/* =============================================================
   KD Games — design system  ·  "Midnight Gold"
   Base   midnight  #080a14
   Gold   (brand / primary)        #f5b73c
   Emerald(secondary / win / live) #2fd28a
   Violet (ambient energy accent)  #7c5cff
   Loss   (crash / negative)       #ff5d63
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Midnight base */
  --navy-900: #080a14;   /* page background */
  --navy-850: #0b0e1c;
  --navy-800: #0f1426;
  --navy-750: #151b32;   /* cards / panels */
  --navy-700: #1b2240;
  --navy-650: #232c4f;

  /* Gold — primary brand */
  --gold: #f5b73c;
  --gold-bright: #ffd470;
  --gold-deep: #e0941c;
  --orange: var(--gold);            /* legacy aliases (referenced widely) */
  --orange-soft: var(--gold-bright);

  /* Emerald — secondary / positive / win / live */
  --emerald: #1fb87a;
  --emerald-bright: #2fd28a;
  --green: var(--emerald);          /* legacy aliases */
  --green-bright: var(--emerald-bright);

  /* Violet — ambient energy accent */
  --violet: #7c5cff;
  --violet-bright: #a190ff;

  /* Status */
  --loss: #ff5d63;

  /* Neutrals */
  --cream: #f5f7fc;
  --text: #f5f7fc;
  --muted: rgba(245, 247, 252, 0.70);
  --faint: rgba(245, 247, 252, 0.52);   /* raised for WCAG contrast on midnight */
  --line: rgba(245, 247, 252, 0.10);
  --line-strong: rgba(245, 247, 252, 0.18);

  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);

  /* Code token colours */
  --tok-key: var(--gold-bright);
  --tok-str: var(--emerald-bright);
  --tok-fn: #7aa2ff;
  --tok-num: #b69bff;
  --tok-com: var(--faint);
  --tok-text: #c2cbe0;

  /* On-accent text (dark ink that sits on bright gold / emerald) */
  --on-gold: #241a04;
  --on-emerald: #07140d;

  --grad-gold: linear-gradient(135deg, #ffd470 0%, #f5b73c 50%, #e0941c 100%);
  --grad-edge: linear-gradient(90deg, #ffe2a0, #f5b73c);
  --shadow-card: 0 18px 40px -18px rgba(0, 0, 0, 0.78);
  --shadow-glow: 0 0 0 1px rgba(245, 183, 60, 0.45), 0 22px 50px -16px rgba(245, 183, 60, 0.38);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --container: 1200px;
  --header-h: 72px;

  --font: "Sora", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font);
}

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--navy-900);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient background glows — gold, violet, emerald */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 80% -8%, rgba(245, 183, 60, 0.13), transparent 60%),
    radial-gradient(760px 540px at 2% 4%, rgba(124, 92, 255, 0.18), transparent 58%),
    radial-gradient(1000px 700px at 50% 120%, rgba(47, 210, 138, 0.08), transparent 60%),
    var(--navy-900);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
ul { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: rgba(245, 183, 60, 0.32); color: #fff; }

/* ---------- Layout helpers ---------- */
.container {
  width: min(var(--container), 100% - 40px);
  margin-inline: auto;
}

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--grad-edge);
  border-radius: 2px;
}

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; }

