/* Tokens from the StressBucket design system (light theme). */
:root {
  color-scheme: light;
  --ground: #f1f4f3;
  --surface: #ffffff;
  --sunken: #e3e9e8;
  --line: #c7d1d0;
  --line-strong: #6e7f83;
  --ink: #0f1b1f;
  --ink-muted: #4a5a5f;
  --deep: #12262b;
  --on-deep: #eaf1f0;
  --ember: #ee7546;
  --ember-hover: #e0643a;
  --on-ember: #0f1b1f;
  --ember-ink: #a8431c;
  --ember-soft: #fbe3d8;
  --level-calm: #9fd8c4;
  --level-rising: #ebcc5e;
  --level-high: #ee7546;
  --level-peak: #e8604b;
  --on-level: #0f1b1f;
  --level-calm-ink: #1f6b55;
  --level-peak-ink: #b3301f;
  --level-peak-ink-on-deep: #f4907c;
  --focus: #0f1b1f;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --font-display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --font-text: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-text); font-size: 17px; line-height: 26px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--ember-ink); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

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

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 26px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand img { display: block; width: 31px; height: 40px; }
.wordmark-a { font-weight: 800; }
.wordmark-b { font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
/* On phones the hero form is right below the header, so the header keeps only the brand. */
@media (max-width: 480px) { .site-nav { display: none; } }

/* Type */
.eyebrow { margin: 0; font-weight: 700; font-size: 13px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.hero-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 5.4vw, 72px); line-height: 0.98; letter-spacing: -0.03em; }
.section-title { margin: 0; font-family: var(--font-display); font-weight: 750; font-size: clamp(36px, 3.6vw, 48px); line-height: 1.02; letter-spacing: -0.02em; }
.lead { margin: 0; font-size: 20px; line-height: 30px; }
.muted { color: var(--ink-muted); }

/* Sections */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 48px; align-items: center; padding-block: 48px 80px; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.band-sunken { background: var(--sunken); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 48px; align-items: start; padding-block: 80px; }
.section { display: flex; flex-direction: column; gap: 48px; padding-block: 80px; }
.rule-top { border-top: 1px solid var(--line); }

/* Hero reading */
.reading { margin: 0; display: flex; align-items: flex-end; justify-content: center; gap: 32px; flex-wrap: wrap; padding: 40px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.reading .sb-bucket { width: 240px; }
.reading figcaption { display: flex; flex-direction: column; gap: 12px; min-width: 180px; }
.score { font-family: var(--font-display); font-weight: 800; font-size: 96px; line-height: 88px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.data { font-family: var(--font-mono); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.note { font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Fill and drain cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 480px) { .card { padding: 24px; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 32px; letter-spacing: -0.01em; }
.tag { padding: 5px 12px 6px; border-radius: var(--radius-pill); font-weight: 700; font-size: 13px; line-height: 16px; }
.tag-raises { background: var(--ember-soft); color: var(--ember-ink); }
.tag-lowers { background: var(--level-calm); color: var(--on-level); }
.list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.list li { padding: 14px 0; border-bottom: 1px solid var(--line); }

/* Steps */
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 2px solid var(--ink); }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 32px; }
.step-title { margin: 0; font-weight: 700; font-size: 20px; line-height: 26px; }
.steps p { margin: 0; color: var(--ink-muted); }

/* Privacy */
.privacy { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 32px; align-items: start; padding-block: 80px; }
.privacy h2 { font-size: clamp(32px, 3vw, 40px); line-height: 1.05; }
.privacy p { margin: 0; }
.privacy strong { display: block; margin-bottom: 4px; }

/* Closing band */
.deep { background: var(--deep); color: var(--on-deep); --focus: var(--on-deep); }
.closing { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 48px; align-items: center; padding-block: 80px; }
.closing-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 4.4vw, 60px); line-height: 1; letter-spacing: -0.025em; }
.closing .sb-bucket { width: 200px; justify-self: center; }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding-block: 32px 48px; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.site-footer a { color: var(--ink-muted); }

/* Components (from the design system bundle) */
.sb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--radius-md); background: var(--ember); color: var(--on-ember); font: 700 16px/1 var(--font-text); text-decoration: none; cursor: pointer; transition: background-color .15s ease-out; }
.sb-btn:hover { background: var(--ember-hover); color: var(--on-ember); }
.sb-btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.sb-btn[aria-busy="true"] { cursor: progress; }

.sb-waitlist { display: grid; gap: 8px; max-width: 520px; }
.sb-waitlist__label { font: 700 13px/16px var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.sb-waitlist__row { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-input { flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: 400 17px/1 var(--font-text); }
.sb-input::placeholder { color: var(--ink-muted); }
.sb-input[aria-invalid="true"] { border-color: var(--level-peak-ink); border-width: 2px; }
.sb-waitlist__help { margin: 0; font: 400 14px/20px var(--font-text); color: var(--ink-muted); }
.sb-waitlist__help--error { color: var(--level-peak-ink); }
.sb-waitlist__done { margin: 0; font: 700 17px/26px var(--font-text); color: var(--level-calm-ink); }
.deep .sb-waitlist__label, .deep .sb-waitlist__help { color: var(--on-deep); }
.deep .sb-waitlist__help--error { color: var(--level-peak-ink-on-deep); }
.deep .sb-waitlist__done { color: var(--level-calm); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.sb-level { display: inline-flex; align-self: flex-start; align-items: baseline; gap: 6px; padding: 5px 12px 6px; border-radius: var(--radius-pill); background: var(--level-high); color: var(--on-level); font: 700 13px/16px var(--font-text); font-variant-numeric: tabular-nums; }
.sb-level__num { font: 800 16px/16px var(--font-display); }

.sb-bucket { display: block; height: auto; overflow: visible; }
.sb-bucket__body { fill: var(--surface); }
.sb-bucket__outline { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.sb-bucket__rim { fill: var(--ink); }
.sb-bucket__tick { stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; }
.sb-bucket__liquid { fill: var(--level-high); }
.sb-bucket--calm .sb-bucket__liquid { fill: var(--level-calm); }
.sb-bucket__eye { fill: var(--on-level); }
.sb-bucket__lid { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.deep .sb-bucket__outline { stroke: var(--on-deep); }
.deep .sb-bucket__rim { fill: var(--on-deep); }
.deep .sb-bucket__tick { stroke: var(--on-deep); }

/* Legal page */
.legal { max-width: 720px; padding-block: 48px 80px; }
.legal h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 5vw, 52px); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 24px; }
.legal h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 30px; margin: 40px 0 8px; }
.legal p, .legal li { color: var(--ink); }
