:root {
  --bg: #050505;
  --bg-alt: #0a0a0a;
  --panel: #101010;
  --panel-alt: #161616;
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.18);

  --text: #F5F5F5;
  --text-dim: #9A9A9A;
  --muted: #616161;

  /* Single accent — swap this one variable to retheme (e.g. #00FFB2 mint, #9D5CFF purple) */
  --accent: #FFFFFF;
  --accent-glow: rgba(255, 255, 255, 0.35);
  --accent-dim: rgba(255, 255, 255, 0.55);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 96px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.15s;
  --t-med: 0.3s;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

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

a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.accent { color: var(--accent); }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Two-layer interactive spotlight: a tight core that tracks the pointer
   instantly, and a softer halo that trails behind with lerped physics
   (see js/main.js). Both bloom on hover of anything clickable. */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  transform: translate3d(-999px, -999px, 0);
}

.cursor-glow--core {
  width: 130px; height: 130px;
  margin-left: -65px; margin-top: -65px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0.55;
  transition: opacity var(--t-med) ease, width var(--t-med) var(--ease-spring), height var(--t-med) var(--ease-spring), margin var(--t-med) var(--ease-spring);
}

.cursor-glow--halo {
  width: 560px; height: 560px;
  margin-left: -280px; margin-top: -280px;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0.32;
  transition: opacity var(--t-med) ease, width 0.4s var(--ease-spring), height 0.4s var(--ease-spring), margin 0.4s var(--ease-spring);
}

.cursor-glow--core.is-active {
  width: 200px; height: 200px;
  margin-left: -100px; margin-top: -100px;
  opacity: 0.85;
}

.cursor-glow--halo.is-active {
  width: 720px; height: 720px;
  margin-left: -360px; margin-top: -360px;
  opacity: 0.5;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--space-4);
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med) ease, background var(--t-med) ease;
}
.nav.scrolled { border-bottom-color: var(--stroke); background: rgba(5, 5, 5, 0.85); }

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.nav__brand .mark { width: 26px; height: 26px; fill: none; stroke: var(--text); stroke-width: 7; }

.nav__links { display: flex; gap: var(--space-4); }
.nav__links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: color var(--t-fast) ease;
}
.nav__links a:hover { color: var(--text); }

.nav__actions { display: flex; align-items: center; gap: var(--space-3); }

@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-med) ease,
              background var(--t-fast) ease,
              border-color var(--t-fast) ease;
}
.btn:active { transform: scale(0.96); }

.btn--primary {
  background: var(--accent);
  color: #050505;
  box-shadow: 0 0 0 rgba(255,255,255,0);
}
.btn--primary:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
  transform: translateY(-2px);
}

.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--lg { padding: 15px 30px; font-size: 15px; }

.link-underline {
  position: relative;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  padding-bottom: 3px;
  transition: color var(--t-fast) ease;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}
