/* ==========================================================================
   Livosa — livosahealth.com
   Design system: "Calm-Light" (mirrors the app). One teal, tinted neutrals,
   deep teal-navy contrast bands. All motion is transform/opacity only and
   fully disabled under prefers-reduced-motion.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* color — OKLCH, neutrals tinted toward the brand teal (hue ≈ 175) */
  --canvas:      oklch(98.3% 0.005 170);
  --surface:     oklch(99.4% 0.003 170);
  --mist:        oklch(95.8% 0.010 172);
  --line:        oklch(90.5% 0.012 178);
  --line-soft:   oklch(93.5% 0.008 178);

  --ink:         oklch(25% 0.020 215);
  --ink-2:       oklch(45% 0.020 205);
  --ink-3:       oklch(58% 0.016 200);

  --teal:        oklch(59% 0.100 175);   /* ≈ #0B9B8A */
  --teal-deep:   oklch(46% 0.085 178);
  --teal-soft:   oklch(93% 0.035 172);
  --teal-wash:   oklch(96.5% 0.020 172);

  --navy:        oklch(22% 0.032 255);   /* dark bands — echoes app onboarding */
  --navy-2:      oklch(27% 0.035 252);
  --navy-line:   oklch(35% 0.035 250);
  --on-navy:     oklch(95% 0.012 200);
  --on-navy-2:   oklch(72% 0.025 215);
  --teal-bright: oklch(74% 0.105 172);   /* teal for dark backgrounds */

  --amber:       oklch(76% 0.125 75);
  --amber-ink:   oklch(48% 0.095 70);
  --amber-wash:  oklch(95% 0.035 85);

  --dusty-blue:  oklch(63% 0.055 255);   /* app macroCarbs */
  --sand:        oklch(74% 0.070 85);    /* app macroFat  */

  /* type */
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Wix Madefor Text", "Segoe UI", system-ui, sans-serif;

  --fs-hero:  clamp(2.7rem, 5.2vw + 1rem, 4.4rem);
  --fs-h2:    clamp(1.9rem, 2.8vw + 0.8rem, 3rem);
  --fs-h3:    clamp(1.35rem, 1vw + 1rem, 1.7rem);
  --fs-lead:  clamp(1.1rem, 0.4vw + 1rem, 1.3rem);
  --fs-body:  1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.8125rem;

  /* space — 4pt scale */
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-section: clamp(4.5rem, 9vw, 8rem);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px oklch(30% 0.02 220 / 0.05), 0 12px 32px -12px oklch(30% 0.03 220 / 0.14);
  --shadow-phone: 0 2px 4px oklch(25% 0.03 220 / 0.08), 0 40px 80px -24px oklch(30% 0.06 210 / 0.35);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* expo-ish deceleration */
  --t-fast: 150ms;
  --t-med: 400ms;
  --t-reveal: 700ms;
}

