
:root {
  --bg: #07080a;
  --bg-raised: #0e1014;
  --bg-card: #111318;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ecebe3;
  --muted: #9b998e;
  --faint: #5f5e57;
  --accent: #cfcc5e;
  --accent-deep: #a7a53c;
  --accent-glow: rgba(207, 204, 94, 0.35);
  --danger: #ff5c57;
  --ok: #5fd88a;

  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 14px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(207, 204, 94, 0.1);
  color: var(--accent);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 14px; border-radius: 8px;
  background: var(--accent); color: #111; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.accent-text { color: var(--accent); }

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 8, 10, 0.72);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom-color: var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
}
.brand-mark { width: 30px; height: 30px; fill: var(--text); }
.brand-mark .brand-null { fill: none; stroke: var(--accent); stroke-width: 2.2; }
.brand:hover .brand-mark rect { animation: brick 0.6s var(--ease) both; }
.brand:hover .brand-mark rect:nth-child(2n) { animation-delay: 0.05s; }
@keyframes brick { 40% { transform: translateY(-1.5px); } }

.nav ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nav a:not(.brand) {
  display: inline-block; padding: 8px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 15px;
  transition: color 0.2s, background 0.2s;
}
.nav a:not(.brand):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav .nav-cta { color: var(--text) !important; border: 1px solid var(--line-strong); }

@media (max-width: 640px) {
  .nav li:not(:last-child) { display: none; }
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.wall { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 30% 50%, rgba(7, 8, 10, 0.86), rgba(7, 8, 10, 0.25) 70%, transparent),
    linear-gradient(to bottom, rgba(7, 8, 10, 0.2), transparent 30%, transparent 70%, var(--bg));
}
.hero-inner {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: 120px var(--gutter) 96px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px; padding: 6px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-strong); background: rgba(7, 8, 10, 0.6);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
h1 {
  margin: 0 0 22px;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.95; letter-spacing: -0.045em; font-weight: 700;
}
h1 .line { display: block; }
.caret { color: var(--accent); animation: blink 1.1s steps(1) infinite; margin-left: 0.04em; }
@keyframes blink { 50% { opacity: 0; } }
.lede { max-width: 560px; margin: 0 0 32px; font-size: clamp(17px, 2vw, 20px); color: #cfcdc3; }
.lede strong { color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.25s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #12130c; box-shadow: 0 8px 30px -10px var(--accent-glow); }
.btn-primary:hover { box-shadow: 0 14px 40px -10px var(--accent-glow); }
.btn-ghost { border: 1px solid var(--line-strong); background: rgba(7, 8, 10, 0.5); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-deep); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 14px; border: 1.5px solid var(--line-strong);
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--accent); animation: scroll 1.8s var(--ease) infinite;
}
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.kicker {
  margin: 0 0 10px; font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
h2 { margin: 0 0 16px; font-size: clamp(36px, 5.5vw, 64px); line-height: 1.02; letter-spacing: -0.035em; }
.section-lede { margin: 0; color: #c7c5bb; font-size: clamp(17px, 1.9vw, 19px); }
.status {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 22px 0 0; color: var(--muted); font-size: 15px;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s infinite; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin: 0 0 40px; border-radius: var(--radius); overflow: hidden;
  background: var(--line); border: 1px solid var(--line);
}
.facts div { margin: 0; padding: 22px 22px 20px; background: var(--bg-raised); }
.facts dt {
  font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  color: var(--accent);
}
.facts dt span { color: var(--faint); font-weight: 400; }
.facts dd { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.4; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }

.citadel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 80% 20%, rgba(167, 165, 60, 0.09), transparent 70%);
}

.showcase { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; margin-bottom: 56px; }
@media (max-width: 900px) { .showcase { grid-template-columns: 1fr; } }

