/* =============================================================================
   Miracle v3 — home page styles.  OWNER: MCL-V3-001-T11.
   Do NOT edit css/base.css — every colour here is a base.css token, never a
   literal hex, except the four rgba() scrim/overlay values which are alpha
   compositions of --deep and have no token form.

   Contents
     1. Hero              full-bleed hike-bg + scrim, two-up at 851px
     2. Flow strip        Move -> Earn -> Redeem -> Impact under the hero CTA
     3. Founding banner   crown pill (hero card + founding section header)
     4. Intro + heads-up  "what is Miracle", phone-down band
     5. How it works      3 image step cards
     6. Stars             dark band, 5 cards, founding card in gold
     7. Redeem + rewards  3 steps, 5 category tiles
     8. Merchants, founding list, vision, mini FAQ, final CTA
     (2026-09-30 restructure to Amit Mehta's outline; status + launch-city
      sections removed.)
     9. Motion            CSS-only entrance; base.css's prefers-reduced-motion
                          block zeroes animation-duration globally, so there is
                          no second media query to keep in sync here.
   ========================================================================== */

/* ---------- 1. hero -------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;                  /* contains the absolutely-placed image */
  isolation: isolate;
  background: var(--deep);           /* paints before the image lands */
  color: var(--cream);
  padding-block: clamp(52px, 8.5vw, 116px);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
}
/* The scrim. Kept in the same stacking context as the image so it can never be
   dropped independently of it (media/README.md §image-set). Vertical on mobile
   where the copy fills the frame; angled at 851px so the picture reads on the
   right, under the white founding card. */
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(7, 56, 68, .80) 0%,
    rgba(7, 56, 68, .86) 52%,
    rgba(7, 56, 68, .94) 100%);
}
.hero__inner { position: relative; z-index: 1; }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }

.hero h1 { color: #FFFFFF; margin-bottom: var(--s4); }
.hero__eyebrow { color: var(--mint); margin-bottom: var(--s4); }
.hero__sub { color: var(--cream); max-width: 34ch; }
.hero__tagline {
  color: var(--gold);
  margin-top: var(--s5);
  letter-spacing: -.01em;
}
/* 2x2 at base width. Four chips need ~340px and the 360 gutter leaves 320, so
   flex-wrap orphans "Trek" — the differentiator — onto a line of its own.
   max-content columns + justify-items:start keeps the chips their natural size. */
.hero__chips {
  margin-top: var(--s6);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  justify-items: start;
  justify-content: start;
}
.hero__actions { margin-top: var(--s6); gap: var(--s5); }
/* Scoped to .hero__actions, NOT .hero — .hero__card is a WHITE card inside the
   dark hero, and a blanket `.hero .text-link {color:var(--cream)}` made its link
   cream-on-white, i.e. invisible. Light text belongs to the dark half only. */
.hero__actions .text-link { color: var(--cream); border-bottom-color: rgba(234, 255, 239, .45); }
.hero__actions .text-link:hover { color: #FFFFFF; border-bottom-color: #FFFFFF; }

.hero__lockup {
  margin-top: var(--s7);
  padding-top: var(--s4);
  border-top: 1px solid rgba(234, 255, 239, .28);
  align-self: stretch;
}
.hero__lockup .eyebrow {
  margin-bottom: 0;
  color: var(--cream);
  letter-spacing: .28em;
}

.hero__card {
  margin-top: var(--s7);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: clamp(20px, 2.6vw, 30px);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3);
  min-width: 0;
}
.hero__card .pill { margin-bottom: var(--s1); }
.hero__card .text-link { margin-top: var(--s1); }

/* base.css gives both h2 and .lead margin:0, so inside .section-heading they
   touch. Page-level spacing fix; the chassis component itself is T10's. */
.section-heading h2 + .lead { margin-top: var(--s3); }

/* ---------- 2. flow strip (hero) ----------------------------------------- */
.flow {
  list-style: none; margin-top: var(--s6);
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center;
}
.flow__step {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--heading); font-weight: 700; font-size: .95rem; color: var(--cream);
}
.flow__step + .flow__step::before { content: "\2192"; color: var(--mint); margin-right: var(--s1); }
.flow__icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(85, 233, 178, .16);
}
.flow__icon svg, .cat__icon svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.flow__icon svg { stroke: var(--mint); }

/* ---------- 3. founding banner (hero card + section header) --------------- */
/* Amit's sample (2026-09-28): crown + "Founding Members / Exclusive rewards &
   benefits" on a deep-blue pill with a warm glow. */
