/* =========================================================================
   I Gotchoo marketing site
   Layout/rhythm reference: https://www.amyfoodjournal.com/ (nav -> hero ->
   numbered how-it-works -> feature grid -> story -> proof -> CTA -> big
   rounded brand footer).
   Palette/type/radius are the APP's own tokens, transcribed from
   src/theme/tokens.ts. Nothing here is imported by the app.

   Motion, materials and type follow Apple's design guidance (WWDC 2018
   "Designing Fluid Interfaces", WWDC 2020 "The Details of UI Typography")
   as distilled in .claude/skills/apple-design/SKILL.md:
   - every transition is a critically damped spring (damping 1.0), so it
     can be retargeted mid-flight without a jump and never overshoots;
   - feedback lands on pointer-down, not on release;
   - only transform, opacity and filter animate (compositor properties);
   - chrome is a translucent material, with a scroll-edge that appears only
     once content is underneath it;
   - tracking and leading are size-specific, and every spacing value is in
     rem so the layout scales with the reader's text-size setting;
   - reduced motion swaps slides for cross-fades rather than removing
     feedback; reduced transparency and increased contrast are honoured.
   ========================================================================= */

/* ---- tokens (mirror of src/theme/tokens.ts) ---------------------------- */
:root {
  --brand:        #244D3E; /* Forest green, October 2026 refresh */
  --brand-hover:  #2E7A50; /* C.greenInk */
  --brand-light:  #62C58A; /* C.green */
  --tint:         #D6F0DC; /* C.tint */
  --tint-faint:   #EAF6EE; /* C.tintFaint */
  --track:        #C8E7D5; /* C.track */

  --ink:          #1B2236; /* C.ink */
  --body:         #3F4759; /* C.body */
  --mute:         #667085; /* C.mute, darkened for body-copy contrast on white */

  --bg:           #FBF9F2; /* warm paper */
  --bg-soft:      #F4F7F5; /* C.bg, lifted and cooled for web contrast */
  --border:       #DFE5E1; /* C.border, deepened so card edges actually read */

  --deep:         #143A20; /* the app's "at a glance" dark card */
  --deep-2:       #0C2413;

  /* materials: the nav bar and the mobile menu are one translucent layer
     with content scrolling underneath. Hairline is the scroll-edge line. */
  --material:      rgba(255,255,255,.72);
  --material-blur: saturate(180%) blur(20px);
  --hairline:      rgba(27,34,54,.09);
  --scrim:         rgba(27,34,54,.28);

  --r-lg: 32px;
  --r-md: 24px;
  --r-pill: 999px;

  --shadow-card:  0 1px 2px rgba(16,24,40,.05), 0 4px 10px -6px rgba(16,24,40,.14);
  --shadow-cta:   0 6px 16px -6px rgba(69,162,108,.55);
  --shadow-lift:  0 18px 40px -22px rgba(16,24,40,.5);
  /* a sheet is a bigger surface than a chip, so it reads thicker: deeper shadow */
  --shadow-sheet: 0 24px 48px -24px rgba(16,24,40,.38);

  /* motion. Apple's two spring parameters, damping ratio + response:
     damping 1.0 everywhere (critically damped, no overshoot; nothing on this
     site is thrown or flicked, so nothing earns bounce). Response 0.3s for
     surfaces, 0.2s for small parts. The curve below is that spring sampled
     into linear(); the durations are its settle times (remaining < 0.1%).
     Fallback for browsers without linear() is set in @supports below. */
  --spring: cubic-bezier(.2, .8, .2, 1);
  --spring-dur: .44s;        /* response .3s */
  --spring-dur-fast: .29s;   /* response .2s */
  --press-dur: 80ms;         /* pointer-down feedback: effectively instant */
  --fade-dur: .2s;

  /* type: tracking is size-specific, never one value for every size.
     Large text tightens, body sits at 0, small text opens up slightly. */
  --track-display: -0.032em; /* 36px and up */
  --track-title:   -0.024em; /* 28 to 36px */
  --track-heading: -0.014em; /* 20 to 27px */
  --track-subhead: -0.006em; /* 17 to 19px */
  --track-body:     0;
  --track-small:    0.008em; /* 15px and under */
  --track-caps:     0.1em;   /* uppercase labels */

  /* spacing scales with the reader's text size: rem, not px */
  --gutter: clamp(1.25rem, 5vw, 3.75rem);
  --section-y: clamp(3.5rem, 8vw, 5.75rem);
  --maxw: 73.75rem;
  --nav-h: 4.625rem;
}