.section-head h2 { font-size: clamp(1.8rem, 1.1rem + 2.6vw, 2.9rem); margin: 14px 0 12px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.gold-text {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.green-text { color: var(--emerald-bright); }
.violet-text { color: var(--violet-bright); }

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 13px;
  --pad-x: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  background: var(--grad-gold);
  color: var(--on-gold);
  box-shadow: 0 12px 28px -12px rgba(245, 183, 60, 0.85);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(245, 183, 60, 0.95);
}

.btn--green {
  background: var(--emerald-bright);
  color: var(--on-emerald);
  box-shadow: 0 12px 28px -14px rgba(47, 210, 138, 0.7);
}
.btn--green:hover { background: #45e0a1; transform: translateY(-2px); }

.btn--ghost {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-strong); transform: translateY(-2px); }

.btn--block { width: 100%; }
.btn--lg { --pad-y: 16px; --pad-x: 28px; font-size: 1.02rem; }
.btn--sm { --pad-y: 9px; --pad-x: 15px; font-size: 0.85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(8, 10, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  width: min(var(--container), 100% - 40px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand__mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand__name span { color: var(--gold); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface); }
.nav__links a.active { color: var(--text); background: var(--surface-2); }

.nav__cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav__cta .btn--ghost { display: none; }

.nav__toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}
.nav__toggle svg { width: 22px; height: 22px; }
.nav__toggle .icon-close { display: none; }
body.nav-open .nav__toggle .icon-open { display: none; }
body.nav-open .nav__toggle .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 64px; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 22px;
}
.hero__badge b { color: var(--text); font-weight: 600; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 0 4px rgba(47, 210, 138, 0.22);
}
.hero h1 {
  font-size: clamp(2.5rem, 1.3rem + 4.8vw, 4.4rem);
  margin-bottom: 20px;
}
.hero__sub {
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.2rem);
  color: var(--muted);
  max-width: 36ch;
  margin-bottom: 30px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero__stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
}
.hero__stat span { font-size: 0.84rem; color: var(--muted); }

/* Hero visual — floating game posters */
.hero__visual { position: relative; height: 460px; }
.hero__cards { position: absolute; inset: 0; }
.poster {
  position: absolute;
  width: 168px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line-strong);
  background: var(--navy-750);
  animation: float 6s ease-in-out infinite;
}
.poster img { aspect-ratio: 3/4; object-fit: cover; }
.poster--1 { top: 6%; left: 4%; transform: rotate(-7deg); z-index: 3; animation-delay: 0s; }
.poster--2 { top: 0; right: 8%; width: 188px; transform: rotate(5deg); z-index: 4; animation-delay: -1.4s; }
.poster--3 { bottom: 2%; left: 20%; width: 196px; transform: rotate(3deg); z-index: 5; animation-delay: -2.6s; }
.poster--4 { bottom: 8%; right: 2%; width: 150px; transform: rotate(-5deg); z-index: 2; animation-delay: -3.8s; }
.hero__glow {
  position: absolute;
  width: 380px; height: 380px;
  top: 48%; left: 52%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(245, 183, 60, 0.30), rgba(124, 92, 255, 0.12) 55%, transparent 72%);
  filter: blur(10px);
  z-index: 0;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-16px) rotate(var(--r, 0deg)); }
}
.poster--1 { --r: -7deg; }
.poster--2 { --r: 5deg; }
.poster--3 { --r: 3deg; }
.poster--4 { --r: -5deg; }

/* Hero — Pitchside is the bold hero card; the rest are blurred "coming soon". */
.poster--main {
  width: 224px; left: 11%; top: 6%;
  --r: -4deg; transform: rotate(-4deg);
  z-index: 6;
  border-color: rgba(245, 183, 60, 0.5);
  box-shadow: 0 26px 72px -20px rgba(245, 183, 60, 0.55), 0 0 0 1px rgba(245, 183, 60, 0.35);
}
.poster--main img { aspect-ratio: 3/4; width: 100%; }
.poster__live {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--emerald-bright); background: rgba(8, 10, 20, 0.72);
  border: 1px solid rgba(47, 210, 138, 0.4);
}
.poster__live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 0 3px rgba(47, 210, 138, 0.25); }
.poster--soon { opacity: 0.72; }
.poster--soon .poster__ph {
  display: block; width: 100%; aspect-ratio: 3/4;
  background:
    radial-gradient(circle at 50% 30%, rgba(124, 92, 255, 0.16), transparent 62%),
    linear-gradient(180deg, var(--navy-700), var(--navy-850));
  filter: blur(2.5px);
}
.poster--soon .poster__soon {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
}

/* Trust strip */
.trust {
  border-block: 1px solid var(--line);
  padding: 22px 0;
  background: rgba(255, 255, 255, 0.015);
}
.trust__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.trust__label { font-size: 0.8rem; color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; }
.trust__items { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.trust__item {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.92rem; color: var(--muted); font-weight: 500;
}
.trust__item svg { width: 18px; height: 18px; color: var(--emerald-bright); flex-shrink: 0; }

/* ---------- Filters ---------- */
.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 13px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip:focus-visible { color: var(--text); border-color: var(--line-strong); }
.chip.active {
  color: var(--on-gold);
  background: var(--grad-gold);
  border-color: transparent;
  font-weight: 600;
}
.search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 230px;
  flex: 0 1 280px;
}
.search svg {
  position: absolute; left: 14px;
  width: 18px; height: 18px; color: var(--faint); pointer-events: none;
}
.search input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color 0.2s, background 0.2s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: rgba(245, 183, 60, 0.55); background: var(--surface-2); }

