:root {
  /* surfaces: depth via layering */
  --bg: #070810;
  --bg-2: #0c0e18;
  --panel: #12151f;
  --panel-2: #171a26;
  --line: #222636;
  --line-strong: #2e3344;

  /* text */
  --text: #f2f4fb;
  --muted: #aab0c4;
  --faint: #6b7088;

  /* accent: purple to teal, plus one warm spark for gaming tension */
  --accent: #7c5cff;
  --accent-2: #19d3c5;
  --spark: #ff8a3d;
  --accent-grad: linear-gradient(100deg, #8a6bff 0%, #19d3c5 100%);
  --ok: #19d3c5;
  --err: #ff6b6b;
  --glow-purple: rgba(124, 92, 255, 0.22);
  --glow-teal: rgba(25, 211, 197, 0.16);

  /* fluid type scale (~1.25) */
  --fs-display: clamp(38px, 5.6vw, 60px);
  --fs-h3: clamp(17px, 2vw, 19px);
  --fs-lead: clamp(16px, 1.6vw, 19px);
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-micro: 12.5px;

  /* spacing rhythm (8px base) */
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 40px;
  --s-5: 64px; --s-6: 96px; --s-7: 128px;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --maxw: 1120px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 24px 70px rgba(6, 7, 14, 0.7);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

.bg-glow {
  position: fixed;
  inset: -20% 0 auto 0;
  height: 70vh;
  background:
    radial-gradient(55% 55% at 22% 0%, var(--glow-purple), transparent 70%),
    radial-gradient(45% 50% at 82% 8%, var(--glow-teal), transparent 70%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px var(--s-6);
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(7, 8, 16, 0.6);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.nav-cta {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  transition: border-color 0.15s, background 0.15s;
}
.nav-cta:hover { border-color: var(--accent); background: rgba(124, 92, 255, 0.1); }

/* status chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 11px;
  background: var(--panel);
}
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
}

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  gap: var(--s-5);
  align-items: center;
  padding-top: var(--s-6);
  padding-bottom: var(--s-6);
}
.hero-copy { max-width: 560px; }
h1 {
  font-size: var(--fs-display);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: var(--s-3) 0 var(--s-3);
}
.grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sub {
  font-size: var(--fs-lead);
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: var(--s-4);
}
.sub strong { color: var(--text); font-weight: 600; }

/* waitlist form (wiring preserved) */
.waitlist { display: flex; gap: 10px; max-width: 480px; }
.waitlist input {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.waitlist input::placeholder { color: #5e647a; }
.waitlist input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.waitlist button {
  background: var(--accent-grad);
  color: #0a0b10;
  font-weight: 700;
  font-size: 15px;
  border: none;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, filter 0.12s;
}
.waitlist button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.waitlist button:active { transform: translateY(0); }
.waitlist button:disabled { opacity: 0.6; cursor: default; transform: none; }

.form-msg { min-height: 22px; margin-top: 14px; font-size: 14.5px; font-weight: 500; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }
.fineprint { margin-top: 12px; font-size: var(--fs-small); color: var(--faint); }

/* hero visual: coded editor mockup */
.hero-visual { position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -8% -6% -10% -6%;
  background:
    radial-gradient(50% 50% at 70% 30%, var(--glow-purple), transparent 70%),
    radial-gradient(45% 45% at 25% 80%, var(--glow-teal), transparent 70%);
  filter: blur(26px);
  z-index: -1;
}
.mock {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.mdot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.mock-title { margin-left: 8px; font-size: var(--fs-micro); color: var(--muted); font-weight: 600; }
.mock-body { padding: 16px; }
.mock-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  /* Empty-state backdrop. Gameplay frames are layered on top by preview.js
     (drop files at /assets/preview-1.jpg ... preview-4.jpg). */
  background:
    radial-gradient(80% 120% at 30% 0%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(90% 120% at 100% 100%, rgba(25, 211, 197, 0.16), transparent 55%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 22px),
    #0a0c15;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-bottom: var(--s-3);
}
.mock-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
}
.mock-video.show { opacity: 1; }
.mock-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 10, 18, 0.06), rgba(8, 10, 18, 0.5));
}
.mock-playbtn {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(10, 12, 20, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 0.2s var(--ease), background 0.15s;
}
.mock-playbtn svg { width: 22px; height: 22px; }
.mock-playbtn:hover { background: rgba(10, 12, 20, 0.65); }
.mock-playbtn .i-pause { display: none; }
.mock-preview.playing .mock-playbtn { opacity: 0; }
.mock-preview.playing .mock-playbtn .i-play { display: none; }
.mock-preview.playing .mock-playbtn .i-pause { display: block; }
.mock-preview.playing:hover .mock-playbtn,
.mock-playbtn:focus-visible { opacity: 1; }
.mock-time {
  position: absolute;
  right: 10px;
  bottom: 9px;
  z-index: 2;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 7px;
  border-radius: 6px;
}
.mock-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}
.mock-track { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: var(--s-3); }
.pill {
  font-size: 12px;
  font-weight: 600;
  color: #ffd9bd;
  background: rgba(255, 138, 61, 0.13);
  border: 1px solid rgba(255, 138, 61, 0.35);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.pill.active {
  background: rgba(255, 138, 61, 0.24);
  border-color: rgba(255, 138, 61, 0.7);
  color: #ffe7d6;
}
.mock-timeline {
  position: relative;
  height: 36px;
  margin-bottom: var(--s-3);
}
.clip {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--l, 0);
  width: var(--w, 20%);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 0 7px;
  overflow: hidden;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.5), rgba(124, 92, 255, 0.22));
  border: 1px solid rgba(124, 92, 255, 0.5);
  transition: filter 0.2s var(--ease);
}
.clip.alt {
  background: linear-gradient(180deg, rgba(25, 211, 197, 0.42), rgba(25, 211, 197, 0.18));
  border-color: rgba(25, 211, 197, 0.5);
}
.clip.active { filter: brightness(1.4); }
.clip-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playhead {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 0;
  width: 2px;
  background: var(--text);
  box-shadow: 0 0 8px rgba(242, 244, 251, 0.6);
  pointer-events: none;
}
.playhead::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
}
.mock-export { display: flex; align-items: center; gap: 8px; }
.ex-label { font-size: 12px; color: var(--faint); font-weight: 600; margin-right: 2px; }
.ex-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 4px 10px;
}
.mock-caption {
  display: block;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 8px 0 11px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

/* features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}
.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-3);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s;
}
.feature:hover { border-color: var(--line-strong); }
.ficon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--s-2);
  color: var(--accent-2);
  background: rgba(25, 211, 197, 0.1);
  border: 1px solid rgba(25, 211, 197, 0.22);
}
.feature h3 { font-size: var(--fs-h3); font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature p { font-size: 14.5px; color: var(--muted); }

/* footer */
.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--faint);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.dot { opacity: 0.5; }

/* focus + motion (accessibility) */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* responsive */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-4);
    padding-top: var(--s-5);
    padding-bottom: var(--s-5);
    text-align: left;
  }
  .hero-copy { max-width: none; }
  .hero-visual { order: 2; }
}
@media (max-width: 620px) {
  .features { grid-template-columns: 1fr; }
  .waitlist { flex-direction: column; }
  .waitlist button { width: 100%; }
}
