/* ==========================================================================
   Replenish — landing page styles
   Colour, type and geometry all come from tokens.css, which is shared with
   the transactional emails. Do not hard-code hex values in this file.
   ========================================================================== */

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.55;
  color: var(--ink);
  overflow-x: hidden;
  background: var(--page-bg);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

/* Universal visible focus */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 8px;
}

.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

/* Skip link — keyboard users land here first */
.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -200%);
  z-index: 999;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--espresso);
  color: var(--on-dark);
  font-weight: 800;
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1 {
  margin: 0 0 22px;
  font-size: clamp(46px, 7.4vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.035em;
}
h2 {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
h3 { margin: 0; }

.orange { color: var(--orange-dark); }  /* AA on cream, unlike raw --orange */

.lead {
  max-width: 640px;
  margin: 0 0 22px;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--muted);
}

.section-copy { margin: 0; font-size: 18px; color: var(--muted); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 0.86fr;
  gap: 30px;
  align-items: end;
  margin-bottom: 34px;
}
.section-head.single { grid-template-columns: 1fr; max-width: 820px; }

section { padding: 82px 0; }

/* --------------------------------------------------------------------------
   4. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 14px;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.glass-nav {
  pointer-events: auto;
  width: min(920px, calc(100vw - 48px));
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 248, 242, 0.48)),
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.86), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(255, 107, 53, 0.15), transparent 32%);
  box-shadow:
    0 20px 58px rgba(31, 22, 12, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(26px) saturate(1.65);
  -webkit-backdrop-filter: blur(26px) saturate(1.65);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
.nav-links.left  { justify-content: flex-end; }
.nav-links.right { justify-content: flex-start; }

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-links a:hover { background: rgba(255, 107, 53, 0.12); color: var(--orange-deep); }

.logo-lockup {
  justify-self: center;
  display: grid;
  place-items: center;
  width: min(300px, 28vw);
  min-width: 230px;
  height: 46px;
}
.logo-lockup img { width: 100%; height: auto; max-height: 46px; object-fit: contain; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 15px 30px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  font-size: 17px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary {
  background: var(--orange-action);
  color: #fff;
  box-shadow: 0 16px 36px rgba(198, 63, 20, 0.32);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 20px 44px rgba(255, 107, 53, 0.36);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { transform: translateY(-2px); background: #fff; }

/* --------------------------------------------------------------------------
   6. CTA cluster (button + trial note + store badges)
   -------------------------------------------------------------------------- */
.cta-cluster { display: grid; gap: 14px; justify-items: start; }

.cta-note {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.store-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.store-row a { display: inline-flex; align-items: center; min-height: 50px; }
.store-badge {
  height: 50px;
  width: auto;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.store-badge:hover { transform: translateY(-2px); filter: brightness(1.04); }

/* --------------------------------------------------------------------------
   7. Phone frames — shared by hero, steps, preview
   -------------------------------------------------------------------------- */
.iphone-mock {
  position: relative;
  /* box-sizing:border-box makes aspect-ratio measure the PADDING box, not the
     content box. Without it the 7px bezel is added outside the ratio and the
     screen overflows the bottom of the frame, where overflow:hidden clips it. */
  box-sizing: border-box;
  display: block;
  padding: 7px;
  border-radius: 42px;
  background: linear-gradient(180deg, #222326, #090909); /* device bezel, not brand */
  box-shadow:
    0 24px 64px rgba(33, 11, 2, 0.20),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
/* Dynamic island */
.iphone-mock::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 23%;
  height: 18px;
  border-radius: 999px;
  background: #050505;
  z-index: 2;
}
/* The screen area fills the inside of the bezel. No padding — the dynamic-
   island pill sits over the screenshot's own status-bar area, exactly as it
   does on a real iPhone. */
.iphone-screen {
  position: absolute;
  inset: 7px;               /* exactly the bezel width */
  border-radius: 35px;
  overflow: hidden;
  /* Background matches the near-white app shell so any sub-pixel gaps at
     the edges blend in. data-bg="dark" swaps to near-black for camera UI. */
  background: #F9FBFB;
}
.iphone-screen[data-bg="dark"] { background: #010101; }
/* object-fit:contain shows the ENTIRE screenshot — pill to nav bar —
   without cropping anything. The screen background fills any sub-pixel
   letterboxing so it's invisible. */
.iphone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; padding: 96px 0 68px; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 44%, rgba(255, 107, 53, 0.16), transparent 30%),
    radial-gradient(circle at 8% 75%, rgba(255, 204, 169, 0.24), transparent 30%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 54px;
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; }

.trust-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.trust-line svg { flex: none; }

.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.hero-bullets li {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-size: 14px;
  font-weight: 700;
}

.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 720px;
}
.hero-orb { position: absolute; border-radius: 999px; filter: blur(4px); pointer-events: none; }
.hero-orb-one {
  width: 420px; height: 420px; top: 40px; right: 20px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.28), rgba(255, 107, 53, 0));
}
.hero-orb-two {
  width: 260px; height: 260px; left: 10px; bottom: 80px;
  background: radial-gradient(circle, rgba(255, 196, 146, 0.4), rgba(255, 196, 146, 0));
}
.phone-cluster { position: relative; width: min(620px, 100%); height: 720px; }

.hero-phone { position: absolute; aspect-ratio: 620 / 1272; }
.hero-phone.center { left: 50%; top: 28px;  width: 270px; transform: translateX(-50%); z-index: 3; }
.hero-phone.left   { left: 16px;  top: 150px; width: 218px; transform: rotate(-10deg); z-index: 2; }
.hero-phone.right  { right: 12px; top: 142px; width: 218px; transform: rotate(10deg);  z-index: 1; }

/* --------------------------------------------------------------------------
   9. Three steps band
   Dark band with light cards floating on it — the page's visual anchor, and
   the bookend to the dark download CTA. Matches the transactional emails.
   -------------------------------------------------------------------------- */
.steps-band {
  position: relative;
  background: var(--espresso);
  color: var(--on-dark);
  overflow: hidden;
}
/* Warm glow so the band reads as brand-dark, not flat black. */
.steps-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 107, 53, 0.20), transparent 34%),
    radial-gradient(circle at 4% 92%, rgba(255, 196, 146, 0.12), transparent 32%);
}
.steps-band > .container { position: relative; z-index: 1; }
.steps-band h2 { color: var(--on-dark); }
.steps-band .section-copy { color: var(--on-dark-muted); }

