/* Nebula Design System — see CLAUDE.md */
:root {
  /* Colour — Ink & Volt */
  --color-bg: #0B0B0C;
  --color-surface: #161618;
  --color-text: #F4F4F2;
  --color-muted: #8A8A86;
  --color-accent: #C6FF3D;
  --color-line: rgba(244, 244, 242, 0.10);

  /* Typography — Grotesk Shout */
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Spacing — 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px;
  --s-24: 96px; --s-32: 128px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --max-w: 1120px;
  --gutter: 16px;
  --section-gap: var(--s-24);
  --nav-h: 64px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1280px) { :root { --section-gap: var(--s-32); } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 17px; } }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--color-accent); color: var(--color-bg); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; padding: var(--s-3) var(--s-4); background: var(--color-text); color: var(--color-bg); border-radius: var(--radius-sm); }
.skip-link:focus { top: var(--s-4); }

.container { width: 100%; max-width: calc(var(--max-w) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }

/* Typography */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.9;
}
.hero__title { font-size: clamp(40px, 10.6vw, 128px); max-width: 12ch; margin-inline: auto; }
.h2 { font-size: clamp(28px, 7.4vw, 80px); }
.hl { color: var(--color-accent); }
.lead { color: var(--color-muted); font-size: 16px; max-width: 56ch; margin-inline: auto; }
@media (min-width: 768px) { .lead { font-size: 18px; } }

/* Logo — Dynamic Identity: constant wordmark + variable frame */
.logo { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; position: relative; }
.logo__word { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.03em; text-transform: uppercase; line-height: 1; }
.logo__frame {
  width: 18px; height: 18px;
  border: 2px solid var(--frame-color, var(--color-text));
  border-radius: var(--frame-radius, 50%);
  transition: border-color .4s var(--ease), border-radius .4s var(--ease), transform .4s var(--ease);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-6);
  border: 1px solid transparent; border-radius: var(--radius-pill);
  font: 600 15px/1 var(--font-body); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn--sm { min-height: 44px; padding: 0 var(--s-4); font-size: 14px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--color-accent); color: var(--color-bg); }
.btn--primary:hover { background: #d4ff6b; }
.btn--primary:active { transform: scale(.98); }
.btn--ghost { background: transparent; color: var(--color-text); border-color: var(--color-line); }
.btn--ghost:hover { border-color: var(--color-muted); }
.btn[disabled] { opacity: .6; cursor: progress; }

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* 1. Navigation */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 12, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-line);
}
.nav__inner { max-width: calc(var(--max-w) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); height: var(--nav-h); display: flex; align-items: center; gap: var(--s-6); }
.nav__links { display: none; gap: var(--s-8); margin-left: auto; }
.nav__links a { color: var(--color-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--color-text); }
.nav__cta { display: none; }
.nav__toggle { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--color-line); border-radius: var(--radius-pill); color: var(--color-text); cursor: pointer; }
.sheet { border-top: 1px solid var(--color-line); padding: var(--s-4) var(--gutter) var(--s-6); background: var(--color-bg); }
.sheet nav { display: grid; margin-bottom: var(--s-4); }
.sheet nav a { padding: var(--s-4) 0; border-bottom: 1px solid var(--color-line); text-decoration: none; font-size: 18px; font-weight: 500; }
@media (min-width: 768px) {
  .nav__links, .nav__cta { display: flex; }
  .nav__toggle, .sheet { display: none !important; }
}

