/* ════════════════════════════════════════════════════════════════
   HealthTrack — Private Health OS · landing page
   Design system echoes the app's "Midnight vitals" tokens.
   Light (warm paper) is the default; dark via [data-theme="dark"].
   ════════════════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────────────────── */
:root,
:root[data-theme="light"] {
  --bg: #faf7f2;
  --bg-raised: #ffffff;
  --bg-inset: #f3efe8;
  --ink: #211f1a;
  --ink-soft: #6f6a5e;
  --ink-faint: #a8a294;
  --hairline: #eae4d9;

  --activity: #2e8f5c;
  --heart: #e25c4a;
  --sleep: #5b6abf;
  --food: #c98a2b;
  --breath: #3a93a3;

  --shadow-sm: 0 1px 2px rgba(60, 50, 30, 0.04), 0 8px 28px rgba(60, 50, 30, 0.07);
  --shadow-lg: 0 2px 6px rgba(60, 50, 30, 0.06), 0 30px 80px rgba(60, 50, 30, 0.14);
  --grain: rgba(120, 100, 60, 0.04);
  --halo: rgba(46, 143, 92, 0.10);
}

:root[data-theme="dark"] {
  --bg: #0b0d0f;
  --bg-raised: #15181c;
  --bg-inset: #101317;
  --ink: #edece6;
  --ink-soft: #a2a89f;
  --ink-faint: #5f665f;
  --hairline: #232a31;

  /* Deeper than the neon #3dd68c so white text on green (chat bubbles) stays
     legible in dark mode, while still reading as a vivid accent on near-black. */
  --activity: #1fa863;
  --heart: #ff6f61;
  --sleep: #94a1f2;
  --food: #f0b25a;
  --breath: #56c8d8;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.5), 0 40px 90px rgba(0, 0, 0, 0.55);
  --grain: rgba(255, 255, 255, 0.022);
  --halo: rgba(61, 214, 140, 0.13);
}

:root {
  --activity-soft: color-mix(in srgb, var(--activity) 14%, var(--bg-raised));
  --heart-soft: color-mix(in srgb, var(--heart) 14%, var(--bg-raised));
  --sleep-soft: color-mix(in srgb, var(--sleep) 14%, var(--bg-raised));
  --food-soft: color-mix(in srgb, var(--food) 14%, var(--bg-raised));
  --breath-soft: color-mix(in srgb, var(--breath) 14%, var(--bg-raised));

  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1140px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui: "Instrument Sans", system-ui, -apple-system, sans-serif;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image: radial-gradient(var(--grain) 1px, transparent 1px);
  background-size: 22px 22px;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 470;
  font-optical-sizing: auto;
  letter-spacing: -0.018em;
  line-height: 1.04;
  color: var(--ink);
}
.display-num { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 460; }

a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in srgb, var(--activity) 28%, transparent); color: var(--ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; }

/* eyebrow / kicker */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}
.kicker::before {
  content: ""; width: 22px; height: 1.5px; background: var(--kr, var(--activity)); border-radius: 2px;
}
.kicker.no-rule::before { display: none; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-ui); font-size: 15px; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink); color: var(--bg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.12), 0 12px 30px color-mix(in srgb, var(--ink) 22%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,0.15), 0 18px 44px color-mix(in srgb, var(--ink) 30%, transparent); }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--hairline);
}
.btn-ghost:hover { border-color: var(--ink-faint); background: var(--bg-raised); transform: translateY(-2px); }
.btn-lg { font-size: 16.5px; padding: 16px 28px; }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ── Nav ──────────────────────────────────────────────────────── */
header.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(140%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
header.nav.scrolled { border-bottom-color: var(--hairline); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; }
.brand-mark { display: block; height: 25px; width: auto; flex: none; }
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.brand-name b { font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a.link { font-size: 14.5px; color: var(--ink-soft); font-weight: 500; transition: color 0.2s; }
.nav-links a.link:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--bg-raised); color: var(--ink-soft); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 0.2s, border-color 0.2s, transform 0.3s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-toggle { display: none; }
.cta-short { display: none; }

/* ── Section scaffold ─────────────────────────────────────────── */
section { position: relative; }
.section-pad { padding-block: 96px; }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); margin: 18px 0 0; }
.section-head p.lead { margin-top: 18px; font-size: 18px; color: var(--ink-soft); line-height: 1.6; max-width: 600px; }

