/* ==========================================================================
   Stage Zero Health — marketing site design system (clinical-modern)
   Static, zero-dependency. Self-hosted variable fonts (preloaded, ~85KB):
   Fraunces (display) + Inter (text), with system-stack fallbacks.
   ========================================================================== */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  /* Color tokens */
  --ink: #0e1c2e;          /* deep navy — headings, nav */
  --ink-soft: #3b4a63;     /* body text */
  --ink-faint: #536078;    /* secondary text — AA 4.6:1 on white */
  --surface: #ffffff;
  --surface-alt: #f4f7f6;  /* alternating section background */
  --surface-deep: #0e1c2e; /* dark bands */
  --line: #e3e8ee;
  --accent: #1e44c8;       /* deep medical indigo-blue */
  --accent-strong: #15339b;
  --accent-tint: #e9eefb;
  --amber: #c2552e;        /* warm coral — sparing highlight (stats, badges) */
  --amber-tint: #faece5;
  --danger: #a33b2e;

  /* Type scale */
  --font: "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces Variable", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-xl: clamp(2.4rem, 5.5vw, 4rem);
  --display-lg: clamp(1.9rem, 3.8vw, 2.8rem);
  --display-md: clamp(1.55rem, 2.4vw, 1.9rem);
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --text-lg: 1.2rem;
  --text-md: 1.05rem;
  --text-sm: 0.92rem;
  --text-xs: 0.8rem;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(14, 28, 46, 0.04), 0 2px 8px rgba(14, 28, 46, 0.04);
  --shadow: 0 1px 2px rgba(14, 28, 46, 0.05), 0 8px 28px rgba(14, 28, 46, 0.07);
  --shadow-hover: 0 2px 4px rgba(14, 28, 46, 0.05), 0 14px 36px rgba(14, 28, 46, 0.10);
  --maxw: 1140px;
  --maxw-narrow: 780px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
/* Tighter tracking at the top of the display scale (h1 caps out near 4rem). */
h1 { letter-spacing: -0.032em; }

h1, h2, h3 { text-wrap: balance; }

::selection { background: var(--accent); color: #fff; }

h1 { font-size: var(--display-xl); }
h2 { font-size: var(--display-lg); }
h3 { font-size: var(--display-md); }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 1em; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
/* WCAG 1.4.1: links inside body text must not rely on color alone */
p a:not(.btn), .footer-legal a, .faq-body a { text-decoration: underline; text-underline-offset: 2px; }
strong { color: var(--ink); }

img, svg { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--maxw-narrow); }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 32px;
  height: 32px;
  background-image: url("logo-mark-48.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex: none;
}

.brand small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 600;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent-strong); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 44px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

/* Enforce comfortable touch targets on touch devices regardless of width */
@media (pointer: coarse) {
  .explorer-presets button { min-height: 44px; }
  .faq summary { padding-top: 20px; padding-bottom: 20px; }
}

/* Collapse to a hamburger as soon as the inline links would crowd the CTAs.
   The four links + two buttons stop fitting comfortably below ~1040px, so we
   switch to the mobile menu there — never the cramped, wrapping in-between state. */
@media (max-width: 1040px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links li + li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 14px 0; font-size: var(--text-md); }
}

