/* d3mon.gg | Halo 3 24/7. Mobile first; wider screens add columns. */
:root {
  color-scheme: dark;
  --bg: #04070c;
  --bg-2: #08101a;
  --surface: rgba(14, 24, 37, 0.58);
  --surface-solid: #0a131d;
  --surface-hi: #0f1b29;
  --border: rgba(150, 205, 240, 0.11);
  --border-hi: rgba(150, 215, 255, 0.26);
  --text: #eaf2f8;
  --text-2: #c0cfdb;
  --muted: #8396a8;
  --cyan: #63d6ff;
  --cyan-deep: #2a8fc0;
  --amber: #e8892b;
  --amber-hi: #f7a14a;
  --d3mon: #42aaff;
  --d3mon-white: #fdfffe;
  --red: #ff5a5f;
  --blue: #4a8dff;
  --ok: #4fe39a;
  --bad: #ff6464;
  --warn: #ffc24a;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hud: "Chakra Petch", var(--sans);
  --r: 20px;
  --r-sm: 14px;
  --wrap: 1180px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Faint light that follows the page down. */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(60vw 50vh at 100% 40%, rgba(66,170,255,0.06), transparent 70%),
    radial-gradient(50vw 40vh at 0% 90%, rgba(232,137,43,0.04), transparent 70%);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #000; padding: 8px 12px; z-index: 200; border-radius: 8px; }
.skip:focus { left: 8px; }

.tag {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  font: 600 12px/1 var(--hud);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cyan);
}
.tag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(79,227,154,.6); animation: ping 2s infinite; }
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 30px 80px -40px rgba(0,0,0,0.9);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(79,227,154,.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(79,227,154,0); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  font: 600 15px/1 var(--sans);
  border-radius: 14px; border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { color: #fff; background: linear-gradient(180deg, var(--amber-hi), var(--amber)); box-shadow: 0 10px 30px -10px rgba(232,137,43,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.primary.blue { background: linear-gradient(180deg, #66bcff, var(--d3mon)); box-shadow: 0 10px 30px -10px rgba(66,170,255,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.ghost { color: var(--text); background: rgba(255,255,255,0.06); border-color: var(--border-hi); }
.btn.ghost:hover { background: rgba(255,255,255,0.1); }
.copy {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px;
  color: var(--text); font-weight: 600; font-size: 14px;
  background: rgba(99,214,255,0.12); border: 1px solid transparent; border-radius: 12px;
  cursor: pointer; transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.copy:hover { background: rgba(99,214,255,0.22); }
.copy.done { color: var(--ok); background: rgba(79,227,154,0.14); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 60; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled, .nav[data-open="true"] {
  background: rgba(4,7,12,0.78);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); transition: transform .2s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-word { font: 800 21px/1 var(--sans); letter-spacing: -0.045em; color: var(--d3mon-white); }
.brand-word b { color: var(--d3mon); font-weight: 800; }
.brand-word i { font-style: normal; font-weight: 800; color: var(--d3mon-white); }

.menu-btn {
  width: 44px; height: 44px; display: grid; place-content: center; gap: 6px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
}
.menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s var(--ease); }
.nav[data-open="true"] .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.nav[data-open="true"] .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Phone menu: a sheet under the bar. */
.nav-links {
  position: absolute; top: 64px; left: 0; right: 0;
  display: grid; gap: 4px; padding: 12px var(--gutter) 20px;
  background: rgba(4,7,12,0.96);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.nav[data-open="true"] .nav-links { transform: none; opacity: 1; visibility: visible; }
.nav-links a { color: var(--text-2); font-weight: 600; font-size: 17px; padding: 14px 12px; border-radius: 12px; }
.nav-links a:hover { background: rgba(255,255,255,0.05); color: var(--text); text-decoration: none; }
.nav-links .nav-cta { color: #fff; text-align: center; margin-top: 8px; background: linear-gradient(180deg, var(--amber-hi), var(--amber)); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 104px 0 56px; }
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.2) brightness(1.2); animation: kenburns 30s ease-in-out infinite alternate; transform-origin: 70% 40%; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.14) translateX(-1.5%); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(4,7,12,0.55) 0%, rgba(4,7,12,0.82) 55%, var(--bg) 100%);
}
/* A slow light sweep, like a visor catching the sun. */
.hero-glow {
  position: absolute; inset: -20% -40%; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(99,214,255,0.10) 48%, rgba(66,170,255,0.18) 50%, rgba(99,214,255,0.10) 52%, transparent 60%);
  animation: sweep 9s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes sweep { 0% { transform: translateX(-35%); } 60%, 100% { transform: translateX(35%); } }
.hero-grid { display: grid; gap: 28px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 12px; margin-bottom: 18px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: rgba(4,7,12,0.55); border: 1px solid var(--border-hi);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.live-pill:hover { text-decoration: none; border-color: var(--cyan); }
.live-pill .dot { color: var(--muted); }
.live-pill[data-state="online"] .dot { color: var(--ok); animation: ping 2s infinite; }
.live-pill[data-state="offline"] .dot { color: var(--bad); }
.hero h1 {
  font: 900 clamp(54px, 15vw, 112px)/0.9 var(--sans);
  letter-spacing: -0.055em;
  color: var(--d3mon-white);
  text-shadow: 0 10px 60px rgba(66,170,255,0.25);
}
.hero h1 b { color: var(--d3mon); font-weight: inherit; }
.hero h1 span {
  display: block; margin-top: 14px;
  font: 700 clamp(15px, 3.6vw, 20px)/1 var(--hud);
  letter-spacing: 0.32em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--cyan), #c9f1ff 60%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
}
.lede { font-size: clamp(16px, 4.2vw, 19px); color: var(--text-2); margin: 20px 0 26px; max-width: 34em; }

.address {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 18px;
  background: rgba(4,7,12,0.6);
  border: 1px solid var(--border-hi); border-radius: 16px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  max-width: 440px;
  box-shadow: 0 0 0 1px rgba(99,214,255,0.04), 0 20px 50px -30px rgba(99,214,255,0.5);
}
.address-text { min-width: 0; }
.address-label { display: block; font: 600 10px/1 var(--hud); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.address code { display: block; font: 700 21px/1.1 var(--hud); color: #fff; letter-spacing: 0.01em; overflow-wrap: anywhere; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cta .btn { flex: 1 1 auto; }

.hero-card { padding: 20px; }
.hc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,0.06); color: var(--muted); }
[data-state="online"] .pill { color: var(--ok); background: rgba(79,227,154,0.1); }
[data-state="online"] .pill .dot { animation: ping 2s infinite; }
[data-state="offline"] .pill { color: var(--bad); background: rgba(255,100,100,0.1); }
[data-state="stale"] .pill { color: var(--warn); background: rgba(255,194,74,0.1); }
.hc-up { font-size: 12px; color: var(--muted); }
.hc-game { margin: 18px 0 18px; }
.hc-mode { display: block; font: 600 12px/1 var(--hud); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 8px; }
.hc-map { display: block; font: 800 30px/1.05 var(--sans); letter-spacing: -0.03em; }
.hc-cap-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); }
.hc-cap-row strong { font: 700 26px/1 var(--hud); color: var(--text); }
.hc-cap-row em { font-style: normal; color: var(--muted); font-size: 17px; }
/* Halo 3's shield bar, rounded off. */
.shield { height: 10px; margin-top: 10px; background: rgba(99,214,255,0.1); border-radius: 999px; overflow: hidden; }
.shield i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan-deep), var(--cyan), #c4f0ff); box-shadow: 0 0 16px rgba(99,214,255,.7); transition: width 1s var(--ease); }
.teams { margin-top: 18px; }
.teams-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.06); gap: 2px; }
.teams-bar i { display: block; height: 100%; transition: flex-grow 1s var(--ease); }
/* The two leading teams, colored from app.js (any of the eight). */
.teams-bar i { flex: 1 1 0; background: var(--c, var(--muted)); box-shadow: 0 0 12px color-mix(in srgb, var(--c, transparent) 50%, transparent); }
.teams-row { display: flex; justify-content: space-between; margin-top: 8px; font: 600 13px/1 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; }
.teams-row b { font-size: 18px; color: var(--text); }
.teams-row span { color: var(--c, var(--muted)); }
.hc-faces { display: flex; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 500; }
.hc-faces:hover { text-decoration: none; color: var(--text); }
.hc-faces .face { width: 34px; height: 34px; margin-right: -8px; border-radius: 50%; border: 2px solid var(--surface-solid); background: var(--surface-solid); }
.hc-faces .face svg { width: 100%; height: 100%; }
.hc-faces .more { margin-left: 18px; }
.scroll-cue { display: none; }