.eyebrow-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero { padding: 70px 0 90px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -10% -20% auto -20%; height: 620px; z-index: 0;
  background:
    radial-gradient(60% 80% at 78% 18%, var(--halo), transparent 70%),
    radial-gradient(50% 70% at 12% 0%, color-mix(in srgb, var(--breath) 9%, transparent), transparent 72%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center;
}
.hero-copy { max-width: 560px; }
.hero h1 {
  font-size: clamp(42px, 6.4vw, 76px); font-weight: 430; letter-spacing: -0.03em; line-height: 0.98;
  margin: 22px 0 0;
}
.hero h1 .em { font-style: italic; font-weight: 430; color: var(--activity); }
.hero p.sub {
  margin-top: 24px; font-size: clamp(17px, 1.9vw, 20px); line-height: 1.6; color: var(--ink-soft); max-width: 510px;
}
.hero-cta { display: flex; align-items: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-assure { display: flex; align-items: center; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.assure-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); }
.assure-item svg { width: 15px; height: 15px; color: var(--activity); flex: none; }

/* hero visual: floating dashboard cluster */
.hero-visual { position: relative; height: 520px; perspective: 1600px; }
.float-stack { position: absolute; inset: 0; transform-style: preserve-3d; }

/* generic card */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-label {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft);
}
.chip-ico {
  width: 26px; height: 26px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.chip-ico svg { width: 15px; height: 15px; }

/* floating positioned cards */
.fc { position: absolute; box-shadow: var(--shadow-lg); }
.fc-readiness { width: 252px; top: 36px; left: 2%; padding: 20px; z-index: 3; }
.fc-steps     { width: 240px; top: 214px; right: -14px; padding: 18px 20px; z-index: 4; }
.fc-coach     { width: 258px; bottom: -8px; left: -10px; padding: 14px; z-index: 5; }
.fc-coach .bubble { font-size: 12px; }
.fc-sleep     { width: 168px; top: 8px; right: 4%; padding: 16px; z-index: 2; }

.floaty { animation: floaty 7s ease-in-out infinite; }
.floaty.d1 { animation-delay: -1.6s; }
.floaty.d2 { animation-delay: -3.4s; }
.floaty.d3 { animation-delay: -0.8s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* readiness ring */
.ring-wrap { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.ring { --p: 82; width: 88px; height: 88px; flex: none; position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); width: 88px; height: 88px; }
.ring .ring-num { position: absolute; text-align: center; }
.ring .ring-num b { font-family: var(--font-display); font-size: 26px; font-weight: 500; display: block; color: var(--activity); line-height: 1; }
.ring .ring-num span { font-size: 9.5px; color: var(--ink-soft); }
.ring-reasons { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.ring-reasons li { margin-left: 15px; margin-bottom: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}

/* big number block */
.bignum { display: flex; align-items: baseline; gap: 7px; margin-top: 12px; }
.bignum b { font-family: var(--font-display); font-size: 34px; font-weight: 460; line-height: 1; }
.bignum span { font-size: 12.5px; color: var(--ink-soft); }
.goalbar { height: 7px; border-radius: 999px; background: var(--bg-inset); margin-top: 12px; overflow: hidden; }
.goalbar > i { display: block; height: 100%; border-radius: 999px; }

/* mini coach chat */
.chat-row { display: flex; gap: 9px; margin-top: 10px; }
.chat-row.me { justify-content: flex-end; }
.bubble {
  max-width: 86%; padding: 9px 13px; border-radius: 15px; font-size: 12.5px; line-height: 1.45;
}
.bubble.ai { background: var(--bg-inset); border-bottom-left-radius: 5px; }
.bubble.me { background: var(--activity); color: #fff; border-bottom-right-radius: 5px; }
:root[data-theme="light"] .bubble.me { color: #fff; }
.src-tag {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 7px;
  font-size: 10.5px; font-weight: 600; color: var(--breath);
  background: var(--breath-soft); padding: 3px 8px; border-radius: 999px;
}
.src-tag svg { width: 10px; height: 10px; }

/* sleep mini bars */
.sleepbars { display: flex; align-items: flex-end; gap: 4px; height: 40px; margin-top: 12px; }
.sleepbars i { flex: 1; border-radius: 3px; background: var(--sleep); opacity: 0.85; }

/* ── Trust / privacy strip ────────────────────────────────────── */
.privacy-strip { padding: 60px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: var(--bg-inset); }
.privacy-strip .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.privacy-strip h2 { font-size: clamp(26px, 3.6vw, 38px); }
.privacy-strip p { margin-top: 16px; color: var(--ink-soft); font-size: 17px; line-height: 1.65; }
.privacy-points { display: grid; gap: 14px; }
.ppoint { display: flex; gap: 13px; align-items: flex-start; }
.ppoint .pi {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: var(--activity-soft); color: var(--activity);
}
.ppoint .pi svg { width: 19px; height: 19px; }
.ppoint b { font-size: 15.5px; font-weight: 600; display: block; }
.ppoint p { margin-top: 2px; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

/* ── Feature pillars ──────────────────────────────────────────── */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding-block: 86px; }
.feature:not(:last-child) { border-bottom: 1px solid var(--hairline); }
.feature.flip .feature-copy { order: 2; }
.feature-copy { max-width: 500px; }
.feature-copy h3 { font-size: clamp(27px, 3.6vw, 40px); margin: 16px 0 0; }
.feature-copy p.lead { margin-top: 16px; font-size: 17px; color: var(--ink-soft); line-height: 1.62; }
.feature-list { margin-top: 22px; display: grid; gap: 13px; }
.feature-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--ink); list-style: none; }
.feature-list li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent, var(--activity)); }
.feature-list li span { color: var(--ink-soft); }
.feature-list li b { color: var(--ink); font-weight: 600; }

.feature-visual { position: relative; min-height: 360px; display: grid; place-items: center; }
.visual-frame {
  width: 100%; border-radius: var(--radius); position: relative;
  padding: 26px; overflow: hidden;
  background:
    radial-gradient(120% 120% at 80% 0%, color-mix(in srgb, var(--accent, var(--activity)) 8%, var(--bg-inset)), var(--bg-inset));
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
}

/* metric grid (whole-body) */
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric-cell { background: var(--bg-raised); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 14px; }
.metric-cell .mc-top { display: flex; align-items: center; gap: 8px; }
.metric-cell .mc-val { display: flex; align-items: baseline; gap: 5px; margin-top: 9px; }
.metric-cell .mc-val b { font-family: var(--font-display); font-size: 25px; font-weight: 460; }
.metric-cell .mc-val span { font-size: 11px; color: var(--ink-soft); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 9px; }
.spark i { flex: 1; border-radius: 2px; opacity: 0.55; }
.spark i.hi { opacity: 1; }

/* telegram mock */
.tg-phone {
  width: 280px; margin: 0 auto; border-radius: 26px; padding: 14px;
  background: var(--bg-raised); border: 1px solid var(--hairline); box-shadow: var(--shadow-lg);
}
.tg-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 12px; border-bottom: 1px solid var(--hairline); }
.tg-avatar { width: 34px; height: 34px; border-radius: 999px; background: linear-gradient(135deg, var(--breath), var(--activity)); display: grid; place-items: center; color: #fff; }
.tg-avatar svg { width: 18px; height: 18px; }
.tg-name b { font-size: 14px; display: block; }
.tg-name span { font-size: 11px; color: var(--activity); }
.tg-body { padding: 14px 4px 4px; display: grid; gap: 9px; }
.tg-msg { background: var(--bg-inset); padding: 10px 13px; border-radius: 14px; border-top-left-radius: 5px; font-size: 12.5px; line-height: 1.45; max-width: 92%; }
.tg-msg.out { background: var(--breath-soft); border-top-left-radius: 14px; border-top-right-radius: 5px; justify-self: end; }
.tg-time { font-size: 9.5px; color: var(--ink-faint); margin-top: 3px; display: block; }

/* exercise snacks circles */
.snack-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.snack {
  width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center;
  border: 2px solid var(--hairline); color: var(--ink-faint); font-size: 18px;
  background: var(--bg-raised); transition: all 0.3s;
}
.snack.done { border-color: var(--food); background: var(--food-soft); color: var(--food); }
.snack.next { border-color: var(--food); color: var(--food); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--food) 40%, transparent); }
  50% { box-shadow: 0 0 0 7px transparent; }
}
.snack-meta { text-align: center; margin-top: 18px; }
.snack-meta b { font-family: var(--font-display); font-size: 30px; color: var(--food); }
.snack-meta span { color: var(--ink-soft); font-size: 13px; }