.link-underline:hover { color: var(--text); }
.link-underline:hover::after { transform: scaleX(1); }
.link-underline--lg { font-size: 15px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px var(--space-3) var(--space-8);
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 var(--space-3);
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(42px, 7.5vw, 84px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 var(--space-3);
}

.hero__sub {
  max-width: 520px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 var(--space-4);
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

/* Floating minimalist HUD mockup */
.hud {
  position: relative;
  width: min(680px, 90vw);
  height: 200px;
  animation: hud-float 5s ease-in-out infinite;
}
@keyframes hud-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hud__panel {
  position: absolute;
  background: rgba(16, 16, 16, 0.55);
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px 18px;
}
.hud__panel--fps {
  top: 0; left: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.hud__value { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.hud__unit { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }

.hud__panel--stats {
  bottom: 0; right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  min-width: 200px;
}
.hud__row { display: flex; justify-content: space-between; gap: var(--space-3); }
.hud__row span:first-child { color: var(--muted); }

.hud__crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 24px; height: 24px;
}
.hud__crosshair-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(245, 245, 245, 0.55);
  transform: translate(-50%, -50%);
}
.hud__crosshair-tick { position: absolute; background: rgba(245, 245, 245, 0.45); }
.hud__crosshair-tick--top,
.hud__crosshair-tick--bottom {
  left: 50%;
  width: 1.5px;
  height: 7px;
  transform: translateX(-50%);
}
.hud__crosshair-tick--top { top: 0; }
.hud__crosshair-tick--bottom { bottom: 0; }
.hud__crosshair-tick--left,
.hud__crosshair-tick--right {
  top: 50%;
  height: 1.5px;
  width: 7px;
  transform: translateY(-50%);
}
.hud__crosshair-tick--left { left: 0; }
.hud__crosshair-tick--right { right: 0; }

.hero__scroll {
  position: relative;
  bottom: var(--space-4);
  width: 22px; height: 36px;
  border: 1px solid var(--stroke-strong);
  border-radius: 11px;
}
.hero__scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 3px; height: 6px;
  border-radius: 2px;
  background: var(--text-dim);
  transform: translate(-50%, 0);
  animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot {
  0% { transform: translate(-50%, 0); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(-50%, 14px); opacity: 0; }
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  background: var(--bg-alt);
  padding: 26px 0;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 26s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__group {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  white-space: nowrap;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.marquee__group .accent { color: var(--accent); text-shadow: 0 0 24px var(--accent-glow); }
.marquee__dot { font-size: 10px; color: var(--muted); }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-3);
  text-align: center;
}
.section--alt { background: var(--bg-alt); max-width: none; border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.section--alt > * { max-width: 980px; margin-left: auto; margin-right: auto; }

.section__head { margin-bottom: var(--space-6); }
.section__head h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 700; letter-spacing: -0.015em; margin: 8px 0 0; }
.section__lede { color: var(--text-dim); margin: var(--space-1) 0 0; font-size: 15px; }
.section__copy {
  max-width: 560px;
  margin: 0 auto var(--space-8);
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.8;
}

/* ---------- Stat ---------- */

.stat {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: var(--space-2) 0 var(--space-4);
}
.stat__prefix {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.stat__number {
  font-size: clamp(72px, 14vw, 140px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-shadow: 0 0 60px var(--accent-glow);
  line-height: 1;
}
.stat__suffix {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* ---------- Bars (FPS comparison) ---------- */

.bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-8);
  height: 320px;
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  width: 120px;
}

.bar-col__value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-dim);
  margin-bottom: var(--space-2);
}
.bar-col--origin .bar-col__value {
  font-size: 28px;
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

.bar-col__track {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--stroke);
}

.bar-col__fill {
  width: 100%;
  height: 0;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: var(--panel-alt);
  border: 1px solid var(--stroke-strong);
  border-bottom: none;
  transition: height 1.1s var(--ease-out);
}
.bars.is-filled .bar-col__fill { height: var(--target); }

.bar-col__fill--origin {
  background: linear-gradient(180deg, #ffffff 0%, #d8d8d8 100%);
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
}

.bar-col__label {
  margin-top: var(--space-2);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.bar-col--origin .bar-col__label { color: var(--text-dim); }

@media (max-width: 640px) {
  .bars { gap: var(--space-3); height: 260px; }
  .bar-col { width: 90px; }
  .bar-col__track { height: 170px; }
}

/* ---------- Compatibility / feature list ---------- */

.compat { padding: var(--space-4) 0; }
.compat__head h2 { margin: 8px 0 0; }

.feature-list {
  list-style: none;
  margin: var(--space-6) auto 0;
  padding: 0;
  max-width: 720px;
  text-align: left;
}
.feature-list__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-3) 4px;
  border-bottom: 1px solid var(--stroke);
  transition: background var(--t-fast) ease;
}
.feature-list__item:first-child { border-top: 1px solid var(--stroke); }
.feature-list__item:hover { background: rgba(255,255,255,0.02); }

.feature-list__title { font-size: 15px; font-weight: 600; white-space: nowrap; }
.feature-list__desc { font-size: 13.5px; color: var(--text-dim); text-align: right; }

@media (max-width: 640px) {
  .feature-list__item { flex-direction: column; align-items: flex-start; gap: 4px; }
  .feature-list__desc { text-align: left; }
}

/* ---------- Comparison table ---------- */

.compare-table {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th, .compare-table td {
  padding: var(--space-3) var(--space-2);
  text-align: center;
  border-bottom: 1px solid var(--stroke);
}
.compare-table thead th { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; font-weight: 600; text-transform: uppercase; }
.compare-table tbody th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 500;
}
.compare-table td { color: var(--text-dim); }
.compare-table__highlight {
  color: var(--accent);
  font-weight: 700;
  position: relative;
}
.compare-table thead .compare-table__highlight::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Legal (Terms) ---------- */

.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 160px var(--space-3) var(--space-10);
}

.legal__head { margin-bottom: var(--space-8); }
.legal__head h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 8px 0 0;
}
.legal__updated { color: var(--muted); font-size: 13px; margin: var(--space-2) 0 0; }

.legal__body h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: var(--space-6) 0 var(--space-2);
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body p, .legal__body li {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.8;
}
.legal__body ul {
  margin: var(--space-2) 0;
  padding-left: 20px;
}
.legal__body li { margin-bottom: 8px; }
.legal__body li::marker { color: var(--muted); }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-10) var(--space-3) var(--space-10);
  border-top: 1px solid var(--stroke);
}
.footer__links { display: flex; gap: var(--space-4); }
.footer__links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  transition: color var(--t-fast) ease;
}
.footer__links a:hover { color: var(--text-dim); }
.footer__copy { color: var(--muted); font-size: 12px; margin: 0; }

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--panel-alt);
  color: var(--text);
  border: 1px solid var(--stroke-strong);
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) ease, transform var(--t-med) ease;
  z-index: 100;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