.fm-banner {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s5) var(--s6);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--deep) 0%, var(--teal) 100%);
  color: #FFFFFF; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(245, 206, 112, .35), 0 12px 40px rgba(245, 206, 112, .28);
  min-width: 0;
}
a.fm-banner { transition: transform var(--dur) var(--ease); }
a.fm-banner:hover { transform: translateY(-2px); }
.fm-banner__crown svg { width: 52px; height: 40px; fill: var(--gold); display: block; }
.fm-banner__text { display: flex; flex-direction: column; min-width: 0; }
.fm-banner__text strong { font-family: var(--heading); font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.fm-banner__text span { color: var(--cream); opacity: .9; }
.fm-banner__go { margin-left: auto; font-size: 1.4rem; color: var(--gold); }
.fm-banner--hero { margin-top: var(--s7); }
.fm-banner--hero { animation: home-rise 620ms var(--ease) 260ms both; }
.fm-banner--big { background: rgba(255, 255, 255, .08); margin-bottom: var(--s6); }
.fm-banner--big .fm-banner__crown svg { width: 64px; height: 48px; }
.fm-banner--big .fm-banner__text strong { font-size: clamp(1.5rem, 3vw, 2rem); }

/* ---------- 4. intro + heads-up ------------------------------------------- */
.intro__inner { text-align: center; }
.intro__inner h2 { margin-bottom: var(--s4); }
.intro__inner .lead { margin-inline: auto; max-width: 58ch; }
.headsup { background: var(--surface-2); padding-block: var(--s8); }
.headsup__inner { display: grid; gap: var(--s6); grid-template-columns: 1fr; align-items: center; }
.headsup__inner > * { min-width: 0; }
.headsup__media { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 10; }
.headsup__media img { width: 100%; height: 100%; object-fit: cover; }
.headsup__copy h2 { color: var(--deep); margin-bottom: var(--s4); }

/* ---------- 5. how it works ----------------------------------------------- */
.steps { list-style: none; display: grid; gap: var(--gap); grid-template-columns: 1fr; }
.steps > * { min-width: 0; }
.steps__card { display: flex; flex-direction: column; gap: var(--s2); position: relative; }
.steps__media { aspect-ratio: 16 / 10; }
/* Portrait source (736x1104) in a 16:10 card: keep the two lead runners in frame. */
.steps__media img.steps__img--runners { object-position: 50% 36%; }
.steps__n {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--mint); color: var(--on-mint); font-family: var(--heading); font-weight: 800;
}
.steps__card h3 { color: var(--deep); }
.steps__chips { margin-top: var(--s2); }

/* ---------- 6. stars (dark band) ------------------------------------------ */
.stars .lead { color: var(--deep-prose); }
.stars__glyph { color: var(--gold); }
.star-grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
.star-grid > * { min-width: 0; }
.star-card {
  padding: var(--s5); border-radius: var(--r-md);
  background: rgba(255, 255, 255, .07);
  border-top: 3px solid var(--mint);
}
.star-card h3 { margin-bottom: var(--s2); }
.star-card--gold { border-top-color: var(--gold); background: rgba(245, 206, 112, .12); }
.stars .fine-print { margin-top: var(--s6); }

/* ---------- 7. redeem + categories ---------------------------------------- */
.redeem { list-style: none; display: grid; gap: var(--gap); grid-template-columns: 1fr; margin-bottom: var(--s5); }
.redeem > * { min-width: 0; }
.redeem__step { border-top: 2px solid var(--line); padding-top: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.redeem__n { font-family: var(--heading); font-weight: 800; font-size: 2rem; color: var(--teal); line-height: 1; }
.redeem__step h3 { color: var(--deep); }
.cats { list-style: none; display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cat {
  display: flex; flex-direction: column; align-items: center; gap: var(--s3); text-align: center;
  padding: var(--s5) var(--s3); border-radius: var(--r-md); background: var(--surface);
  box-shadow: var(--shadow-1); font-family: var(--heading); font-weight: 700; color: var(--deep); min-width: 0;
}
.cat__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-3); color: var(--teal); }
.cat__icon svg { width: 26px; height: 26px; }
.cats__more { margin: var(--s5) auto 0; max-width: none; text-align: center; color: var(--muted); }

/* ---------- 8. merchants, founding, vision, faq, final -------------------- */
.merch { padding: clamp(24px, 4vw, 48px); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.merch__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); }
.merch__copy h2 { max-width: 24ch; color: var(--deep); }

