/* Lepo — lepohealth.app
 * One shared visual system, no build step and no external requests.
 *
 * The palette is the H1 app icon, "Evening to Aurora" (tools/AppIcon/lepo-icon-h1.svg):
 * a kaamos sky, the Lepo line running amber → rose → violet → aurora teal, and a cream
 * point for today. The palette and its rules are in docs/DESIGN_SYSTEM.md § Brand Identity;
 * change it there first, then in the icon and here, so the three read as one brand.
 * Everything is styled from this file because the CSP in _headers allows
 * style-src 'self' only: no <style> blocks, no style="" attributes.
 */

:root {
  color-scheme: dark;

  /* Sky — the icon's background gradient, plus one step darker for the page itself */
  --sky-0: #0B0917;
  --sky-1: #120E24;
  --sky-2: #2E2150;
  --sky-3: #6B3E6E;

  /* The Lepo line */
  --amber: #FFB36B;
  --rose: #FF6F91;
  --violet: #8C7BFF;
  --teal: #4FD1B5;
  --cream: #FFE9CC;

  /* Roles */
  --bg: var(--sky-0);
  --surface: rgb(36 27 66 / 0.55);
  --surface-strong: rgb(42 31 76 / 0.82);
  --fg: #F5F0FA;
  --muted: #B9B0CC;
  --border: rgb(200 184 255 / 0.14);
  --border-strong: rgb(200 184 255 / 0.26);
  --accent: var(--teal);
  --fg-soft: rgb(245 240 250 / 0.06);
  --pos: var(--teal);
  --neg: var(--rose);

  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --container: 72rem;
  --measure: 42rem;
  --gutter: 2rem;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  overflow-x: clip;
  /* The night deepens toward the bottom of the page the way the icon's sky does,
   * but only as far as plum-tinted near-black: body text has to hold 4.5:1 on
   * every part of it. */
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgb(107 62 110 / 0.35), transparent 70%),
    radial-gradient(50rem 36rem at -10% 30%, rgb(46 33 80 / 0.55), transparent 70%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-0) 40rem, var(--sky-0) 100%);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
picture { display: block; }
a { color: inherit; text-underline-offset: 0.2em; }
button { font: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.75rem, 6.4vw, 5.25rem); line-height: 1; letter-spacing: -0.045em; font-weight: 750; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.06; letter-spacing: -0.035em; font-weight: 720; }
h3 { font-size: 1.375rem; line-height: 1.3; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; border-radius: 6px; }
::selection { background: rgb(140 123 255 / 0.45); color: var(--fg); }

.container, .wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap { max-width: var(--measure); }
.section { position: relative; padding-block: clamp(4rem, 9vw, 7rem); }
/* The sticky nav is 4rem tall and would otherwise cover the top of whatever an
 * anchor link lands on. Section padding hides that at wide viewports but not
 * around 768px, where 8vw of padding is less than the header. */
