:root {
  --bg: #07090f;
  --bg-2: #0b0f1a;
  --surface: #111726;
  --surface-2: #161d31;
  --border: #1e2740;
  --text: #e8eef7;
  --muted: #8b96ad;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background ---------- */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}
.bg-glow {
  position: fixed; border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 { width: 600px; height: 600px; background: rgba(59,130,246,0.35); top: -200px; left: -100px; }
.bg-glow-2 { width: 500px; height: 500px; background: rgba(34,211,238,0.18); bottom: -150px; right: -100px; }

/* ---------- HUD ---------- */
.hud {
  position: fixed; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px;
  z-index: 20;
  pointer-events: none;
}
.hud-top { top: 0; }
.hud-bottom { bottom: 0; }
.hud-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em;
}
.hud-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.hud-sep, .hud-muted { color: var(--muted); font-weight: 500; }
.hud-hint { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.hud-progress { flex: 1; max-width: 200px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.hud-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--cyan)); transition: width 0.5s ease; }
.hud-counter { color: var(--muted); font-family: var(--mono); font-size: 12px; }

/* ---------- Dots ---------- */
.dots {
  position: fixed; right: 28px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 20;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); cursor: pointer;
  transition: all 0.3s ease;
}
.dot.active { background: var(--accent); box-shadow: 0 0 10px var(--accent); height: 22px; border-radius: 4px; }

/* ---------- Deck / Scenes ---------- */
#deck { position: relative; width: 100%; height: 100%; z-index: 10; }
.scene {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 8vw;
  opacity: 0; visibility: hidden;
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s;
}
.scene.active {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
}
.scene-inner { width: 100%; max-width: 1080px; }
.scene-inner.center { text-align: center; }

/* ---------- Typography ---------- */
.kicker {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.22em; color: var(--accent-2);
  text-transform: uppercase; margin-bottom: 20px;
}
.title-glow {
  font-size: clamp(72px, 14vw, 160px);
  font-weight: 900; line-height: 0.95; letter-spacing: -0.03em;
  background: linear-gradient(120deg, #fff 0%, #a8c7ff 45%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(59,130,246,0.35));
  margin-bottom: 18px;
}
.h2 {
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.subtitle {
  font-size: clamp(18px, 2.4vw, 26px); color: var(--muted); font-weight: 500;
}
.lede { font-size: 17px; color: var(--muted); margin-bottom: 30px; }
.accent { color: var(--accent-2); }
.accent-red { color: var(--red); }

.tag-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.chip {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.scene.active .reveal { opacity: 1; transform: translateY(0); }

/* ---------- Pillars ---------- */
.pillars { display: flex; gap: 22px; justify-content: center; margin: 40px 0 44px; flex-wrap: wrap; }
.pillar {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 30px; min-width: 170px; text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.pillar:hover { transform: translateY(-4px); border-color: var(--accent); }
.pillar-icon { font-size: 30px; margin-bottom: 12px; }
.pillar-name { font-family: var(--mono); font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.pillar-desc { color: var(--muted); font-size: 13px; }

.big-stat { margin-top: 8px; }
.big-stat-num {
  font-family: var(--mono); font-size: clamp(56px, 8vw, 96px); font-weight: 800;
  color: var(--accent-2);
}
.big-stat-unit { color: var(--muted); font-size: 20px; margin-left: 8px; }

/* ---------- Charts ---------- */
.chart { display: flex; flex-direction: column; gap: 22px; }
.chart-row { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; }
.chart-label { text-align: right; }
.chart-name { font-weight: 600; font-size: 15px; }
.chart-sub { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.chart-bars { display: flex; flex-direction: column; gap: 7px; }
.bar-track {
  position: relative; height: 30px; background: var(--surface);
  border-radius: 7px; overflow: hidden;
}
.bar-fill {
  position: absolute; top: 0; left: 0; height: 100%; width: 0;
  border-radius: 7px; transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-fill.before { background: linear-gradient(90deg, #2a3348, #3a455f); }
.bar-fill.after { background: linear-gradient(90deg, var(--accent), var(--cyan)); box-shadow: 0 0 18px rgba(59,130,246,0.5); }
.bar-fill.comp { background: linear-gradient(90deg, #3a455f, #55617a); }
.bar-val {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: #fff;
  opacity: 0; transition: opacity 0.4s ease 0.6s;
}
.bar-val.show { opacity: 1; }
.bar-legend { display: flex; gap: 18px; margin-bottom: 4px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 11px; height: 11px; border-radius: 3px; }
.legend-swatch.before { background: #3a455f; }
.legend-swatch.after { background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.legend-swatch.comp { background: #55617a; }

/* efficiency scatter-ish */
.eff-row { display: flex; align-items: flex-end; gap: 28px; justify-content: center; padding-top: 20px; }
.eff-col { text-align: center; }
.eff-bar {
  width: 90px; border-radius: 10px 10px 0 0;
  transition: height 1s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.eff-bar .eff-val { position: absolute; top: -28px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-weight: 700; font-size: 15px; opacity: 0; transition: opacity 0.4s ease 0.7s; }
.eff-bar .eff-val.show { opacity: 1; }
.eff-name { font-family: var(--mono); font-size: 13px; margin-top: 10px; font-weight: 600; }
.eff-tokens { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.eff-bar.glm53 { background: linear-gradient(180deg, var(--cyan), var(--accent)); box-shadow: 0 0 24px rgba(59,130,246,0.45); }
.eff-bar.glm52 { background: #3a455f; }
.eff-bar.opus { background: #55617a; }
.eff-bar.fable { background: #2a3348; }

/* ---------- Stat grid ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 40px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 18px; text-align: center;
}
.stat-num {
  font-family: var(--mono); font-size: clamp(30px, 4vw, 46px); font-weight: 800;
  color: var(--accent-2); line-height: 1;
}
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 10px; line-height: 1.35; }

/* ---------- Infra ---------- */
.infra-grid { display: flex; gap: 20px; margin-top: 36px; flex-wrap: wrap; }
.infra-card {
  flex: 1; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 30px 26px; position: relative;
}
.infra-num {
  font-family: var(--mono); font-size: clamp(40px, 5vw, 58px); font-weight: 800;
  color: var(--accent-2); display: inline-block;
}
.infra-suffix { font-family: var(--mono); font-size: 28px; color: var(--cyan); font-weight: 800; margin-left: 4px; }
.infra-label { color: var(--muted); font-size: 14px; margin-top: 10px; }

/* ---------- API ---------- */
.api-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.api-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px;
}
.api-title { font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.api-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tag {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border);
}
.tag-low { color: var(--green); border-color: rgba(52,211,153,0.4); }
.tag-high { color: var(--amber); border-color: rgba(251,191,36,0.4); }
.tag-max { color: var(--accent-2); border-color: rgba(96,165,250,0.4); }
.tag-green { color: var(--green); border-color: rgba(52,211,153,0.4); }
.api-note { color: var(--muted); font-size: 13px; }
.api-warn { color: var(--red); font-weight: 700; font-size: 15px; margin-bottom: 8px; }
code { font-family: var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: 0.9em; }
.code-block {
  margin-top: 26px; background: #0a0e18; border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 24px; overflow-x: auto;
}
.code-block pre { font-family: var(--mono); font-size: 15px; color: #9eceff; }

/* ---------- Cursor hide ---------- */
body.hide-cursor, body.hide-cursor * { cursor: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .api-grid { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; gap: 6px; }
  .chart-label { text-align: left; }
  .hud-hint { display: none; }
}