/* ---------- Game grid + cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.game-grid--scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.game-grid--scroll .card { flex: 0 0 200px; scroll-snap-align: start; }

.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-750);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.28s ease, border-color 0.22s ease;
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); border-color: rgba(245, 183, 60, 0.55); box-shadow: var(--shadow-glow); }

.card__media { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card__media img { transform: scale(1.06); }

/* Coming-soon tile — blurred art, not clickable, honest copy. */
.card--soon { cursor: default; opacity: 0.9; }
.card--soon .card__ph {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(124, 92, 255, 0.16), transparent 62%),
    linear-gradient(180deg, var(--navy-700), var(--navy-850));
  filter: blur(3px);
}
.card--soon .card__soonlabel {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
}
.card__soonbadge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: rgba(8, 10, 20, 0.7); border: 1px solid var(--line-strong);
}
.card--soon .card__title { color: var(--muted); }

.card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 10, 20, 0.55) 78%, rgba(8, 10, 20, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover .card__overlay,
.card:focus-visible .card__overlay { opacity: 1; }
.card__play {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--grad-gold);
  color: var(--on-gold);
  font-weight: 600;
  font-size: 0.92rem;
  transform: translateY(8px);
  transition: transform 0.25s ease;
  box-shadow: 0 10px 26px -10px rgba(0,0,0,0.6);
}
.card:hover .card__play,
.card:focus-visible .card__play { transform: translateY(0); }
.card__play svg { width: 16px; height: 16px; }

.badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.badge--hot { background: rgba(245, 183, 60, 0.95); color: var(--on-gold); }
.badge--new { background: rgba(124, 92, 255, 0.95); color: #fff; }
.badge--top { background: rgba(245, 247, 252, 0.94); color: var(--navy-900); }

.card__cat {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(8, 10, 20, 0.7);
  border: 1px solid var(--line-strong);
  color: var(--cream);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.card__body { padding: 14px 15px 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.card__title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.card__meta { display: flex; gap: 14px; margin-top: auto; padding-top: 8px; font-size: 0.78rem; color: var(--muted); }
.card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.card__meta b { color: var(--cream); font-weight: 600; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty svg { width: 42px; height: 42px; color: var(--faint); margin-bottom: 12px; }

/* ---------- Feature cards (why integrate) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.feature {
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.feature:hover,
.feature:focus-visible { transform: translateY(-4px); border-color: var(--line-strong); background: var(--surface-2); }
.feature__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: rgba(245, 183, 60, 0.13);
  border: 1px solid rgba(245, 183, 60, 0.28);
  margin-bottom: 18px;
}
.feature__icon svg { width: 24px; height: 24px; color: var(--gold-bright); }
.feature--green .feature__icon { background: rgba(47, 210, 138, 0.15); border-color: rgba(47, 210, 138, 0.35); }
.feature--green .feature__icon svg { color: var(--emerald-bright); }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Stats band ---------- */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(245, 183, 60, 0.10));
  border: 1px solid var(--line);
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem);
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat span { font-size: 0.88rem; color: var(--muted); margin-top: 8px; display: block; }

/* ---------- Operators / B2B teaser ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.steps { display: grid; gap: 14px; }
.step {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.step__num {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--grad-gold);
  color: var(--on-gold);
  font-weight: 700;
  font-family: var(--font-display);
}
.step h4 { font-size: 1rem; margin-bottom: 3px; font-family: var(--font-display); }
.step p { font-size: 0.9rem; color: var(--muted); }

/* Code block */
.code-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--navy-850);
  box-shadow: var(--shadow-card);
}
.code-card__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--faint);
}
.code-card__bar .dots { display: flex; gap: 6px; }
.code-card__bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.code-card__bar .dots i:nth-child(1) { background: #ff5f57; }
.code-card__bar .dots i:nth-child(2) { background: #febc2e; }
.code-card__bar .dots i:nth-child(3) { background: #28c840; }
.code-card__bar .file { margin-left: auto; }
.code-card pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: "SF Mono", "Cascadia Code", Consolas, "Roboto Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.7;
}
.code-card code { color: var(--tok-text); }
.tok-key { color: var(--tok-key); }
.tok-str { color: var(--tok-str); }
.tok-fn { color: var(--tok-fn); }
.tok-com { color: var(--tok-com); }
.tok-num { color: var(--tok-num); }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  padding: 64px 40px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(245, 183, 60, 0.18), transparent 70%),
    radial-gradient(500px 320px at 12% 120%, rgba(124, 92, 255, 0.14), transparent 70%),
    var(--navy-800);
  border: 1px solid var(--line-strong);
}
.cta-band h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); margin-bottom: 14px; }
.cta-band p { color: var(--muted); max-width: 52ch; margin: 0 auto 28px; font-size: 1.05rem; }
.cta-band .hero__actions { justify-content: center; margin-bottom: 0; }

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: 60px 0 36px; }
.page-hero h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); margin: 16px 0 14px; }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 58ch; }