.steps-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
/* Light cards on the dark band — the contrast is the point. */
.step-card {
  padding: 26px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-dark);
  color: var(--ink);
  overflow: hidden;
}
.step-number {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--orange-dark);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.08em;
}
.step-phone {
  width: min(245px, 100%);
  aspect-ratio: 620 / 1272;
  margin: 0 auto 20px;
}
.step-card h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.step-card p { margin: 0 0 16px; color: var(--muted); }

.step-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.step-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.10);
  color: var(--orange-deep);
  font-size: 13px;
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   10. Feature switcher ("Why Replenish")
   -------------------------------------------------------------------------- */
.mind-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 30px;
  align-items: center;
}
.feature-switcher {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}
.mind-button {
  width: 100%;
  padding: 22px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease,
              color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.mind-button strong {
  display: block;
  margin-bottom: 6px;
  font-size: 19px;
  line-height: 1.2;
}
.mind-button span { display: block; font-size: 15px; color: var(--muted); }

.mind-button:hover,
.mind-button[aria-selected="true"] {
  transform: translateY(-2px);
  background: var(--orange-action);
  color: #fff;
  border-color: var(--orange-action);
  box-shadow: 0 22px 48px rgba(198, 63, 20, 0.28);
}
.mind-button:hover span,
.mind-button[aria-selected="true"] span { color: rgba(255, 255, 255, 0.9); }

.preview-only {
  display: grid;
  place-items: center;
  min-height: 610px;
  padding: 36px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 243, 232, 0.74));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.preview-phone { width: min(286px, 80%); aspect-ratio: 620 / 1272; }

/* --------------------------------------------------------------------------
   11. Benefit cards
   -------------------------------------------------------------------------- */