@supports (animation-timing-function: linear(0, 0.5, 1)) {
  :root {
    --spring: linear(
      0, 0.0344, 0.1145, 0.2151, 0.3209, 0.423, 0.5166, 0.5995, 0.6712,
      0.7322, 0.7832, 0.8255, 0.8602, 0.8885, 0.9114, 0.9298, 0.9445,
      0.9563, 0.9657, 0.9731, 0.9789, 0.9835, 0.9872, 0.99, 0.9922,
      0.994, 0.9953, 0.9964, 0.9972, 0.9978, 0.9983, 0.9987, 1
    );
  }
}

/* ---- reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + .875rem);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* 17px at the default setting, and it follows the reader's text-size preference */
  font-size: 106.25%;
  line-height: 1.6;
  letter-spacing: var(--track-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 3px; border-radius: 6px; }

/* ---- layout primitives ------------------------------------------------- */
.wrap {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  /* keeps content clear of the notch on a landscape iPhone (viewport-fit=cover) */
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--tint-faint); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--brand-hover); background: var(--tint);
  padding: .4375rem .875rem; border-radius: var(--r-pill); margin-bottom: 1.25rem;
}
.eyebrow::before { content: ""; width: .375rem; height: .375rem; border-radius: 50%; background: var(--brand); }
.eyebrow--on-dark { background: rgba(98,197,138,.2); color: #9FE0B9; }
.eyebrow--on-dark::before { background: #9FE0B9; }

h1 { font-size: clamp(2.3rem, 5.4vw, 3.65rem); font-weight: 800; line-height: 1.06; letter-spacing: var(--track-display); }
h2 { font-size: clamp(1.95rem, 3.9vw, 3rem); font-weight: 800; line-height: 1.12; letter-spacing: var(--track-title); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; line-height: 1.25; letter-spacing: var(--track-heading); }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.28rem); line-height: 1.5; color: var(--body); }
.section-head { max-width: 45rem; margin-inline: auto; text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { margin-top: 1rem; }

/* ---- buttons ----------------------------------------------------------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .625rem;
  font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1; letter-spacing: var(--track-body);
  padding: 1.0625rem 1.875rem; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; max-width: 100%;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: transform var(--spring-dur-fast) var(--spring), background-color .15s ease, color .15s ease, border-color .15s ease;
}
/* feedback lives on the press, instantly; the release springs back */
.btn:active { transform: scale(.97); transition-duration: var(--press-dur); transition-timing-function: ease-out; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:hover:active { transform: translateY(0) scale(.97); }
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }
/* the CTA shadow lives on a pseudo-element so pressing fades it (opacity,
   compositor) instead of re-rasterising a box-shadow every frame */
.btn--primary::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  box-shadow: var(--shadow-cta); transition: opacity .15s ease;
}
.btn--primary:active::after { opacity: .45; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--border); box-shadow: var(--shadow-card); }
.btn--ghost:hover { color: var(--ink); border-color: var(--track); background: var(--tint-faint); }
.btn--sm { padding: .75rem 1.375rem; font-size: .94rem; }
.btn svg { flex: none; }

/* ---- nav (translucent material, content scrolls underneath) ------------ */
.top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.nav {
  /* above the sheet (60) and the scrim (59): the sheet emerges from under the bar */
  position: sticky; top: 0; z-index: 61;
  background: var(--material);
  -webkit-backdrop-filter: var(--material-blur);
  backdrop-filter: var(--material-blur);
}
/* scroll edge: a hairline plus a soft shadow, shown only once content has
   scrolled beneath the bar. At the top of the page the bar is just the page. */
