/* StatWhisper landing page. Tokens mirror the app's Jumbotron theme (src/ui/theme.ts and
   aiDocs/DESIGN.md): ink, volt and amber, Barlow Condensed for display, Inter for text.
   The page follows the phone's light or dark setting, like the app. */

@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/BarlowCondensed-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/BarlowCondensed-Bold.woff2") format("woff2"); }
@font-face { font-family: Inter; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/Inter-SemiBold.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  /* light palette */
  --background: #F6F6F1; --surface: #FFFFFF; --elevated: #ECEEE7; --text: #0B0F13; --muted: #545C66; --border: #D8DAD4;
  --primary: #C6FF00; --on-primary: #0B0F13; --action-text: #365B00; --error: #A3261A; --floor: #E2ECE7; --court-line: #FFFFFF;
  /* volt fills get an ink edge on light surfaces so the shape stays visible */
  --edge: #0B0F13; --focus: #0B0F13; --glow: transparent;
  /* spacing, radius and motion */
  --xs: 0.25rem; --sm: 0.5rem; --compact: 0.75rem; --md: 1rem; --page: 1.25rem; --lg: 1.5rem; --xl: 2rem; --xxl: 3rem;
  --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;
  --press: 100ms;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0B0F13; --surface: #141A20; --elevated: #1D242B; --text: #F4F5EF; --muted: #A9B2BA; --border: #2A333B;
    --action-text: #C6FF00; --error: #FF8A7A; --floor: #13242A; --court-line: #2C4650;
    --edge: #C6FF00; --focus: #C6FF00; --glow: #1A280C;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font: 400 1rem/1.5 var(--body); -webkit-font-smoothing: antialiased; }
body { background-image: radial-gradient(130% 34rem at 50% -8rem, var(--glow) 0%, transparent 62%); background-repeat: no-repeat; }
h1, h2, p, ul, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul { list-style: none; }
a { color: var(--action-text); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: var(--lg); }

.wrap { width: 100%; max-width: 70rem; margin-inline: auto; padding-inline: max(var(--page), env(safe-area-inset-left)) max(var(--page), env(safe-area-inset-right)); }
.skip { position: absolute; left: var(--page); top: -4rem; z-index: 10; padding: var(--compact) var(--md); background: var(--text); color: var(--background); border-radius: var(--r-md); font-weight: 600; }
.skip:focus { top: var(--sm); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--md); padding-block: var(--md); }
.brand { display: inline-flex; align-items: center; gap: var(--sm); min-height: 2.75rem; color: var(--text); text-decoration: none; font: 800 1.625rem/1 var(--display); letter-spacing: 0.005em; }
.mark { width: 2.25rem; height: 2.25rem; flex: none; }
.mark circle { fill: var(--primary); }
.mark path { fill: var(--on-primary); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 var(--page); border: 2px solid transparent; border-radius: var(--r-pill); font: 800 1.25rem/1 var(--display); letter-spacing: 0.03em; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--press); }
.btn:active { transform: scale(0.97); }
.btn-primary { min-height: 3.75rem; padding: 0 var(--xl); background: var(--primary); color: var(--on-primary); border-color: var(--edge); font-size: 1.5rem; }
.btn-primary:active, .btn-primary[aria-busy="true"] { background: var(--on-primary); color: var(--primary); }
.btn-quiet { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-quiet:active { background: var(--border); }
.btn-wide { width: 100%; }
@media (hover: hover) {
  .btn-quiet:hover { border-color: var(--text); }
  .btn-primary:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 35%, transparent); }
}

