/*
 * Vial-Log coming soon page. Same tokens and type as the app and landing page:
 * Space Grotesk for titles, Inter for words, JetBrains Mono for identifiers.
 * Night is the default mood (the teaser lives at 02.13), light follows the phone or the toggle.
 */
@font-face { font-family: 'Inter Variable'; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-var.woff2) format('woff2-variations'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url(/fonts/space-grotesk-600.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url(/fonts/space-grotesk-700.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; size-adjust: 92%; src: url(/fonts/jetbrains-mono-500.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --bg: #f3f5f8; --bg-glow: rgb(76 198 242 / .22); --surface: #ffffff; --line: #d2d9e3; --line-strong: #7b8698;
  --ink: #0f1b2d; --ink-2: #4a5669; --brand: #1658c4; --brand-hover: #0f469f; --on-brand: #fff; --cold: #086a92; --cold-soft: #e1f3fb;
  --ok: #146a3e; --ok-bg: #e0f2e7; --crit: #b1310f; --crit-bg: #fce4da; --focus: #0b57d0; --logo-bg: #0b1828; --logo-fg: #4cc6f2;
  --grid: rgb(22 88 196 / .06); --shadow: 0 24px 60px rgb(11 24 40 / .16);
  --font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', var(--font); --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #060d17; --bg-glow: rgb(76 198 242 / .14); --surface: #101b29; --line: #26364b; --line-strong: #6b7c93;
  --ink: #eef2f8; --ink-2: #a7b4c6; --brand: #6ea2ff; --brand-hover: #8bb6ff; --on-brand: #06101c; --cold: #4cc6f2; --cold-soft: #10283a;
  --ok: #5fd896; --ok-bg: #10301f; --crit: #ff8a6b; --crit-bg: #3a1a12; --focus: #8bb6ff; --logo-bg: #13304f;
  --grid: rgb(76 198 242 / .05); --shadow: 0 24px 70px rgb(0 0 0 / .55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  font: 1.0625rem/1.6 var(--font); color: var(--ink); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 620px at 78% 18%, var(--bg-glow), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--bg);
}
h1, h2, p { margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--brand); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
@media (min-width: 720px) { .wrap { width: min(1160px, 100% - 80px); } }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-weight: 500; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 12px 16px; background: var(--ink); color: var(--bg); border-radius: 12px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.3rem var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 34px; height: 34px; }
.logo-bg { fill: var(--logo-bg); } .logo-fg { stroke: var(--logo-fg); } .logo-fill { fill: var(--logo-fg); }
.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { border-color: var(--line-strong); }
.theme-btn .to-light { display: none; }
:root[data-theme='dark'] .theme-btn .to-light { display: block; }
:root[data-theme='dark'] .theme-btn .to-dark { display: none; }

/* ---------- Hero ---------- */
main { flex: 1; }
.hero { display: grid; gap: 48px; padding: 32px 0 64px; align-items: center; }
@media (min-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr) 380px; gap: 72px; padding: 56px 0 88px; } }
@media (min-width: 1100px) { .hero { grid-template-columns: minmax(0, 1fr) 420px; } }
.copy { display: flex; flex-direction: column; gap: 24px; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--cold-soft); color: var(--cold); font-size: .8rem; font-weight: 700; letter-spacing: .14em; }
.pill i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; }
@media (prefers-reduced-motion: no-preference) { .pill i { animation: ping 1.8s ease-out infinite; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
h1 { font: 700 clamp(2.6rem, 7.4vw, 4.6rem)/1.02 var(--display); letter-spacing: -.03em; }
h1 em { font-style: normal; color: var(--cold); }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 34em; }
.night { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 18px; border-left: 3px solid var(--crit); background: var(--surface); border-radius: 0 12px 12px 0; max-width: 36em; font-size: .98rem; }
.night .t { color: var(--crit); font-size: 1.05rem; }
.night span:last-child { color: var(--ink-2); }

/* ---------- Waitlist ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); max-width: 620px; }
@media (min-width: 720px) { .card { padding: 32px; } }
.card h2 { font: 700 1.5rem/1.2 var(--display); letter-spacing: -.01em; }
.card .sub { color: var(--ink-2); margin-top: 6px; }
form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-weight: 600; font-size: .95rem; }
.opt { font-weight: 400; color: var(--ink-2); }
.input { font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: 12px; min-height: 52px; padding: 10px 14px; width: 100%; }
.input:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.input[aria-invalid='true'] { border-color: var(--crit); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .98rem; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check small { display: block; color: var(--ink-2); font-size: .88rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 10px 24px; border: 0; border-radius: 14px; font: 700 1.05rem var(--font); cursor: pointer; text-decoration: none; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary[disabled] { opacity: .75; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { background: var(--bg); }
.consent { font-size: .86rem; color: var(--ink-2); }
.field-error { display: flex; gap: 8px; align-items: flex-start; color: var(--crit); font-weight: 600; font-size: .9rem; }
.field-error svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--crit-bg); color: var(--ink); }
.alert svg { width: 22px; height: 22px; flex: none; color: var(--crit); margin-top: 1px; }
.alert b { display: block; }
#status:empty { display: none; }
#status:focus { outline: none; }
.hp { position: absolute; left: -9999px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.done { display: flex; flex-direction: column; gap: 14px; }
.done .ok { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.done .ok svg { width: 30px; height: 30px; }
.done .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ---------- Teaser ---------- */
.teaser { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.story { position: relative; width: min(100%, 340px); aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: #060d17; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
@media (min-width: 960px) { .story { width: 100%; } }
.story video, .story img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story .bars { position: absolute; left: 14px; right: 14px; top: 12px; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .25); overflow: hidden; z-index: 2; }
.story .bars i { display: block; height: 100%; width: 0; background: #fff; }
.play { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: transparent; border: 0; cursor: pointer; color: #fff; }
.play span { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: rgb(6 13 23 / .7); backdrop-filter: blur(8px); font: 600 .95rem var(--font); }
.play svg { width: 20px; height: 20px; }
.play[hidden] { display: none; }
.teaser figcaption { font-size: .9rem; color: var(--ink-2); text-align: center; }

/* ---------- What's coming ---------- */
.coming { display: grid; gap: 16px; padding-bottom: 72px; }
@media (min-width: 720px) { .coming { grid-template-columns: repeat(3, 1fr); } }
.coming li { list-style: none; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.coming ul { display: contents; margin: 0; padding: 0; }
.coming .k { font-size: .78rem; letter-spacing: .14em; font-weight: 700; color: var(--cold); }
.coming h3 { margin: 0; font: 700 1.2rem/1.25 var(--display); }
.coming p { color: var(--ink-2); font-size: .98rem; }

footer { border-top: 1px solid var(--line); padding: 24px 0 32px; font-size: .9rem; color: var(--ink-2); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- Simple pages (thanks, privacy, 404) ---------- */
.simple { padding: 48px 0 80px; display: flex; flex-direction: column; gap: 20px; max-width: 680px; }
.simple h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.simple h2 { font: 700 1.3rem var(--display); margin-top: 12px; }
.simple ul { padding-left: 1.2em; color: var(--ink-2); }
.simple .big { font: 700 clamp(4rem, 16vw, 7rem)/1 var(--display); color: var(--cold); letter-spacing: -.04em; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.no-js .js-only { display: none !important; }