.section[id] { scroll-margin-top: 4.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.lead { max-width: 56ch; margin: 0; color: var(--muted); font-size: 1.1875rem; line-height: 1.6; }
.eyebrow, .caption {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* A short cream rule before every eyebrow. Cream, not the line: the full
 * gradient is kept for the hero aurora, the score ring and the rest band. */
.eyebrow::before {
  content: "";
  flex: none;
  width: 1.5rem;
  height: 2px;
  border-radius: 2px;
  background: var(--cream);
  opacity: 0.6;
}
.meta, .num { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }

/* Shared navigation and footer */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(11 9 23 / 0.72);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: 1.5rem; }
.logo { display: inline-flex; align-items: center; gap: 0.625rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 750; letter-spacing: -0.03em; text-decoration: none; }
/* The app icon, masked to the iOS squircle ratio the share card already uses.
 * The square artwork is never stretched, and the mark carries an empty alt: the
 * word beside it names the link, so describing it again would give the same
 * link two names. 1.75rem is what /brand/logo-96.png is emitted for — three
 * times this is the 96px file, so no display upscales it. */
.logo-mark { width: 1.75rem; height: 1.75rem; border-radius: 22.37%; box-shadow: 0 0 0 1px var(--border), 0 0.375rem 1.25rem rgb(255 111 145 / 0.25); }
.topnav nav { display: flex; gap: 0.25rem; }
.topnav nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.875rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.topnav nav a:hover { color: var(--fg); background: var(--fg-soft); }
.topnav nav a[aria-current="page"] { color: var(--fg); background: var(--fg-soft); box-shadow: inset 0 0 0 1px var(--border); }
.nav-action { white-space: nowrap; }
/* In the bar the store action takes the nav links' size and pill, drawn as a
 * cream outline rather than a filled button, so it belongs to the bar instead
 * of sitting on it. It fills cream on hover, the same cream as the main CTAs.
 * Deliberately not .btn-primary, so the filled style can never reach the bar. */
.topnav .nav-action {
  padding-inline: 1rem;
  background: transparent;
  border-color: rgb(255 233 204 / 0.55);
  box-shadow: none;
  color: var(--cream);
  font-size: 0.875rem;
}
.topnav .nav-action:hover {
  background: var(--cream);
  border-color: var(--cream);
  box-shadow: none;
  color: var(--sky-1);
}

.pagefoot {
  position: relative;
  padding-block: 3.5rem 4rem;
  color: var(--muted);
  font-size: 0.8125rem;
}
/* The footer's top rule: a plain hairline that fades at both ends. */
.pagefoot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 20%, var(--border-strong) 80%, transparent);
}
.foot-brand { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 1.5rem; color: var(--fg); font-family: var(--font-display); font-size: 1.125rem; font-weight: 750; letter-spacing: -0.03em; text-decoration: none; }
.foot-brand img { width: 1.75rem; height: 1.75rem; border-radius: 22.37%; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: underline; text-decoration-color: var(--border-strong); transition: color var(--dur) var(--ease-out); }
.footer-nav a:hover { color: var(--fg); text-decoration-color: var(--teal); }

/* Actions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6875rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
/* Primary is the cream point for today: the one bright thing on the sky. */
.btn-primary { background: var(--cream); color: var(--sky-1); border-color: var(--cream); box-shadow: 0 0 0 0 rgb(79 209 181 / 0), 0 0.75rem 2rem rgb(255 179 107 / 0.18); }
.btn-primary:hover { background: #FFF3E2; color: var(--sky-1); box-shadow: 0 0 0 4px rgb(79 209 181 / 0.22), 0 0.75rem 2.5rem rgb(255 179 107 / 0.28); }
.btn-secondary { background: rgb(245 240 250 / 0.04); color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--violet); background: rgb(140 123 255 / 0.12); }
.btn-ghost { padding-inline: 0.75rem; background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg-soft); color: var(--fg); }
.btn-arrow::after { content: "→"; margin-left: 0.5rem; transition: transform var(--dur) var(--ease-out); }
.btn-arrow:hover::after { transform: translateX(3px); }
.btn-lg { min-height: 3.25rem; padding: 0.875rem 1.625rem; font-size: 1rem; }

/* Home hero */
.hero { padding-block: clamp(4rem, 9vw, 7.5rem) clamp(7rem, 14vw, 11rem); overflow: hidden; }
/* Stars: the icon's single cream star, scattered. Pure background, no layout. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 18%, rgb(255 233 204 / 0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 62%, rgb(255 233 204 / 0.5), transparent 60%),
    radial-gradient(2px 2px at 44% 8%, rgb(255 233 204 / 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 34%, rgb(255 233 204 / 0.45), transparent 60%),
    radial-gradient(2.5px 2.5px at 88% 14%, rgb(255 233 204 / 0.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 74% 52%, rgb(255 233 204 / 0.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 6% 78%, rgb(255 233 204 / 0.4), transparent 60%),
    radial-gradient(2px 2px at 95% 70%, rgb(255 233 204 / 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 36% 88%, rgb(255 233 204 / 0.35), transparent 60%);
}
.hero > .container { position: relative; z-index: 1; }
/* The horizon: the icon's line laid on its side across the bottom of the hero,
 * glowing from evening amber into aurora teal and ending in today's point. A
 * decorative overlay pinned to the bottom edge; the hero's bottom padding is
 * the room reserved for it. */