/* ---------- Spec / API lists (developers) ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.spec {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.spec h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-bright); margin-bottom: 12px; }
.spec ul { display: grid; gap: 9px; }
.spec li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.93rem; color: var(--muted); }
.spec li svg { width: 16px; height: 16px; color: var(--emerald-bright); flex-shrink: 0; margin-top: 4px; }

.faq { display: grid; gap: 12px; }
details.qa {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
details.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-family: var(--font-display);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: -2px; }
details.qa summary .plus {
  width: 24px; height: 24px; flex-shrink: 0;
  position: relative; transition: transform 0.25s;
}
details.qa summary .plus::before,
details.qa summary .plus::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  background: var(--gold-bright); border-radius: 2px;
  transform: translate(-50%, -50%);
}
details.qa summary .plus::before { width: 13px; height: 2px; }
details.qa summary .plus::after { width: 2px; height: 13px; transition: transform 0.25s; }
details.qa[open] summary .plus::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
details.qa .qa__body { padding: 0 22px 20px; color: var(--muted); font-size: 0.95rem; }

/* ---------- Contact form ---------- */
.form-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; margin-bottom: 7px; color: var(--muted); font-weight: 500; }
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--navy-850);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field textarea:focus,
.field select:focus { outline: none; border-color: rgba(245, 183, 60, 0.55); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 0.82rem; color: var(--faint); margin-top: 12px; text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 30px;
  margin-top: 40px;
  background: rgba(0, 0, 0, 0.22);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer__brand .brand { margin-bottom: 16px; }
.footer__brand p { color: var(--muted); font-size: 0.92rem; max-width: 30ch; }
.footer__col h5 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--faint); margin-bottom: 14px; font-weight: 600;
}
.footer__col a {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 5px 0;
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--gold-bright); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--faint);
}
.footer__bottom .badge-18 {
  display: inline-flex; align-items: center; gap: 8px;
}
.age-pill {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--gold-bright);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 0.72rem;
  flex-shrink: 0;
}
.footer__social { display: flex; gap: 12px; }
.footer__social a {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.footer__social a:hover { background: var(--surface-2); color: var(--gold-bright); transform: translateY(-2px); }
.footer__social svg { width: 18px; height: 18px; }

/* =============================================================
   Modal + crash demo
   ============================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 5, 12, 0.8);
  backdrop-filter: blur(6px);
  animation: fade 0.25s ease;
}
.modal__dialog {
  position: relative;
  width: min(940px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
  animation: pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.97); } }

.modal__close {
  position: absolute; top: 13px; right: 13px; z-index: 5;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(8, 10, 20, 0.7);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--cream);
  transition: background 0.2s, transform 0.2s, color 0.2s;
}
.modal__close:hover { background: var(--gold); color: var(--on-gold); transform: rotate(90deg); }
.modal__close svg { width: 20px; height: 20px; }

.modal__head {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 22px;
  padding: 26px;
  border-bottom: 1px solid var(--line);
}
.modal__poster { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); aspect-ratio: 3/4; }
.modal__poster img { width: 100%; height: 100%; object-fit: cover; }
.modal__info h2 { font-size: 1.7rem; margin-bottom: 8px; }
.modal__info .modal__tagline { color: var(--muted); margin-bottom: 14px; }
.modal__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tag {
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted);
}
.modal__specs { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; }
.modal__spec span { display: block; font-size: 0.72rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.modal__spec b { font-family: var(--font-display); font-size: 1.1rem; }
.modal__desc { color: var(--muted); font-size: 0.95rem; padding: 0 26px 22px; }

/* ---- Immersive game player (seamless embed — game space is the hero) ---- */
.modal--play { padding: 0; }
.modal--play .modal__backdrop { background: rgba(2, 3, 8, 0.92); backdrop-filter: blur(4px); }
.modal--play .modal__close { display: none; }
.modal--play .modal__dialog {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #05070f;
  animation: fade 0.22s ease;
  display: flex;
  flex-direction: column;
}
.modal--play #modalContent { flex: 1 1 auto; min-height: 0; display: flex; }
@media (min-width: 900px) {
  .modal--play { padding: 24px; }
  .modal--play .modal__dialog {
    width: min(1120px, 100%);
    height: min(92dvh, 880px);
    max-height: 92dvh;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
  }
}
.gplay { display: flex; flex-direction: column; flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; }
.gplay__bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(21, 27, 50, 0.92), rgba(8, 10, 20, 0.72));
}
.gplay__back {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 15px 0 10px;
  border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--cream); font-weight: 600; font-size: 0.9rem;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.gplay__back:hover { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.gplay__back svg { width: 18px; height: 18px; }
.gplay__id { display: flex; align-items: center; gap: 10px; margin: 0 auto 0 2px; min-width: 0; }
.gplay__title {
  font-family: var(--font-display); font-size: 1.05rem; color: var(--cream);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gplay__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--emerald-bright); background: rgba(47, 210, 138, 0.12);
  border: 1px solid rgba(47, 210, 138, 0.3);
}
.gplay__chip i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald-bright); box-shadow: 0 0 0 3px rgba(47, 210, 138, 0.22);
  animation: gpPulse 1.8s ease-in-out infinite;
}
@keyframes gpPulse { 50% { opacity: 0.35; } }
.gplay__full {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  display: grid; place-items: center; transition: color 0.18s, background 0.18s;
}
.gplay__full:hover { color: var(--gold-bright); background: var(--surface); }
.gplay__full svg { width: 18px; height: 18px; }
.gplay__stage {
  position: relative; flex: 1 1 auto; min-height: 0;
  background: radial-gradient(circle at 50% 100%, rgba(245, 183, 60, 0.08), transparent 60%), #070a14;
}
.gplay__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #070a14; }
.gplay__stage canvas { width: 100%; height: 100%; display: block; }
.gplay__about { flex: 0 0 auto; border-top: 1px solid var(--line); background: rgba(8, 10, 20, 0.6); }
.gplay__about > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; font-size: 0.82rem;
}
.gplay__about > summary::-webkit-details-marker { display: none; }
.gplay__aboutlead { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gplay__abouttoggle { color: var(--gold-bright); font-weight: 600; flex: 0 0 auto; }
.gplay__about[open] > summary .gplay__abouttoggle::after { content: " ▲"; font-size: 0.7em; }
.gplay__about:not([open]) > summary .gplay__abouttoggle::after { content: " ▼"; font-size: 0.7em; }
.gplay__aboutbody { padding: 0 16px 16px; }
.gplay__desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }
.gplay__specs { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.gplay__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.gplay__disc { font-size: 0.75rem; color: var(--faint); }

/* Crash demo */
.demo {
  margin: 0 26px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: var(--navy-850);
}
.demo__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.demo__head .live {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.74rem;
  color: var(--emerald-bright);
}
.demo__balance { color: var(--muted); }
.demo__balance b { color: var(--cream); font-family: var(--font-display); }
.demo__stage { position: relative; aspect-ratio: 16/8; background: radial-gradient(circle at 30% 95%, rgba(245,183,60,0.12), transparent 60%), var(--navy-900); }
.demo__stage canvas { width: 100%; height: 100%; display: block; }
.demo__mult {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  letter-spacing: -0.02em;
  text-shadow: 0 6px 30px rgba(0,0,0,0.5);
  transition: color 0.15s;
}
.demo__mult.crashed { color: var(--loss); }
.demo__status {
  position: absolute; top: 14px; left: 0; right: 0;
  text-align: center; font-size: 0.84rem; font-weight: 600;
  color: var(--muted);
}
.demo__controls {
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.demo__bet { display: flex; align-items: center; gap: 8px; }
.demo__bet label { font-size: 0.8rem; color: var(--faint); }
.demo__stepper {
  display: flex; align-items: center;
  background: var(--navy-900); border: 1px solid var(--line-strong); border-radius: 999px;
  overflow: hidden;
}
.demo__stepper button { width: 44px; height: 44px; font-size: 1.2rem; color: var(--muted); transition: color 0.15s, background 0.15s; }
.demo__stepper button:hover { color: var(--gold-bright); background: var(--surface); }
.demo__stepper input {
  width: 68px; text-align: center; border: none; background: none; color: var(--cream);
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; -moz-appearance: textfield;
}
.demo__stepper input::-webkit-outer-spin-button,
.demo__stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.demo__action { height: 50px; font-size: 1rem; }
.demo__action.cashout { background: var(--emerald-bright); color: var(--on-emerald); box-shadow: 0 12px 28px -14px rgba(47,210,138,0.8); }
.demo__action.cashout:hover { background: #45e0a1; }
.demo__history {
  display: flex; gap: 7px; padding: 10px 16px; border-top: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.demo__history::-webkit-scrollbar { display: none; }
.demo__history span {
  flex-shrink: 0;
  padding: 3px 9px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line);
}
.demo__history span.low { color: var(--loss); }
.demo__history span.mid { color: var(--gold-bright); }
.demo__history span.high { color: var(--emerald-bright); }
.demo__toast {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%) translateY(10px);
  padding: 8px 18px; border-radius: 999px;
  background: var(--emerald); color: #fff; font-weight: 600; font-size: 0.88rem;
  opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none;
  white-space: nowrap;
}
.demo__toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.demo__toast.lose { background: var(--loss); }
.demo__disclaimer { padding: 0 26px 24px; font-size: 0.78rem; color: var(--faint); text-align: center; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Toast (page-level, e.g. form) ---------- */
.page-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 300;
  padding: 13px 22px; border-radius: 999px;
  background: var(--emerald); color: #fff; font-weight: 600;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.6);
  opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none;
  display: flex; align-items: center; gap: 10px;
}
.page-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.page-toast svg { width: 18px; height: 18px; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__visual { height: 380px; order: -1; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .stats-band { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; padding: 32px 24px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .nav__links { display: none; }
  .nav__cta .btn--ghost { display: none; }
  .nav__cta > .btn--primary { display: none; }
  .nav__toggle { display: flex; }
  .nav__cta { margin-left: 0; }

  /* Mobile drawer */
  .nav__links {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 20px 24px;
    background: var(--navy-850);
    border-bottom: 1px solid var(--line-strong);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    margin-left: 0;
  }
  .nav__links a { padding: 13px 16px; font-size: 1rem; border-radius: 12px; }
  body.nav-open .nav__links {
    display: flex; opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  }
  body.nav-open .nav__links .btn { margin-top: 10px; }
  .nav__drawer-cta { display: flex !important; }

  .modal__head { grid-template-columns: 96px 1fr; gap: 16px; padding: 20px; padding-right: 62px; }
  .modal__info h2 { font-size: 1.35rem; }
  .modal__desc, .demo { margin-inline: 18px; }
  .modal__desc { padding-inline: 0; }
  .demo__controls { grid-template-columns: 1fr; }
  .demo__action { width: 100%; }

  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  body { font-size: 15px; }
}

@media (max-width: 460px) {
  .container { width: min(var(--container), 100% - 28px); }
  .hero__stats { gap: 22px; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 13px; }
  .game-grid--scroll .card { flex-basis: 150px; }
  .card__title { font-size: 0.95rem; }
  .trust__row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero__visual { height: 320px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto; }
  .poster { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