/* ---------- hero ---------- */
.hero { display: grid; gap: var(--xl); padding-block: var(--lg) var(--xxl); }
.hero-copy { display: grid; gap: var(--lg); justify-items: start; }
h1 { font: 800 clamp(3.5rem, 15.6vw, 6.5rem)/0.88 var(--display); letter-spacing: -0.012em; text-wrap: balance; }
h1 span { display: block; }
h1 mark { display: inline-block; margin: 0.1em 0 0 -0.1em; padding: 0.05em 0.1em 0.09em; background: var(--primary); color: var(--on-primary); }
.lead { max-width: 34rem; font-size: 1.125rem; line-height: 1.6; color: var(--muted); }
.lead b { font-weight: 400; color: var(--text); }
@media (prefers-color-scheme: dark) {
  h1 mark { display: inline; background: none; color: var(--primary); padding: 0; margin: 0; }
}

/* The stage is a strip of court floor: a boundary line and the net. */
.stage { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--floor); padding: var(--xl) var(--md); }
.stage::before { content: ""; position: absolute; inset: 3.25rem 1.5rem -1rem; border: 3px solid var(--court-line); border-bottom: 0; }
.stage::after { content: ""; position: absolute; left: 0; right: 0; top: 1.5rem; height: 6px; background: repeating-linear-gradient(90deg, var(--court-line) 0 3px, transparent 3px 7px); }
.stage .app { position: relative; z-index: 1; display: grid; justify-items: center; background: none; }

.net { height: 6px; background: repeating-linear-gradient(90deg, var(--border) 0 3px, transparent 3px 7px); }
.net.wrap { background-clip: content-box; }