.nav::before, .nav::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; pointer-events: none;
  opacity: 0; transition: opacity .25s ease;
}
.nav::before { height: 1px; background: var(--hairline); }
.nav::after { height: .75rem; background: linear-gradient(to bottom, rgba(27,34,54,.06), rgba(27,34,54,0)); }
.nav[data-scrolled="true"]::before, .nav[data-scrolled="true"]::after { opacity: 1; }
/* the open menu continues the material downward, so the edge belongs to it */
.nav[data-open="true"]::before, .nav[data-open="true"]::after { opacity: 0; }

.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6875rem; color: var(--ink); font-weight: 800; font-size: 1.09rem; letter-spacing: var(--track-subhead); }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: var(--shadow-card); }
.nav__links { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.75rem); }
/* vibrancy: over a translucent surface, text is ink rather than flat gray,
   with a small tracking bump. Padding gives each link a taller hit area. */
.nav__links a:not(.btn) {
  color: var(--ink); font-size: .97rem; font-weight: 500; letter-spacing: .01em;
  padding: .5rem .125rem;
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: .45em;
  transition: color .15s ease, text-decoration-color .2s ease;
}
.nav__links a:not(.btn):hover { color: var(--brand-hover); }
.nav__links a:not(.btn)[aria-current="true"] { color: var(--brand-hover); text-decoration-color: var(--brand-light); }

.nav__toggle {
  display: none; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
  padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform var(--spring-dur-fast) var(--spring), background-color .15s ease;
}
.nav__toggle:active { transform: scale(.92); transition-duration: var(--press-dur); transition-timing-function: ease-out; }
/* the glyph morphs between menu and close in place: status feedback for the
   press, and the same element on both sides of the transition */
.nav__toggle rect {
  transform-box: fill-box; transform-origin: center;
  transition: transform var(--spring-dur-fast) var(--spring), opacity .12s ease;
}
.nav[data-open="true"] .nav__toggle .bar-top { transform: translateY(5px) rotate(45deg); }
.nav[data-open="true"] .nav__toggle .bar-mid { opacity: 0; transform: scaleX(.3); }
.nav[data-open="true"] .nav__toggle .bar-bot { transform: translateY(-5px) rotate(-45deg); }

/* the mobile menu overlays the page rather than reflowing it. It emerges
   from the toggle (origin top right), materialises (blur + scale + opacity
   together) on a critically damped spring, and leaves along the same path.
   It stays rendered while closed so a re-tap mid-dismiss simply retargets
   the running transition from wherever it is. It is a sibling of the bar,
   not a child, because a backdrop-filter inside a backdrop-filtered ancestor
   can only sample that ancestor, never the page. */
.nav__mobile {
  display: none; position: fixed; left: 0; right: 0; top: var(--nav-h); z-index: 60;
  background: var(--material);
  -webkit-backdrop-filter: var(--material-blur);
  backdrop-filter: var(--material-blur);
  border-bottom: 1px solid var(--hairline);
  box-shadow: var(--shadow-sheet);
  transform-origin: top right;
  opacity: 0; visibility: hidden;
  transform: translateY(-.5rem) scale(.98); filter: blur(6px);
  will-change: transform, opacity, filter;
  transition:
    opacity var(--fade-dur) ease,
    filter var(--fade-dur) ease,
    transform var(--spring-dur) var(--spring),
    visibility 0s linear var(--spring-dur);
}
.nav__mobile[data-open="true"] {
  opacity: 1; visibility: visible; transform: none; filter: blur(0);
  transition-delay: 0s, 0s, 0s, 0s;
}
.nav__mobile ul {
  list-style: none; display: grid; gap: .25rem;
  padding: .875rem max(var(--gutter), env(safe-area-inset-right)) 1.375rem max(var(--gutter), env(safe-area-inset-left));
}
.nav__mobile a:not(.btn) {
  display: block; padding: .75rem .25rem; color: var(--ink); font-weight: 500; letter-spacing: .01em;
  border-radius: .5rem; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: color .15s ease, background-color .15s ease;
}
.nav__mobile a:not(.btn):active { background: var(--tint-faint); color: var(--brand-hover); }
.nav__mobile a:not(.btn)[aria-current="true"] { color: var(--brand-hover); }
.nav__mobile .btn { width: 100%; margin-top: .625rem; }

