/* Colours from ui/src/app.css, so the site looks like the app. */
:root {
  --bg: #0e0f12;
  --surface: #17191e;
  --surface-sunken: #0a0b0d;
  --stage: #08090b;
  --border: #2a2d35;
  --border-strong: #3d414b;
  --text: #e6e8ec;
  --text-muted: #8b909c;
  --accent: #4da3ff;
  --master: #ffb547;
  --blind: #b48cff;
  /* 124 BPM, the demo show's tempo. */
  --beat: 0.4839s;
  color-scheme: dark;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
/* Glows and beams spill past the edges; the page never scrolls sideways. */
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }
code { padding: 1px 5px; border-radius: 4px; background: var(--surface); font-size: 0.88em; }

/* Navigation */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.logo {
  width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(from 0deg, #ff3d8b, #ffb547, #4cd08a, #4da3ff, #b48cff, #ff3d8b);
  box-shadow: 0 0 14px rgb(180 140 255 / 0.6);
  animation: pulse var(--beat) ease-out infinite;
}
.links { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 24px); font-size: 15px; }
.links a { color: var(--text-muted); text-decoration: none; }
.links a:hover { color: var(--text); }
.links .pill { padding: 5px 14px; border-radius: 99px; color: var(--text); border: 1px solid var(--border-strong); }
@media (max-width: 560px) { .links a:not(.pill):not([href^="manual"]) { display: none; } }

/* Hero */
.hero { position: relative; padding: clamp(64px, 12vw, 140px) clamp(16px, 4vw, 40px) 0; text-align: center; isolation: isolate; }
.rig { position: absolute; inset: 0 0 auto; height: min(900px, 110vh); z-index: -1; overflow: hidden; pointer-events: none; }
.truss { position: absolute; top: 18px; left: 6%; right: 6%; height: 6px; border-radius: 3px; background: #2a2d35; box-shadow: 0 1px 0 #3d414b; }
.head {
  position: absolute; top: 14px; left: var(--at);
  width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: hsl(var(--hue) 100% 75%);
  box-shadow: 0 0 18px 4px hsl(var(--hue) 100% 60% / 0.8);
  transform-origin: 50% 50%;
  animation: sweep calc(var(--beat) * 16) ease-in-out var(--phase) infinite alternate;
}
.head::before {
  /* The beam: a cone from the lens down into the haze. */
  content: '';
  position: absolute; top: 9px; left: 50%;
  width: 260px; height: 120vh; margin-left: -130px;
  clip-path: polygon(48% 0, 52% 0, 100% 100%, 0 100%);
  background: linear-gradient(hsl(var(--hue) 100% 70% / 0.55), hsl(var(--hue) 100% 60% / 0.12) 55%, transparent 85%);
  mix-blend-mode: screen;
  filter: blur(2px);
  animation: pulse var(--beat) ease-out infinite;
}
.haze {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 50% 100%, rgb(180 140 255 / 0.18), transparent 70%),
    linear-gradient(transparent 55%, var(--bg));
}
@keyframes sweep {
  from { transform: rotate(calc(var(--dir, 1) * -32deg)); }
  to { transform: rotate(calc(var(--dir, 1) * 26deg)); }
}
@keyframes pulse {
  from { opacity: 1; }
  to { opacity: 0.55; }
}