.feature-band { background: var(--cream); }
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.benefit-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
}
.benefit-card h3 {
  margin-bottom: 8px;
  font-size: 23px;
  letter-spacing: -0.02em;
}
.benefit-card p { margin: 0; color: var(--muted); }

/* --------------------------------------------------------------------------
   12. Doctor-led
   -------------------------------------------------------------------------- */
.doctor-led {
  padding: 82px 0;
  background: linear-gradient(180deg, var(--paper-solid) 0%, var(--cream) 100%);
}
.doctor-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: center;
  padding: clamp(26px, 4vw, 46px);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 107, 53, 0.16);
  box-shadow: 0 18px 48px rgba(31, 22, 12, 0.08);
}
.doctor-card blockquote {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
}
.doctor-card cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-weight: 800;
  color: var(--ink);
}
.doctor-points { display: grid; gap: 14px; }
.doctor-points article {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255, 248, 242, 0.92), rgba(255, 255, 255, 0.96));
  border: 1px solid var(--line);
}
.doctor-points strong {
  display: block;
  margin-bottom: 4px;
  color: var(--orange-deep);
  font-size: 18px;
}
.doctor-points span { color: var(--muted); }

/* --------------------------------------------------------------------------
   13. Evidence
   -------------------------------------------------------------------------- */
.evidence-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.evidence-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}
.evidence-card h3 {
  margin-bottom: 12px;
  font-size: 27px;
  letter-spacing: -0.025em;
}
.evidence-card p { margin: 0 0 18px; font-size: 17px; color: var(--muted); }

.quote-box {
  padding: 16px 18px;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  background: rgba(255, 107, 53, 0.11);
  color: var(--orange-deep);
  font-weight: 800;
}
.evidence-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.evidence-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  color: var(--muted);
}
.tick {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.evidence-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 30px 0 0;
  padding: 24px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 107, 53, 0.28);
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 107, 53, 0.14), transparent 40%),
    var(--paper-solid);
  box-shadow: 0 14px 40px rgba(33, 11, 2, 0.08);
}
.evidence-cta span { flex: 1; min-width: 240px; font-weight: 700; color: var(--muted); }
/* Nudge the arrow on hover so the affordance is unmistakable. */
.evidence-cta .btn svg { transition: transform 0.18s ease; }
.evidence-cta .btn:hover svg { transform: translateX(3px); }
.doctor-points a { color: var(--orange-deep); font-weight: 800; text-decoration: underline; }

.goal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}
.goal {
  padding: 25px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 107, 53, 0.20);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 241, 232, 0.8));
  box-shadow: var(--shadow-card);
}
.goal strong {
  display: block;
  margin-bottom: 8px;
  color: var(--orange-deep);
  font-size: 20px;
}
.goal p { margin: 0; color: var(--muted); }

/* --------------------------------------------------------------------------
   14. Progress / comparison slider
   -------------------------------------------------------------------------- */
.premium-progress {
  padding: 92px 0;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 107, 53, 0.13), transparent 28%),
    linear-gradient(180deg, var(--paper-solid) 0%, var(--cream-2) 100%);
}
.premium-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  align-items: center;
}
.premium-pill {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.12);
  color: var(--orange-deep);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.premium-copy h2 { margin: 0 0 18px; }
.premium-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.premium-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 17px;
  color: var(--muted);
}
.premium-list li > span:first-child {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.comparison-demo {
  padding: clamp(20px, 4vw, 34px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 107, 53, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 244, 235, 0.86));
  box-shadow: var(--shadow-soft);
}
.compare-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.progress-tab {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.progress-tab[aria-selected="true"] {
  background: rgba(255, 107, 53, 0.14);
  color: var(--orange-deep);
  border-color: rgba(255, 107, 53, 0.3);
}

.compare-viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--cream-2), var(--cream));
  cursor: ew-resize;
  touch-action: none;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.compare-before,
