/* Mission Run · missionrun.app
   Built to the designer's handoff v1 (docs/handoff). One-off layout values stay inline in
   the page templates exactly as the design file has them; this sheet holds the base, the
   repeated patterns, and every hover / focus / active / state rule. */

:root {
  --navy: #0A1424; --s1: #0D1A2E; --s2: #10223A;
  --line: #35577A; --line-muted: #536675;
  --white: #F2F5F7; --text-2: #BAC7D3; --muted: #8496A8;
  --cyan: #37BFEA; --blue: #3670DC; --blue-hover: #3F78E0; --blue-active: #2C5DB8;
  --green: #42C98A; --red: #E94D58; --amber: #D4B45E;
  --ring: 0 0 0 3px rgba(55, 191, 234, .25);
  --display: 'Barlow Condensed', Impact, sans-serif;
  --ui: Inter, system-ui, sans-serif;
  --mono: 'IBM Plex Sans', monospace;
  color-scheme: dark;
}

html, body { margin: 0; background: var(--navy); color: var(--white); -webkit-font-smoothing: antialiased; }
html { scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { font-family: var(--ui); min-height: 100vh; }
a { color: var(--cyan); }
a:hover { color: var(--white); }
input::placeholder { color: var(--line-muted); }
img { max-width: 100%; }
picture { display: contents; }
@keyframes spin { to { transform: rotate(360deg); } }

[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.skip { position: absolute; left: 12px; top: -100px; z-index: 50; padding: 12px 16px; border-radius: 12px; background: var(--blue); color: var(--white); font: 600 14px/1 var(--ui); text-decoration: none; }
.skip:focus { top: 10px; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(13, 26, 46, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 72px); height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); padding: 4px; border-radius: 8px; }
.brand:focus-visible { outline-offset: 2px; }
.primary-nav { display: flex; align-items: center; gap: 28px; }
@media (max-width: 819.98px) { .primary-nav { display: none; } }
.nav-link { color: var(--text-2); text-decoration: none; font: 500 14px/1 var(--ui); padding: 8px 2px; border-radius: 4px; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--white); }
.nav-link:focus-visible { outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--white); text-decoration: none; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.btn:hover { color: var(--white); }
.btn-primary { min-height: 56px; padding: 0 28px; background: var(--blue); border: 0; font: 700 15px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-primary:active { background: var(--blue-active); }
.btn-primary.header-cta { min-height: 44px; padding: 0 18px; font-size: 13px; white-space: nowrap; }
.btn-ghost { min-height: 56px; padding: 0 24px; border: 1px solid var(--line); background: rgba(16, 34, 58, .6); font: 500 15px/1 var(--ui); }
.btn-ghost:hover, .btn-line:hover { border-color: var(--cyan); }
.btn-line { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); font: 500 14px/1 var(--ui); }
.btn-quiet { min-height: 44px; padding: 0 12px; background: none; border: 0; color: var(--muted); font: 500 14px/1 var(--ui); border-radius: 8px; }
.btn-quiet:hover { color: var(--white); }