.hero-text { max-width: 820px; margin: 0 auto; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font-size: clamp(40px, 7.5vw, 84px); line-height: 1.04; letter-spacing: -0.03em; }
.glow {
  background: linear-gradient(90deg, #ff3d8b, #ffb547 30%, #4da3ff 65%, #b48cff);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: slide calc(var(--beat) * 16) linear infinite;
}
@keyframes slide { to { background-position: -200% 0; } }
.lede { max-width: 640px; margin: 22px auto 0; font-size: clamp(17px, 2.2vw, 20px); color: color-mix(in srgb, var(--text) 82%, var(--bg)); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 32px 0 0; }
.button {
  display: inline-block; padding: 11px 22px; border-radius: 10px;
  color: var(--text); font-weight: 600; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border-strong);
  transition: transform 0.15s, border-color 0.15s;
}
.button:hover { transform: translateY(-1px); border-color: var(--text-muted); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #06121f; box-shadow: 0 6px 30px rgb(77 163 255 / 0.35); }

.hero-shot { max-width: 1180px; margin: clamp(28px, 5vw, 48px) auto 0; perspective: 1400px; }
.window {
  padding: 30px 0 0; border-radius: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: 0 40px 120px rgb(0 0 0 / 0.7), 0 0 0 1px rgb(255 255 255 / 0.03), 0 0 80px rgb(180 140 255 / 0.15);
  /* Held up in front of the light show like a tablet, tipped back; it
     straightens to face you as it scrolls into view (--tilt from site.js,
     1 at the top of the page down to 0). */
  transform: rotateX(calc(var(--tilt, 1) * 32deg)) scale(calc(1 - var(--tilt, 1) * 0.08));
  transform-origin: 50% 0;
  will-change: transform;
  position: relative;
}
.dots { position: absolute; top: 10px; left: 14px; display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #3d414b; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

/* Quick facts */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px;
  max-width: 1180px; margin: 72px auto 0; padding: 0 clamp(16px, 4vw, 40px);
}
.facts div { padding: 22px 20px; border-top: 1px solid var(--border); }
.facts strong { display: block; font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; }
.facts span { color: var(--text-muted); font-size: 15px; }

/* Feature sections */
section { padding: clamp(64px, 10vw, 120px) clamp(16px, 4vw, 40px) 0; }
h2 { margin: 0 0 16px; font-size: clamp(30px, 4.5vw, 48px); line-height: 1.1; letter-spacing: -0.025em; }
h3 { margin: 0 0 8px; font-size: 19px; }
.copy p { color: color-mix(in srgb, var(--text) 80%, var(--bg)); }
.copy ul { margin: 16px 0 0; padding: 0; list-style: none; }
.copy li { position: relative; padding: 5px 0 5px 24px; color: color-mix(in srgb, var(--text) 80%, var(--bg)); }
.copy li::before { content: ''; position: absolute; left: 2px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.center { max-width: 760px; margin: 0 auto; text-align: center; }

.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(28px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.feature.flip .copy { order: 2; }
@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .copy { order: 0; }
}
.shot { margin: 0; }
.shot img { margin: 0 auto; border-radius: 12px; border: 1px solid var(--border-strong); box-shadow: 0 30px 80px rgb(0 0 0 / 0.6); }
/* The header shows the whole window; here, the grid and mixer close up. */
.shot.crop {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--border-strong); box-shadow: 0 30px 80px rgb(0 0 0 / 0.6);
}
.shot.crop img { position: absolute; left: 0; bottom: 0; width: 165%; max-width: none; border: none; border-radius: 0; box-shadow: none; }
.wide .shot.big { max-width: 1240px; margin: 40px auto 0; }

/* The playground */
.playground .lab {
  max-width: 1080px; margin: 40px auto 0; padding: clamp(16px, 3vw, 28px);
  border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
}
.lights {
  display: grid; grid-template-columns: repeat(16, 1fr); gap: clamp(4px, 1.2vw, 12px);
  padding: clamp(28px, 5vw, 48px) clamp(10px, 3vw, 28px);
  border-radius: 12px; background: var(--stage); border: 1px solid var(--border);
}
.light { aspect-ratio: 1; border-radius: 50%; background: #000; border: 2px solid #1d2026; }
.controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 18px; }
@media (max-width: 860px) { .controls { grid-template-columns: 1fr; } }
fieldset { min-width: 0; margin: 0; padding: 12px 14px 14px; border-radius: 12px; border: 1px solid var(--border); }
legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices button {
  font: inherit; font-size: 14px; padding: 5px 11px; border-radius: 8px; cursor: pointer;
  color: var(--text); background: var(--surface-sunken); border: 1px solid var(--border);
}
.choices button:hover { border-color: var(--border-strong); }
.choices button[aria-pressed='true'] { background: color-mix(in srgb, var(--accent) 30%, var(--surface-sunken)); border-color: var(--accent); }
.formula {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px;
  margin: 12px 0 0; padding: 10px 12px; border-radius: 8px;
  font-size: 13px; line-height: 1.5; background: var(--surface-sunken);
}
.formula b { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.formula code { padding: 0; background: none; font-size: 1em; color: #c9d6ff; overflow-wrap: anywhere; }
.fader { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--text-muted); }
.fader input { flex: 1; min-width: 0; accent-color: var(--accent); }
.fader output { width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.note { margin: 16px 0 0; font-size: 14px; color: var(--text-muted); }

/* More features */
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px;
  max-width: 1240px; margin: 0 auto;
}
.grid article {
  position: relative; padding: 24px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 100%, transparent), var(--surface-sunken));
  border: 1px solid var(--border);
}
.grid article::before {
  content: ''; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(var(--glow, rgb(77 163 255 / 0.35)), transparent 70%);
}
.grid article:nth-child(2) { --glow: rgb(255 181 71 / 0.3); }
.grid article:nth-child(3) { --glow: rgb(180 140 255 / 0.35); }
.grid article:nth-child(4) { --glow: rgb(76 208 138 / 0.3); }
.grid article:nth-child(5) { --glow: rgb(255 61 139 / 0.3); }
.grid article:nth-child(6) { --glow: rgb(255 107 107 / 0.3); }
.grid p { margin: 0; color: var(--text-muted); font-size: 16px; }

/* Get it */
.get { position: relative; max-width: 820px; margin: 0 auto; text-align: center; padding-bottom: 40px; isolation: isolate; }
.get p { color: color-mix(in srgb, var(--text) 80%, var(--bg)); }
.glow-ring {
  position: absolute; z-index: -1; left: 50%; top: 40%; width: min(520px, 90vw); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; filter: blur(70px); opacity: 0.35;
  background: conic-gradient(#ff3d8b, #ffb547, #4cd08a, #4da3ff, #b48cff, #ff3d8b);
  animation: turn calc(var(--beat) * 32) linear infinite;
}
@keyframes turn { to { transform: rotate(1turn); } }

.signup {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  max-width: 520px; margin: 28px auto 0;
}
.signup .email { flex: 1 1 240px; }
.signup input[type='email'] {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  font: inherit; color: var(--text); background: var(--surface-sunken); border: 1px solid var(--border-strong);
}
.signup input[type='email']:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.signup button { font: inherit; font-weight: 600; cursor: pointer; }
.consent { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; font-size: 14px; color: var(--text-muted); }
.consent input { margin-top: 4px; accent-color: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The small pages: thanks and privacy. */
.page { max-width: 720px; margin: 0 auto; padding: clamp(48px, 9vw, 96px) clamp(16px, 4vw, 40px) 0; }
.page h1 { font-size: clamp(34px, 6vw, 52px); }
.page h2 { margin-top: 1.6em; font-size: 24px; }
.page p, .page li { color: color-mix(in srgb, var(--text) 82%, var(--bg)); }

footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  max-width: 1240px; margin: 80px auto 0; padding: 28px clamp(16px, 4vw, 40px) 40px;
  border-top: 1px solid var(--border); font-size: 14px; color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  .window { transform: none; }
}