.compare-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
}
.compare-after-wrap {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}
.compare-after-wrap .compare-after {
  width: var(--compare-viewport-width, 100%);
  max-width: none;
}
.compare-divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 100%;
  border-left: 3px solid var(--orange-action);
  box-shadow: 0 0 20px rgba(198, 63, 20, 0.25);
  cursor: ew-resize;
  z-index: 3;
}
.compare-divider span {
  position: absolute;
  left: -23px;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 999px;
  background: var(--orange-action);
  border: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(31, 22, 12, 0.22);
}
.compare-divider span::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 14px;
  border: 4px solid #fff;
  border-radius: 3px;
  background: transparent;
  transform: translate(-50%, -50%) rotate(45deg);
}
.photo-label {
  position: absolute;
  bottom: 16px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
  z-index: 2;
}
.photo-label.is-before { left: 16px; }
.photo-label.is-after  { right: 16px; }


/* ── Progress metric board ───────────────────────────────── */
.comparison-demo .metric-board {
  margin-top: 16px;
}

.metric-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-card {
  padding: 16px 14px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,248,242,.95), rgba(255,255,255,.95));
  border: 1px solid rgba(255, 107, 53, .12);
}

.metric-card > span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.metric-pair {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.metric-pair strong {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}

.metric-pair em {
  font-size: 14px;
  font-style: normal;
  color: var(--muted);
  text-decoration: line-through;
}

.metric-card small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

@media (max-width: 480px) {
  .metric-board {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   15. Pricing
   -------------------------------------------------------------------------- */
.pricing-section {
  padding: 92px 0;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 107, 53, 0.14), transparent 30%),
    linear-gradient(180deg, var(--cream-2) 0%, var(--paper-solid) 100%);
}

.free-highlight {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.free-pill {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.12);
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.free-highlight h3 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.025em;
}

/* Feature comparison table */
.comparison-table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(31, 22, 12, 0.07);
  overflow-x: auto;
}
.comparison-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}
.comparison-table th,
.comparison-table td {
  padding: 17px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(23, 20, 18, 0.08);
}
.comparison-table thead th {
  background: rgba(255, 107, 53, 0.09);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Row headers = the feature names */
.comparison-table tbody th {
  font-weight: 800;
  color: var(--ink);
}
.comparison-table td {
  color: var(--muted);
  font-weight: 700;
}
.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td { border-bottom: 0; }

.comparison-table .highlight-row { background: rgba(255, 107, 53, 0.06); }
.comparison-table .highlight-row td:first-of-type { color: var(--orange-deep); }

/* Pricing cards */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.pricing-cards article {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}
.pricing-cards .best-value {
  border-color: rgba(255, 107, 53, 0.38);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 232, 0.86));
}
.pricing-cards span { display: block; margin-bottom: 8px; font-weight: 900; color: var(--muted); }
.pricing-cards strong {
  display: block;
  color: var(--orange-dark);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.025em;
}
.pricing-cards p { margin: 8px 0 0; font-weight: 700; color: var(--muted); }
.trial-note { margin: 18px 0 0; text-align: center; font-weight: 700; color: var(--muted); }

/* --------------------------------------------------------------------------
   16. Dark download CTA
   -------------------------------------------------------------------------- */
.dark-download {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 56px;
  border-radius: 38px;
  background: var(--espresso);
  color: var(--on-dark);
  overflow: hidden;
}
.dark-download::after {
  content: "";
  position: absolute;
  right: -120px; bottom: -160px;
  width: 430px; height: 430px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.28);
}
.dark-download h2,
.dark-download p,
.dark-download .cta-cluster { position: relative; z-index: 1; }
.dark-download h2 { color: var(--on-dark); font-size: clamp(34px, 5vw, 60px); }
.dark-download p { margin: 18px 0 0; font-size: 19px; color: var(--on-dark-muted); }
.dark-download .cta-cluster { justify-items: end; }
.dark-download .cta-note { color: var(--on-dark-muted); }

/* --------------------------------------------------------------------------
   17. FAQ
   -------------------------------------------------------------------------- */