/* Type */
.eyebrow { font: 500 12px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.h2 { margin: 0; font: 700 clamp(36px, 4.6vw, 60px)/.95 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--white); }
.h2-feature { margin: 0; font: 700 clamp(40px, 5vw, 68px)/.95 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--white); }
.plate { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 8px; background: rgba(10, 20, 36, .85); border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* Linked cards and panels */
.card-link { transition: border-color 150ms ease; }
.card-link:hover { border-color: var(--cyan) !important; color: var(--white); }

/* Footer */
.footer-link { color: var(--text-2); text-decoration: none; font: 400 14px/1.3 var(--ui); padding: 8px 0; border-radius: 4px; }
.footer-link:hover { color: var(--white); }
.footer-link:focus-visible, .toc-link:focus-visible { outline-offset: 2px; }
.store-later { border: 1px dashed var(--line-muted); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 500; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }

/* Waitlist form */
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font: 500 13px/1.2 var(--ui); color: var(--white); }
.opt { color: var(--muted); font-weight: 400; }
.input { width: 100%; box-sizing: border-box; height: 52px; padding: 0 14px; border-radius: 12px; background: var(--navy); color: var(--white); font: 400 16px/1 var(--ui); outline: none; border: 1px solid var(--line); box-shadow: none; }
.input:focus { border-color: var(--cyan); box-shadow: var(--ring); }
.input[aria-invalid="true"], .input[aria-invalid="true"]:focus { border-color: var(--red); }
.err { display: flex; gap: 8px; align-items: center; color: var(--red); font: 500 13px/1.3 var(--ui); }
.err[hidden] { display: none; }
.err-ring { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--red); display: inline-flex; align-items: center; justify-content: center; font: 700 10px/1 var(--ui); flex: none; box-sizing: border-box; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { min-height: 52px; border-radius: 12px; cursor: pointer; color: var(--white); font: 500 15px/1 var(--ui); display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--navy); border: 1px solid var(--line); box-sizing: border-box; transition: border-color 150ms ease, background-color 150ms ease; }
.choice:hover { border-color: var(--cyan); }
.choice .rdot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-muted); box-sizing: border-box; background: transparent; background-clip: content-box; padding: 2px; }
.choice:has(input:checked) { background: rgba(55, 191, 234, .1); border: 2px solid var(--cyan); }
.choice:has(input:checked) .rdot { border-color: var(--cyan); background-color: var(--cyan); }
.choices[data-invalid="true"] .choice:not(:has(input:checked)) { border-color: var(--red); }
.choice:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 3px; }

.check { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 0; color: var(--white); font: 400 15px/1.4 var(--ui); cursor: pointer; border-radius: 8px; }
.check:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 4px; }
.box { width: 24px; height: 24px; border-radius: 6px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--navy); color: var(--navy); font: 700 14px/1 var(--ui); box-sizing: border-box; }
.box::after { content: ''; }
.check:has(input:checked) .box { border-color: var(--cyan); background: var(--cyan); }
.check:has(input:checked) .box::after { content: '✓'; }

.consent { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); }
.consent .check { align-items: flex-start; padding: 0; font: 400 14px/1.5 var(--ui); }
.consent .check .box { margin-top: -1px; }
.consent .check:has(input:focus-visible) { outline-offset: 6px; }
.consent[data-invalid="true"] { border-color: var(--red); }
.consent[data-invalid="true"] .check:not(:has(input:checked)) .box { border-color: var(--red); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--red); background: rgba(233, 77, 88, .08); color: var(--white); font: 400 14px/1.45 var(--ui); }
.banner[hidden] { display: none; }

.submit { gap: 12px; padding: 0 24px; width: 100%; }
.submit[aria-busy="true"], .submit[aria-busy="true"]:hover { background: var(--blue-active); cursor: progress; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(242, 245, 247, .35); border-top-color: var(--white); animation: spin .9s linear infinite; flex: none; box-sizing: border-box; }
.spinner[hidden] { display: none; }

/* Support FAQ */
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 16px 20px; background: none; border: 0; color: var(--white); font: 600 16px/1.3 var(--ui); text-align: left; cursor: pointer; }
.faq-q:hover { background: rgba(55, 191, 234, .05); }
.faq-q:focus-visible { outline-offset: -2px; border-radius: 12px; }

/* Sticky side columns (waitlist intro, support intro, legal contents). Once the grid is a
   single column a sticky block would sit over the content scrolling under it, so it
   becomes static at the same 820 px switch the header uses. */
.stick { position: sticky; top: 88px; }
@media (max-width: 819.98px) { .stick { position: static; } }

/* Legal */
.legal-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 819.98px) { .legal-grid { grid-template-columns: minmax(0, 1fr); } }
.toc-link { display: flex; gap: 10px; padding: 6px 0; color: var(--text-2); text-decoration: none; font: 400 14px/1.4 var(--ui); border-radius: 4px; }
.toc-link:hover { color: var(--white); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .spinner { animation: none; }
}

.wl-state:not([hidden]) { display: flex; }
.faq [role="region"]:not([hidden]) { display: flex; }