/* ---------- Numbers ---------- */
.numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding-top: 8px; }
.numbers div { padding: 18px 0 18px; border-top: 1px solid var(--border); }
.numbers div:nth-child(odd) { padding-right: 12px; }
.numbers b { display: block; font: 700 36px/1 var(--hud); letter-spacing: -0.01em; }
.numbers small { font-size: .5em; color: var(--muted); margin-left: 2px; }
.numbers span:not([data-count]) { color: var(--muted); font-size: 14px; }

/* ---------- Sections ---------- */
.section { padding-top: 88px; }
.section-head { margin-bottom: 28px; max-width: 680px; }
.section h2 { font: 800 clamp(30px, 8vw, 50px)/1.05 var(--sans); letter-spacing: -0.04em; }
.section-head .muted { margin: 12px 0 0; font-size: 16px; }

/* ---------- Live lobby ---------- */
.lobby { display: grid; gap: 16px; }
.team { border-radius: var(--r); padding: 14px; background: linear-gradient(180deg, var(--team-wash), rgba(10,19,29,0.6) 40%); border: 1px solid var(--team-line); }
/* All eight Halo 3 team colors, as R G B for the tinted panel and border. */
.team { --team: rgb(var(--rgb)); --team-wash: rgb(var(--rgb) / 0.11); --team-line: rgb(var(--rgb) / 0.28); }
.team[data-team="red"]    { --rgb: 255 90 95; }
.team[data-team="blue"]   { --rgb: 74 141 255; }
.team[data-team="green"]  { --rgb: 70 195 106; }
.team[data-team="orange"] { --rgb: 255 138 43; }
.team[data-team="purple"] { --rgb: 164 107 255; }
.team[data-team="gold"]   { --rgb: 245 197 66; }
.team[data-team="brown"]  { --rgb: 190 135 85; }
.team[data-team="pink"]   { --rgb: 255 111 181; }
.team[data-team="none"] { --rgb: 99 214 255; --team-line: var(--border); --team-wash: rgb(99 214 255 / 0.07); }
.team-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 12px; }
.team-head h3 { font: 700 14px/1 var(--hud); letter-spacing: 0.18em; text-transform: uppercase; color: var(--team); }
.team-head strong { font: 700 28px/1 var(--hud); }
.team-head strong small { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; margin-left: 6px; }
.roster { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

.player { border-radius: var(--r-sm); background: rgba(4,7,12,0.55); border: 1px solid var(--border); overflow: hidden; transition: border-color .2s, background .2s; }
.player[open] { border-color: var(--team-line, var(--border-hi)); background: rgba(4,7,12,0.75); }
.player summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; -webkit-tap-highlight-color: transparent; }
.player summary::-webkit-details-marker { display: none; }
.player.dead summary { opacity: .55; }
.avatar { position: relative; width: 46px; height: 46px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--team) calc(var(--sh, 1) * 360deg), rgba(255,255,255,0.08) 0); }
.avatar svg { display: block; width: 100%; height: 100%; border-radius: 50%; background: #070d15; }
.avatar .skull { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: #1a0f12; border: 1.5px solid var(--bad); display: grid; place-items: center; font-size: 10px; }
.p-main { min-width: 0; }
.p-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; }
.p-name span:first-child { overflow: hidden; text-overflow: ellipsis; }
.p-tag { font: 700 11px/1 var(--hud); letter-spacing: 0.06em; color: var(--muted); padding: 3px 6px; border-radius: 6px; background: rgba(255,255,255,0.06); flex: none; }
.p-admin { display: inline-flex; align-items: center; gap: 4px; font: 700 10px/1 var(--hud); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-hi); padding: 3px 5px; border-radius: 6px; background: rgba(232,137,43,0.14); flex: none; }
.p-admin svg { width: 11px; height: 11px; fill: currentColor; }
.p-admin em { display: none; font-style: normal; }
@media (min-width: 420px) { .p-admin em { display: inline; } }
.p-rank { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-score { text-align: right; }
.p-score b { display: block; font: 700 24px/1 var(--hud); }
.p-score span { font: 600 11px/1 var(--hud); color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; }
.p-score span i { font-style: normal; color: var(--cyan); }
.p-live { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 12px 12px; }
.p-live div, .p-career div { background: rgba(255,255,255,0.04); border-radius: 10px; padding: 8px 6px; text-align: center; }
.p-live b, .p-career b { display: block; font: 700 17px/1.1 var(--hud); }
.p-live span, .p-career span { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.p-live .kda b { color: var(--cyan); }
.p-career { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px 12px; }
.p-career-title { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 6px 2px 2px; font: 600 11px/1 var(--hud); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.p-career-title span { color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-family: var(--sans); font-weight: 500; }
.p-chevron { width: 18px; height: 18px; color: var(--muted); transition: transform .25s var(--ease); }
.player[open] .p-chevron { transform: rotate(180deg); }
.p-side { display: flex; align-items: center; gap: 10px; }
.vitals { display: grid; gap: 3px; padding: 0 12px 10px; }
.vitals i { display: block; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.06); overflow: hidden; }
.vitals i::after { content: ""; display: block; height: 100%; width: calc(var(--v, 0) * 100%); border-radius: inherit; }
.vitals .vs::after { background: linear-gradient(90deg, var(--cyan-deep), var(--cyan)); }
.vitals .vh::after { background: linear-gradient(90deg, #39b56b, var(--ok)); }

.lobby-empty { display: grid; gap: 16px; padding: 22px; align-items: center; }
.le-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(99,214,255,0.1); }
.le-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lobby-empty h3 { font-size: 20px; margin-bottom: 4px; }
.lobby-empty p { margin: 0; }
.crew { margin-top: 28px; }
.crew-title { font: 600 12px/1 var(--hud); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.crew-grid { display: grid; gap: 8px; }
.crew-grid .player { --team: var(--cyan); --team-line: var(--border-hi); }
.updated { color: var(--muted); font-size: 12px; margin: 14px 0 0; }

/* ---------- Features ---------- */
.features { display: grid; gap: 12px; }
.feature {
  display: grid; grid-template-columns: 44px 1fr; column-gap: 16px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  border: 1px solid var(--border); border-radius: var(--r);
  transition: border-color .25s, transform .25s var(--ease);
}
.feature:hover { border-color: var(--border-hi); }
.feature svg { grid-row: span 2; width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: rgba(99,214,255,0.1); fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 17px; font-weight: 700; margin: 2px 0 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Maps: swipe on phones, grid on desktop ---------- */
[data-swipe] { display: grid; grid-auto-flow: column; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-inline: var(--gutter); }
[data-swipe]::-webkit-scrollbar { display: none; }
.maps { list-style: none; counter-reset: map; margin: 0 auto; grid-auto-columns: 72%; gap: 12px; padding-bottom: 6px; }
.maps li {
  counter-increment: map; scroll-snap-align: start;
  position: relative; min-height: 180px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px; border-radius: var(--r); overflow: hidden; isolation: isolate;
  border: 1px solid var(--border);
  background: var(--art), #070d15;
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
/* The photo, when one exists, sits on top of the map's art; text stays readable. */
.maps li::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(4,7,12,0) 25%, rgba(4,7,12,.82) 100%), var(--img, none) center / cover;
  transition: transform .8s var(--ease);
}
/* Contour lines, like a tactical map. */
.maps li > b::before {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: .18; pointer-events: none;
  background: repeating-radial-gradient(circle at 78% 22%, transparent 0 14px, hsl(var(--h) 80% 75% / .5) 14px 15px);
  mask-image: linear-gradient(200deg, #000 10%, transparent 70%);
  -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 70%);
}
.maps li::before { content: counter(map, decimal-leading-zero); position: absolute; top: 14px; right: 18px; font: 700 40px/1 var(--hud); color: hsl(var(--h) 85% 80% / .3); }
.maps li:hover { border-color: hsl(var(--h) 70% 60% / .55); transform: translateY(-4px); box-shadow: 0 24px 50px -24px hsl(var(--h) 80% 50% / .6); }
.maps li:hover::after { transform: scale(1.05); }
.maps li[data-map="construct"]   { --h: 200; --art: radial-gradient(90% 80% at 85% 10%, hsl(200 60% 55% / .45), transparent 60%), linear-gradient(160deg, #1d2f40, #0b1520 55%, #070d15); }
.maps li[data-map="epitaph"]     { --h: 30;  --art: radial-gradient(90% 80% at 85% 10%, hsl(28 80% 55% / .45), transparent 60%), linear-gradient(160deg, #3a2a1e, #1b1420 55%, #070d15); }
.maps li[data-map="guardian"]    { --h: 120; --art: radial-gradient(90% 80% at 85% 10%, hsl(110 50% 45% / .45), transparent 60%), linear-gradient(160deg, #1d3524, #0f1d18 55%, #070d15); }
.maps li[data-map="high-ground"] { --h: 195; --art: radial-gradient(90% 80% at 85% 10%, hsl(190 70% 55% / .4), transparent 55%), linear-gradient(160deg, #2b3a44, #16252e 55%, #070d15); }
.maps li[data-map="isolation"]   { --h: 95;  --art: radial-gradient(90% 80% at 85% 10%, hsl(85 70% 40% / .45), transparent 60%), linear-gradient(160deg, #26301a, #141a12 55%, #070d15); }
.maps li[data-map="last-resort"] { --h: 175; --art: radial-gradient(90% 80% at 85% 10%, hsl(178 70% 45% / .45), transparent 60%), linear-gradient(160deg, #173a3a, #0e2022 55%, #070d15); }
.maps li[data-map="narrows"]     { --h: 225; --art: radial-gradient(90% 80% at 85% 10%, hsl(230 70% 60% / .4), transparent 55%), linear-gradient(160deg, #1a2140, #0d1226 55%, #070d15); }
.maps li[data-map="sandtrap"]    { --h: 40;  --art: radial-gradient(90% 80% at 85% 10%, hsl(40 85% 60% / .45), transparent 60%), linear-gradient(160deg, #4a3a22, #241b12 55%, #070d15); }
.maps li[data-map="snowbound"]   { --h: 205; --art: radial-gradient(90% 80% at 85% 10%, hsl(200 90% 90% / .45), transparent 60%), linear-gradient(160deg, #3a4a5a, #1a2633 55%, #070d15); }
.maps li[data-map="the-pit"]     { --h: 15;  --art: radial-gradient(90% 80% at 85% 10%, hsl(15 70% 50% / .4), transparent 55%), linear-gradient(160deg, #3a2b28, #1c1718 55%, #070d15); }
.maps li[data-map="valhalla"]    { --h: 150; --art: radial-gradient(90% 80% at 85% 10%, hsl(150 55% 50% / .4), transparent 60%), radial-gradient(70% 50% at 10% 100%, hsl(200 70% 50% / .25), transparent 70%), linear-gradient(160deg, #1f3a30, #10201c 55%, #070d15); }
/* Map photos: scripts/map-images.sh adds a rule here per map it has a photo for. */
/* MAP-PHOTOS */
.maps b { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.maps span { color: var(--text-2); font-size: 14px; line-height: 1.45; margin-top: 4px; opacity: .85; }

/* ---------- Modes ---------- */
.modes { display: grid; gap: 10px; margin-bottom: 14px; }
.mode[data-mode="slayer"] { --h: 205; } .mode[data-mode="ctf"] { --h: 0; } .mode[data-mode="koth"] { --h: 42; }
.mode { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-radius: var(--r-sm); border: 1px solid hsl(var(--h) 70% 60% / .3); background: linear-gradient(100deg, hsl(var(--h) 70% 50% / .16), rgba(10,19,29,.6) 70%); }
.mode b { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.mode span { font: 600 13px/1.3 var(--hud); color: hsl(var(--h) 85% 72%); letter-spacing: .04em; }
@media (min-width: 640px) { .modes { grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; } .mode { flex-direction: column; gap: 6px; } .mode span { text-align: left; } }

/* ---------- Gallery ---------- */
.gallery { padding-top: 64px; grid-auto-columns: 86%; gap: 12px; }
.gallery figure, .join-shot { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); scroll-snap-align: start; }
.gallery img, .join-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .8s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption, .join-shot figcaption, .codec-shot figcaption {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(4,7,12,0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 600;
}

/* ---------- Project Reclaimer ---------- */
.reclaimer { display: grid; gap: 12px; }
.pr-features { display: grid; gap: 12px; }
.pr-features article { padding: 20px; border-radius: var(--r); border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)); }
.pr-features h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.pr-features p { margin: 0; color: var(--muted); font-size: 15px; }
.pr-card { padding: 22px; display: flex; flex-direction: column; background: linear-gradient(160deg, rgba(232,137,43,0.14), rgba(14,24,37,0.6) 50%); border-color: rgba(232,137,43,0.28); }
.pr-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.needs { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.needs li { position: relative; padding-left: 26px; font-size: 15px; color: var(--text-2); }
.needs li::before { content: ""; position: absolute; left: 0; top: 6px; width: 13px; height: 13px; border-radius: 4px; background: rgba(232,137,43,0.2); box-shadow: inset 0 0 0 1.5px var(--amber); }
.pr-card .cta { margin-top: auto; padding-top: 18px; }
.more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; }

/* ---------- Join ---------- */
.join { display: grid; gap: 28px; padding: 22px; }
.join .section-head { margin-bottom: 22px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 20px; }
.steps li { counter-increment: step; position: relative; padding-left: 50px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; font: 700 15px/1 var(--hud); color: #fff; border-radius: 10px; background: linear-gradient(180deg, var(--amber-hi), var(--amber)); box-shadow: 0 8px 20px -8px rgba(232,137,43,.8); }
.steps h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
.steps strong { color: var(--text); font-weight: 600; }
code.inline { font: 600 .92em/1 var(--hud); color: var(--text); background: rgba(99,214,255,0.1); padding: 3px 7px; border-radius: 6px; white-space: nowrap; }

/* ---------- Rules ---------- */
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rules li { position: relative; padding: 16px 18px 16px 48px; border-radius: var(--r-sm); background: var(--surface-solid); border: 1px solid var(--border); color: var(--muted); font-size: 15px; }
.rules li::before { content: ""; position: absolute; left: 18px; top: 19px; width: 16px; height: 16px; border-radius: 5px; background: rgba(99,214,255,0.14); box-shadow: inset 0 0 0 1.5px var(--cyan); }
.rules b { color: var(--text); font-weight: 600; }

/* ---------- d3mon network ---------- */
.codec { display: grid; gap: 22px; padding: 12px 12px 24px; border-color: rgba(66,170,255,0.25); background: linear-gradient(140deg, rgba(66,170,255,0.10), rgba(14,24,37,0.6) 50%); }
.codec-shot { margin: 0; position: relative; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); }
.codec-shot img { width: 100%; }
.codec-copy { padding: 0 8px; }
.codec-copy .tag { color: var(--d3mon); }
.codec-copy h3 { font-size: clamp(24px, 6vw, 32px); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 12px; }
.codec-copy > p:not(.tag):not(.small) { color: var(--text-2); margin: 0 0 16px; }
.codec-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.codec-points li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15px; }
.codec-points li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--d3mon); box-shadow: 0 0 10px rgba(66,170,255,.7); }
.codec-copy .cta { margin: 22px 0 12px; }
.places { display: grid; gap: 12px; margin-top: 12px; }
.place { display: block; padding: 22px; border-radius: var(--r); border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)); color: var(--text); transition: border-color .25s, transform .25s var(--ease); }
.place:hover { text-decoration: none; border-color: rgba(66,170,255,0.45); transform: translateY(-3px); }
.place-tag { display: inline-block; font: 600 11px/1 var(--hud); letter-spacing: 0.16em; text-transform: uppercase; color: var(--d3mon); padding: 6px 10px; border-radius: 999px; background: rgba(66,170,255,0.12); }
.place h3 { font-size: 20px; font-weight: 800; margin: 14px 0 6px; letter-spacing: -0.03em; }
.place p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.place-go { font-weight: 600; font-size: 15px; color: var(--d3mon); }

/* ---------- Footer ---------- */
.footer { margin-top: 100px; border-top: 1px solid var(--border); padding: 32px 0 calc(110px + var(--safe-b)); }
.footer-inner { display: grid; gap: 18px; }
.brand.small .brand-word { font-size: 18px; }
.brand.small .brand-mark { width: 26px; height: 26px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; font-weight: 500; }
.footer-links a { color: var(--text-2); padding: 6px 0; }
.fine { font-size: 13px; margin: 0; }

/* ---------- Phone dock ---------- */
.dock {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 55;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 14px; border-radius: 18px;
  background: rgba(8,14,22,0.86); border: 1px solid var(--border-hi);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.8);
  transform: translateY(140%); transition: transform .35s var(--ease);
}
.dock.show { transform: none; }
.dock-addr { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.dock-addr .dot { color: var(--ok); }
.dock-addr code { font: 700 15px/1 var(--hud); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .btn { min-height: 44px; padding: 0 18px; }

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

/* ================= Tablet ================= */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .numbers { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .numbers div { padding-right: 0 !important; }
  .features, .pr-features, .places, .rules { grid-template-columns: 1fr 1fr; }
  .feature { display: block; padding: 26px; }
  .feature svg { margin-bottom: 18px; }
  .maps { grid-auto-columns: 40%; }
  .gallery { grid-auto-columns: 60%; }
  .crew-grid { grid-template-columns: 1fr 1fr; }
  .lobby-empty { grid-template-columns: auto 1fr auto; }
  .cta .btn { flex: 0 0 auto; }
  .join, .codec { padding: 32px; }
  .codec { padding: 16px 16px 32px; }
}

/* ================= Desktop ================= */
@media (min-width: 1000px) {
  .menu-btn { display: none; }
  .nav-inner { height: 72px; }
  .nav-links {
    position: static; display: flex; align-items: center; gap: 2px; padding: 0;
    background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
    transform: none; opacity: 1; visibility: visible;
  }
  .nav-links a { font-size: 14px; padding: 9px 14px; border-radius: 999px; color: var(--muted); }
  .nav-links .nav-cta { margin: 0 0 0 8px; padding: 10px 18px; color: #fff; }
  .hero { min-height: min(100svh, 940px); display: flex; align-items: center; padding: 120px 0 90px; }
  .hero::before { background: linear-gradient(90deg, rgba(4,7,12,0.95) 0%, rgba(4,7,12,0.7) 45%, rgba(4,7,12,0.3) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
  .hero-card { padding: 26px; }
  .cta .btn { flex: 0 0 auto; }
  .scroll-cue { display: block; position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid var(--border-hi); border-radius: 14px; }
  .scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--cyan); animation: cue 1.8s ease-in-out infinite; }
  @keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateY(14px); } }
  .section { padding-top: 130px; }
  .section-head { margin-bottom: 40px; }
  .lobby { grid-template-columns: 1fr 1fr; align-items: start; }
  .lobby[data-teams="1"] { grid-template-columns: 1fr; }
  .lobby[data-teams="1"] .roster, .crew-grid { grid-template-columns: repeat(3, 1fr); }
  .team { padding: 18px; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  [data-swipe] { grid-auto-flow: row; overflow: visible; }
  .maps { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .maps li:first-child { grid-column: span 2; grid-row: span 2; }
  .maps li:first-child b { font-size: 34px; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 90px; }
  .reclaimer { grid-template-columns: 1.35fr 1fr; gap: 16px; }
  .pr-features { gap: 16px; }
  .join { grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; padding: 48px; }
  .codec { grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; padding: 20px 40px 20px 20px; }
  .codec-copy { padding: 0; }
  .places { gap: 16px; margin-top: 16px; }
  .footer { padding-bottom: 48px; }
  .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
  .footer-links { justify-content: center; }
  .fine { max-width: 380px; text-align: right; }
  .dock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Byte vs. Elite (Codec card) ---------- */
.codec-stage { grid-column: 1 / -1; aspect-ratio: 1200 / 420; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 4px; }
.byte-scene { display: block; width: 100%; height: 100%; }
.bs-flash, .bs-pop, .bs-elite { transform-box: fill-box; }
.bs-flash, .bs-tracer, .bs-shield, .bs-pop { opacity: 0; }
.bs-tracer { stroke-dasharray: 40 400; }
.bs-bob { animation: bs-bob 2s ease-in-out infinite; }
.bs-recoil { animation: bs-recoil 4s linear infinite; }
.bs-flash { transform-origin: center; animation: bs-flash 4s linear infinite; }
.bs-tracer { animation: bs-tracer 4s linear infinite; }
.bs-tracer.t2 { animation-delay: .16s; }
.bs-tracer.t3 { animation-delay: .32s; }
.bs-shield { animation: bs-shield 4s linear infinite; }
.bs-pop { transform-origin: center; animation: bs-pop 4s ease-out infinite; }
.bs-elite { transform-origin: 72% 100%; animation: bs-elite 4s cubic-bezier(.4,0,.6,1) infinite; }
.bs-feed { animation: bs-feed 4s linear infinite; }
.bs-medal { animation: bs-feed 4s linear infinite; }
@keyframes bs-bob { 50% { transform: translateY(-5px); } }
@keyframes bs-recoil {
  0%, 8%, 12%, 16%, 20%, 100% { transform: translateX(0); }
  10%, 14%, 18% { transform: translateX(-8px); }
}
@keyframes bs-flash {
  0%, 9%, 11.5%, 13%, 15.5%, 17%, 19.5%, 100% { opacity: 0; transform: scale(.6); }
  10%, 14%, 18% { opacity: 1; transform: scale(1.15); }
}
@keyframes bs-tracer {
  0%, 9.9% { opacity: 0; stroke-dashoffset: 40; }
  10% { opacity: 1; stroke-dashoffset: 40; }
  15% { opacity: 1; stroke-dashoffset: -251; }
  15.1%, 100% { opacity: 0; stroke-dashoffset: -251; }
}
@keyframes bs-shield {
  0%, 14.9%, 100% { opacity: 0; }
  15%, 19%, 23% { opacity: .9; }
  17%, 21% { opacity: .25; }
  27% { opacity: 0; }
}
@keyframes bs-pop {
  0%, 22.9%, 100% { opacity: 0; transform: scale(.4); }
  23% { opacity: 1; transform: scale(1.4); }
  32% { opacity: 0; transform: scale(2); }
}
@keyframes bs-elite {
  0%, 24% { transform: translateY(0) rotate(0); opacity: 1; }
  38% { transform: translateY(-8px) rotate(-66deg); opacity: 1; }
  42% { transform: translateY(-14px) rotate(-60deg); }
  46%, 78% { transform: translateY(-8px) rotate(-66deg); opacity: 1; }
  86% { transform: translateY(-8px) rotate(-66deg); opacity: 0; }
  87%, 92% { transform: translateY(0) rotate(0); opacity: 0; }
  100% { transform: translateY(0) rotate(0); opacity: 1; }
}
@keyframes bs-feed {
  0%, 25.9%, 82%, 100% { opacity: 0; }
  26%, 80% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .byte-scene *, .byte-scene g { animation: none !important; }
  .bs-tracer.t1 { opacity: 1; stroke-dasharray: none; }
}
