:root {
  --bg: #05060d;
  --fg: #e9ecff;
  --muted: #8a90b4;
  --glow: #7cf7ff;
  --glow2: #c38bff;
  --line: rgba(255, 255, 255, .08);
  --font: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font: 17px/1.6 var(--font); overflow-x: clip; }
a { color: var(--glow); }
img { max-width: 100%; }

/* nav */
nav {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 56px);
  backdrop-filter: blur(10px); background: rgba(5, 6, 13, .55); border-bottom: 1px solid var(--line);
}
.logo { font-weight: 700; letter-spacing: .08em; color: var(--fg); text-decoration: none; }
.logo span { color: var(--glow); }
nav ul { display: flex; gap: clamp(14px, 3vw, 32px); list-style: none; padding: 0; }
nav ul a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav ul a:hover { color: var(--fg); }

/* hero */
#swarm { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero {
  min-height: 100vh; display: grid; place-content: center; text-align: center;
  padding: 120px 16px 60px; perspective: 900px;
}
.hero h1 {
  font-size: clamp(48px, 11vw, 150px); line-height: .9; letter-spacing: -.04em;
  background: linear-gradient(120deg, #fff 30%, var(--glow) 60%, var(--glow2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform-style: preserve-3d; transition: transform .2s ease-out;
}
.hero p { color: var(--muted); max-width: 560px; margin: 24px auto 36px; font-size: clamp(16px, 2.2vw, 20px); }
.eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: 12px; color: var(--glow); margin-bottom: 18px; }

.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px; text-decoration: none; font-weight: 600;
  color: var(--bg); background: linear-gradient(90deg, var(--glow), var(--glow2));
  box-shadow: 0 0 30px rgba(124, 247, 255, .35); transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(124, 247, 255, .6); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); box-shadow: none; }

/* sections */
section { padding: clamp(70px, 12vw, 140px) clamp(16px, 5vw, 56px); max-width: 1180px; margin: auto; }
h2 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -.03em; line-height: 1.05; margin-bottom: 16px; }
.lead { color: var(--muted); max-width: 640px; }

/* game card with 3D tilt */
.games { display: grid; gap: 32px; margin-top: 48px; }
.card {
  display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, #11152a, #080a16);
  border: 1px solid var(--line); transform-style: preserve-3d;
  transition: transform .15s ease-out; will-change: transform;
}
.card-art {
  position: relative; min-height: 360px; overflow: hidden;
  background: radial-gradient(circle at 50% 55%, #1b2a5c 0%, #070816 70%);
  transform: translateZ(40px);
}
.card-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-art .title {
  position: absolute; left: 24px; bottom: 20px; font-size: 34px; font-weight: 700;
  text-shadow: 0 0 24px var(--glow);
}
.card-body { padding: clamp(24px, 4vw, 44px); transform: translateZ(20px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; padding: 0; list-style: none; }
.tags li { font-size: 13px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.card-body ul.feat { padding-left: 18px; color: var(--muted); margin-bottom: 28px; }
.card-body .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.soon {
  border: 1px dashed var(--line); border-radius: 24px; padding: 40px; text-align: center; color: var(--muted);
}

/* about */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 48px; }
.pill {
  padding: 28px; border-radius: 20px; border: 1px solid var(--line);
  background: rgba(255,255,255,.02); transition: transform .3s, border-color .3s;
}
.pill:hover { transform: translateY(-6px) rotateX(6deg); border-color: rgba(124, 247, 255, .4); }
.pill h3 { margin-bottom: 8px; }
.pill p { color: var(--muted); font-size: 15px; }
.stats { display: flex; flex-wrap: wrap; gap: 48px; margin-top: 56px; }
.stats b { display: block; font-size: 44px; color: var(--glow); line-height: 1; }
.stats span { color: var(--muted); font-size: 14px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px) rotateX(10deg); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }

/* legal pages */
.legal { max-width: 780px; padding-top: 140px; }
.legal h1 { font-size: clamp(36px, 6vw, 60px); letter-spacing: -.03em; line-height: 1.05; }
.legal .date { color: var(--muted); margin: 8px 0 40px; }
.legal h2 { font-size: 22px; margin: 40px 0 10px; letter-spacing: 0; }
.legal p, .legal li { color: #c3c7e4; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal-bg { background: radial-gradient(ellipse at top, #121a3d, var(--bg) 60%) fixed; }

footer {
  border-top: 1px solid var(--line); padding: 32px clamp(16px, 5vw, 56px);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; color: var(--muted); font-size: 14px;
}
footer a { color: var(--muted); margin-left: 20px; }
footer a:first-child { margin-left: 0; }

@media (max-width: 760px) {
  .card { grid-template-columns: 1fr; }
  .card-art { min-height: 260px; }
  nav ul li:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* legal tables */
.table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; }
.legal table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: #c3c7e4; }
.legal th { color: var(--fg); background: rgba(255,255,255,.04); }
.legal tr:last-child td { border-bottom: 0; }