/* dim to focus: the menu is a task, so the page behind it steps back and a
   tap anywhere on it is the way out */
.scrim {
  position: fixed; inset: 0; z-index: 59; background: var(--scrim);
  opacity: 0; visibility: hidden; touch-action: none; -webkit-tap-highlight-color: transparent;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.scrim[data-open="true"] { opacity: 1; visibility: visible; transition-delay: 0s; }

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__mobile { display: block; }
}
@media (min-width: 881px) { .scrim { display: none; } }

/* ---- hero -------------------------------------------------------------- */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 5.25rem); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: 1.375rem; }
.hero .lead { max-width: 44ch; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: .875rem; margin-top: 2.125rem; }
.hero__note { margin-top: .875rem; font-size: .9rem; letter-spacing: var(--track-small); color: var(--mute); }
.hero__art { position: relative; display: flex; justify-content: center; }
.hero__art .phone { position: relative; z-index: 1; }

.hero__stats { display: flex; flex-wrap: wrap; gap: clamp(1.25rem, 4vw, 2.75rem); margin-top: 2.625rem; padding-top: 1.875rem; border-top: 1px solid var(--border); }
.hero__stat strong { display: block; font-size: 1.55rem; font-weight: 800; color: var(--ink); letter-spacing: var(--track-heading); line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero__stat span { font-size: .88rem; letter-spacing: var(--track-small); color: var(--body); }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { max-width: 46ch; margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__stats { justify-content: center; text-align: center; }
}

/* ---- phone frame ------------------------------------------------------- */
.phone {
  width: 100%; max-width: 336px; padding: 9px;
  background: linear-gradient(160deg, #313B52 0%, #1B2236 55%, #121826 100%);
  border-radius: 44px;
  box-shadow: var(--shadow-lift), inset 0 0 0 1px rgba(255,255,255,.14);
}
.phone img { border-radius: 36px; width: 100%; height: auto; background: var(--bg-soft); }
.phone--hero { max-width: 348px; }

/* ---- how it works ------------------------------------------------------ */
.how__grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(2.25rem, 6vw, 5rem); align-items: center; }
.how__art { display: flex; justify-content: center; }
.steps { display: grid; gap: clamp(1.625rem, 3vw, 2.375rem); margin-top: 2.5rem; }
.step { position: relative; padding-right: clamp(3.5rem, 8vw, 6rem); }
.step + .step { border-top: 1px solid var(--border); padding-top: clamp(1.625rem, 3vw, 2.375rem); }
.step__num {
  position: absolute; top: -.75rem; right: 0;
  font-size: clamp(3rem, 6vw, 4.4rem); font-weight: 800; line-height: 1;
  color: var(--tint); letter-spacing: -0.05em; user-select: none; font-variant-numeric: tabular-nums;
}
.step h3 { margin-bottom: .5rem; position: relative; z-index: 1; }
.step p { position: relative; z-index: 1; }

@media (max-width: 900px) { .how__grid { grid-template-columns: 1fr; } .how__art { order: 2; } }

/* ---- feature grid ------------------------------------------------------ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.375rem, 2.6vw, 2.125rem); }
.feature { display: flex; flex-direction: column; }
/* the tiles are not pressable, so they do not lift on hover: a hover lift
   promises a tap target that is not there */
.feature__shot {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: .625rem; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.feature__shot img {
  /* `height: auto` is load-bearing: the <img height="..."> attribute is a
     presentational hint, and with both width and height definite the browser
     ignores aspect-ratio entirely and renders the tile at the source height. */
  width: 100%; height: auto; aspect-ratio: 5 / 4;
  object-fit: cover; object-position: top center;
  border-radius: 14px; background: var(--bg-soft);
}
.feature h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: var(--track-subhead); margin: 1.375rem 0 .4375rem; text-align: center; }
.feature p { font-size: .97rem; color: var(--body); line-height: 1.6; text-align: center; }

@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* ---- topics ------------------------------------------------------------ */
.topics { display: flex; flex-wrap: wrap; gap: .625rem; justify-content: center; max-width: 55rem; margin: 0 auto; }
.topic {
  background: #fff; border: 1px solid var(--track); color: var(--brand-hover);
  font-size: .95rem; font-weight: 600; padding: .6875rem 1.25rem; border-radius: var(--r-pill);
  box-shadow: 0 1px 2px rgba(20,34,60,.04);
}

/* ---- story ------------------------------------------------------------- */
.story__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(2.25rem, 6vw, 4.75rem); align-items: center; }
.story h2 { margin-bottom: 1.375rem; }
.story p + p { margin-top: 1.125rem; }
.story__quote {
  margin-top: 1.875rem; padding: 1.5rem 1.625rem; background: var(--tint-faint);
  border-left: 4px solid var(--brand-light); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--ink); font-size: 1.06rem; font-weight: 600; line-height: 1.55; text-wrap: pretty;
}
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.collage__tile {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 1.125rem; box-shadow: var(--shadow-card); text-align: center;
}
/* capped at 280 so the 560px source is a clean 2x on retina rather than
   being stretched past its native resolution */