/* Ambient Abstract Loop (hero + CTA only) */
.ambient { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient__video { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.ambient__overlay { position: absolute; inset: 0; background: rgba(11, 11, 12, 0.55); }

/* 2. Hero */
.hero { position: relative; isolation: isolate; min-height: calc(100svh - var(--nav-h)); display: grid; align-items: center; padding: var(--s-16) 0; text-align: center; }
.hero__inner { display: grid; justify-items: center; gap: var(--s-6); }
.badge { display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-3); border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: rgba(22, 22, 24, .7); font: 500 12px/2 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--color-text); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-text); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* Waitlist form */
.waitlist { width: 100%; max-width: 520px; display: grid; gap: var(--s-3); margin-top: var(--s-2); }
.waitlist__form { display: grid; gap: var(--s-2); }
@media (min-width: 560px) {
  .waitlist__form { grid-template-columns: 1fr auto; padding: var(--s-1); background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-pill); }
  .waitlist__form .input { border-color: transparent; background: transparent; }
  .waitlist__form .waitlist__error { grid-column: 1 / -1; }
}
.input {
  width: 100%; min-height: 48px; padding: 0 var(--s-4);
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-line); border-radius: var(--radius-pill);
  font: 400 16px var(--font-body);
}
.input::placeholder { color: var(--color-muted); }
.input:focus-visible { outline-offset: 2px; }
.input--mono { font-family: var(--font-mono); font-size: 14px; }
.input[aria-invalid="true"] { border-color: #ff8a80; }
.waitlist__error { color: #ff8a80; font-size: 14px; text-align: left; padding-left: var(--s-4); }
.waitlist__success { display: grid; gap: var(--s-3); animation: fade .4s var(--ease); }
.waitlist__done { font-weight: 500; }
.referral { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); }
.queue { color: var(--color-muted); font-size: 13px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* 3. Orbital Scene */
.orbit { position: relative; height: 300vh; margin-top: var(--section-gap); }
.orbit__sticky { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); display: grid; align-items: center; overflow: hidden; }
.orbit__inner { display: grid; gap: var(--s-6); justify-items: center; text-align: center; }
.orbit__stage { position: relative; width: min(78vw, 46vh, 520px); aspect-ratio: 1; }
.orbit__canvas, .orbit__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.orbit__stats { display: grid; width: 100%; max-width: 420px; min-height: 96px; }
.stat { grid-area: 1 / 1; display: grid; gap: var(--s-1); opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.stat.is-active { opacity: 1; transform: none; }
.stat__num { font-size: 32px; font-weight: 500; line-height: 1.1; }
.stat__text { color: var(--color-muted); font-size: 15px; }
@media (min-width: 960px) {
  .orbit__inner { grid-template-columns: 1fr minmax(0, 520px) 1fr; text-align: left; align-items: center; }
  .orbit__inner .h2 { grid-column: 1; align-self: center; }
  .orbit__stage { width: min(46vh, 520px); }
  .orbit__stats { grid-column: 3; }
}
/* Static fallback (low-power / reduced motion) */
.orbit.is-static { height: auto; }
.orbit.is-static .orbit__sticky { position: static; height: auto; overflow: visible; }
.orbit.is-static .orbit__stats { gap: var(--s-6); }
.orbit.is-static .stat { grid-area: auto; opacity: 1; transform: none; }

/* Sections */
.section { padding-top: var(--section-gap); }
.section .h2 { margin-bottom: var(--s-12); }

/* 4. Glow Cards */
.cards { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, 1fr); gap: var(--s-6); } }
.card {
  position: relative; display: grid; gap: var(--s-3); align-content: start;
  padding: var(--s-4) var(--s-4) var(--s-8);
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-lg);
  --x: 50%; --y: 50%;
}
.card__art { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: var(--radius-md); margin-bottom: var(--s-3); }
.card__icon { color: var(--color-text); }
.card__title { font-size: 20px; font-weight: 600; line-height: 1.3; }
.card__text { color: var(--color-muted); }
.card > :not(.card__art) { margin-inline: var(--s-2); }
/* Border glow that tracks the cursor */
.glow::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: radial-gradient(260px circle at var(--x) var(--y), rgba(198, 255, 61, .75), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.glow:hover::before { opacity: 1; }

/* 5. Proof — numbers */
.numbers { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .numbers { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); } }
.number { display: flex; flex-direction: column-reverse; gap: var(--s-2); padding: var(--s-8) var(--s-6); text-align: center; border: 1px solid var(--color-line); border-radius: var(--radius-lg); }
.number__value { font-size: clamp(40px, 9vw, 56px); font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.number__label { color: var(--color-muted); font-size: 14px; }

/* 6. CTA */
.cta { position: relative; isolation: isolate; margin-top: var(--section-gap); padding: var(--s-24) 0; text-align: center; overflow: hidden; border-block: 1px solid var(--color-line); }
.cta__inner { display: grid; justify-items: center; gap: var(--s-6); }
.signups { display: flex; align-items: center; gap: var(--s-3); color: var(--color-muted); font-size: 13px; flex-wrap: wrap; justify-content: center; }
.avatars { display: flex; }
.avatars span { width: 32px; height: 32px; margin-left: -8px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--color-bg); background: var(--color-surface); color: var(--color-text); font: 500 10px var(--font-mono); }
.avatars span:nth-child(even) { background: #2a2a2d; }
.avatars span:first-child { margin-left: 0; }

/* 7. Footer */
.footer { padding: var(--s-8) 0; font-size: 14px; color: var(--color-muted); }
.footer__inner { display: flex; gap: var(--s-6); justify-content: center; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--color-text); }

/* Reduced motion: fades only, no movement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .stat, .waitlist__success { transform: none !important; }
  .magnetic { transform: none !important; }
}