/* ---------- Hero aurora ----------
 * Tall curtains in the icon line’s colours rising from the foot of the hero.
 * Two renderers: aurora.js draws it with WebGL on .aurora-gl and marks the
 * page .has-webgl once running; these CSS layers are the fallback before the
 * script runs and whenever WebGL or scripts are unavailable.
 *
 * The CSS layers cannot change shape in place the way the shader does, so
 * they drift slowly while their height breathes; each layer is a 200%-wide
 * strip that repeats every 100% of the hero, so the loop has no seam. Only
 * transform and opacity animate. Strongest on the right behind the devices,
 * held to about a third behind the headline so the copy keeps its contrast. */
.hero {
  /* Calm: slow drift, long breaths */
  --aurora-height: 96%;
  --aurora-drift-slow: 120s;
  --aurora-drift-mid: 84s;
  --aurora-drift-fast: 56s;
  --aurora-breathe: 11s;
}

.aurora-sep {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--aurora-height);
  overflow: hidden;
  pointer-events: none;
  /* Two masks, intersected: fade upward into the sky, and stay dim on the
   * left where the copy sits. */
  -webkit-mask-image:
    linear-gradient(to top, #000 0%, #000 22%, rgb(0 0 0 / 0.7) 55%, transparent 100%),
    linear-gradient(90deg, rgb(0 0 0 / 0.28) 0%, rgb(0 0 0 / 0.36) 40%, #000 64%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to top, #000 0%, #000 22%, rgb(0 0 0 / 0.7) 55%, transparent 100%),
    linear-gradient(90deg, rgb(0 0 0 / 0.28) 0%, rgb(0 0 0 / 0.36) 40%, #000 64%, #000 100%);
  mask-composite: intersect;
}

/* The horizon: one bright hairline in the line's colours where the hero ends.
 * Shared by both renderers. */
.aurora-sep::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber) 14%, var(--rose) 38%, var(--violet) 64%, var(--teal) 86%, transparent);
  box-shadow: 0 0 1rem rgb(140 123 255 / 0.6), 0 0 3rem rgb(79 209 181 / 0.35);
}

/* ---------- CSS curtains (fallback) ---------- */
.aurora-sep span {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
  background-size: 50% 100%;
  transform-origin: 50% 100%;
  will-change: transform;
  animation: aurora-drift-breathe var(--aurora-drift-mid) linear infinite;
}

/* The layers below follow the WebGL version's look (warm rose at the
 * horizon, teal rising above it) but keep it as curtains: a row of narrow
 * folds of differing heights, each warm at its foot and turning teal as it
 * rises, softly blurred so neighbouring folds overlap without merging into
 * one blob. Each fold is a radial gradient anchored on the horizon, so its
 * colour stops run bottom to top. */

/* 1 — Curtains: rose at the foot, teal higher up, uneven heights */
.aurora-sep span:nth-child(1) {
  --fold: rgb(255 111 145 / 0.5) 0%, rgb(255 111 145 / 0.32) 22%, rgb(79 209 181 / 0.42) 52%, rgb(79 209 181 / 0.18) 80%, transparent 100%;
  background-image:
    radial-gradient(4.5% 58% at 5% 100%,  var(--fold)),
    radial-gradient(3.5% 44% at 15% 100%, var(--fold)),
    radial-gradient(5% 70% at 27% 100%,   var(--fold)),
    radial-gradient(4% 50% at 39% 100%,   var(--fold)),
    radial-gradient(5.5% 76% at 52% 100%, var(--fold)),
    radial-gradient(4% 56% at 63% 100%,   var(--fold)),
    radial-gradient(6% 80% at 74% 100%,   var(--fold)),
    radial-gradient(4% 52% at 85% 100%,   var(--fold)),
    radial-gradient(5% 66% at 95% 100%,   var(--fold));
  filter: blur(22px);
  animation:
    aurora-drift-breathe var(--aurora-drift-slow) linear infinite,
    aurora-glow var(--aurora-breathe) ease-in-out infinite alternate;
}

/* 2 — Warm footing: a low, even rose/amber glow that ties the folds to
 * the horizon, drifting the other way */