.founding__lead { color: var(--deep-prose); margin-bottom: var(--s5); max-width: 52ch; }
.founding__h { color: var(--gold); margin-bottom: var(--s4); }
.fm-list { list-style: none; display: grid; gap: var(--s3) var(--s6); grid-template-columns: 1fr; margin-bottom: var(--s6); }
.fm-list > li { position: relative; padding-left: 30px; color: var(--deep-prose); min-width: 0; }
.fm-list > li::before { content: "\2605"; position: absolute; left: 0; top: 0; color: var(--gold); font-size: 1.1rem; }
.fm-list strong { color: #FFFFFF; }
.founding__actions { gap: var(--s5); margin-bottom: var(--s4); }
.founding .text-link { color: var(--cream); border-bottom-color: rgba(234, 255, 239, .45); }
.founding .text-link:hover { color: #FFFFFF; border-bottom-color: #FFFFFF; }
.founding .fine-print { color: var(--deep-prose); }

.vision { text-align: center; }
.vision__quote { font-family: var(--heading); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.35; color: var(--deep); margin: 0 auto; max-width: 30ch; }

.mini-faq { display: flex; flex-direction: column; gap: var(--s3); }
.mini-faq details { background: var(--surface); border-radius: var(--r-sm); padding: var(--s4) var(--s5); box-shadow: var(--shadow-1); }
.mini-faq summary { cursor: pointer; font-family: var(--heading); font-weight: 700; color: var(--deep); }
.mini-faq details p { margin-top: var(--s3); }

.final__inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s6); }
.final__title { font-size: clamp(1.8rem, 4.4vw, 3rem); max-width: 20ch; }

/* ---------- 621px and up --------------------------------------------------- */
@media (min-width: 621px) {
  .star-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__sub { max-width: 46ch; }
}

/* ---------- 851px and up --------------------------------------------------- */
@media (min-width: 851px) {
  .hero { padding-block: clamp(96px, 9vw, 132px); }
  .hero__bg::after {
    background:
      linear-gradient(98deg,
        rgba(7, 56, 68, .93) 0%,
        rgba(7, 56, 68, .84) 46%,
        rgba(7, 56, 68, .58) 100%),
      linear-gradient(180deg, rgba(7, 56, 68, .18) 0%, rgba(7, 56, 68, .42) 100%);
  }
  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: var(--s7);
    align-items: center;
  }
  .fm-banner--hero { margin-top: 0; }
  .headsup__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .star-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .redeem { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .star-card--gold { grid-column: span 2; }
}

/* ---------- 9. motion ------------------------------------------------------ */
/* Vertical only — a horizontal transform would move an element past clientWidth
   mid-animation and the overflow gate samples a live page.
   base.css already zeroes animation-duration under prefers-reduced-motion. */
@keyframes home-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero__copy > *,
.hero__card {
  animation: home-rise 620ms var(--ease) both;
}
.hero__copy > :nth-child(1) { animation-delay: 0ms; }
.hero__copy > :nth-child(2) { animation-delay: 60ms; }
.hero__copy > :nth-child(3) { animation-delay: 120ms; }
.hero__copy > :nth-child(4) { animation-delay: 170ms; }
.hero__copy > :nth-child(5) { animation-delay: 220ms; }
.hero__copy > :nth-child(6) { animation-delay: 270ms; }
.hero__copy > :nth-child(7) { animation-delay: 320ms; }
.hero__copy > :nth-child(8) { animation-delay: 370ms; }
.hero__card { animation-delay: 260ms; }

/* MCL-CONV-006 B3: benefits listed inside the hero card (no scroll-jump). */
.fm-banner__perks { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: 2px; font-size: .9rem; }
.fm-banner__perks li { color: var(--cream); opacity: .9; padding-left: 1.1em; position: relative; }
.fm-banner__perks li::before { content: "\2605"; position: absolute; left: 0; color: var(--gold); font-size: .8em; top: .15em; }

/* MCL-SITE-REFERRAL-001-T04 (spec W4/D8): "Coming live January 2027" badge, base .pill--gold. */
.launch-badge { align-self:flex-start; max-width:100%; white-space:normal; margin-bottom:var(--s3); }

/* Round 3 (Amit 2026-10-28) item 4: "It's 100% free. Easy to register. No
   subscriptions required." in the hero's open space, under the CTAs. */
.free-line {
  margin-top: var(--s5);
  max-width: 100%;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-sm);
  background: rgba(85, 233, 178, .14);
  box-shadow: inset 0 0 0 1px rgba(85, 233, 178, .45);
  font-family: var(--heading); font-weight: 700; font-size: .95rem; line-height: 1.4;
  color: #FFFFFF;
}
.free-line strong { color: var(--mint); font-weight: 800; }

/* Round 3 item 1: the pre-registration count under the hero. The card itself
   is css/counter.css (shared with /founding/ and /join/). */
.prereg__inner { display: grid; grid-template-columns: 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.prereg__inner > * { min-width: 0; }
.prereg__copy { display: flex; flex-direction: column; gap: var(--s3); }
.prereg__copy h2 { margin: 0; }
@media (min-width: 851px) {
  .prereg__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Round 3 fix: "Pre-registration is open" + "Coming live January 2027" on one row. */
.hero__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s4); min-width: 0; }
.hero__status .hero__eyebrow,
.hero__status .launch-badge { margin-bottom: 0; }
