/* VoxPop website — shared styles.
   Layout concept: a pocket "studio console". Dark neon stage (the app's own
   palette), Outfit for voice, JetBrains Mono for the engineer's readouts
   (semitones, formats, frame sizes). Dark-first; light mirrors the app's
   light theme. */
:root {
  --bg: #0B0714;
  --surface: #151024;
  --surface-2: #1E1733;
  --surface-3: #2A2145;
  --line: rgba(245, 243, 255, 0.09);
  --line-strong: rgba(245, 243, 255, 0.18);
  --fg: #F5F3FF;
  --muted: #A9A1C4;
  --purple: #7C3AED;
  --purple-soft: #A78BFA;
  --pink: #DB2777;
  --pink-soft: #F472B6;
  --orange: #F97316;
  --cyan: #22D3EE;
  --lime: #A3E635;
  --yellow: #FACC15;
  --rec: #FF3B5C;
  --glow: rgba(219, 39, 119, 0.35);
  --aurora-a: rgba(124, 58, 237, 0.42);
  --aurora-b: rgba(219, 39, 119, 0.30);
  --aurora-c: rgba(249, 115, 22, 0.22);
  --brand: linear-gradient(110deg, var(--purple) 0%, var(--pink) 52%, var(--orange) 100%);
  --on-brand: #FFFFFF;

  --font-display: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4: clamp(2.6rem, 1.8rem + 4.2vw, 5.4rem);

  --radius: 22px;
  --radius-sm: 14px;
  --max: 1180px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F7F5FF; --surface: #FFFFFF; --surface-2: #F0EBFE; --surface-3: #E4DCFB;
    --line: rgba(26, 21, 48, 0.09); --line-strong: rgba(26, 21, 48, 0.18);
    --fg: #1A1530; --muted: #5F5878;
    --purple-soft: #6D28D9; --pink-soft: #BE185D;
    --cyan: #0E7490; --lime: #4D7C0F; --yellow: #A16207;
    --glow: rgba(219, 39, 119, 0.22);
    --aurora-a: rgba(124, 58, 237, 0.20); --aurora-b: rgba(219, 39, 119, 0.14); --aurora-c: rgba(249, 115, 22, 0.14);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F7F5FF; --surface: #FFFFFF; --surface-2: #F0EBFE; --surface-3: #E4DCFB;
  --line: rgba(26, 21, 48, 0.09); --line-strong: rgba(26, 21, 48, 0.18);
  --fg: #1A1530; --muted: #5F5878;
  --purple-soft: #6D28D9; --pink-soft: #BE185D;
  --cyan: #0E7490; --lime: #4D7C0F; --yellow: #A16207;
  --glow: rgba(219, 39, 119, 0.22);
  --aurora-a: rgba(124, 58, 237, 0.20); --aurora-b: rgba(219, 39, 119, 0.14); --aurora-c: rgba(249, 115, 22, 0.14);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--bg);
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--pink-soft); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--pink); color: #fff; }

.wrap {
  width: 100%; max-width: calc(var(--max) + 64px); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

.mono { font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.04em; }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--step--1); text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 4px rgba(255, 59, 92, 0.18); animation: rec 1.6s ease-in-out infinite; }
@keyframes rec { 50% { opacity: 0.35; } }
.grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shimmer 8s ease-in-out infinite alternate; }
@keyframes shimmer { to { background-position: 100% 0; } }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 36ch; line-height: 1.45; }
.muted { color: var(--muted); }

/* Aurora backdrop: three slow blobs, same recipe as the app. */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(10px); animation: drift 24s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: radial-gradient(closest-side, var(--aurora-a), transparent); }
.aurora i:nth-child(2) { width: 55vmax; height: 55vmax; right: -22vmax; top: 10vh; background: radial-gradient(closest-side, var(--aurora-b), transparent); animation-duration: 30s; }
.aurora i:nth-child(3) { width: 60vmax; height: 60vmax; left: 10vw; bottom: -38vmax; background: radial-gradient(closest-side, var(--aurora-c), transparent); animation-duration: 36s; }
@keyframes drift { to { transform: translate3d(6vw, 5vh, 0) scale(1.08); } }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; }
.logo-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--brand); display: grid; place-items: center; box-shadow: 0 6px 18px var(--glow); }
.logo-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--fg); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--fg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.nav-cta { margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: currentColor; margin: auto; position: relative; transition: transform .25s; border-radius: 2px; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav .nav-cta { display: none; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 4px; margin: 0;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px));
    background: var(--bg); border-bottom: 1px solid var(--line);
    transform-origin: top; transform: scaleY(0.96); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .menu-open .nav-links { opacity: 1; transform: none; visibility: visible; }
  .nav-links a { display: block; padding: 12px 14px; font-size: 1.1rem; }
}

/* Buttons */
.btn {
  --b-bg: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; min-height: 52px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--b-bg); color: var(--fg); text-decoration: none; font: 600 1rem/1 var(--font-body);
  cursor: pointer; transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.96); }
.btn-brand { background: var(--brand); color: var(--on-brand); border: 0; box-shadow: 0 10px 30px -8px var(--glow); }
.btn-brand:hover { box-shadow: 0 16px 40px -8px var(--glow); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn small { display: block; font: 500 0.68rem/1.1 var(--font-mono); letter-spacing: 0.06em; opacity: .8; text-transform: uppercase; }
.btn .two { text-align: left; line-height: 1.15; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.45; max-width: 52ch; }
.page-hero { padding-block: clamp(56px, 8vw, 104px) clamp(32px, 4vw, 48px); display: grid; gap: 20px; }
.page-hero h1 { max-width: 15ch; }

/* Panels (used by role, not everywhere) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; min-height: 44px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); cursor: pointer;
  font: 600 0.95rem/1 var(--font-body); transition: transform .18s cubic-bezier(.3,1.6,.5,1), background .2s, color .2s, border-color .2s;
}
.chip:hover { transform: translateY(-2px); border-color: var(--pink-soft); }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }

/* Reveal: visible at rest; only below-the-fold items get the "pre" state. */
.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.pre { opacity: 0; transform: translateY(26px); }
.load-in { animation: loadIn .9s cubic-bezier(.2,.8,.2,1) both; }
.load-in.d1 { animation-delay: .08s; } .load-in.d2 { animation-delay: .16s; } .load-in.d3 { animation-delay: .24s; } .load-in.d4 { animation-delay: .32s; }
@keyframes loadIn { from { opacity: 0; transform: translateY(18px); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 40px; margin-top: 40px; }
.foot { display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.foot h4 { font-size: 0.8rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 12px; font-weight: 500; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; color: var(--fg); opacity: .85; }
.foot a:hover { opacity: 1; color: var(--pink-soft); }
.foot-note { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: var(--step--1); }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* Final CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: 32px; padding: clamp(40px, 7vw, 80px) clamp(24px, 5vw, 64px);
  background: var(--brand); color: var(--on-brand); display: grid; gap: 22px; justify-items: start;
}
.cta-band h2 { max-width: 16ch; }
.cta-band p { max-width: 46ch; font-size: var(--step-1); opacity: .92; line-height: 1.45; }
.cta-band .btn { background: rgba(11, 7, 20, 0.88); color: #fff; border-color: transparent; }
.cta-band canvas { position: absolute; right: -2%; bottom: 0; width: 60%; height: 70%; opacity: .35; pointer-events: none; }
@media (max-width: 700px) { .cta-band canvas { width: 100%; opacity: .22; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal.pre { opacity: 1; transform: none; }
}
