/* Brainfizzle: dark glass over a slow aurora. Violet to aqua is the one accent. Tokens mirror the app's src/theme.ts. */

@font-face { font-family: 'Space Grotesk'; src: url('/fonts/SpaceGrotesk-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/SpaceGrotesk-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/InstrumentSans-Variable.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --bg: #06070F;
  --raised: rgba(255, 255, 255, 0.06);
  --raised-hi: rgba(255, 255, 255, 0.11);
  --ink: #FFFFFF;
  --muted: rgba(235, 238, 255, 0.76);
  --dim: rgba(235, 238, 255, 0.6);
  --accent: #8FF3EA;
  --accent-deep: #9B8CFF;
  --hot: #FF8AD8;
  --trap: #FF9AA6;
  --line: rgba(255, 255, 255, 0.13);
  --fizz: linear-gradient(90deg, #9B8CFF, #6FC8FF 55%, #8FF3EA);
  --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --text: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --r-md: 16px;
  --r-xl: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---------- Aurora backdrop ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.aurora::before, .aurora::after { content: ''; position: absolute; inset: -20%; will-change: transform; }
.aurora::before {
  background:
    radial-gradient(42% 38% at 18% 14%, rgba(94, 70, 230, 0.6), transparent 70%),
    radial-gradient(34% 40% at 92% 44%, rgba(18, 150, 160, 0.42), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora::after {
  background:
    radial-gradient(38% 30% at 22% 96%, rgba(190, 60, 150, 0.24), transparent 70%),
    radial-gradient(30% 26% at 70% 2%, rgba(111, 200, 255, 0.16), transparent 70%);
  animation: drift 34s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

/* ---------- Shared pieces ---------- */
.glass {
  background: linear-gradient(180deg, var(--raised-hi), var(--raised));
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 24px 60px -30px rgba(0, 0, 0, 0.7);
}
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 14px var(--hot); }
.fizz { background: var(--fizz); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 9vw, 5rem); }
h2 { font-size: clamp(2rem, 6vw, 3.25rem); }
h3 { font-size: 1.6rem; }
.link { color: var(--accent); font-weight: 600; text-underline-offset: 4px; }
.link:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--fizz); color: var(--bg);
  font: 600 1rem/1 var(--text); text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(111, 200, 255, 0.7);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(111, 200, 255, 0.9); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: default; transform: none; }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 0.9rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips li { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.chips--solid li { background: var(--ink); border-color: var(--ink); color: var(--bg); padding: 9px 18px; font-size: 1rem; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 10; padding: 12px 0; }
.top__bar { width: min(1120px, 100% - 24px); margin-inline: auto; display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 14px; border-radius: 999px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.1rem/1 var(--display); letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.brand img { border-radius: 9px; }
.top__nav { display: none; gap: 26px; margin-right: 10px; }
.top__nav a { color: var(--muted); font-size: 0.95rem; font-weight: 500; text-decoration: none; padding: 10px 0; }
.top__nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 48px; padding: 40px 0 72px; }
.hero h1 { margin-top: 18px; }
.lede { margin-top: 20px; max-width: 34rem; font-size: 1.2rem; line-height: 1.5; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.soon {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--raised-hi); font-weight: 600;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}

.phone {
  position: relative; width: min(290px, 76vw); margin-inline: auto; padding: 8px;
  border-radius: 46px; background: #0B0D18; border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 50px 90px -40px rgba(111, 200, 255, 0.45), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.phone img { width: 100%; border-radius: 38px; aspect-ratio: 660 / 1435; }
.hero__phones { position: relative; }
.phone--back { display: none; }

/* ---------- How it works ---------- */
.how { padding: 56px 0 24px; }
.how h2 { margin-top: 14px; }
.row { display: grid; gap: 32px; align-items: center; margin-top: 56px; }
.row__copy { display: grid; gap: 16px; }
.step { position: relative; padding: 26px 24px 26px 78px; border-radius: var(--r-xl); }
.step__n {
  position: absolute; left: 22px; top: 24px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--fizz); color: var(--bg);
  font: 700 1.1rem/1 var(--display);
}
.step p:not(.step__n) { margin-top: 10px; color: var(--muted); }

/* ---------- Platforms ---------- */
.where { padding: 72px 0 24px; }
.where__panel { display: grid; gap: 36px; padding: 32px 24px 0; border-radius: var(--r-xl); overflow: hidden; }
.where h2 { margin-top: 14px; }
.where__copy > p:not(.eyebrow) { margin-top: 16px; color: var(--muted); max-width: 32rem; }
.facts { display: grid; gap: 12px; margin-top: 28px; }
.facts li { position: relative; padding-left: 30px; color: var(--muted); }
.facts li::before { content: ''; position: absolute; left: 4px; top: 0.5em; width: 12px; height: 12px; border-radius: 50%; background: var(--fizz); }
.facts b { color: var(--ink); font-weight: 600; }
.phone--crop { margin-bottom: -240px; }

/* ---------- Privacy ---------- */
.privacy { padding: 88px 0 24px; }
.privacy__panel { max-width: 44rem; }
.privacy h2 { margin-top: 14px; }
.privacy p:not(.eyebrow) { margin-top: 16px; color: var(--muted); font-size: 1.15rem; }

/* ---------- Closing call to action ---------- */
.cta { padding: 72px 0; }
.cta__panel { display: grid; justify-items: center; text-align: center; padding: 48px 24px; border-radius: var(--r-xl); }
.cta__panel img { border-radius: 16px; box-shadow: 0 16px 40px -12px rgba(155, 140, 255, 0.8); }
.cta h2 { margin-top: 22px; }
.cta__panel > p { margin-top: 14px; max-width: 30rem; color: var(--muted); }

/* ---------- Footer ---------- */
.foot { display: grid; gap: 14px; justify-items: start; padding: 28px 0 44px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.92rem; }
.foot .brand { color: var(--ink); margin: 0; }
.foot nav { display: flex; gap: 22px; }
.foot nav a { color: var(--muted); padding: 6px 0; }
.foot nav a:hover { color: var(--ink); }

/* ---------- Privacy policy and 404 pages ---------- */
.doc { max-width: 44rem; padding: 40px 0 72px; }
.doc h1 { font-size: clamp(2.3rem, 7vw, 3.5rem); margin-top: 14px; }
.doc h2 { font-size: 1.5rem; margin-top: 44px; letter-spacing: -0.015em; }
.doc p, .doc ul { margin-top: 14px; color: var(--muted); }
.doc ul { list-style: disc; padding-left: 22px; }
.doc li + li { margin-top: 8px; }
.doc b { color: var(--ink); font-weight: 600; }
.doc .updated { color: var(--dim); font-size: 0.95rem; }
.doc--centre { text-align: center; margin-inline: auto; padding-block: 96px; }
.doc--centre .btn { margin-top: 28px; }

/* ---------- Reveal on scroll. Only hides content when JavaScript is running. ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Wider screens ---------- */
@media (min-width: 560px) {
  .foot { grid-template-columns: auto 1fr auto; align-items: center; justify-items: start; }
  .foot p { justify-self: center; }
}
@media (min-width: 860px) {
  body { font-size: 1.125rem; }
  .top__nav { display: flex; }
  .hero { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 24px; padding: 56px 0 96px; }
  .hero__phones { height: 640px; }
  .hero__phones .phone { position: absolute; margin: 0; }
  .phone--front { right: 4%; top: 0; width: 296px; transform: rotate(3deg); }
  .phone--back { display: block; right: 44%; top: 70px; width: 250px; transform: rotate(-7deg); opacity: 0.75; }
  .how { padding-top: 72px; }
  .row { grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 88px; }
  .row .phone { width: 300px; }
  .row--flip .row__copy { order: 2; }
  .step { padding: 32px 32px 32px 92px; }
  .step__n { left: 30px; top: 30px; }
  .where__panel { grid-template-columns: 1.1fr 0.9fr; padding: 56px 56px 0; align-items: start; }
  .where__copy { padding-bottom: 56px; }
  .phone--crop { margin-bottom: -150px; }
  .cta__panel { padding: 72px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora::before, .aurora::after { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