/* sharing scopes */
.share-card { background: var(--bg-raised); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 14px 16px; }
.share-card + .share-card { margin-top: 11px; }
.share-top { display: flex; align-items: center; justify-content: space-between; }
.share-who { display: flex; align-items: center; gap: 10px; }
.share-who .av { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.share-who b { font-size: 14.5px; display: block; }
.share-who span { font-size: 11.5px; color: var(--ink-soft); }
.scopes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.scope { font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--bg-inset); color: var(--ink-soft); border: 1px solid var(--hairline); }
.scope.on { background: var(--activity-soft); color: var(--activity); border-color: transparent; }
.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--activity); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 999px; background: #fff; }
.switch.off { background: var(--bg-inset); border: 1px solid var(--hairline); }
.switch.off::after { left: 2px; right: auto; background: var(--ink-faint); }

/* ── Nutrition / macro card ───────────────────────────────────── */
.nutri-card { width: 100%; max-width: 380px; margin: 0 auto; background: var(--bg-raised); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-lg); }
.nutri-top { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.macro-list { flex: 1; min-width: 0; display: grid; gap: 11px; }
.macro-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; color: var(--ink-soft); }
.macro-row b { font-family: var(--font-display); font-size: 14px; color: var(--ink); }
.macro-bar { margin-top: 5px; height: 6px; border-radius: 999px; background: var(--bg-inset); overflow: hidden; }
.macro-bar > i { display: block; height: 100%; border-radius: 999px; }
.nutri-meal { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.meal-photo { width: 44px; height: 44px; flex: none; border-radius: 12px; object-fit: cover; display: block; border: 1px solid var(--hairline); }
.meal-info { flex: 1; min-width: 0; }
.meal-info b { font-size: 14px; display: block; }
.meal-info span { font-size: 11.5px; color: var(--ink-soft); }
.prov-badge { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--breath); background: var(--breath-soft); padding: 4px 9px; border-radius: 999px; }
.prov-badge svg { width: 11px; height: 11px; }
.nutri-methods { display: flex; gap: 8px; margin-top: 16px; }
.nutri-chip { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--bg-inset); border: 1px solid var(--hairline); border-radius: 11px; padding: 9px 6px; }
.nutri-chip svg { width: 15px; height: 15px; color: var(--food); flex: none; }
.nutri-chip svg.barcode { width: 20px; height: 14px; }