.aurora-sep span:nth-child(2) {
  height: 22%;
  background-image:
    radial-gradient(22% 100% at 20% 100%, rgb(255 111 145 / 0.35), transparent 75%),
    radial-gradient(18% 90% at 50% 100%,  rgb(255 179 107 / 0.25), transparent 75%),
    radial-gradient(24% 100% at 78% 100%, rgb(255 111 145 / 0.4),  transparent 75%);
  filter: blur(26px);
  opacity: 1;
  animation-direction: reverse;
}

/* 3 — Bright folds: a few narrower, brighter curtains that flare and fade
 * on their own rhythm, offset from layer 1 */
.aurora-sep span:nth-child(3) {
  --core: rgb(255 140 160 / 0.5) 0%, rgb(110 220 195 / 0.55) 45%, rgb(110 220 195 / 0.2) 80%, transparent 100%;
  background-image:
    radial-gradient(2.5% 62% at 21% 100%, var(--core)),
    radial-gradient(2% 50% at 46% 100%,   var(--core)),
    radial-gradient(3% 72% at 69% 100%,   var(--core)),
    radial-gradient(2% 54% at 90% 100%,   var(--core));
  filter: blur(14px);
  animation:
    aurora-drift-breathe var(--aurora-drift-fast) linear infinite,
    aurora-flare calc(var(--aurora-breathe) * 0.7) ease-in-out infinite alternate;
}

/* 4 — Unused: the chosen Curtains shape has no ribbon. Kept in the markup
 * so the layer count can change without touching index.html. */
.aurora-sep span:nth-child(4) { display: none; }

/* Drift one full tile while the height swells and settles, so the curtains
 * read as breathing light rather than a scrolling strip. Translation stays
 * linear across the stops, so the speed is constant. The swell stays within
 * ±8% so the curtains never climb above the shader's height. */
@keyframes aurora-drift-breathe {
  0%   { transform: translateX(0)      scaleY(1); }
  25%  { transform: translateX(-12.5%) scaleY(1.08); }
  50%  { transform: translateX(-25%)   scaleY(0.92); }
  75%  { transform: translateX(-37.5%) scaleY(1.05); }
  100% { transform: translateX(-50%)   scaleY(1); }
}
@keyframes aurora-glow {
  from { opacity: 0.75; }
  to   { opacity: 1; }
}
@keyframes aurora-flare {
  from { opacity: 0.35; }
  to   { opacity: 0.9; }
}

/* ---------- WebGL canvas ---------- */
/* Takes over from the CSS curtains while .has-webgl is set. The horizon
 * hairline (.aurora-sep::after) stays either way. */
.aurora-gl {
  position: absolute;
  left: 0;
  bottom: 0;
  display: none;
  width: 100%;
  height: var(--aurora-height);
  pointer-events: none;
}
.has-webgl .aurora-gl { display: block; }
.has-webgl .aurora-sep span { display: none; }

/* Let the aurora show through behind the devices: the hero stage keeps its
 * border and floor but drops most of its fill. */
.hero .product-stage {
  background: linear-gradient(180deg, rgb(18 14 36 / 0.2), rgb(18 14 36 / 0.55));
}

/* Stacked layout: copy sits above the devices, so the aurora stays lower and
 * even rather than biased to one side. The shader reads the same breakpoint. */
@media (max-width: 920px) {
  .hero { --aurora-height: 60%; }
  .aurora-sep {
    -webkit-mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.85) 30%, transparent 100%);
    mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.85) 30%, transparent 100%);
  }
}

/* Reduced motion: the CSS curtains hold still. The site-wide rule below shortens
 * every animation to 0.01ms, which on an infinite loop would flicker, so the
 * animation is removed outright. The WebGL version draws one still frame. */
@media (prefers-reduced-motion: reduce) {
  .aurora-sep span { animation: none !important; }
}
.hero-split { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(21.25rem, 1.08fr); gap: clamp(3rem, 7vw, 5.5rem); align-items: center; }
.hero-copy h1 { font-size: clamp(3rem, 7vw, 5.75rem); }
.hero-copy .lead { margin-top: 1.5rem; font-size: 1.25rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.hero-proof { display: flex; align-items: center; gap: 0.625rem; margin: 1.5rem 0 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.02em; }
.hero-proof::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgb(79 209 181 / 0.2), 0 0 0.75rem var(--teal); }

