/* WeighCast website — shared styles for every page.
   Brand green #0F6E56 is taken from the app icon (SPEC.md §9b). */

:root {
  --brand: #0f6e56;
  --brand-deep: #0b4f3f;
  --brand-bright: #1a9373;
  --brand-mint: #8fe3c6;
  --brand-tint: #e6f2ee;

  --bg: #ffffff;
  --bg-soft: #f4f7f6;
  --card: #ffffff;
  --text: #13201c;
  --muted: #5a6b66;
  --line: #e2e8e6;
  --grey-dot: #8c9693;
  --chart-grid: #e8eceb;
  --phone-screen: #ffffff;
  --tile: #f1f3f2;
  --shadow: 0 30px 60px -20px rgba(11, 79, 63, 0.35);

  --radius: 20px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1311;
    --bg-soft: #121b18;
    --card: #16211e;
    --text: #e8efed;
    --muted: #9db0aa;
    --line: #24322e;
    --grey-dot: #7d8a86;
    --chart-grid: #26332f;
    --phone-screen: #0f1714;
    --tile: #1b2724;
    --brand-tint: #15302a;
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0c1311;
  --bg-soft: #121b18;
  --card: #16211e;
  --text: #e8efed;
  --muted: #9db0aa;
  --line: #24322e;
  --grey-dot: #7d8a86;
  --chart-grid: #26332f;
  --phone-screen: #0f1714;
  --tile: #1b2724;
  --brand-tint: #15302a;
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; display: block; }
a { color: var(--brand-bright); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand-mint); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav .btn { color: #fff; }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--brand); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 16px; padding: 12px 20px; border-radius: 999px;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--brand-deep); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-light { background: #fff; color: var(--brand-deep); }
.btn-light:hover { background: var(--brand-tint); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #1a9373 0%, #0f6e56 55%, #0b4f3f 100%);
  color: #fff;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; font-weight: 700; color: var(--brand-mint); margin: 0 0 14px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(38px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 20px; font-weight: 800; }
.hero .lede { font-size: clamp(18px, 2vw, 21px); color: rgba(255,255,255,.88); max-width: 34em; margin: 0 0 30px; }
.hero .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-bottom: 18px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.pill-row li { font-size: 14px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.92); }
.hero-text { padding-bottom: 72px; }
.hero-phone { align-self: end; display: flex; justify-content: center; }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; gap: 8px; }
  .hero-text { padding-bottom: 32px; }
}

/* ---------- Phone mockup (built in HTML so it stays crisp) ---------- */
.phone {
  width: 340px; max-width: 100%;
  background: #121614; border-radius: 52px 52px 0 0;
  padding: 12px 12px 0; box-shadow: var(--shadow);
}
.phone.full { border-radius: 52px; padding-bottom: 12px; }
.screen {
  background: var(--phone-screen); color: var(--text);
  border-radius: 40px 40px 0 0; overflow: hidden;
  padding: 14px 16px 22px; font-size: 13px; line-height: 1.35;
  background-image: linear-gradient(180deg, rgba(15,110,86,.42) 0, rgba(15,110,86,.15) 90px, rgba(15,110,86,0) 200px);
}
.phone.full .screen { border-radius: 40px; }
.status { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; padding: 2px 10px 10px; }
.island { width: 92px; height: 26px; background: #121614; border-radius: 20px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.round { width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--phone-screen) 75%, transparent); display: grid; place-items: center; color: var(--brand); font-weight: 600; }
.round svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.wordmark { color: var(--brand); font-weight: 800; letter-spacing: .14em; font-size: 12px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark, :root:not([data-theme="light"]) .round { color: var(--brand-mint); } }
:root[data-theme="dark"] .wordmark, :root[data-theme="dark"] .round { color: var(--brand-mint); }
.range-card { background: var(--tile); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.range-card .label { color: var(--muted); font-size: 12px; }
.range-card .range { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 2px 0; }
.range-card .likely { color: var(--muted); font-size: 11.5px; }
.chart { margin: 4px 0 2px; }
.chart-note { text-align: center; color: var(--muted); font-size: 10.5px; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: var(--tile); border-radius: 12px; padding: 8px 11px; }
.tile .k { color: var(--muted); font-size: 11px; }
.tile .v { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.tile .d { color: var(--muted); font-size: 10.5px; min-height: 1em; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
@media (max-width: 600px) { section { padding: 64px 0; } }
.soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; font-weight: 700; color: var(--brand-bright); margin: 0 0 12px; }
h2 { font-family: var(--font-display); font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 16px; font-weight: 800; }
h3 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 8px; line-height: 1.25; }
.section-head p { color: var(--muted); font-size: 19px; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-bright); font-weight: 800; margin-bottom: 18px; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }

/* Narrowing range */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.split p.body { color: var(--muted); font-size: 18px; }
.narrow { display: grid; gap: 14px; }
.narrow-row { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.narrow-row .when { color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; }
.narrow-row .dates { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin: 2px 0 10px; }
.bar { position: relative; height: 10px; border-radius: 999px; background: var(--chart-grid); }
.bar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, rgba(26,147,115,.55), var(--brand-bright), rgba(26,147,115,.55)); }
.footnote { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* Milestones */
.ms-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 0; }
.ms { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ms:last-child { border-bottom: 0; }
.ms .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.ms.done .dot { background: var(--brand); border-color: var(--brand); }
.ms.done .dot svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; fill: none; }
.ms.next .dot { border-color: var(--brand-bright); box-shadow: 0 0 0 4px var(--brand-tint); }
.ms .w { font-weight: 700; font-size: 18px; min-width: 64px; }
.ms .t { color: var(--muted); font-size: 15px; }
.ms.next .t { color: var(--text); font-weight: 600; }
.ms .tag { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand-bright); background: var(--brand-tint); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); display: grid; place-items: center; margin-bottom: 16px; }
.feature .ic svg { width: 22px; height: 22px; stroke: var(--brand-bright); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); margin: 0; font-size: 16px; }
.units { display: inline-flex; gap: 6px; margin-top: 12px; }
.units span { font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--tile); }