@media (max-width: 560px) {
  .nav { gap: 10px; }
  .brand { white-space: nowrap; font-size: 1rem; gap: 8px; }
  .brand small { font-size: 0.58rem; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn--ghost { display: none; }
  .nav-cta .btn--primary { padding: 9px 16px; font-size: 0.82rem; }
  .nav-toggle { padding: 8px 11px; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.16s var(--ease-out), box-shadow 0.16s var(--ease-out), background 0.16s var(--ease-out);
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

/* Unified keyboard focus ring across all interactive elements */
a:focus-visible, .btn:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, summary:focus-visible,
.stage-node:focus-visible, .explorer-presets button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (forced-colors: active) {
  input:focus, select:focus { outline: 2px solid ButtonText; }
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(14, 28, 46, 0.12);
}
.btn--primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 2px 6px rgba(14, 28, 46, 0.16);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink-faint); }

.btn--light {
  background: #fff;
  color: var(--ink);
}

.btn--lg { padding: 16px 34px; font-size: var(--text-md); }

/* --------------------------------------------------------------------------
   Sections & bands
   -------------------------------------------------------------------------- */
.section { padding: 88px 0; }
.section--alt { background: var(--surface-alt); }
.section--deep { background: var(--surface-deep); color: #c6d2e2; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section--deep strong { color: #fff; }
.section--tight { padding: 56px 0; }

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 16px;
}
.section--deep .eyebrow { color: #9db8ff; }
.eyebrow--amber { color: var(--amber); }

.section-head { max-width: 780px; margin-bottom: 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.lede { font-size: var(--text-lg); color: var(--ink-soft); max-width: 62ch; }
/* Cap reading-prose measure so multi-paragraph copy stays in a readable band (~66ch). */
.container--narrow p:not(.lede):not(.form-success) { max-width: 66ch; }
.section-head--center .lede { margin-left: auto; margin-right: auto; }
.section--deep .lede { color: #c6d2e2; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 96px 0 80px;
  background:
    radial-gradient(1100px 500px at 85% -10%, var(--accent-tint) 0%, transparent 60%),
    radial-gradient(800px 400px at 0% 115%, rgba(194, 85, 46, 0.06) 0%, transparent 60%),
    var(--surface);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: 0.5em; font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
.hero .lede { margin-bottom: 1.8em; max-width: 560px; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero-note { margin-top: 18px; font-size: var(--text-sm); color: var(--ink-faint); }

/* Hero visual: risk distribution card */
.hero-visual {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}
.hero-visual h4, .hero-visual .widget-title { font-size: var(--text-sm); color: var(--ink-faint); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 18px; }

.risk-row { display: grid; grid-template-columns: 110px 1fr 56px; gap: 12px; align-items: center; margin-bottom: 14px; font-size: var(--text-sm); }
.risk-row .label { color: var(--ink); font-weight: 600; }
.risk-bar { height: 10px; border-radius: 6px; background: var(--surface-alt); overflow: hidden; }
.risk-bar span { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.risk-row .pct { text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.risk-row--high .risk-bar span { background: var(--amber); }
.hero-visual .footnote { font-size: var(--text-xs); color: var(--ink-faint); margin: 14px 0 0; }

/* Conversation panel (honest Q&A — not data-viz) */
.convo { display: flex; flex-direction: column; gap: 14px; }
.convo-turn { border-radius: var(--radius); padding: 16px 18px; }
.convo-turn--q { background: var(--surface-alt); border: 1px solid var(--line); }
.convo-turn--a { background: var(--accent-tint); border: 1px solid rgba(30, 68, 200, 0.16); border-left: 3px solid var(--accent); }
.convo-label { display: block; font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.convo-turn--a .convo-label { color: var(--accent-strong); }
.convo-turn p { margin: 0; font-size: 1rem; font-weight: 600; color: var(--ink); line-height: 1.5; }

/* --------------------------------------------------------------------------
   Population risk explorer (homepage hero widget)
   -------------------------------------------------------------------------- */
.explorer {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 26px 22px;
}

.explorer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.explorer-head h4, .explorer-head .widget-title {
  font-size: var(--text-sm);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0;
}
.explorer-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: 4px 10px;
  flex: none;
}

.explorer-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; }
.explorer-presets-label { font-size: 0.7rem; color: var(--ink-faint); font-weight: 600; width: 100%; margin-bottom: 2px; }
.explorer-presets button {
  font: inherit; font-size: 0.74rem; font-weight: 600;
  color: var(--ink-soft); background: var(--surface-alt);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 11px; cursor: pointer; transition: all 0.12s ease;
}
.explorer-presets button:hover { border-color: var(--accent); color: var(--accent-strong); }
.explorer-presets button[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-strong); }

.explorer-controls { display: grid; gap: 10px; margin-bottom: 18px; }
.explorer-control { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.explorer-control label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0;
}
.explorer-control output {
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.explorer-control input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  padding: 0;
  border: none;
  height: 22px;
  accent-color: var(--accent);
  background: transparent;
  cursor: pointer;
}
.explorer-control input[type="range"]:focus { box-shadow: none; outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.dotgrid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 5px;
  margin-bottom: 6px;
}
.dotgrid i {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #dbe2ec;
  transition: background 0.45s var(--ease-soft), transform 0.45s var(--ease-soft);
}
.dotgrid i.is-overdue { background: var(--accent); }
.dotgrid i.is-elevated { background: var(--amber); transform: scale(1.15); }
.dot-caption { font-size: var(--text-xs); color: var(--ink-faint); margin: 0 0 14px; }

.explorer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-bottom: 16px;
}
@media (max-width: 420px) { .explorer-stats { grid-template-columns: 1fr; gap: 12px; } }
.explorer-stat .v {
  display: block;
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.explorer-stat .v.coral { color: var(--amber); }
.explorer-stat .v.indigo { color: var(--accent-strong); }
.explorer-stat .k { font-size: 0.7rem; color: var(--ink-faint); line-height: 1.35; display: block; margin-top: 2px; }

.explorer-cost {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.explorer-cost-label { display: block; font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.explorer-cost-sub { display: block; font-size: 0.7rem; color: var(--ink-faint); line-height: 1.35; margin-top: 2px; }
.explorer-cost-v {
  font-family: var(--font-display); font-weight: 620;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -0.01em;
  color: var(--accent-strong); white-space: nowrap; font-variant-numeric: tabular-nums;
}

.explorer-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.explorer-cta .btn { padding: 10px 20px; font-size: var(--text-xs); }
.explorer .footnote { font-size: 0.68rem; color: var(--ink-faint); margin: 8px 0 0; line-height: 1.5; }
.explorer-foot { margin-top: 12px; }
.explorer-foot summary { font-size: 0.72rem; font-weight: 600; color: var(--ink-faint); cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.explorer-foot summary::-webkit-details-marker { display: none; }
.explorer-foot summary::after { content: "+"; color: var(--accent-strong); font-weight: 400; }
.explorer-foot[open] summary::after { content: "–"; }
.explorer-foot summary:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .dotgrid i { transition: none; }
}

/* --------------------------------------------------------------------------
   Stage Timeline — signature interactive (stages 0→IV)
   -------------------------------------------------------------------------- */
.stages {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 44px 48px 36px;
  margin-bottom: 48px;
}
@media (max-width: 720px) { .stages { padding: 28px 22px 24px; } }

.stages-track { position: relative; margin: 18px 0 10px; }
.stages-line {
  position: absolute; top: 50%; left: 0; right: 0; height: 4px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--accent) 0%, #8fa6e8 30%, #e0b39a 70%, var(--amber) 100%);
  border-radius: 4px;
}
.stages-nodes { position: relative; display: flex; justify-content: space-between; }
.stage-node {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line);
  font-family: var(--font-display); font-weight: 620; font-size: 1.25rem;
  color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; z-index: 1;
  transition: border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.stage-node:hover { border-color: var(--ink-faint); }
.stage-node[aria-pressed="true"] {
  border-color: var(--accent); color: var(--accent-strong);
  transform: scale(1.18);
  box-shadow: 0 0 0 6px var(--accent-tint), var(--shadow);
}
.stage-node--zero[aria-pressed="true"] {
  border-color: var(--accent);
}
@media (max-width: 720px) { .stage-node { width: 44px; height: 44px; min-width: 44px; min-height: 44px; font-size: 1rem; } }

.stages-readout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  gap: 32px;
  align-items: center;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  min-height: 130px;
  transition: opacity 0.18s var(--ease-out);
}
.stages-readout.is-changing { opacity: 0.25; }
@media (max-width: 880px) { .stages-readout { grid-template-columns: 1fr; gap: 16px; min-height: 0; } }
.stages-readout .story h3 { font-size: 1.15rem; margin-bottom: 6px; }
.stages-readout .story p { font-size: var(--text-sm); color: var(--ink-soft); margin: 0; max-width: 480px; }
.stages-metric .v {
  display: block; font-family: var(--font-display); font-weight: 620;
  font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -0.015em;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1;
}
.stages-metric .v.good { color: var(--accent-strong); }
.stages-metric .v.bad { color: var(--amber); }
.stages-metric .k { font-size: var(--text-xs); color: var(--ink-faint); display: block; margin-top: 6px; max-width: 150px; line-height: 1.4; }
.stages-foot { font-size: 0.7rem; color: var(--ink-faint); margin: 18px 0 0; line-height: 1.5; }
.stages .eyebrow { margin-bottom: 4px; }
.stages-hint { font-size: var(--text-xs); color: var(--ink-faint); margin: 0 0 8px; }

/* --------------------------------------------------------------------------
   Two Timelines scrollstory (employers)
   -------------------------------------------------------------------------- */
.story-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.story-col-head {
  font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 10px 16px; border-radius: 999px; text-align: center;
}
.story-col-head--sz { background: var(--accent-tint); color: var(--accent-strong); }
.story-col-head--base { background: #eef0f4; color: var(--ink-faint); }

.story-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; position: relative; }
.story-year {
  position: absolute; left: 50%; top: -10px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px;
  z-index: 1;
}
.story-cell {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 22px; font-size: var(--text-sm);
  box-shadow: var(--shadow-sm);
}
.story-cell--sz { border-left: 3px solid var(--accent); }
.story-cell--base { border-left: 3px solid #c9cfd9; color: var(--ink-faint); }
.story-cell b { color: var(--ink); display: block; margin-bottom: 4px; }
.story-cell--base b { color: var(--ink-soft); }
.story-cell p { margin: 0; }
@media (max-width: 720px) {
  .story-cols, .story-row { grid-template-columns: 1fr; gap: 10px; }
  .story-year { position: static; transform: none; display: inline-block; margin-bottom: 4px; }
}

/* staggered reveal for story rows */
.story-row.reveal { transition-delay: 0.08s; }

/* --------------------------------------------------------------------------
   Ghost zero motif
   -------------------------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band::before {
  content: "0";
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 580;
  font-size: clamp(16rem, 30vw, 26rem); line-height: 1;
  color: rgba(157, 184, 255, 0.07);
  pointer-events: none;
}
.cta-band > * { position: relative; }

/* --------------------------------------------------------------------------
   Stat band
   -------------------------------------------------------------------------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 760px) { .stat-band { grid-template-columns: 1fr; } }

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.stat .src { margin-top: auto; padding-top: 14px; }
.section--deep .stat { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.14); }

.stat .num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 640;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.section--deep .stat .num { color: #fff; }
.stat .num em { font-style: normal; color: var(--accent-strong); }
.section--deep .stat .num em { color: #9db8ff; }

.stat .desc { font-size: var(--text-sm); color: var(--ink-faint); margin: 8px 0 0; }
.section--deep .stat .desc { color: #9fb0c6; }
.stat .src { font-size: var(--text-xs); color: var(--ink-faint); display: block; opacity: 0.85; }

/* --------------------------------------------------------------------------
   Cards / grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) and (min-width: 641px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 960px) { .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card:active { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.card--accent { border-top: 4px solid var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.icon-dot {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(160deg, var(--accent-tint) 0%, #dbe5fa 100%);
  border: 1px solid rgba(30, 68, 200, 0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--accent-strong);
}
.icon-dot svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 12px; }
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-tint);
}
.checklist li::after {
  content: "";
  position: absolute; left: 4px; top: 9px;
  width: 8px; height: 5px;
  border-left: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  transform: rotate(-45deg);
}
.section--deep .checklist li::before { background: rgba(157, 184, 255, 0.18); }
.section--deep .checklist li::after { border-color: #9db8ff; }

/* --------------------------------------------------------------------------
   Mandate band
   -------------------------------------------------------------------------- */
.mandate-band {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #101e38 0%, #1c2a66 100%);
  color: #c6d2e2;
  padding: 56px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: center;
}
@media (max-width: 960px) { .mandate-band { grid-template-columns: 1fr; padding: 36px 28px; } }
.mandate-band h2, .mandate-band h3 { color: #fff; }
.mandate-band .eyebrow { color: #9db8ff; }

.mandate-band--compact {
  grid-template-columns: 1fr auto;
  gap: 40px;
  padding: 44px 48px;
  align-items: center;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(157, 184, 255, 0.14) 0%, transparent 60%),
    linear-gradient(135deg, #101e38 0%, #1c2a66 100%);
}
.mandate-band--compact h3 { margin-bottom: 0.4em; }
.mandate-band--compact p { max-width: 640px; }
@media (max-width: 960px) { .mandate-band--compact { grid-template-columns: 1fr; gap: 24px; } }

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--amber-tint);
  color: #94401b; /* darkened for WCAG AA contrast on the tint */
  margin-bottom: 16px;
}
.badge--live { background: rgba(255, 168, 130, 0.16); color: #ffb899; }

/* --------------------------------------------------------------------------
   Comparison table
   -------------------------------------------------------------------------- */
.compare { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); border-bottom: 2px solid var(--ink); }
.compare tbody th { color: var(--ink); font-weight: 700; width: 26%; }
.compare tbody tr { transition: background 0.15s ease; }
.compare tbody tr:hover { background: #fafbfd; }
.compare tbody tr:hover .col-sz { background: #dfe9f8; }
.compare .col-sz { background: var(--accent-tint); }
.compare-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.compare-wrap .compare { min-width: 640px; }
/* right-edge fade hints there's more table to scroll on small screens */
@media (max-width: 700px) {
  .compare-wrap { background-image: linear-gradient(90deg, transparent calc(100% - 28px), rgba(14,28,46,0.06)); background-attachment: local; }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 22px 36px 22px 0;
  font-weight: 700;
  color: var(--ink);
  font-size: var(--text-md);
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400;
  color: var(--accent-strong);
}
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 0 22px; max-width: 720px; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

label { display: block; font-size: var(--text-sm); font-weight: 700; color: var(--ink); margin-bottom: 6px; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem; /* 16px — prevents iOS focus auto-zoom */
  color: var(--ink);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 68, 200, 0.15);
}

.form-success {
  display: none;
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  color: var(--accent-strong);
  border-radius: var(--radius);
  padding: 20px;
  font-weight: 600;
}

.form-disclaimer { font-size: var(--text-xs); color: var(--ink-faint); margin-top: 14px; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  background:
    radial-gradient(700px 340px at 50% -30%, rgba(60, 95, 230, 0.32) 0%, transparent 65%),
    var(--surface-deep);
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  text-align: center;
  color: #c6d2e2;
}
@media (max-width: 640px) { .cta-band { padding: 44px 24px; } }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 560px; margin: 0 auto 28px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface-deep);
  color: #9fb0c6;
  padding: 64px 0 36px;
  font-size: var(--text-sm);
  margin-top: 88px;
}
.site-footer a { color: #c6d2e2; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4, .site-footer .footer-h { color: #fff; font-size: var(--text-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 28px;
  font-size: var(--text-xs);
  color: #7e8fa6;
  line-height: 1.7;
}
.footer-legal p { margin-bottom: 0.8em; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--ink-faint); }
.small { font-size: var(--text-sm); }

/* Bio cards (about page) */
.bio-name { font-size: 1.05rem; margin-bottom: 2px; }
.bio-name--lead { font-size: 1.15rem; }
.bio-role { color: var(--accent-strong); font-weight: 700; margin-bottom: 10px; }

/* Founder pull-quote */
.pullquote { font-family: var(--font-display); font-size: 1.35rem; font-weight: 560; color: var(--ink); line-height: 1.4; letter-spacing: -0.01em; }
/* Download link inside a form success state */
.form-success a { font-weight: 800; }
.tiny { font-size: var(--text-xs); }

/* Reveal-on-scroll (progressive enhancement; respects reduced motion) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s var(--ease-soft), transform 0.55s var(--ease-soft); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; transition-delay: 0s !important; }
  .stages-readout { transition: none; }
  .btn { transition: none; }
}

/* Print */
@media print {
  .site-header, .site-footer, .cta-band, .nav-cta { display: none; }
}