.product-visual { position: relative; min-width: 0; margin: 0; }
.product-stage {
  position: relative;
  display: grid;
  align-items: end;
  gap: 0.875rem;
  min-height: 37.5rem;
  padding: 2.5rem 1.5rem 0;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 50% 100%, rgb(107 62 110 / 0.55), transparent 70%),
    linear-gradient(180deg, rgb(46 33 80 / 0.55), rgb(18 14 36 / 0.85));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 2.5rem 6rem rgb(5 3 12 / 0.6);
}
/* A single soft violet halo behind the devices. One hue, so the aurora behind
 * it stays the only multicolour light in the hero. */
.product-stage::before {
  content: "";
  position: absolute;
  inset: 22% 8% 6%;
  background: radial-gradient(closest-side at 50% 45%, rgb(140 123 255 / 0.35), transparent);
  filter: blur(40px);
  border-radius: 50%;
}
.product-stage > * { position: relative; }
/* One phone and the watch, phone first. The phone gets the width because its
 * breakdown is the thing to read. Both sit on the stage floor: the watch
 * capture is cut below its readiness card, and the floor is what hides the
 * cut, so lifting the watch exposes a half row. */
.stage-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr); }
/* One phone alone, on a prose page rather than in a hero split. The stage's grid
 * would otherwise hand its only child the whole 42rem measure — a 560px-wide
 * screenshot taller than the viewport, reading as the page rather than as a
 * figure in it. The cap is also what keeps a 2× display on the 516 variant; the
 * comment beside the `sizes` value in readiness.html has that arithmetic. */
.stage-single { justify-items: center; }
.stage-single .phone-shot { width: 15.5rem; max-width: 100%; }
.phone-shot { align-self: end; overflow: hidden; background: var(--sky-1); border: 1px solid var(--border-strong); border-bottom: 0; border-radius: 1.75rem 1.75rem 0 0; box-shadow: 0 0 0 6px rgb(18 14 36 / 0.7), 0 1.75rem 4rem rgb(5 3 12 / 0.7); }
.phone-shot img, .watch-shot img { width: 100%; height: auto; }
.watch-shot { align-self: end; overflow: hidden; background: var(--sky-1); border: 1px solid var(--border-strong); border-radius: 1.75rem / 2.125rem; filter: drop-shadow(0 1.25rem 2.125rem rgb(5 3 12 / 0.75)); }
/* One capture rather than a pair, for a .prose page. Two things differ from the
 * stages above: the phone is capped so a single shot does not fill the 42rem
 * measure, and the height floor goes — with nothing beside it the stage only
 * has to be as tall as the shot standing on it. Compounded with .product-stage
 * so the responsive rules at the bottom of this file, which reserve height for
 * the homepage's two-up stages, do not put that floor back. */
.product-stage.stage-solo { grid-template-columns: minmax(0, 16rem); justify-content: center; min-height: 0; }
.prose .product-visual { margin: 2rem 0 2.5rem; }
.product-caption { margin: 0.875rem 0 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.5; text-align: center; }

/* Section heads shared by the homepage bands */
.section-intro { max-width: 40ch; }
.section-intro.is-wide { max-width: 52rem; }
.section-intro .lead { margin-top: 1.25rem; }

/* Score proof: the ring and the breakdown */
.moved { display: grid; grid-template-columns: minmax(15rem, 0.78fr) minmax(0, 1.22fr); gap: clamp(3rem, 7vw, 5.5rem); align-items: start; }
.score-summary { position: sticky; top: 6.75rem; }
.score-summary .lead { margin-top: 1.5rem; }
.score-lockup { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.875rem; }
.score-lockup strong { color: var(--cream); font-family: var(--font-display); font-size: clamp(5.25rem, 12vw, 9.25rem); line-height: 0.8; letter-spacing: -0.07em; }
.score-lockup span { color: var(--muted); font-family: var(--font-mono); }
/* 84 out of 100, drawn as the line itself closing most of a circle. The ring
 * is decoration; the numeral inside it is the content, centred in the same box. */