/* ---------- Reset-ish base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 640;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; max-width: 62ch; }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--teal-soft); }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.dark .eyebrow, .band-dark .eyebrow { color: var(--teal-bright); }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 0.8em 1.5em; border-radius: var(--radius-pill);
  text-decoration: none; border: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease;
  cursor: pointer;
}
.btn .arr { transition: transform var(--t-fast) var(--ease-out); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .arr { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--teal); color: oklch(99% 0.005 170); }
.btn-primary:hover { background: var(--teal-deep); color: oklch(99% 0.005 170); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); }
.band-dark .btn-ghost { border-color: var(--navy-line); color: var(--on-navy); }
.band-dark .btn-ghost:hover { border-color: var(--teal-bright); color: var(--teal-bright); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background-color 300ms ease, border-color 300ms ease;
}
.nav.is-solid { background: oklch(98.3% 0.005 170 / 0.92); border-bottom-color: var(--line-soft); backdrop-filter: blur(8px); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding-block: 0.9rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 26px; height: 26px; }
.brand b { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: var(--space-lg); list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: var(--fs-small); font-weight: 500; color: var(--ink-2); text-decoration: none; }
.nav-links a:hover { color: var(--teal-deep); }
.nav .btn { padding: 0.55em 1.2em; font-size: var(--fs-small); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: clip;
  padding-block: clamp(7rem, 14vh, 9.5rem) var(--space-section);
  background:
    radial-gradient(52rem 30rem at 82% -6rem, var(--teal-wash), transparent 68%),
    radial-gradient(40rem 26rem at -12% 32rem, oklch(96% 0.015 85 / 0.75), transparent 70%),
    var(--canvas);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(var(--space-xl), 5vw, var(--space-3xl)); align-items: center;
}
.hero h1 { font-size: var(--fs-hero); font-weight: 700; }
.hero h1 .soft { color: var(--teal-deep); }
.hero-copy { display: grid; gap: var(--space-lg); justify-items: start; }
.hero-copy .lead { max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.hero-note { font-size: var(--fs-small); color: var(--ink-3); }

/* load-in sequence */
.rise { opacity: 0; transform: translateY(22px); }
.js .rise { animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 120ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Phone mock ---------- */
.phone-stage { display: grid; justify-items: center; }
.phone {
  width: min(310px, 82vw);
  border-radius: 46px;
  background: var(--navy);
  padding: 12px;
  box-shadow: var(--shadow-phone);
}
.js .phone-stage .phone { animation: phone-in 900ms var(--ease-out) 250ms backwards, float 8s ease-in-out 1.4s infinite alternate; }
@keyframes phone-in { from { opacity: 0; transform: translateY(48px); } }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-12px); } }
.screen {
  border-radius: 36px; background: oklch(97.5% 0.006 172);
  padding: 1.1rem 0.95rem 1.25rem; display: grid; gap: 0.7rem;
  font-size: 0.8rem; line-height: 1.4;
}
.screen .status { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); font-size: 0.68rem; padding-inline: 0.2rem; }
.screen .hello { display: flex; justify-content: space-between; align-items: center; padding-inline: 0.2rem; }
.screen .hello b { font-family: var(--font-display); font-size: 0.95rem; }
.screen .hello .ava { width: 26px; height: 26px; border-radius: 50%; background: var(--teal-soft); display: grid; place-items: center; color: var(--teal-deep); font-weight: 700; font-size: 0.65rem; }
.mini-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 0.8rem; box-shadow: 0 1px 2px oklch(30% 0.02 220 / 0.04); }

.ringrow { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: center; }
.ring { position: relative; width: 92px; height: 92px; }
.ring svg { transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--mist); stroke-width: 8; }
.ring .arc { fill: none; stroke: var(--teal); stroke-width: 8; stroke-linecap: round; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.15; }
.ring-label b { font-family: var(--font-display); font-size: 1.05rem; }
.ring-label span { font-size: 0.58rem; color: var(--ink-3); }
.macros { display: grid; gap: 0.45rem; }
.macro { display: grid; gap: 0.2rem; font-size: 0.66rem; color: var(--ink-2); }
.macro .bar { height: 5px; border-radius: 99px; background: var(--mist); overflow: hidden; }
.macro .fill { display: block; height: 100%; border-radius: inherit; width: 0; transition: width 1100ms var(--ease-out); }
.macro.protein .fill { background: var(--teal); }
.macro.carbs .fill { background: var(--dusty-blue); }
.macro.fat .fill { background: var(--sand); }

.safety { display: flex; gap: 0.55rem; align-items: flex-start; background: var(--amber-wash); border: 1px solid oklch(88% 0.055 85); }
.safety .shield { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--amber); color: oklch(30% 0.05 70); display: grid; place-items: center; }
.safety b { color: var(--amber-ink); }
.safety p { font-size: 0.7rem; color: var(--ink-2); }

.upnext h5 { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.dose { display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.55rem; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--surface); transition: opacity 500ms ease, background-color 500ms ease; }
.dose + .dose { margin-top: 0.45rem; }
.dose .t { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 0.66rem; }
.dose .n { flex: 1; font-weight: 600; font-size: 0.72rem; }
.dose .take {
  font-size: 0.62rem; font-weight: 700; color: var(--teal-deep);
  border: 1px solid var(--teal-soft); background: var(--teal-wash);
  border-radius: 99px; padding: 0.25em 0.8em;
}
.dose.is-done { opacity: 0.55; background: var(--mist); }
.dose.is-done .take { background: var(--teal); border-color: var(--teal); color: oklch(99% 0.005 170); }

