/* =========================================================================
   Home page
   ========================================================================= */

/* ---------- Hero -------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}

/* Soft sage glow behind the illustration */
.hero::before {
  content: "";
  position: absolute;
  top: -10rem;
  right: -12rem;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(163, 177, 138, 0.32) 0%, rgba(163, 177, 138, 0) 65%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero__lede {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1.5rem;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hero__facts li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero__facts li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--sage);
}

.hero__visual { position: relative; }

.hero-map {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* The dotted route "marches" forward like a runner on the move */
.hero-route {
  stroke-dasharray: 0.1 14;
  animation: route-march 1.2s linear infinite;
}
@keyframes route-march { to { stroke-dashoffset: -28.2; } }

.hero-pin { animation: pin-bob 2.8s ease-in-out infinite; }
@keyframes pin-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.reveal--late { animation-delay: 0.15s; }

/* Little info chips floating over the illustration */
.map-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 12px 28px -14px rgba(42, 39, 34, 0.45);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
  animation: chip-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.map-chip svg { width: 1rem; height: 1rem; color: var(--ember-deep); }

.map-chip--distance { left: 4%; bottom: 7%; animation-delay: 0.5s; }
.map-chip--verified { left: 40%; top: 6%; animation-delay: 0.8s; }
.map-chip--inferred { right: 3%; top: 52%; animation-delay: 1.1s; }

.map-chip__dot {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  font-size: 0.8rem;
}
.map-chip__dot--verified { background: var(--sage-soft); color: var(--forest-deep); }
.map-chip__dot--inferred { background: #F1E6D2; color: #6B5639; }

@keyframes chip-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 40rem; }
}

@media (max-width: 520px) {
  .map-chip { font-size: 0.75rem; padding: 0.4rem 0.7rem; }
  .map-chip--verified { left: 4%; top: 4%; }
  .map-chip--inferred { right: 3%; top: auto; bottom: 22%; }
}

/* ---------- How it works ------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
}
.step p { margin: 0; color: var(--ink-soft); }

.step__number {
  position: absolute;
  top: 1.4rem;
  right: 1.5rem;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--sage-soft);
}

.step__icon {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.1rem;
  padding: 0.6rem;
  border-radius: 14px;
  background: var(--sage-soft);
  color: var(--forest);
}

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Featured categories ---------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: inherit;
}
.category-card img {
  width: 100%;
  height: auto;
  padding: 0.75rem 0.75rem 0;
}
.category-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.35rem 1.4rem; }
.category-card__body p { color: var(--ink-soft); font-size: 0.95rem; }
.category-card__link { margin-top: auto; font-weight: 600; color: var(--ember-deep); }

@media (max-width: 1000px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .category-grid { grid-template-columns: 1fr; } }

/* ---------- Example runs ----------------------------------------------- */
.example-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.example-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-top: 4px solid var(--sage);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.example-card:nth-child(2) { border-top-color: var(--ember); }
.example-card:nth-child(3) { border-top-color: var(--clay); }
.example-card:nth-child(4) { border-top-color: var(--forest); }
.example-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.example-card h3 { font-size: 1.2rem; }
.example-card p { color: var(--ink-soft); font-size: 0.95rem; }
.example-card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.example-card__link { margin-top: auto; font-weight: 600; text-decoration: none; }
.example-card__link:hover { text-decoration: underline; }

@media (max-width: 1000px) { .example-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .example-grid { grid-template-columns: 1fr; } }

/* ---------- Honesty legend --------------------------------------------- */
.honest {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.honest__copy p { color: var(--ink-soft); font-size: 1.05rem; }

.honest__legend {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 1.75rem;
  list-style: none;
}
.honest__legend li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  align-items: center;
  gap: 1rem;
}
.honest__legend .badge { justify-self: start; font-size: 0.85rem; }

@media (max-width: 860px) {
  .honest { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .honest__legend li { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* ---------- Closing call to action -------------------------------------- */
.cta-band {
  padding-block: clamp(3rem, 7vw, 5rem);
  background-color: var(--forest);
  /* Topographic lines drawn as a repeating SVG pattern */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='2'%3E%3Cpath d='M-20 60 C40 20 90 100 150 60 S240 40 260 70'/%3E%3Cpath d='M-20 120 C40 80 90 160 150 120 S240 100 260 130'/%3E%3Cpath d='M-20 180 C40 140 90 220 150 180 S240 160 260 190'/%3E%3C/g%3E%3C/svg%3E");
  color: #fff;
}
.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cta-band h2 { margin: 0; color: #fff; max-width: 32rem; }