.faq-grid { display: grid; gap: 12px; }
details {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
summary {
  padding: 20px 22px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  float: right;
  color: var(--orange-dark);
  font-size: 22px;
  line-height: 1;
}
details[open] summary::after { content: "–"; }
details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* --------------------------------------------------------------------------
   18. Contact form
   -------------------------------------------------------------------------- */
.contact-card {
  margin-top: 30px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.18);
  background:
    radial-gradient(circle at 88% 15%, rgba(255, 107, 53, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 232, 0.9));
  box-shadow: 0 18px 48px rgba(31, 22, 12, 0.08);
}
.contact-intro { max-width: 720px; margin-bottom: 24px; }
.contact-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--orange-deep);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact-card h3 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.contact-card > .contact-intro p { margin: 0; font-size: 17px; color: var(--muted); }

.contact-form { display: grid; gap: 16px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: var(--ink);
}
.contact-form label > span { font-size: 14px; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(23, 20, 18, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  border-color: var(--orange-dark);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.18);
}
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.character-count { font-size: 14px; font-weight: 700; color: var(--muted); }
.form-status { min-height: 22px; font-size: 14px; font-weight: 800; }
.form-status.success { color: var(--green); }
.form-status.error   { color: var(--orange-deep); }

/* --------------------------------------------------------------------------
   19. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 800; }

/* --------------------------------------------------------------------------
   20. Legal / evidence page shell
   -------------------------------------------------------------------------- */
.legal-hero { padding: 90px 0 35px; }
.legal-hero h1 { font-size: clamp(42px, 6vw, 72px); }
.legal-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 80px;
  padding: clamp(24px, 5vw, 54px) clamp(28px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}
.legal-shell h2 { margin: 42px 0 14px; font-size: clamp(26px, 3.3vw, 42px); }
.legal-shell h3 { margin: 30px 0 10px; font-size: 24px; }
.legal-shell h4 { margin: 26px 0 8px; font-size: 19px; }
.legal-shell p,
.legal-shell li { font-size: 17px; color: var(--muted); }
.legal-shell ul { padding-left: 22px; }
.legal-shell hr { margin: 32px 0; border: 0; border-top: 1px solid var(--line); }
.legal-shell a { color: var(--orange-deep); font-weight: 800; }

/* --------------------------------------------------------------------------
   21. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .glass-nav {
    width: min(920px, calc(100vw - 28px));
    gap: 10px;
    padding: 8px 14px;
  }
  .logo-lockup { width: min(260px, 26vw); min-width: 190px; }
  .nav-links { font-size: 13px; gap: 4px; }
  .nav-links a { padding: 7px 8px; }
}

@media (max-width: 980px) {
  .glass-nav {
    grid-template-columns: 1fr;
    width: min(760px, calc(100vw - 24px));
    gap: 6px;
    border-radius: 28px;
  }
  .logo-lockup {
    order: -1;
    width: min(340px, 72vw);
    min-width: 0;
    margin-inline: auto;
  }
  .nav-links.left,
  .nav-links.right { justify-content: center; flex-wrap: wrap; }

  .hero { padding-top: 56px; }
  .hero-grid,
  .mind-grid,
  .section-head,
  .premium-grid,
  .evidence-layout,
  .doctor-card,
  .dark-download { grid-template-columns: 1fr; }

  .phone-stage { order: -1; min-height: 560px; }
  .phone-cluster { height: 560px; }
  .hero-phone.center { width: 230px; }
  .hero-phone.left,
  .hero-phone.right { width: 200px; }

  .steps-showcase,
  .goal-grid,
  .benefit-grid,
  .pricing-cards { grid-template-columns: 1fr; }

  /* Table scrolls horizontally rather than squashing. */
  .comparison-table-wrap { -webkit-overflow-scrolling: touch; }

  .cta-cluster,
  .dark-download .cta-cluster { justify-items: start; }
  .free-highlight { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .form-row.two { grid-template-columns: 1fr; }
  .form-footer button { width: 100%; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 28px, var(--max)); }
  .site-header { top: 8px; padding: 0 10px; }
  .glass-nav { width: min(430px, calc(100vw - 20px)); }
  .nav-links.left, .nav-links.right { display: none; }
  .logo-lockup { width: min(320px, 76vw); }

  h1 { letter-spacing: -0.025em; }
  section { padding: 58px 0; }

  .btn { width: 100%; }
  .cta-cluster { justify-items: stretch; }
  .store-badge { height: 45px; }

  .phone-stage { min-height: 500px; }
  .phone-cluster { height: 500px; }
  .hero-phone.center { width: 210px; top: 20px; }
  .hero-phone.left  { left: -30px; top: 140px; width: 190px; }
  .hero-phone.right { right: -34px; top: 132px; width: 190px; }

  .preview-only { min-height: 520px; padding: 22px; }
  .preview-phone { width: 240px; }
  .step-phone { width: min(220px, 88vw); }
  .compare-viewport { aspect-ratio: 4 / 5; }

  .dark-download { padding: 34px 24px; border-radius: 30px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   22. Evidence page
   ========================================================================== */
.evidence-hero {
  padding: 110px 0 44px;
}
.evidence-hero h1 {
  max-width: 16ch;
  font-size: clamp(40px, 6vw, 68px);
}
.evidence-hero .lead { max-width: 62ch; margin-bottom: 0; }

.evidence-page { padding: 0 0 90px; }

.evidence-layout-2col {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

/* Sticky "on this page" nav */
.evidence-nav {
  position: sticky;
  top: 110px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}
.evidence-nav-title {
  margin: 0 0 12px;
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.evidence-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: nav;
}
.evidence-nav li { counter-increment: nav; }
.evidence-nav a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  transition: color 0.18s ease, padding-left 0.18s ease;
}
.evidence-nav li:last-child a { border-bottom: 0; }
.evidence-nav a:hover {
  color: var(--orange-deep);
  padding-left: 4px;
}

/* Content column */
.evidence-content { min-width: 0; }

.ev-section {
  padding: 0 0 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.ev-section:last-of-type { border-bottom: 0; }

.ev-section h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 3.6vw, 44px);
}
.ev-section h3 {
  margin: 38px 0 14px;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.ev-section h4 {
  margin: 28px 0 10px;
  font-size: 19px;
  color: var(--orange-deep);
}
.ev-section p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.68;
  color: var(--muted);
}
.ev-section strong { color: var(--ink); font-weight: 800; }