/* ---------- app illustrations (always the dark hero palette; decorative, fixed px) ---------- */
.app {
  --ink: #0B0F13; --card: #141A20; --card2: #1D242B; --line: #2A333B; --volt: #C6FF00; --amber: #FFC46B; --coral: #FF8A7A; --cream: #F4F5EF; --dim: #A9B2BA;
  color: var(--cream); font: 400 14px/1.3 var(--body); font-variant-numeric: tabular-nums; -webkit-user-select: none; user-select: none;
}
.app b { font-weight: 800; }
.app .eb { font: 600 10.5px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.say { position: relative; z-index: 2; justify-self: start; margin: 0 0 -14px 4px; padding: 10px 16px 11px; border-radius: 20px 20px 20px 6px; background: var(--cream); color: var(--ink); font: 600 17px/1.2 var(--body); transform: rotate(-3deg); box-shadow: 0 6px 0 rgba(11, 15, 19, 0.16); }
.phone { width: min(100%, 320px); padding: 7px; border-radius: 44px; background: var(--card2); box-shadow: 0 0 0 1px var(--line), 0 24px 40px -18px rgba(11, 15, 19, 0.55); }
.screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 18px 12px 14px; border-radius: 38px; background: var(--ink); }
.screen.listening { box-shadow: inset 0 0 0 4px var(--volt); }
.app-head { display: flex; align-items: center; justify-content: center; gap: 8px; height: 30px; font-weight: 600; font-size: 13px; color: #C9CFD4; }
.ty { font: 800 13px/1 var(--display); letter-spacing: 0.1em; padding: 4px 7px; border-radius: 6px; background: var(--card2); color: var(--dim); }
.sb { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; padding: 12px 16px; border-radius: 24px; background: #10161B; border: 1px solid var(--line); }
.sb .sd { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sb .sd.r { align-items: flex-end; }
.sb .n { font: 800 84px/0.8 var(--display); letter-spacing: -0.02em; }
.sb .n.us { color: var(--volt); }
.sb .mid { display: flex; flex-direction: column; align-items: center; gap: 7px; padding-bottom: 4px; }
.sb .mid b { font: 800 20px/1 var(--display); letter-spacing: 0.04em; }
.pips { display: flex; gap: 5px; }
.pips i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.pips i.w { background: var(--volt); }
.pips i.lo { background: var(--coral); }
.pips i.now { background: transparent; box-shadow: 0 0 0 2px var(--cream); }
.tot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tot div { padding: 9px 0 8px; border-radius: 14px; background: var(--card); text-align: center; }
.tot b { display: block; font: 800 26px/1 var(--display); }
.tot span { font: 600 9.5px/1 var(--body); letter-spacing: 0.08em; color: var(--dim); }
.dock { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.dockbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 54px; height: 76px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: #C9CFD4; }
.dockbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mic { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; height: 76px; border-radius: 999px; background: var(--volt); color: var(--ink); }
.mic .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.mic .lab { font: 800 21px/1 var(--display); letter-spacing: 0.05em; }
.bars { display: flex; align-items: center; gap: 3px; height: 26px; }
.bars i { width: 4px; height: 100%; border-radius: 2px; background: var(--ink); transform: scaleY(0.35); animation: bar 0.7s ease-in-out infinite alternate; }
.bars i:nth-child(2) { animation-delay: -0.45s; }
.bars i:nth-child(3) { animation-delay: -0.2s; }
.bars i:nth-child(4) { animation-delay: -0.6s; }
@keyframes bar { to { transform: scaleY(1); } }

/* ---------- benefits ---------- */
.benefits { display: grid; gap: var(--xxl); padding-block: var(--xxl); }
.benefit { display: grid; gap: var(--compact); align-content: start; }
.benefit h2 { margin-top: var(--sm); font: 800 2rem/1 var(--display); text-wrap: balance; }
.benefit p { color: var(--muted); max-width: 32rem; }
.vig { display: grid; place-items: center; height: 272px; padding: 14px; overflow: hidden; border-radius: var(--r-xl); background: var(--ink); border: 1px solid var(--line); }

.tag { font: 800 15px/1 var(--display); letter-spacing: 0.06em; padding: 6px 9px; border-radius: 8px; white-space: nowrap; }
.tag.g { background: rgba(198, 255, 0, 0.13); color: var(--volt); }
.tag.n { background: #222A32; color: #C9CFD4; }
.jn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; border: 2px solid #323B44; font: 800 22px/1 var(--display); }

.rev { width: min(100%, 300px); padding: 12px; border-radius: 20px; background: rgba(255, 196, 107, 0.08); border: 1.5px solid rgba(255, 196, 107, 0.55); }
.rev .q { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--amber); }
.rev .heard { margin: 7px 0 8px; font-size: 14.5px; font-style: italic; color: #E6E9EC; }
.rcall { display: flex; align-items: center; gap: 10px; margin-top: 5px; padding: 5px 8px 5px 6px; border-radius: 12px; background: rgba(11, 15, 19, 0.4); }
.rcall .nm { flex: 1; font-size: 14.5px; font-weight: 600; }
.rev .acts { display: flex; gap: 6px; margin-top: 10px; }
.rev .acts span { display: grid; place-items: center; height: 42px; padding: 0 16px; border-radius: 14px; background: #222A32; font-size: 14.5px; font-weight: 600; }
.rev .acts .all { flex: 1; background: var(--amber); color: var(--ink); }

.ring { position: relative; width: 244px; height: 244px; }
.ring .ctr, .bub { position: absolute; left: 50%; top: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; }
.ring .ctr { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: var(--cream); color: var(--ink); font: 800 30px/1 var(--display); }
.bub { width: 66px; height: 66px; margin: -33px 0 0 -33px; background: #26303A; border: 2px solid #3A4652; transform: rotate(var(--a)) translateY(-88px) rotate(calc(-1 * var(--a))); }
.bub:nth-of-type(3) { --a: 60deg; }
.bub:nth-of-type(4) { --a: 120deg; }
.bub:nth-of-type(5) { --a: 180deg; }
.bub:nth-of-type(6) { --a: 240deg; }
.bub:nth-of-type(7) { --a: 300deg; }
.bub b { font: 800 16px/1 var(--display); letter-spacing: 0.04em; }
.bub small { margin-top: 3px; font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.bub.on { background: var(--volt); border-color: var(--volt); color: var(--ink); transform: translate(14px, -88px); box-shadow: -14px 0 0 -4px rgba(198, 255, 0, 0.22); }

.off { display: grid; gap: 6px; width: min(100%, 300px); }
.sb.cmp { padding: 10px 16px; border-radius: 20px; }
.sb.cmp .n { font-size: 52px; }
.play { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 16px; background: var(--card); }
.play .who { flex: 1; font-size: 14.5px; font-weight: 600; }
.play .who small { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 400; color: var(--dim); }
.saved { display: flex; align-items: center; justify-content: center; gap: 6px; padding-top: 4px; font-size: 13px; font-weight: 600; color: #8EE0B0; }
.saved svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- join: the app's next-match ticket, as a form ---------- */
.join { padding-block: var(--md) var(--xxl); }
.ticket { display: grid; }
.stub { position: relative; display: grid; gap: var(--sm); justify-items: start; padding: var(--lg) var(--lg) var(--xl); border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--primary); color: var(--on-primary); border-bottom: 2px dashed rgba(11, 15, 19, 0.3); }
.stub .mark { margin-bottom: var(--sm); }
.stub .mark circle { fill: var(--on-primary); }
.stub .mark path { fill: var(--primary); }
.stub h2 { font: 800 clamp(2.75rem, 12vw, 4rem)/0.9 var(--display); letter-spacing: -0.01em; }
.stub p { max-width: 22rem; font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.stub::before, .stub::after { content: ""; position: absolute; z-index: 1; bottom: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--background); }
.stub::before { left: -13px; }
.stub::after { right: -13px; }
.ticket-body { padding: var(--xl) var(--lg) var(--lg); border-radius: 0 0 var(--r-xl) var(--r-xl); background: var(--surface); border: 1px solid var(--border); border-top: 0; }

form { display: grid; gap: var(--lg); }
.field { display: grid; gap: var(--sm); }
label, legend { font-weight: 600; }
legend { padding: 0; margin-bottom: var(--sm); }
.opt { margin-left: var(--xs); font-size: 0.875rem; font-weight: 400; color: var(--muted); }
input[type="email"], input[type="text"] { width: 100%; min-height: 3.25rem; padding: var(--compact) var(--md); border: 1px solid var(--muted); border-radius: var(--r-md); background: var(--surface); color: var(--text); font: 400 1rem/1.5 var(--body); -webkit-appearance: none; appearance: none; }
input::placeholder { color: var(--muted); opacity: 0.75; }
input[type="email"]:focus-visible, input[type="text"]:focus-visible { outline-offset: 1px; border-color: var(--text); border-radius: var(--r-md); }
input[aria-invalid="true"], input[aria-invalid="true"]:focus-visible { border-color: var(--error); border-width: 2px; }
.field-error, .form-error { color: var(--error); font-weight: 600; }
.form-error { padding: var(--compact) var(--md); border: 2px solid var(--error); border-radius: var(--r-md); }
.form-error a { color: inherit; }
#try-again:target { display: block; }
.form-note { color: var(--muted); font-size: 0.9375rem; }
.form-note a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: var(--sm); }
.chip { position: relative; display: inline-flex; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 3rem; padding: 0 var(--md); border: 1px solid var(--muted); border-radius: var(--r-pill); font-weight: 600; transition: transform var(--press); }
.chip input:active + span { transform: scale(0.97); background: var(--border); }
.chip input:checked + span { background: var(--text); color: var(--background); border-color: var(--text); }
.chip input:checked + span::before { content: "✓"; margin-right: 0.4em; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Off-screen, not display:none, so simple bots still fill it in. */
.trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }

.joined { display: none; gap: var(--compact); justify-items: start; padding-block: var(--md); outline: none; }
.joined h2 { font: 800 clamp(2.5rem, 11vw, 3.5rem)/0.92 var(--display); }
.joined p { font-size: 1.125rem; color: var(--muted); }
.check { width: 3.5rem; height: 3.5rem; margin-bottom: var(--sm); }
.check circle { fill: var(--primary); stroke: var(--edge); stroke-width: 2; r: 19px; }
.check path { fill: none; stroke: var(--on-primary); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.join.is-joined form, .ticket-body:has(#joined:target) form { display: none; }
.join.is-joined .joined, #joined:target { display: grid; }

/* ---------- faq ---------- */
.faq { display: grid; gap: var(--md); padding-block: var(--md) var(--xxl); }
.faq > h2 { font: 800 clamp(2.75rem, 12vw, 4rem)/0.9 var(--display); letter-spacing: -0.01em; }
.faq-list { border-top: 1px solid var(--border); }
details { border-bottom: 1px solid var(--border); }
summary { display: flex; align-items: center; justify-content: space-between; gap: var(--md); min-height: 3.75rem; padding-block: var(--compact); font: 700 1.5rem/1.1 var(--display); letter-spacing: 0.005em; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 0.7rem; height: 0.7rem; margin: 0 var(--xs) 0.25rem; border-right: 2.5px solid var(--action-text); border-bottom: 2.5px solid var(--action-text); transform: rotate(45deg); transition: transform var(--press); }
details[open] summary::after { transform: translateY(0.3rem) rotate(-135deg); }
summary:active { color: var(--action-text); }
details p { max-width: 38rem; padding-bottom: var(--page); color: var(--muted); }

/* ---------- footer ---------- */
.foot { padding-bottom: max(var(--xl), env(safe-area-inset-bottom)); }
.foot-row { display: grid; gap: var(--md); padding-top: var(--lg); color: var(--muted); font-size: 0.9375rem; }
.foot-row p { max-width: 30rem; }
.foot-row ul { display: grid; }
.foot-row a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }

/* ---------- privacy page ---------- */
.legal { display: grid; gap: var(--md); max-width: 44rem; padding-block: var(--lg) var(--xxl); }
.legal h1 { font-size: clamp(3rem, 13vw, 4.5rem); }
.legal h2 { margin-top: var(--lg); font: 800 1.75rem/1 var(--display); }
.legal p { color: var(--muted); }
.legal .updated { font-size: 0.9375rem; }
.legal a { font-weight: 600; }
.legal .back { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ---------- wider screens ---------- */
@media (min-width: 44rem) {
  .benefits { grid-template-columns: repeat(3, 1fr); gap: var(--lg); }
  .benefit h2 { font-size: 1.75rem; }
  .foot-row { grid-template-columns: 1fr auto; align-items: start; }
  .foot-row ul { justify-items: end; }
}
@media (min-width: 58rem) {
  .top { padding-block: var(--lg); }
  .hero { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: var(--xxl); padding-block: var(--xl) 4.5rem; }
  h1 { font-size: clamp(5rem, 8.6vw, 7rem); }
  .lead { font-size: 1.1875rem; }
  .stage { padding-block: 3.5rem 3rem; }
  .phone { width: min(100%, 350px); }
  .benefits { gap: var(--xl); padding-block: 4.5rem; }
  .benefit h2 { font-size: 2rem; }
  .ticket { grid-template-columns: 0.8fr 1.2fr; }
  .stub { align-content: center; padding: var(--xxl) var(--xl); border-radius: var(--r-xl) 0 0 var(--r-xl); border-bottom: 0; border-right: 2px dashed rgba(11, 15, 19, 0.3); }
  .stub h2 { font-size: clamp(4rem, 6.4vw, 5.25rem); }
  .stub p { font-size: 1.25rem; }
  .stub::before, .stub::after { left: auto; right: -14px; }
  .stub::before { top: -13px; bottom: auto; }
  .stub::after { bottom: -13px; }
  .ticket-body { padding: var(--xxl) var(--xxl); border-radius: 0 var(--r-xl) var(--r-xl) 0; border-top: 1px solid var(--border); border-left: 0; }
  .faq { grid-template-columns: 0.8fr 1.2fr; gap: var(--xl); padding-block: var(--xl) 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .chip span, summary::after { transition: none; }
  .btn:active, .chip input:active + span { transform: none; }
  .bars i { animation: none; transform: scaleY(0.7); }
  .bars i:nth-child(odd) { transform: scaleY(0.4); }
}