/* ---------- Ticker ---------- */
.ticker { border-block: 1px solid var(--line-soft); background: var(--surface); overflow: hidden; padding-block: 0.9rem; }
.ticker-track { display: flex; gap: 2.5rem; width: max-content; animation: ticker 36s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-small); color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 2.5rem; }
.ticker .leaf { color: var(--teal); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); }
.section-head { display: grid; gap: var(--space-md); max-width: 60ch; margin-bottom: clamp(var(--space-2xl), 6vw, var(--space-3xl)); }
.section-head h2 { font-size: var(--fs-h2); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Moat band (dark) ---------- */
.band-dark { background: var(--navy); color: var(--on-navy); }
.band-dark h2, .band-dark h3 { color: oklch(97% 0.01 190); }
.band-dark p { color: var(--on-navy-2); }
.band-dark a { color: var(--teal-bright); }
.moat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(var(--space-xl), 5vw, var(--space-3xl)); align-items: center; }
.moat-copy { display: grid; gap: var(--space-lg); }
.moat-copy h2 { font-size: var(--fs-h2); }
.moat-copy .pts { display: grid; gap: var(--space-sm); margin: 0; padding: 0; list-style: none; }
.moat-copy .pts li { display: flex; gap: 0.7rem; align-items: baseline; color: var(--on-navy-2); }
.moat-copy .pts .tick { color: var(--teal-bright); font-weight: 700; }

.demo {
  background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1rem; position: relative;
}
.demo .chip {
  display: inline-flex; align-items: center; gap: 0.6rem; justify-self: start;
  background: oklch(31% 0.035 250); border: 1px solid var(--navy-line);
  border-radius: var(--radius-pill); padding: 0.5rem 1rem; font-weight: 600; font-size: var(--fs-small);
  color: var(--on-navy);
}
.demo .chip .pill { width: 20px; height: 20px; border-radius: 6px; background: var(--dusty-blue); display: grid; place-items: center; color: oklch(20% 0.03 255); }
.demo .connector { justify-self: start; margin-left: 3.2rem; height: 84px; }
.demo .connector path { fill: none; stroke: var(--teal-bright); stroke-width: 2; stroke-dasharray: 130; stroke-dashoffset: 130; }
.demo.is-in .connector path { transition: stroke-dashoffset 900ms var(--ease-out) 150ms; stroke-dashoffset: 0; }
.demo .nutrient { display: grid; gap: 0.45rem; background: oklch(26% 0.032 252); border: 1px solid var(--navy-line); border-radius: var(--radius-md); padding: 0.9rem 1rem; }
.demo .nutrient .row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-small); }
.demo .nutrient b { color: var(--on-navy); }
.demo .nutrient .pct { font-variant-numeric: tabular-nums; color: var(--amber); font-weight: 700; }
.demo .nutrient .bar { height: 8px; border-radius: 99px; background: oklch(33% 0.03 252); overflow: hidden; }
.demo .nutrient .fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--amber); transition: width 1100ms var(--ease-out) 950ms; }
.demo.is-in .nutrient .fill { width: 42%; }
.demo .verdict { display: flex; gap: 0.6rem; align-items: flex-start; opacity: 0; transform: translateY(10px); transition: opacity 600ms var(--ease-out) 1900ms, transform 600ms var(--ease-out) 1900ms; }
.demo.is-in .verdict { opacity: 1; transform: none; }
.demo .verdict .dot { flex: none; margin-top: 0.45em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); }
.demo .verdict p { font-size: var(--fs-small); color: var(--on-navy); }
.demo .src { font-size: 0.75rem; color: var(--on-navy-2); opacity: 0.8; }

