:root {
  --bg: #07090d;
  --bg-2: #0d1118;
  --panel: #111722;
  --line: #1f2836;
  --text: #e8edf4;
  --muted: #8b97a8;
  --blue: #3fa2ff;
  --red: #ff4a4a;
  --accent: #3fa2ff;
  --max: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--accent); }
a:hover { color: #fff; }

img { max-width: 100%; display: block; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 9, 13, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand img { height: 22px; width: auto; }
.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 96px 0;
  isolation: isolate;
}
.hero::before {
  /* perspective grid that reads as "floor" — and as a wall once rotated */
  content: "";
  position: absolute;
  inset: -40% -20% 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(700px) rotateX(62deg) translateY(30%);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, #000 10%, transparent 75%);
  animation: grid-drift 14s linear infinite;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 320px at 22% 40%, rgba(63, 162, 255, 0.16), transparent 70%),
    radial-gradient(600px 320px at 78% 60%, rgba(255, 74, 74, 0.13), transparent 70%);
}
@keyframes grid-drift { to { background-position: 0 64px, 0 0; } }

.hero-logo { width: min(640px, 86vw); margin: 0 auto 32px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}
.tagline {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 300;
  max-width: 720px;
  margin: 0 auto 40px;
}
.tagline strong { font-weight: 600; }

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background 0.15s, color 0.15s;
}
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn-ghost:hover { background: var(--panel); color: #fff; }

/* ---------- Sections ---------- */
section { padding: 110px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.section-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
h2 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.lead { color: var(--muted); font-size: 19px; max-width: 760px; margin: 0; }

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.about-grid p + p { margin-top: 16px; }

/* gravity diagram */
.gravity-box {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--panel);
}
.gravity-box .player {
  position: absolute;
  width: 18px;
  height: 46px;
  border-radius: 9px;
}
.gravity-box .p1 { background: var(--blue); left: 30%; bottom: 0; }
.gravity-box .p2 { background: var(--red); right: 0; top: 34%; transform: rotate(-90deg); transform-origin: right center; }
.gravity-box .p3 { background: var(--blue); left: 62%; top: 0; transform: rotate(180deg); }
.gravity-box .arrow {
  position: absolute;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.gravity-box .a1 { left: 30%; bottom: 60px; }
.gravity-box .a2 { right: 64px; top: 36%; }
.gravity-box .a3 { left: 62%; top: 60px; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 56px;
}
.feature { background: var(--bg); padding: 34px 30px; }
.section-alt .feature { background: var(--bg-2); }
.feature .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2em;
}
.feature h3 { font-size: 20px; margin: 12px 0 10px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.specs li { border-top: 1px solid var(--line); padding-top: 14px; }
.specs .k {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.specs .v { font-size: 18px; }

.final-cta { text-align: center; }
.final-cta .lead { margin: 0 auto 36px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Legal page ---------- */
.legal { padding: 80px 0 120px; }
.legal .wrap { max-width: 800px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; margin: 0 0 12px; }
.legal .updated { color: var(--muted); font-family: var(--mono); font-size: 14px; margin: 0 0 48px; }
.legal h2 { font-size: 24px; margin: 56px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal h3 { font-size: 18px; margin: 28px 0 8px; }
.legal p, .legal li { color: #c7cfdb; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; border: 1px solid var(--line); }
.legal th { background: var(--panel); font-weight: 600; }
.legal .toc { background: var(--panel); border: 1px solid var(--line); padding: 20px 28px; }
.legal .toc ol { margin: 0; padding-left: 20px; }
.legal .toc a { color: var(--text); text-decoration: none; }
.legal .toc a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .gravity-box { max-width: 360px; }
  section { padding: 80px 0; }
  .nav { gap: 18px; }
}
@media (max-width: 480px) {
  .nav a:not(.keep) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  html { scroll-behavior: auto; }
}