.collage__tile img { width: 100%; max-width: 280px; height: auto; margin-inline: auto; }
.collage__tile--wide { grid-column: 1 / -1; }
.collage__tile strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--ink); letter-spacing: var(--track-heading); margin-top: .625rem; font-variant-numeric: tabular-nums; }
.collage__tile span { font-size: .84rem; letter-spacing: var(--track-small); color: var(--mute); }
.collage__tile--offset { transform: translateY(1.125rem); }

@media (max-width: 900px) {
  .story__grid { grid-template-columns: 1fr; }
  .collage__tile--offset { transform: none; }
}

/* ---- safety (dark panel) ----------------------------------------------- */
.panel {
  background: linear-gradient(155deg, var(--deep) 0%, var(--deep-2) 100%);
  border-radius: var(--r-lg); color: #fff;
  padding: clamp(2.125rem, 5vw, 3.75rem);
  box-shadow: var(--shadow-lift);
}
.panel h2, .panel h3 { color: #fff; }
.panel__head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.panel__head p { color: rgba(255,255,255,.74); margin-top: 1rem; }
.safety { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.125rem, 2.4vw, 1.75rem); }
.safety__card {
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-md); padding: 1.625rem;
}
.safety__icon {
  width: 2.75rem; height: 2.75rem; border-radius: 13px; margin-bottom: 1.125rem;
  background: rgba(98,197,138,.22); color: #A6E4BE;
  display: flex; align-items: center; justify-content: center;
}
.safety__card h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: var(--track-subhead); margin-bottom: .5rem; }
.safety__card p { color: rgba(255,255,255,.72); font-size: .97rem; line-height: 1.55; }
.panel__foot {
  margin-top: clamp(1.5rem, 3vw, 2.125rem); padding: 1.25rem 1.5rem;
  background: rgba(0,0,0,.22); border-radius: var(--r-md);
  color: rgba(255,255,255,.8); font-size: .95rem; line-height: 1.6;
}
.panel__foot strong { color: #fff; }

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

/* ---- pricing ----------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.375rem; max-width: 47.5rem; margin: 0 auto; }
.plan {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.875rem 1.75rem; box-shadow: var(--shadow-card);
}
.plan--best { border-color: var(--brand-light); box-shadow: 0 0 0 3px var(--tint), var(--shadow-card); }
.plan__tag {
  position: absolute; top: -.8125rem; left: 1.75rem;
  background: var(--brand); color: #fff; font-size: .74rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; padding: .375rem .8125rem; border-radius: var(--r-pill);
}
.plan h3 { font-size: 1.06rem; font-weight: 700; color: var(--mute); letter-spacing: .02em; }
.plan__price { display: flex; align-items: baseline; gap: .4375rem; margin: .75rem 0 .375rem; }
.plan__price strong { font-size: 2.5rem; font-weight: 800; color: var(--ink); letter-spacing: var(--track-display); line-height: 1; font-variant-numeric: tabular-nums; }
.plan__price span { color: var(--mute); font-size: .98rem; }
.plan__sub { font-size: .93rem; color: var(--body); }
.plan-note { max-width: 40rem; margin: 1.875rem auto 0; font-size: .9rem; letter-spacing: var(--track-small); color: var(--mute); line-height: 1.6; text-align: center; }

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

/* ---- final CTA --------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 1.125rem; }
.cta-band .lead { max-width: 52ch; margin: 0 auto 2.125rem; }
.cta-band .hero__note { margin-top: 1rem; }

/* ---- footer ------------------------------------------------------------ */
.footer {
  background: var(--brand); color: #fff;
  border-radius: 48px 48px 0 0;
  padding: clamp(3rem, 6vw, 4.5rem) 0 calc(2.125rem + env(safe-area-inset-bottom));
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.footer a { color: rgba(255,255,255,.88); }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: clamp(1.75rem, 4vw, 3rem); }
.footer__brand { display: inline-flex; align-items: center; gap: .6875rem; color: #fff; font-weight: 800; font-size: 1.12rem; letter-spacing: var(--track-subhead); }
.footer__brand:hover { color: #fff; text-decoration: none; }
.footer__brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.footer__blurb { margin-top: 1.125rem; max-width: 34ch; color: rgba(255,255,255,.82); font-size: .96rem; line-height: 1.62; }
.footer h3 { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.72); margin-bottom: 1rem; }
.footer ul { list-style: none; display: grid; gap: .6875rem; font-size: .97rem; }
.footer__bottom {
  margin-top: clamp(2.25rem, 4vw, 3.25rem); padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.22);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between;
  font-size: .87rem; letter-spacing: var(--track-small); color: rgba(255,255,255,.78);
}
.footer__crisis {
  margin-top: 1.625rem; padding: 1.125rem 1.375rem; background: rgba(255,255,255,.13);
  border-radius: var(--r-md); font-size: .92rem; line-height: 1.6; color: rgba(255,255,255,.92);
}
.footer__crisis strong { color: #fff; }

@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  /* inline footer links are ~26px tall, which is under the comfortable touch
     minimum; padding lifts each row to ~44 without changing the desktop rhythm */
  .footer ul { gap: .125rem; }
  .footer li a { display: block; padding: .5625rem 0; }
}
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---- legal pages ------------------------------------------------------- */
.legal-hero { background: linear-gradient(180deg, var(--tint-faint) 0%, #FFFFFF 100%); padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(1.75rem, 4vw, 2.75rem); border-bottom: 1px solid var(--border); }
.legal-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: var(--track-title); }
.legal-hero p { margin-top: 1rem; color: var(--mute); }
.legal-hero .updated {
  display: inline-block; margin-top: 1.25rem; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: .5rem 1rem; font-size: .87rem; letter-spacing: var(--track-small); font-weight: 600; color: var(--brand-hover);
  font-variant-numeric: tabular-nums;
}

.legal-layout { display: grid; grid-template-columns: 16.125rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; padding-block: clamp(2.5rem, 5vw, 4rem); }
.toc {
  position: sticky; top: calc(var(--nav-h) + 1.625rem); max-height: calc(100vh - var(--nav-h) - 3.5rem);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  interpolate-size: allow-keywords;
}
.toc summary {
  font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--mute); margin-bottom: .875rem; list-style: none; cursor: default;
}
.toc summary::-webkit-details-marker { display: none; }
/* on the wide layout the list is always open, so the label is not a control */
@media (min-width: 961px) { .toc summary { pointer-events: none; } }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1875rem; counter-reset: toc; }
.toc a {
  display: block; padding: .4375rem .75rem; border-radius: 9px; font-size: .89rem; line-height: 1.4; letter-spacing: var(--track-small);
  color: var(--body); font-weight: 500;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color .15s ease, color .15s ease;
}
.toc a:hover { background: var(--tint-faint); color: var(--brand-hover); }
.toc a:active { background: var(--tint); color: var(--brand-hover); transition-duration: var(--press-dur); }
/* where am I: the section in view is marked on the list */
.toc a[aria-current="true"] { background: var(--tint-faint); color: var(--brand-hover); font-weight: 600; }
/* the list opens and closes on the spring where the browser can animate
   height: auto (interpolate-size); elsewhere it steps, as it always did */