/* TL;DR callout — a white card that lifts off the warm page. */
.tldr {
  position: relative;
  margin: 0 0 30px;
  padding: 24px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  background: var(--paper-solid);
  box-shadow: 0 14px 40px rgba(33, 11, 2, 0.09);
}
.tldr-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px !important;
  color: var(--orange-deep);
  font-size: 12px !important;
  font-weight: 900;
  letter-spacing: 0.1em;
}
.tldr-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--orange);
}
.tldr p:last-child {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: 18px !important;
  line-height: 1.55 !important;
  font-weight: 700;
}

/* How-to-read key */
.read-key {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.read-key li {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
}
.read-key strong { color: var(--orange-deep); font-weight: 900; }
.read-key span { color: var(--muted); }

.plain-list {
  margin: 0 0 16px;
  padding-left: 22px;
}
.plain-list li {
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.68;
  color: var(--muted);
}

/* Limitations block - deliberately prominent, this is a trust signal */
.limits {
  margin: 34px 0 0;
  padding: 24px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--cream-2);
}
.limits-title {
  margin: 0 0 14px !important;
  font-size: 18px !important;
  color: var(--ink);
}
.limits ul { margin: 0; padding-left: 20px; }
.limits li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}
.limits li:last-child { margin-bottom: 0; }

/* Inline superscript citations */
.ref {
  display: inline-block;
  margin-left: 1px;
  padding: 0 3px;
  color: var(--orange-deep);
  font-size: 0.72em;
  font-weight: 900;
  vertical-align: super;
  line-height: 1;
  text-decoration: none;
}
.ref:hover { text-decoration: underline; }

/* Collapsible reference lists */
.refs {
  margin-top: 24px;
  border-radius: var(--radius-sm);
}
.refs summary {
  padding: 14px 18px;
  font-size: 15px;
}
.ref-list {
  margin: 0;
  padding: 0 22px 20px 42px;
}
.ref-list li {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  scroll-margin-top: 120px;
}
.ref-list li:target {
  background: rgba(255, 107, 53, 0.14);
  border-radius: 6px;
  padding: 4px 8px;
  margin-left: -8px;
}