/* ---------- Features (numbered editorial rows) ---------- */
.features { display: grid; gap: 0; }
.feature {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1.1fr) minmax(0, 1.6fr);
  gap: var(--space-lg); align-items: baseline;
  padding-block: var(--space-xl); border-top: 1px solid var(--line);
}
.feature:last-child { border-bottom: 1px solid var(--line); }
.feature .num { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--teal); font-variant-numeric: tabular-nums; }
.feature h3 { font-size: var(--fs-h3); }
.feature p { color: var(--ink-2); }
.feature .fine { display: block; margin-top: var(--space-xs); font-size: var(--fs-small); color: var(--ink-3); }
@media (max-width: 760px) {
  .feature { grid-template-columns: 3rem minmax(0, 1fr); }
  .feature p { grid-column: 2; }
}

/* ---------- Coach ---------- */
.coach-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(var(--space-xl), 5vw, var(--space-3xl)); align-items: center; }
.chat { display: grid; gap: 0.7rem; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--shadow-card); }
.bubble { max-width: 88%; padding: 0.7rem 1rem; border-radius: 18px; font-size: var(--fs-small); line-height: 1.55; }
.bubble.user { justify-self: end; background: var(--teal); color: oklch(99% 0.005 170); border-bottom-right-radius: 6px; }
.bubble.coach { justify-self: start; background: var(--mist); color: var(--ink); border-bottom-left-radius: 6px; }
.bubble.coach b { color: var(--teal-deep); }
.chat .who { font-size: 0.72rem; color: var(--ink-3); justify-self: start; }
.js .bubble, .js .chat .who { opacity: 0; transform: translateY(14px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
.chat.is-in .bubble, .chat.is-in .who { opacity: 1; transform: none; }
.chat.is-in > :nth-child(1) { transition-delay: 100ms; }
.chat.is-in > :nth-child(2) { transition-delay: 600ms; }
.chat.is-in > :nth-child(3) { transition-delay: 1100ms; }
.chat.is-in > :nth-child(4) { transition-delay: 1600ms; }
.coach-copy { display: grid; gap: var(--space-lg); }
.coach-copy h2 { font-size: var(--fs-h2); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-xl); counter-reset: step; }
.step { display: grid; gap: var(--space-sm); align-content: start; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1;
  color: var(--teal-soft); -webkit-text-stroke: 1.5px var(--teal);
}
.step h3 { font-size: 1.2rem; }
.step p { color: var(--ink-2); font-size: var(--fs-small); }

/* ---------- Privacy band ---------- */
.privacy-band { background: var(--teal-wash); border-block: 1px solid var(--line-soft); }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(var(--space-xl), 5vw, var(--space-3xl)); align-items: center; }
.privacy-grid h2 { font-size: var(--fs-h2); }
.privacy-list { display: grid; gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.privacy-list li { display: flex; gap: 0.8rem; align-items: flex-start; }
.privacy-list .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); display: grid; place-items: center; color: var(--teal-deep); }
.privacy-list b { display: block; font-family: var(--font-display); }
.privacy-list span { font-size: var(--fs-small); color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa button {
  all: unset; display: flex; width: 100%; justify-content: space-between; align-items: center; gap: var(--space-md);
  padding-block: var(--space-lg); cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink);
}
.qa button:hover { color: var(--teal-deep); }
.qa .plus { flex: none; width: 22px; height: 22px; position: relative; }
.qa .plus::before, .qa .plus::after { content: ""; position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; background: var(--teal-deep); border-radius: 2px; transition: rotate 300ms var(--ease-out); }
.qa .plus::before { width: 14px; height: 2px; }
.qa .plus::after { width: 2px; height: 14px; }
.qa[data-open="true"] .plus::after { rotate: 90deg; }
.qa .a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 400ms var(--ease-out); }
.qa[data-open="true"] .a { grid-template-rows: 1fr; }
.qa .a > div { overflow: hidden; }
.qa .a p { padding-bottom: var(--space-lg); color: var(--ink-2); }