.toc details::details-content {
  height: 0; overflow: clip;
  transition: height var(--spring-dur) var(--spring), content-visibility var(--spring-dur) allow-discrete;
}
.toc details[open]::details-content { height: auto; }

.legal-body { max-width: 74ch; }
.legal-body > p { margin-bottom: 1.125rem; line-height: 1.65; }
.legal-body h2 {
  font-size: clamp(1.18rem, 1.9vw, 1.42rem); font-weight: 700; line-height: 1.3; letter-spacing: var(--track-heading);
  margin: 2.75rem 0 1rem; padding-top: .875rem; border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-h) + 1.375rem);
}
.legal-body h2:first-of-type { margin-top: .5rem; }
.legal-body h2 .n { color: var(--brand); font-variant-numeric: tabular-nums; margin-right: .5rem; }
.legal-body ul { list-style: none; display: grid; gap: .6875rem; margin: 0 0 1.25rem; }
.legal-body li { position: relative; padding-left: 1.625rem; line-height: 1.65; text-wrap: pretty; }
.legal-body li::before {
  content: ""; position: absolute; left: .25rem; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-light);
}
.legal-body .intro {
  background: var(--tint-faint); border: 1px solid var(--track);
  border-radius: var(--r-md); padding: 1.375rem 1.5rem; margin-bottom: 1.875rem; color: var(--ink);
}
.legal-body .intro p + p { margin-top: .75rem; }