/* Calm / won't do */
.calm { background: linear-gradient(180deg, #0f6e56, #0b4f3f); color: #fff; }
.calm .kicker { color: var(--brand-mint); }
.calm .section-head p { color: rgba(255,255,255,.82); }
.nots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 40px; list-style: none; padding: 0; margin: 0; }
.nots li { display: flex; gap: 14px; align-items: flex-start; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.16); }
.nots svg { flex: none; width: 22px; height: 22px; margin-top: 3px; stroke: var(--brand-mint); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.nots strong { display: block; font-size: 18px; margin-bottom: 2px; }
.nots span { color: rgba(255,255,255,.78); font-size: 16px; }
@media (max-width: 760px) { .nots { grid-template-columns: 1fr; } }

/* Privacy */
.privacy-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 44px; display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: start; }
.privacy-card .lock { width: 72px; height: 72px; border-radius: 20px; background: var(--brand); display: grid; place-items: center; }
.privacy-card .lock svg { width: 34px; height: 34px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.checks { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.checks li { display: flex; gap: 10px; color: var(--text); }
.checks svg { flex: none; width: 20px; height: 20px; margin-top: 3px; stroke: var(--brand-bright); stroke-width: 2.5; fill: none; }
@media (max-width: 760px) { .privacy-card { grid-template-columns: 1fr; padding: 28px 22px; gap: 20px; } .checks { grid-template-columns: 1fr; } }

/* Video */
.video-split { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.video-frame { width: 300px; border-radius: 44px; background: #121614; padding: 10px; box-shadow: var(--shadow); }
.video-frame video { width: 100%; aspect-ratio: 9 / 16; border-radius: 34px; background: #0f6e56; object-fit: cover; }
@media (max-width: 820px) { .video-split { grid-template-columns: 1fr; } .video-frame { margin: 0 auto; width: min(300px, 100%); } }

/* Final CTA */
.final { text-align: center; }
.final img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 24px; box-shadow: var(--shadow); }
.final p { color: var(--muted); font-size: 19px; margin: 0 auto 28px; max-width: 32em; }
.small-print { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 15px; color: var(--muted); background: var(--bg-soft); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { color: var(--text); font-size: 14px; margin: 0 0 10px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--text); text-decoration: underline; }
.disclaimer { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13.5px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Document pages (privacy, terms) ---------- */
.doc-hero { background: linear-gradient(180deg, rgba(15,110,86,.16), transparent); padding: 64px 0 24px; }
.doc { max-width: 760px; margin: 0 auto; padding: 0 24px 96px; }
@media (max-width: 600px) { .doc { padding: 0 16px 64px; } }
.doc h1 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 10px; }
.doc .updated { color: var(--muted); margin: 0 0 8px; }
.doc h2 { font-size: 24px; letter-spacing: -0.015em; margin: 44px 0 10px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .summary { background: var(--brand-tint); border-radius: 18px; padding: 22px 26px; margin: 28px 0 8px; }
.doc .summary h2 { margin-top: 0; font-size: 20px; }
.doc .summary ul { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 16px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; font-size: 14px; }
.table-scroll { overflow-x: auto; }