/* ---------- Download ---------- */
.download { text-align: center; display: grid; justify-items: center; gap: var(--space-lg); }
.download h2 { font-size: var(--fs-h2); }
.badges { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none;
  background: var(--ink); color: oklch(97% 0.005 170); border-radius: 14px; padding: 0.65rem 1.25rem;
  transition: transform var(--t-fast) var(--ease-out), opacity var(--t-fast) ease;
}
.badge:hover { transform: translateY(-2px); color: oklch(99% 0.005 170); }
.badge small { display: block; font-size: 0.65rem; opacity: 0.75; letter-spacing: 0.04em; }
.badge b { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.1; }
.badge svg { width: 22px; height: 22px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: var(--on-navy-2); padding-block: var(--space-3xl) var(--space-xl); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: var(--space-2xl); }
.footer .brand { color: var(--on-navy); }
.footer h4 { font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-navy-2); font-weight: 600; margin-bottom: var(--space-md); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }
.footer a { color: var(--on-navy); text-decoration: none; font-size: var(--fs-small); }
.footer a:hover { color: var(--teal-bright); }
.footer .blurb { font-size: var(--fs-small); max-width: 34ch; margin-top: var(--space-md); }
.footer-legal { border-top: 1px solid var(--navy-line); margin-top: var(--space-2xl); padding-top: var(--space-lg); display: grid; gap: var(--space-sm); font-size: 0.8rem; }
.footer-legal p { max-width: none; }

/* ---------- Legal / doc pages ---------- */
.doc-hero { padding-block: clamp(7rem, 14vh, 9rem) var(--space-2xl); border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.doc-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.doc-hero .meta { margin-top: var(--space-md); color: var(--ink-3); font-size: var(--fs-small); }
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-3xl); padding-block: var(--space-2xl) var(--space-section); }
.doc-toc { position: sticky; top: 6rem; align-self: start; display: grid; gap: var(--space-xs); font-size: var(--fs-small); }
.doc-toc a { color: var(--ink-2); text-decoration: none; padding-block: 0.15rem; }
.doc-toc a:hover { color: var(--teal-deep); }
.doc-toc .toc-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--space-xs); }
.doc { max-width: 70ch; }
.doc h2 { font-size: 1.45rem; margin: var(--space-2xl) 0 var(--space-md); scroll-margin-top: 6rem; }
.doc h3 { font-size: 1.1rem; margin: var(--space-lg) 0 var(--space-xs); }
.doc p { margin-bottom: var(--space-md); color: var(--ink-2); }
.doc p strong, .doc li strong { color: var(--ink); }
.doc ul, .doc ol { color: var(--ink-2); padding-left: 1.3rem; display: grid; gap: var(--space-xs); margin: 0 0 var(--space-md); }
.doc table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); margin-bottom: var(--space-md); }
.doc th, .doc td { text-align: left; padding: 0.6rem 0.75rem; border: 1px solid var(--line); vertical-align: top; }
.doc th { background: var(--mist); font-family: var(--font-display); font-weight: 600; }
.doc .callout { background: var(--amber-wash); border: 1px solid oklch(88% 0.055 85); border-radius: var(--radius-md); padding: var(--space-lg); margin-bottom: var(--space-md); }
.doc .callout p { margin: 0; color: var(--ink); }
.doc .callout p + p { margin-top: var(--space-sm); }
.doc .note { background: var(--teal-wash); border: 1px solid var(--line-soft); border-radius: var(--radius-md); padding: var(--space-lg); margin-bottom: var(--space-md); }
.doc .note p { margin: 0; }
@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; gap: var(--space-xl); }
  .doc-toc { position: static; }
}

/* ---------- 404 ---------- */
.err { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: var(--space-lg); padding-block: var(--space-section); }
.err h1 { font-size: var(--fs-hero); }

/* ---------- Feature tour (features.html) ---------- */
.tour-hero {
  padding-block: clamp(7rem, 14vh, 9rem) var(--space-2xl);
  background:
    radial-gradient(46rem 24rem at 85% -6rem, var(--teal-wash), transparent 68%),
    var(--canvas);
}
.tour-hero h1 { font-size: clamp(2.3rem, 4.2vw, 3.7rem); font-weight: 700; }
.tour-hero .lead { margin-top: var(--space-md); }
.tour-index { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-lg); }
.tour-index a {
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-label);
  text-decoration: none; color: var(--teal-deep);
  border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.35em 0.9em;
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.tour-index a:hover { border-color: var(--teal); background: var(--teal-wash); }