/* Institutional source cards */
.source-card {
  margin-bottom: 18px;
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}
.source-card h3 { margin: 0 0 6px; font-size: 22px; }
.source-role {
  margin: 0 0 16px !important;
  font-size: 14px !important;
  font-weight: 800;
  color: var(--orange-deep) !important;
}
.source-ref {
  margin: 16px 0 0 !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px !important;
  color: var(--soft) !important;
}

/* Safety note */
.safety-card {
  padding: 30px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--dark-gradient);
  color: var(--on-dark);
}
.safety-card h2 { margin-bottom: 14px; color: var(--on-dark); font-size: 28px; }
.safety-card p { color: var(--on-dark-muted) !important; }
.safety-card strong { color: var(--on-dark); }


@media (max-width: 980px) {
  .evidence-layout-2col { grid-template-columns: 1fr; gap: 28px; }
  .evidence-nav { position: static; top: auto; }
  .evidence-nav ol { columns: 2; column-gap: 24px; }
}
@media (max-width: 620px) {
  .evidence-hero { padding-top: 90px; }
  .evidence-nav ol { columns: 1; }
  .read-key li { grid-template-columns: 1fr; gap: 4px; }
  .ev-section { padding-bottom: 40px; margin-bottom: 40px; }
}

/* ==========================================================================
   23. Legal pages (privacy policy, terms of service)
   Generated by build_legal.py from the Markdown sources.
   ========================================================================== */
.legal-meta {
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--soft);
}

.legal-content h2.legal-h2 {
  margin: 52px 0 16px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: clamp(26px, 3.2vw, 36px);
  scroll-margin-top: 110px;
}
.legal-content > h2.legal-h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.legal-content h3.legal-h3 {
  margin: 32px 0 12px;
  font-size: 21px;
  scroll-margin-top: 110px;
}
.legal-content h4.legal-h4 {
  margin: 24px 0 8px;
  font-size: 17px;
  color: var(--orange-deep);
}
.legal-content p {
  margin: 0 0 15px;
  font-size: 17px;
  line-height: 1.68;
  color: var(--muted);
}
.legal-content strong { color: var(--ink); font-weight: 800; }
.legal-content a {
  color: var(--orange-deep);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content ul {
  margin: 0 0 18px;
  padding-left: 22px;
}
.legal-content li {
  margin-bottom: 9px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}
.legal-content ul ul {
  margin: 9px 0 0;
}
.legal-content code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--cream-2);
  font-size: 0.92em;
}
.legal-rule {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.legal-table-wrap {
  margin: 0 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper-solid);
  overflow-x: auto;
}
.legal-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}
.legal-table th,
.legal-table td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.legal-table th {
  background: rgba(255, 107, 53, 0.08);
  color: var(--ink);
  font-weight: 900;
}
.legal-table td { color: var(--muted); }
.legal-table tr:last-child th,
.legal-table tr:last-child td { border-bottom: 0; }

/* ==========================================================================
   24. Page-end CTA (evidence, privacy, terms)
   ========================================================================== */
.page-end-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  margin-top: 56px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--dark-gradient);
  color: var(--on-dark);
  overflow: hidden;
  position: relative;
}
.page-end-cta::after {
  content: "";
  position: absolute;
  right: -80px; bottom: -100px;
  width: 320px; height: 320px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.22);
  pointer-events: none;
}
.page-end-cta-copy { position: relative; z-index: 1; }
.page-end-cta-copy h2 {
  margin: 0 0 12px;
  color: var(--on-dark);
  font-size: clamp(26px, 3.5vw, 38px);
}
.page-end-cta-copy p {
  margin: 0;
  font-size: 17px;
  color: var(--on-dark-muted);
}
.page-end-cta .cta-cluster {
  position: relative;
  z-index: 1;
  justify-items: start;
}
.page-end-cta .cta-note { color: var(--on-dark-muted); }

@media (max-width: 720px) {
  .page-end-cta { grid-template-columns: 1fr; }
}