.replay-card, .terminal {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.replay-top { display: flex; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chip {
  font-family: var(--font-mono); font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: rgba(207, 204, 94, 0.12); color: var(--accent);
}
.chip-muted { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.chip-flag {
  margin-left: auto; background: rgba(255, 92, 87, 0.14); color: var(--danger);
  opacity: 0; transform: translateY(-4px); transition: opacity 0.25s, transform 0.25s;
}
.chip-flag.on { opacity: 1; transform: none; }
.replay { display: block; width: 100%; aspect-ratio: 16 / 10; background:
  linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 28px 28px; }
.replay-card figcaption {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.legend { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.ghost-claimed { background: #f3f2ea; }
.ghost-predicted { background: var(--danger); }
.ghost-trail { background: linear-gradient(90deg, var(--ok), #f5e13c, var(--danger)); border-radius: 3px !important; width: 18px !important; }

.terminal { display: flex; flex-direction: column; min-height: 320px; }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a2c31; }
.terminal-bar span { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.terminal-body {
  flex: 1; margin: 0; padding: 16px 18px; overflow: hidden;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.75; color: #d8d6cc;
  white-space: pre-wrap; word-break: break-word;
}
.terminal-body .t-cmd { color: var(--text); }
.terminal-body .t-dim { color: var(--faint); }
.terminal-body .t-acc { color: var(--accent); }
.terminal-body .t-bad { color: var(--danger); }
.terminal-body .t-ok { color: var(--ok); }
.terminal-body .t-cursor { display: inline-block; width: 0.6em; height: 1.1em; vertical-align: -0.18em; background: var(--accent); animation: blink 1s steps(1) infinite; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature p code { font-size: 0.85em; }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }
.feature {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: var(--bg-raised); border: 1px solid var(--line);
  transition: border-color 0.3s, transform 0.3s var(--ease);
  overflow: hidden;
}
.feature::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(207, 204, 94, 0.12), transparent 70%);
}
.feature:hover { border-color: rgba(207, 204, 94, 0.35); transform: translateY(-3px); }
.feature:hover::before { opacity: 1; }
.feature h3 { margin: 16px 0 8px; font-size: 20px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }
.feature-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: rgba(207, 204, 94, 0.1); border: 1px solid rgba(207, 204, 94, 0.25);
}
.feature-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.pipeline {
  --progress: 0;
  position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  margin: 0; padding: 34px 0 0; list-style: none; counter-reset: none;
}
.pipeline::before, .pipeline::after {
  content: ""; position: absolute; top: 9px; left: 10px; right: 10px; height: 2px; border-radius: 2px;
}
.pipeline::before { background: var(--line-strong); }
.pipeline::after {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transform-origin: left; transform: scaleX(var(--progress));
  box-shadow: 0 0 18px var(--accent-glow);
}
.pipeline li { position: relative; }
.pipeline li::before {
  content: ""; position: absolute; top: -31px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong); transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.pipeline li.lit::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 14px var(--accent-glow); }
.step-n { font-family: var(--font-mono); font-size: 13px; color: var(--faint); }
.pipeline h3 { margin: 4px 0 6px; font-size: 21px; }
.pipeline p { margin: 0; font-size: 15px; color: var(--muted); }
@media (max-width: 860px) {
  .pipeline { grid-template-columns: 1fr; gap: 26px; padding: 0 0 0 34px; }
  .pipeline::before, .pipeline::after { top: 6px; bottom: 6px; left: 6px; right: auto; width: 2px; height: auto; }
  .pipeline::after { transform-origin: top; transform: scaleY(var(--progress)); }
  .pipeline li::before { top: 6px; left: -34px; }
}

.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; gap: 10px; } }
.about-copy p { margin: 0 0 18px; color: #c7c5bb; font-size: 18px; }
.about-links { margin-top: 28px !important; }

.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--faint); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.js .hero .reveal:nth-child(4) { transition-delay: 0.24s; }
.js .features .reveal:nth-child(3n + 2) { transition-delay: 0.08s; }
.js .features .reveal:nth-child(3n) { transition-delay: 0.16s; }

.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 24px; position: relative; overflow: hidden; isolation: isolate; }
.lost h1 { font-size: clamp(80px, 18vw, 180px); margin: 0; }
.lost p { color: var(--muted); margin: 0 0 28px; }

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