.tour { padding-block: clamp(3.5rem, 7vw, 6rem); scroll-margin-top: 4.5rem; }
.tour + .tour { border-top: 1px solid var(--line-soft); }
.tour-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(var(--space-xl), 5vw, var(--space-3xl)); align-items: center; }
.tour-copy { display: grid; gap: var(--space-md); }
.tour-copy h2 { font-size: clamp(1.7rem, 2.4vw, 2.4rem); }
.tour-copy .lead { font-size: 1.15rem; }
@media (min-width: 901px) { .tour-grid.flip .tour-visual { order: -1; } }

.cap-list { list-style: none; margin: var(--space-xs) 0 0; padding: 0; display: grid; gap: var(--space-sm); }
.cap-list li { display: flex; gap: 0.65rem; align-items: flex-start; color: var(--ink-2); font-size: var(--fs-small); line-height: 1.6; }
.cap-list li::before { content: ""; flex: none; margin-top: 0.5em; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.cap-list b { color: var(--ink); }

.tracker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-sm); margin-top: var(--space-lg); }
.tracker-chip { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-md); padding: var(--space-md); display: grid; gap: 0.2rem; }
.tracker-chip b { font-family: var(--font-display); font-size: 0.95rem; }
.tracker-chip span { font-size: 0.8rem; color: var(--ink-3); line-height: 1.45; }

/* generic small app-panel mock */
.panel-mock {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 1.1rem; box-shadow: var(--shadow-card);
  display: grid; gap: 0.6rem; width: 100%; max-width: 380px; justify-self: center; font-size: 0.8rem;
}
.panel-mock h6 { margin: 0; font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.panel-mock .dose + .dose { margin-top: 0; }

/* Diary mock */
.diary-mock { gap: 0.75rem; }
.diary-mock .search { display: flex; gap: 0.5rem; align-items: center; background: var(--mist); border-radius: 12px; padding: 0.55rem 0.75rem; color: var(--ink-2); font-size: 0.76rem; }
.diary-mock .search .q { color: var(--ink); font-weight: 600; }
.diary-mock .week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; text-align: center; }
.diary-mock .day { border-radius: 10px; padding: 0.4rem 0; font-size: 0.62rem; color: var(--ink-3); display: grid; gap: 0.05rem; }
.diary-mock .day b { font-size: 0.78rem; color: var(--ink); font-family: var(--font-display); }
.diary-mock .day.sel { background: var(--teal); color: oklch(97% 0.01 170); }
.diary-mock .day.sel b { color: inherit; }
.diary-mock .chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.diary-mock .fchip { border: 1px solid var(--line); border-radius: 99px; padding: 0.18rem 0.6rem; font-size: 0.64rem; color: var(--ink-2); }
.diary-mock .fchip.on { background: var(--teal-wash); border-color: var(--teal-soft); color: var(--teal-deep); font-weight: 600; }
.diary-mock .entry { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0.6rem; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.diary-mock .entry.hl { background: var(--teal-wash); border-color: var(--teal-soft); }
.diary-mock .edot { flex: none; margin-top: 0.4em; width: 8px; height: 8px; border-radius: 50%; }
.diary-mock .entry b { font-size: 0.72rem; display: block; }
.diary-mock .entry small { color: var(--ink-3); font-size: 0.64rem; }
.diary-mock .freq { font-size: 0.68rem; color: var(--teal-deep); background: var(--teal-wash); border-radius: 10px; padding: 0.45rem 0.65rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .moat-grid, .coach-grid, .privacy-grid, .tour-grid { grid-template-columns: 1fr; }
  .phone-stage { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
}

/* ---------- Reduced motion: everything appears, nothing moves ---------- */
@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; transition-delay: 0ms !important; }
  .rise, .reveal, .js .bubble, .js .chat .who { opacity: 1 !important; transform: none !important; }
  .demo .connector path { stroke-dashoffset: 0 !important; }
  .demo .nutrient .fill { width: 42% !important; }
  .demo .verdict { opacity: 1 !important; transform: none !important; }
  .ticker-track { animation: none !important; }
  .macro .fill { transition: none !important; }
}