/* ── How it works (steps) ─────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; padding: 30px 26px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); }
.step .sn { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--activity); }
.step .si { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--activity-soft); color: var(--activity); margin: 14px 0 18px; }
.step .si svg { width: 23px; height: 23px; }
.step h3 { font-size: 21px; }
.step p { margin-top: 10px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

/* ── Who it's for ─────────────────────────────────────────────── */
.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.who-card { padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--hairline); background: var(--bg-raised); }
.who-card .wi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; }
.who-card .wi svg { width: 22px; height: 22px; }
.who-card h3 { font-size: 20px; }
.who-card p { margin-top: 9px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

/* ── FAQ ──────────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
.faq-item { border-bottom: 1px solid var(--hairline); padding: 4px 0; }
.faq-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--font-ui); font-size: 17px; font-weight: 600; color: var(--ink); }
.faq-q .pm { flex: none; width: 22px; height: 22px; position: relative; transition: transform 0.3s; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: var(--activity); border-radius: 2px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.faq-q .pm::before { width: 14px; height: 2px; }
.faq-q .pm::after { width: 2px; height: 14px; transition: transform 0.3s; }
.faq-item.open .pm::after { transform: translate(-50%,-50%) scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a p { padding: 0 0 22px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; max-width: 90%; }

/* ── Final CTA ────────────────────────────────────────────────── */
.cta-final { padding-block: 30px 110px; }
.cta-box {
  position: relative; overflow: hidden;
  border-radius: 32px; padding: 72px 56px; text-align: center;
  background:
    radial-gradient(70% 120% at 50% 0%, var(--halo), transparent 70%),
    var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
}
.cta-box h2 { color: var(--bg); font-size: clamp(32px, 5vw, 56px); font-weight: 430; letter-spacing: -0.025em; }
.cta-box h2 .em { font-style: italic; color: var(--activity); }
.cta-box p { margin: 20px auto 0; max-width: 520px; color: color-mix(in srgb, var(--bg) 78%, transparent); font-size: 18px; }
.cta-box .btn-primary { background: var(--bg); color: var(--ink); margin-top: 34px; box-shadow: 0 14px 40px rgba(0,0,0,0.3); }
.cta-box .btn-primary:hover { box-shadow: 0 20px 56px rgba(0,0,0,0.4); }
.cta-note { margin-top: 18px; font-size: 13.5px; color: color-mix(in srgb, var(--bg) 62%, transparent); }
.cta-deco { position: absolute; border-radius: 999px; filter: blur(2px); opacity: 0.6; }

/* ── Footer ───────────────────────────────────────────────────── */
footer.foot { border-top: 1px solid var(--hairline); padding: 50px 0 60px; }
.foot-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot p.tag { margin-top: 14px; color: var(--ink-soft); font-size: 14px; max-width: 320px; line-height: 1.6; }
.foot-links { display: flex; gap: 48px; flex-wrap: wrap; }
.foot-col h4 { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.foot-col a { display: block; font-size: 14.5px; color: var(--ink-soft); margin-bottom: 9px; transition: color 0.2s; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--hairline); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-bottom small { color: var(--ink-faint); font-size: 13px; line-height: 1.6; }
.disclaimer { font-size: 12.5px; color: var(--ink-faint); max-width: 640px; line-height: 1.55; }

/* ── App-faithful widgets (rendered by script.js) ────────────── */
.appviz { display: flex; justify-content: center; align-items: center; }
.appviz svg { display: block; }
.ring-box { position: relative; display: grid; place-items: center; flex: none; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring-center b { font-family: var(--font-display); font-size: 23px; font-weight: 500; }
.ring-center span { font-size: 9.5px; color: var(--ink-soft); margin-top: 1px; }

.mc-viz { display: flex; align-items: center; justify-content: center; margin-top: 10px; min-height: 100px; }
.mc-viz.line { min-height: 100px; }
.mc-cap { margin-top: 10px; font-size: 12px; color: var(--ink-soft); }
.mc-cap b { font-family: var(--font-display); font-size: 14px; }

/* ── BYO AI model ─────────────────────────────────────────────── */
.byo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.byo-card { position: relative; padding: 32px 28px; border-radius: var(--radius); border: 1px solid var(--hairline); background: var(--bg-raised); box-shadow: var(--shadow-sm); overflow: hidden; }
.byo-ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px; }
.byo-ico svg { width: 25px; height: 25px; }
.byo-card h3 { font-size: 22px; }
.byo-card p { margin-top: 11px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.58; }
.byo-badge { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }

/* ── Wearables ────────────────────────────────────────────────── */
.wear-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.wear-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 34px 24px 30px; border-radius: var(--radius); border: 1px solid var(--hairline); background: var(--bg-raised); box-shadow: var(--shadow-sm); transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.35s cubic-bezier(0.22,1,0.36,1); }
.wear-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.wear-art { width: 124px; height: 143px; margin-bottom: 16px; }
.wear-svg { width: 100%; height: 100%; display: block; }
.wear-name { font-family: var(--font-display); font-size: 20px; font-weight: 500; color: var(--ink); }
.wear-note { margin-top: 5px; font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0.01em; }

/* ── Exercise-snacks panel (mirrors components/ExerciseSnacks.tsx) ── */
.snack-panel { width: 100%; max-width: 360px; margin: 0 auto; background: var(--bg-raised); border: 1px solid var(--hairline); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-lg); }
.snack-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.snack-panel-head h4 { font-family: var(--font-ui); font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; letter-spacing: -0.01em; }
.snack-count { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.snack-instr { margin-top: 6px; font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.snack-circles { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.sc { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; border: 1.5px dashed var(--hairline); background: var(--bg); color: var(--ink-faint); overflow: hidden; }
.sc svg { display: block; }
.sc.done { border: 1.5px solid var(--activity); background: var(--activity-soft); color: var(--activity); }
.sc.next { border: 1.5px solid var(--food); background: var(--food-soft); color: var(--food); font-weight: 600; animation: breathe 2.6s ease-in-out infinite; }
.sc.upcoming { border: 1.5px dashed var(--hairline); background: var(--bg); }
.snack-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 15px; font-size: 11.5px; color: var(--ink-soft); }
.snack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.snack-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.snack-legend i.ring-i { background: transparent; border: 1.5px dashed var(--ink-faint); }
.snack-suggest { margin-top: 15px; background: transparent; border: none; color: var(--activity); font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 6px; }
.snack-suggest-panel { margin-top: 16px; border-top: 1px solid var(--hairline); padding-top: 14px; }
.snack-suggest-label { font-size: 12.5px; font-weight: 600; color: var(--activity); display: inline-flex; align-items: center; gap: 6px; }
.snack-suggest-row { display: flex; gap: 9px; margin-top: 12px; }
.snack-chip { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 4px 9px; border-radius: 13px; background: var(--bg-inset); border: 1px solid var(--hairline); }
.snack-chip-fig { display: flex; align-items: center; justify-content: center; height: 40px; }
.snack-chip b { font-size: 10.5px; font-weight: 600; color: var(--ink-soft); }
.snack-suggest-row .snack-chip:nth-child(1) .snack-chip-fig { color: var(--activity); }
.snack-suggest-row .snack-chip:nth-child(2) .snack-chip-fig { color: var(--breath); }
.snack-suggest-row .snack-chip:nth-child(3) .snack-chip-fig { color: var(--food); }
.snack-suggest-row .snack-chip:nth-child(4) .snack-chip-fig { color: var(--heart); }

/* ── Scroll reveal ────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; } .reveal.d4 { transition-delay: 0.32s; }

/* hero load-in (no scroll dependency) */
.rise { opacity: 0; transform: translateY(20px); animation: rise 0.9s cubic-bezier(0.22,1,0.36,1) forwards; }
.rise-1 { animation-delay: 0.05s; } .rise-2 { animation-delay: 0.18s; } .rise-3 { animation-delay: 0.32s; }
.rise-4 { animation-delay: 0.46s; } .rise-5 { animation-delay: 0.6s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { height: 440px; max-width: 460px; margin: 0 auto; width: 100%; }
  .privacy-strip .wrap { grid-template-columns: 1fr; gap: 32px; }
  .feature { grid-template-columns: 1fr; gap: 30px; padding-block: 60px; }
  .feature.flip .feature-copy { order: 0; }
  .section-pad { padding-block: 72px; }
  .section-head { margin-bottom: 40px; }
  .steps { grid-template-columns: 1fr; }
  .byo-grid { grid-template-columns: 1fr; }
  .who-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; gap: 0 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .section-pad { padding-block: 62px; }
  .section-head { margin-bottom: 32px; }
  .feature { padding-block: 54px; gap: 26px; }
  .privacy-strip { padding: 44px 0; }
  /* Feature mockup cards span the column so their left edge matches the copy. */
  .feature-visual .nutri-card, .feature-visual .snack-panel, .feature-visual .visual-frame { max-width: 100%; margin-left: 0; margin-right: 0; }
  .wear-grid { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; }
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .nav-actions { gap: 10px; }
  .nav-actions .btn-primary { font-size: 13.5px; padding: 10px 15px; }
  .nav-actions .btn-primary .arrow { display: none; }
  .cta-full { display: none; }
  .cta-short { display: inline; }
  .brand-name { font-size: 17.5px; }
  .wrap { padding-inline: 18px; }
  .cta-box { padding: 52px 26px; }
  .hero { padding: 36px 0 54px; }

  /* Hero cluster: keep the overlapping desktop arrangement, just scaled to
     fit the phone — so the same key details (82, 7h20m, 9,240, coach reply)
     stay visible without the cards covering each other's headers. */
  .hero-visual { position: relative; height: 358px; max-width: 100%; margin: 6px auto 0; overflow: visible; }
  .float-stack { position: absolute; top: 0; left: 50%; width: 480px; height: 520px; transform: translateX(-50%) scale(0.68); transform-origin: top center; }

  .foot-bottom { flex-direction: column; align-items: flex-start; }
}