.score-ring { position: relative; display: grid; place-items: center; width: min(17rem, 100%); aspect-ratio: 1; margin: 2rem 0 0; }
.score-ring svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: visible; }
.score-ring strong { position: relative; color: var(--cream); font-family: var(--font-display); font-size: clamp(4.5rem, 9vw, 6.5rem); font-weight: 750; line-height: 1; letter-spacing: -0.06em; text-shadow: 0 0 2rem rgb(255 233 204 / 0.35); }
.factor-panel {
  padding: 0.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}
.factor-list { border-top: 0; }
.factor { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.375rem 1.5rem; padding: 1.375rem 0; border-bottom: 1px solid var(--border); }
.factor:last-child { border-bottom: 0; }
.factor strong { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 650; }
.factor-reading { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; }
.factor-value { color: var(--fg); text-align: right; white-space: nowrap; }
.factor-status { min-width: 4.875rem; padding: 0.25rem 0.625rem; border: 1px solid rgb(79 209 181 / 0.4); border-radius: 999px; background: rgb(79 209 181 / 0.1); color: #8FE6D2; font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.4; text-align: center; white-space: nowrap; }
.factor-status.is-neg { border-color: rgb(255 111 145 / 0.45); background: rgb(255 111 145 / 0.1); color: #FFA3B9; }
.factor-dir { grid-column: 1 / -1; color: var(--muted); font-size: 0.875rem; }
.example-note { margin: 1.25rem 0 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.6; }

/* Three scores */
.scores { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(3rem, 7vw, 5.5rem); align-items: start; }
.scores-lead { margin-top: 1.25rem; }
.scores-visual { margin-top: 2.5rem; }
.scores-stage { min-height: 31rem; }
.score-stack { display: grid; gap: 1rem; }
.score-entry {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.375rem 1.25rem;
  padding: 1.75rem 1.75rem 1.75rem 1.5rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.score-entry:hover { border-color: var(--border-strong); transform: translateY(-2px); }
/* Score cards stay neutral: colour is reserved for data (the factor pills)
 * and for the three signature moments, not for decoration. */
.score-entry .num { padding-top: 0.45rem; color: var(--cream); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.score-entry p { grid-column: 2; margin: 0.5rem 0 0; color: var(--muted); }
.signals { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.signal { padding: 0.25rem 0.75rem; background: var(--fg-soft); border: 1px solid var(--border); border-radius: 999px; color: var(--fg); font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5; }

/* Principles */
.principles { display: flex; flex-direction: column; gap: 3rem; }
.feature {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.feature-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.5rem;
  color: var(--cream);
  background: var(--fg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 0.875rem;
}
.feature-mark svg { width: 1.25rem; height: 1.25rem; }
.feature p { margin: 0.5rem 0 0; color: var(--muted); font-size: 1rem; }
/* The compatibility line under Ready on day one. Mono, because a model list is a
 * spec rather than prose, but a step down from the paragraph above it: at body
 * size the middle column of the three-up carried twice the visual weight of its
 * neighbours. Same 0.75rem as .hero-proof and .origin-provenance, and scoped
 * under .feature because `.feature p` above would otherwise win on specificity
 * and leave the size unchanged. */
.feature .feature-note { margin-top: 1rem; font-size: 0.75rem; line-height: 1.6; }
.feature .feature-note a:hover { color: var(--fg); }

/* Free and Pro */
.tiers { display: flex; flex-direction: column; gap: 3rem; }
.tier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.tier { display: flex; flex-direction: column; gap: 1.25rem; padding: 2.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
/* Pro carries the line as its border: a gradient on the border box under a
 * solid padding box. The one place the gradient frames content, because Pro is
 * the page's conversion point; the glow stays faint so it reads as an edge. */
.tier-pro {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface-strong), var(--surface-strong)) padding-box,
    linear-gradient(150deg, var(--amber), var(--rose) 35%, var(--violet) 65%, var(--teal)) border-box;
  box-shadow: 0 2rem 5rem rgb(5 3 12 / 0.5), 0 0 3rem rgb(140 123 255 / 0.14);
}
.tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.tier-price { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.8125rem; text-align: right; }
.tier-price strong { display: block; color: var(--fg); font-family: var(--font-display); font-size: 1.625rem; letter-spacing: -0.02em; white-space: nowrap; }
.tier-pro .tier-price strong { color: var(--cream); }
.tier-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.tier-list li { display: grid; grid-template-columns: 1.25rem 1fr; gap: 0.75rem; padding: 0.875rem 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 1rem; }
.tier-list li:last-child { border-bottom: 0; }
.tier-list strong { color: var(--fg); font-weight: 600; }
.tier-list svg { width: 1rem; height: 1rem; margin-top: 0.3rem; color: var(--teal); }
.tier-pro .tier-list svg { color: var(--cream); }
.tier-foot { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.6; }

/* Name origin: the one band that is all sky, with the icon's mark at full size */
.origin-section {
  padding-block: clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
  background:
    radial-gradient(40rem 26rem at 22% 60%, rgb(255 111 145 / 0.16), transparent 70%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 62%, #4A2B57 100%);
  border-block: 1px solid var(--border);
}
.origin-panel { display: grid; grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 7vw, 5.5rem); align-items: center; }
.origin-art { position: relative; }
.origin-mark { width: min(22rem, 100%); height: auto; margin-inline: auto; }
.origin-entry { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; align-items: baseline; margin: 0 0 2rem; }
.origin-entry dd { margin-inline: 0; }
.origin-word { margin: 0; font-family: var(--font-display); font-size: clamp(4rem, 9vw, 7rem); font-weight: 780; line-height: 0.9; letter-spacing: -0.06em; }
.origin-meta { margin: 0; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.origin-meaning { grid-column: 1 / -1; margin: 0.5rem 0 0; color: var(--cream); font-family: var(--font-display); font-size: 1.5rem; }
.origin-copy .lead { margin-top: 1rem; color: #CFC6DF; }
.origin-provenance { margin: 1.25rem 0 0; color: #CFC6DF; font-size: 0.75rem; letter-spacing: 0.04em; }

/* Privacy */
.privacy-panel { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(3rem, 7vw, 5.5rem); align-items: start; }
.privacy-lead { margin-top: 1.25rem; }
.privacy-list { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.privacy-list li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--muted); }
.privacy-list strong { color: var(--fg); }
.privacy-list .num { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; color: var(--sky-1); background: var(--cream); font-size: 0.75rem; font-weight: 700; }
.privacy-link { margin-top: 1.25rem; }

/* FAQ and closing */
.faq { max-width: 52rem; }
.faq-list { display: grid; gap: 0.625rem; margin-top: 2.5rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }
.faq details[open] { background: var(--surface-strong); border-color: var(--border-strong); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4rem; padding: 0.75rem 1.5rem; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 1.125rem; font-weight: 650; border-radius: var(--radius-lg); }
.faq summary:hover { color: var(--cream); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--muted); font-family: var(--font-mono); font-size: 1.125rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; color: var(--sky-1); background: var(--cream); border-color: var(--cream); }
.faq details p { max-width: 65ch; margin: 0; padding: 0 3.5rem 1.5rem 1.5rem; color: var(--muted); }
.faq a { color: var(--fg); }
.faq a:hover { color: var(--teal); }

.cta-strip { text-align: center; }
.cta-card {
  position: relative;
  max-width: 56rem;
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 5rem) var(--gutter);
  overflow: hidden;
  background:
    radial-gradient(70% 80% at 50% 0%, rgb(140 123 255 / 0.24), transparent 70%),
    linear-gradient(180deg, var(--sky-2), var(--sky-1));
  border: 1px solid var(--border-strong);
  border-radius: 2rem;
}
.cta-card > * { position: relative; }
.cta-card .eyebrow { justify-content: center; }
.cta-icon { display: block; width: 5.5rem; height: 5.5rem; margin: 0 auto 2rem; border-radius: 22.37%; box-shadow: 0 0 0 1px var(--border-strong), 0 1rem 3rem rgb(5 3 12 / 0.6); }
.cta-inner .lead { margin: 1rem auto 2rem; }

/* Privacy, support, readiness, Body Battery and 404 */
.prose { padding-block: clamp(3.5rem, 8vw, 6rem); }
.prose h1 { font-size: clamp(2.75rem, 7vw, 4.25rem); }
.prose h2 { margin: 3.5rem 0 0.875rem; font-size: clamp(1.75rem, 4vw, 2.375rem); }
.prose h3 { margin: 2rem 0 0.5rem; font-size: 1.1875rem; }
.prose p { margin: 0 0 1.15rem; }
.prose > .lede { margin-top: 1.25rem; color: var(--muted); font-size: 1.1875rem; }
.prose ul, .prose ol { margin: 0 0 1.15rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--violet); }
.prose a { color: var(--fg); text-decoration-color: rgb(79 209 181 / 0.6); }
.prose a:hover { color: var(--teal); }
.prose a.btn { text-decoration: none; }
.prose .caption { margin-top: 3.5rem; }
.prose > .caption:first-child { margin-top: 0; }
.prose .plain { padding: 0.875rem 1.125rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); font-size: 0.9375rem; }
code { padding: 0.0625rem 0.3125rem; background: var(--fg-soft); border-radius: 0.3125rem; font-family: var(--font-mono); font-size: 0.9em; }
.scroller { max-width: 100%; overflow-x: auto; }
.prose table { width: 100%; margin: 0 0 1.5rem; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.prose th { color: var(--teal); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.updated { color: var(--muted); font-family: var(--font-mono); font-size: 0.8125rem; }

@media (max-width: 920px) {
  .hero-split, .moved, .scores, .origin-panel, .privacy-panel, .grid-3, .tier-grid { grid-template-columns: 1fr; }
  .hero-split { gap: 3.5rem; }
  .score-summary { position: static; }
  .score-ring { width: min(14rem, 100%); }
  .product-stage { width: 100%; max-width: 38.75rem; min-height: 32.5rem; margin-inline: auto; }
  .scores-stage { min-height: 26rem; }
  .origin-mark { width: min(16rem, 70%); }
}

/* The section links go away on narrow viewports rather than moving to a
 * second row. Keeping them costs a second sticky row — about 96px of a phone
 * viewport, pinned for the whole scroll — and this is one page that a reader
 * gets through by scrolling. Five links plus the action need about 800px to
 * sit on one line with room to breathe, which is why this breakpoint is above
 * the phone one below. The
 * logo and the store action stay, so the two things a phone reader
 * actually needs from a fixed header survive. */
@media (max-width: 840px) {
  .topnav nav { display: none; }
}

@media (max-width: 640px) {
  :root { --gutter: 1.25rem; }
  .nav-action { padding-inline: 0.875rem; }
  .hero { padding-block: 3rem 5.5rem; }
  .hero-copy .lead { font-size: 1.125rem; }
  .product-stage { min-height: 0; padding: 1.25rem 1rem 0; gap: 0.5rem; border-radius: var(--radius-lg); }
  .stage-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); }
  .phone-shot { border-radius: 1.125rem 1.125rem 0 0; box-shadow: 0 0 0 4px rgb(18 14 36 / 0.7), 0 1rem 2.5rem rgb(5 3 12 / 0.7); }
  .watch-shot { border-radius: 1.125rem / 1.375rem; }
  .score-lockup { flex-wrap: wrap; }
  .factor-panel { padding: 0.25rem 1.125rem; }
  .factor { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .factor-reading { justify-content: space-between; }
  .factor-value { text-align: left; }
  .factor-dir { grid-column: auto; }
  .score-entry { grid-template-columns: minmax(0, 1fr); padding: 1.5rem 1.25rem; }
  .score-entry p, .signals { grid-column: 1; }
  .feature, .tier { padding: 1.5rem; }
  .tier-head { flex-direction: column; align-items: flex-start; }
  .tier-price { text-align: left; }
  .privacy-list li { padding: 1.125rem; grid-template-columns: 2.25rem 1fr; }
  .faq summary { padding-inline: 1.125rem; }
  .faq details p { padding: 0 1.125rem 1.25rem; }
  .row-between { align-items: flex-start; flex-direction: column; }
  .prose table { min-width: 36rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .score-entry:hover { transform: none; }
}