@media (max-width: 960px) {
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.125rem 1.25rem; background: var(--bg-soft); }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); margin-top: .375rem; }
  /* below the desktop breakpoint the list collapses, so the summary is a control */
  .toc summary {
    cursor: pointer; margin-bottom: 0; display: flex; align-items: center; justify-content: space-between;
    padding: .25rem 0; color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .toc summary::after {
    content: ""; width: 9px; height: 9px; margin-left: .75rem; flex: none;
    border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform var(--spring-dur-fast) var(--spring);
  }
  .toc details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
}

/* ---- touch: comfortable targets on coarse pointers --------------------- */
@media (pointer: coarse) {
  .toc a { min-height: 2.75rem; display: flex; align-items: center; }
  .btn--sm { padding-block: .875rem; }
}

/* ---- misc -------------------------------------------------------------- */
.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -140%);
  background: var(--ink); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 12px 12px; z-index: 100;
  transition: transform var(--spring-dur-fast) var(--spring);
}
.skip-link:focus { transform: translate(-50%, 0); color: #fff; }

/* ---- preferences ------------------------------------------------------- */
/* reduced motion is not no feedback: slides, scales and blurs become short
   cross-fades or instant states, and colour changes stay */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav__toggle { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
  .btn:hover, .btn:active, .nav__toggle:active { transform: none; }
  .nav__toggle rect { transition: opacity .15s ease; }
  .nav__mobile { transform: none; filter: none; transition: opacity var(--fade-dur) ease, visibility 0s linear var(--fade-dur); }
  .nav__mobile[data-open="true"] { transition-delay: 0s, 0s; }
  .skip-link { transition: none; }
  .toc summary::after { transition: none; }
  .toc details::details-content { transition: none; }
}
/* frostier chrome when translucency is turned down */
@media (prefers-reduced-transparency: reduce) {
  .nav, .nav__mobile { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav__mobile { filter: none; }
  .scrim { background: rgba(27,34,54,.45); }
}
/* near-solid surfaces with defined edges when more contrast is asked for */
@media (prefers-contrast: more) {
  .nav, .nav__mobile { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav::before { opacity: 1; background: var(--ink); }
  .nav__mobile { border-bottom-color: var(--ink); }
  .btn--ghost, .nav__toggle { border-color: var(--ink); }
  .feature__shot, .plan, .collage__tile, .toc, .legal-body .intro, .legal-hero .updated { border-color: var(--body); }
  .hero__note, .plan-note, .collage__tile span, .legal-hero p { color: var(--body); }
  .scrim { background: rgba(27,34,54,.6); }
}
