/* Overspammer — overspam.com
   Palette is the game's own "Emberglass" UI skin (UISkin.cs) and overtime danger tiers (OvertimeDirector.cs). */

:root {
  --bg: #09090f;
  --bg-2: #0d0d1a;
  --panel: rgba(15, 16, 32, .78);
  --panel-solid: #11121f;
  --line: rgba(255, 214, 150, .14);
  --line-strong: rgba(255, 214, 150, .32);
  --text: #f6efe1;
  --dim: #b4afc6;
  --faint: #7d7a91;
  --maroon: #54122b;

  --ember: #ffa145;
  --ember-l: #ffd696;
  --arcane: #5ed9e8;
  --rose: #ff4d82;
  --gold: #ffd454;
  --boss: #e02b42;

  --common: #ccc7bd;
  --uncommon: #73db6b;
  --rare: #4fa1ff;
  --epic: #ba6eff;
  --legendary: #ffc738;

  /* danger tiers: CALM … OVERSPAM */
  --t0: #7adb8f; --t1: #c7e666; --t2: #ffcc4d; --t3: #ff8c3d;
  --t4: #c77aff; --t5: #ff524d; --t6: #e01a42; --t7: #ff38c7;

  --tier: var(--t0);
  --wrap: 1180px;
  --gut: clamp(16px, 4vw, 40px);
  --hud-h: 64px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --f-body: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hud-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: clamp(16px, 1.05vw + 10px, 18px);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* CRT: faint scanlines over everything */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: .55;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--rose); color: #fff; }
:focus-visible { outline: 2px solid var(--arcane); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ember); color: var(--bg); padding: 8px 14px; font-weight: 700; }
.skip:focus { left: 8px; }
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }

/* ---------- pixel text (the game's "Overspam Pixel" face, rendered to SVG by site.js) ---------- */
[data-px] { display: inline; font-family: var(--f-mono); font-weight: 600; letter-spacing: .04em; }
.js [data-px]:not(.px-done) { visibility: hidden; }
.px-done { display: inline-flex; flex-wrap: wrap; align-items: flex-end; column-gap: .42em; row-gap: .3em; letter-spacing: 0; }
.px-word { display: block; height: 1em; width: auto; overflow: visible; shape-rendering: crispEdges; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* letters of the big logo drop in, then bob — same as the in-game main menu */
.px-letter { transform-box: fill-box; transform-origin: 50% 100%; }
.js .px-anim .px-letter { animation: drop .7s var(--ease) both, bob 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 55ms + 150ms), calc(var(--i) * 140ms + 1.1s); }
@keyframes drop { from { transform: translateY(-60%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5%); } }

/* ---------- HUD nav ---------- */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  height: var(--hud-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gut);
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(to bottom, rgba(9, 9, 15, .92), rgba(9, 9, 15, .66));
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  transition: transform .4s var(--ease);
}
.hud-logo { justify-self: start; font-size: 19px; text-decoration: none; line-height: 0; }
.hud-clock { display: flex; align-items: center; gap: 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: var(--dim); }
.hud-stage { color: var(--faint); }
.hud-timer {
  font-family: var(--f-mono); font-weight: 600; font-size: 22px; letter-spacing: .02em; color: var(--text);
  font-variant-numeric: tabular-nums; min-width: 4.4ch; text-align: center;
  text-shadow: 2px 2px 0 rgba(84, 18, 43, .9);
  transition: color .3s;
}
.hud-timer.is-ot { color: var(--rose); }
.hud-danger { display: flex; align-items: center; gap: 8px; }
.hud-tier { color: var(--tier); font-weight: 600; min-width: 10.5ch; text-align: right; transition: color .3s; }
.hud-segs { display: flex; gap: 3px; }
.hud-segs i { width: 12px; height: 5px; background: rgba(255, 255, 255, .1); transform: skewX(-20deg); transition: background .3s, box-shadow .3s; }
.hud-segs i.on { background: var(--c); box-shadow: 0 0 8px var(--c); }
.hud-d { color: var(--text); min-width: 4ch; font-variant-numeric: tabular-nums; }
.hud-nav { justify-self: end; display: flex; gap: clamp(12px, 2vw, 26px); font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hud-nav a { text-decoration: none; color: var(--dim); transition: color .2s; position: relative; }
.hud-nav a:hover { color: var(--text); }
.hud-nav a.hot { color: var(--rose); }
.hud-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.hud-progress i { display: block; height: 100%; width: 0; background: var(--tier); box-shadow: 0 0 10px var(--tier); transition: background .3s; }

/* ---------- shared bits ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 18px;
}
.dot { width: 8px; height: 8px; transform: rotate(45deg); background: var(--c, var(--t0)); box-shadow: 0 0 10px var(--c, var(--t0)); flex: none; }
.dot.calm { --c: var(--t0); } .dot.rising { --c: var(--t1); } .dot.dangerous { --c: var(--t2); } .dot.deadly { --c: var(--t3); }
.dot.boss { --c: var(--boss); } .dot.overspam { --c: var(--t7); }

.title { font-size: clamp(24px, 3.4vw, 44px); line-height: 1; margin-bottom: 22px; }
.subtitle { font-size: clamp(18px, 1.8vw, 24px); line-height: 1; margin-bottom: 10px; color: var(--ember-l); }
.lead { font-size: clamp(18px, 1.3vw + 10px, 22px); line-height: 1.5; color: var(--text); font-weight: 500; }
.section p + p { margin-top: 14px; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .lead { color: var(--dim); }
.section { position: relative; padding: clamp(80px, 11vw, 150px) 0; }

.btn {
  --bc: var(--ember);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--f-body); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none;
  border: 0; border-radius: var(--radius);
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, color .2s;
}
.btn-primary {
  color: #2a0a12;
  background: linear-gradient(to bottom, var(--ember-l), var(--ember));
  box-shadow: 0 4px 0 var(--maroon), 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 10px 30px rgba(255, 161, 69, .25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--maroon), 0 0 0 1px rgba(255, 255, 255, .3) inset, 0 14px 40px rgba(255, 161, 69, .4); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--maroon); }
.btn-ghost { color: var(--text); background: rgba(9, 9, 15, .5); box-shadow: 0 0 0 1px var(--line-strong) inset; }
.btn-ghost:hover { background: rgba(255, 214, 150, .08); box-shadow: 0 0 0 1px var(--ember-l) inset; }
.btn-key { font-size: 12px; }

/* framed screenshot with Emberglass corner brackets */
.shot { position: relative; margin: 0; border-radius: var(--radius); background: var(--panel-solid); box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .55); }
.shot img { width: 100%; border-radius: var(--radius); }
.shot::before, .shot::after {
  content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
  border: 2px solid var(--ember-l); opacity: .8;
}
.shot::before { top: -7px; left: -7px; border-right: 0; border-bottom: 0; }
.shot::after { bottom: -7px; right: -7px; border-left: 0; border-top: 0; }
.shot figcaption {
  position: absolute; left: 14px; bottom: 14px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(9, 9, 15, .82); padding: 6px 10px; border-left: 2px solid var(--ember);
}

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tags li { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--dim); }
.tags li.hot { color: var(--boss); border-color: var(--boss); box-shadow: 0 0 14px rgba(224, 43, 66, .35); }

/* scroll reveal */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; isolation: isolate; padding: calc(var(--hud-h) + 40px) 0 110px; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; transform: scale(1.08); animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.08) translate3d(0, 0, 0); } to { transform: scale(1.16) translate3d(-1.5%, -1%, 0); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 9, 15, .94) 0%, rgba(9, 9, 15, .78) 32%, rgba(9, 9, 15, .2) 62%, rgba(9, 9, 15, .1) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(9, 9, 15, 0) 30%),
    radial-gradient(ellipse 40% 50% at 66% 72%, rgba(255, 161, 69, .16), transparent 70%);
}
.hero-embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-embers i { position: absolute; bottom: -10px; width: 3px; height: 3px; background: var(--ember-l); box-shadow: 0 0 8px 1px var(--ember); opacity: 0; animation: ember linear infinite; }
@keyframes ember {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .9; }
  100% { transform: translate(var(--dx), -70vh); opacity: 0; }
}
.hero-inner { position: relative; }
.hero-logo { font-size: clamp(38px, 8vw, 112px); line-height: 1; margin: 6px 0 22px; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .6)); }
.hero-genre { font-size: clamp(13px, 1.5vw, 20px); color: var(--arcane); margin-bottom: 34px; }
.hero-pitch { font-size: clamp(26px, 3.4vw, 46px); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; text-transform: uppercase; margin-bottom: 20px; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.hero-pitch em { font-style: normal; color: var(--rose); }
.hero-lede { max-width: 34em; color: var(--dim); font-size: clamp(16px, 1.2vw + 8px, 19px); margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 38px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.hero-meta li { display: flex; align-items: center; gap: 22px; }
.hero-meta li + li::before { content: ""; width: 4px; height: 4px; background: var(--faint); transform: rotate(45deg); margin-left: -22px; margin-right: 0; position: relative; left: -9px; }
.hero-meta b { color: var(--gold); font-weight: 600; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; text-decoration: none; font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.scroll-cue i { width: 2px; height: 34px; background: linear-gradient(var(--ember), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- PITCH ---------- */
.pitch { background: linear-gradient(var(--bg), var(--bg-2)); }
.pitch-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.pitch-copy p:not(.lead):not(.kicker) { color: var(--dim); }
.shot-tilt { transform: perspective(1400px) rotateY(-9deg) rotateX(2deg); transition: transform .8s var(--ease); }
.shot-tilt:hover { transform: perspective(1400px) rotateY(-3deg); }
.js .shot-tilt.reveal { transform: perspective(1400px) rotateY(-16deg) translateY(28px); }
.js .shot-tilt.reveal.in { transform: perspective(1400px) rotateY(-9deg) rotateX(2deg); }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); margin: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stats li { padding: 22px 12px; text-align: center; display: grid; gap: 4px; }
.stats li + li { border-left: 1px solid var(--line); }
.stats b { font-family: var(--f-mono); font-size: clamp(30px, 3.6vw, 48px); font-weight: 600; line-height: 1; color: var(--ember-l); text-shadow: 3px 3px 0 var(--maroon); font-variant-numeric: tabular-nums; }
.stats span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.stats .hot b { color: var(--rose); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--bg-2); padding: 28px 26px 30px; transition: background .3s; }
.feature:hover { background: #131427; }
.feature-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; color: var(--ember); border: 1px solid var(--line-strong); font-size: 14px; }
.feature h3 { font-size: 19px; line-height: 1.25; margin-bottom: 8px; font-weight: 700; }
.feature p { color: var(--dim); font-size: 15.5px; }
.feature-hot .feature-ico { color: var(--rose); border-color: var(--rose); box-shadow: 0 0 14px rgba(255, 77, 130, .3); }
.feature-hot h3 { color: var(--rose); }

/* ---------- HEROES ---------- */
.heroes { background: radial-gradient(ellipse 70% 60% at 70% 40%, #191630, var(--bg-2) 70%); }
.select { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.select-list { display: grid; gap: 8px; }
.select-list button {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 8px 14px 8px 8px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.select-list button img { width: 52px; height: 52px; image-rendering: pixelated; border-radius: 2px; background: #1a1428; flex: none; }
.select-list b { display: block; font-size: 17px; font-weight: 700; }
.select-list small { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.select-list button:hover { background: rgba(255, 255, 255, .05); transform: translateX(3px); }
.select-list button[aria-selected="true"] { border-color: var(--hc); background: linear-gradient(90deg, color-mix(in srgb, var(--hc) 22%, transparent), transparent); box-shadow: inset 3px 0 0 var(--hc); }
.select-list button[aria-selected="true"] small { color: var(--hc); }

.select-stage { position: relative; min-height: 440px; }
.hero-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 44px); align-items: center; padding: clamp(18px, 2.4vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.hero-card[hidden] { display: none; }
.hero-card:not([hidden]) { animation: card-in .45s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero-portrait { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--hc) 45%, #1a1428), #120e1c 75%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--hc) 60%, transparent), 0 0 60px color-mix(in srgb, var(--hc) 25%, transparent); }
.hero-portrait img { width: 100%; height: 100%; image-rendering: pixelated; }
.hero-portrait::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .18) 0 2px, transparent 2px 4px); pointer-events: none; }
.hero-tag { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--hc); margin-bottom: 10px; }
.hero-name { font-size: clamp(26px, 3vw, 40px); line-height: 1; margin-bottom: 16px; }
.hero-info > p:not(.hero-tag) { color: var(--dim); }
.bars { display: grid; gap: 10px; margin: 22px 0; }
.bars > div { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 12px; }
.bars dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.bars dd { display: flex; align-items: center; gap: 12px; }
.bars dd i { flex: 1; height: 8px; background: rgba(255, 255, 255, .07); position: relative; overflow: hidden; transform: skewX(-18deg); }
.bars dd i::after { content: ""; position: absolute; inset: 0; width: calc(var(--v) * 100%); background: linear-gradient(90deg, color-mix(in srgb, var(--hc) 60%, #000), var(--hc)); box-shadow: 0 0 10px var(--hc); }
.bars dd b { font-family: var(--f-mono); font-size: 13px; min-width: 7ch; text-align: right; }
.bars .perk { font-family: var(--f-mono); font-size: 13px; color: var(--text); }
.weapon-chip { display: grid; gap: 2px; padding: 12px 14px; border-left: 3px solid var(--hc); background: rgba(255, 255, 255, .03); }
.wc-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.weapon-chip b { font-size: 17px; }
.weapon-chip span:last-child { color: var(--dim); font-size: 14.5px; line-height: 1.45; }

/* ---------- WORLD ---------- */
.world { overflow: hidden; isolation: isolate; }
.world-aerial { position: absolute; inset: 0 0 auto 0; height: 90vh; z-index: -1; }
.world-aerial img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.world-aerial::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--bg-2) 0%, rgba(13, 13, 26, .55) 30%, var(--bg) 100%); }
.poi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.poi-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--panel-solid); border: 1px solid var(--line); display: flex; flex-direction: column; transition: border-color .3s, transform .4s var(--ease); }
.poi-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.poi-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .8s var(--ease); }
.poi-card:hover img { transform: scale(1.04); }
.poi-text { padding: 18px 20px 22px; }
.poi-tag { display: inline-block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
.poi-tag::before { content: "◆ "; }
.poi-text h3 { font-size: 20px; line-height: 1.2; margin-bottom: 6px; }
.poi-text p { color: var(--dim); font-size: 15px; }
.poi-wide { grid-column: 1 / -1; }
.poi-wide img { aspect-ratio: 21 / 9; object-position: 50% 45%; }
.poi-wide .poi-text { position: absolute; left: 0; bottom: 0; top: 0; width: min(42%, 420px); display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; background: linear-gradient(90deg, rgba(9, 9, 15, .96) 40%, transparent); }
.poi-wide .poi-text h3 { font-size: 26px; }

/* ---------- BOSS ---------- */
.boss { background: radial-gradient(ellipse 60% 70% at 75% 55%, rgba(224, 43, 66, .22), transparent 70%), var(--bg); overflow: hidden; }
.boss-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 70px); align-items: center; }
.boss-copy p:not(.lead):not(.kicker) { color: var(--dim); }
.boss-visual { position: relative; padding-bottom: 12%; }
.boss-shot { width: 88%; margin-left: auto; }
.boss-render { position: absolute; left: -6%; bottom: -6%; width: 46%; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .8)) drop-shadow(0 0 40px rgba(255, 120, 40, .25)); }

/* ---------- ARSENAL ---------- */
.arsenal { background: linear-gradient(var(--bg), #0e0b1c 50%, var(--bg)); }
.loop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: loop; }
.loop-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.loop-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.loop-card > div { padding: 20px 22px 24px; }
.loop-n { font-family: var(--f-mono); font-size: 12px; color: var(--ember); letter-spacing: .14em; }
.loop-card h3 { font-size: 21px; margin: 4px 0 6px; }
.loop-card p { color: var(--dim); font-size: 15px; }
.rarity { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.rarity span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 12px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); border-radius: 2px; }
.rarity b { color: var(--text); font-weight: 500; margin-left: 6px; }

.reel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: clamp(64px, 9vw, 110px); margin-bottom: 22px; }
.reel-head p { color: var(--dim); max-width: 44em; }
.reel-btns { display: flex; gap: 8px; flex: none; }
.reel-btn { width: 46px; height: 46px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-strong); font-size: 18px; transition: background .2s, border-color .2s; }
.reel-btn:hover { background: rgba(255, 214, 150, .1); border-color: var(--ember-l); }
.reel {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(260px, 34vw, 460px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 6px max(var(--gut), (100vw - var(--wrap)) / 2) 22px;
  scroll-padding-inline: max(var(--gut), (100vw - var(--wrap)) / 2);
  scrollbar-width: thin; scrollbar-color: var(--ember) transparent;
}
.reel li { position: relative; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.reel img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .6s var(--ease), filter .6s; filter: saturate(1.05); }
.reel li:hover img { transform: scale(1.05); filter: saturate(1.25); }
.reel span { position: absolute; left: 0; bottom: 0; padding: 26px 14px 10px; width: 100%; background: linear-gradient(transparent, rgba(9, 9, 15, .9)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 15px; }
.reel span::after { content: "LV 35"; float: right; font-family: var(--f-mono); font-size: 11px; font-weight: 500; color: var(--legendary); margin-top: 3px; }
.build-shot { margin-top: clamp(48px, 7vw, 80px); }

/* ---------- SWARM ---------- */
.swarm { overflow: hidden; isolation: isolate; }
.swarm-bg { position: absolute; inset: 0; z-index: -1; }
.swarm-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .16; filter: saturate(.8) blur(2px); }
.swarm-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--bg), rgba(9, 9, 15, .6) 35%, rgba(9, 9, 15, .6) 65%, var(--bg)); }
.lineup { display: grid; grid-template-columns: .8fr .8fr .75fr 1.15fr 1.15fr; align-items: end; gap: clamp(8px, 2vw, 24px); margin-bottom: clamp(48px, 7vw, 80px); position: relative; }
.lineup::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: 52px; height: 40px; background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, .7), transparent 70%); z-index: -1; }
.lineup li { display: grid; justify-items: center; text-align: center; }
.lineup img { width: 100%; max-height: 300px; object-fit: contain; object-position: bottom; image-rendering: auto; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .6)); transition: transform .4s var(--ease); margin-bottom: 14px; }
.lineup li:hover img { transform: translateY(-8px) scale(1.04); }
.lineup b { font-size: 17px; letter-spacing: .04em; }
.lineup small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.lineup .elite b { color: var(--gold); }

/* ---------- OVERTIME (pinned) ---------- */
.overtime { position: relative; height: 340vh; background: #12060f; --p: 0; }
.ot-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; align-items: center; isolation: isolate; padding-top: var(--hud-h); }
.ot-bg { position: absolute; inset: 0; z-index: -2; }
.ot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.04 + var(--p) * .1)); }
.ot-img-b { opacity: clamp(0, calc((var(--p) - .62) * 4), 1); }
.ot-sticky::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 4, 12, .95) 0%, rgba(12, 4, 12, .82) 40%, rgba(12, 4, 12, .35) 75%, rgba(12, 4, 12, .55) 100%),
    radial-gradient(ellipse at 70% 50%, color-mix(in srgb, var(--tier) 30%, transparent), transparent 70%);
  transition: background .4s;
}
.ot-sticky::after { content: ""; position: absolute; inset: 0; z-index: -1; box-shadow: inset 0 0 calc(80px + var(--p) * 140px) color-mix(in srgb, var(--tier) 55%, transparent); pointer-events: none; }
.ot-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 70px); align-items: center; }
.ot-copy .title { color: var(--text); }
.ot-copy p:not(.lead):not(.kicker):not(.ot-dare) { color: var(--dim); }
.ot-dare { font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--rose); }
.ladder { display: grid; gap: 6px; }
.ladder li {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 14px;
  padding: 12px 16px; border-radius: var(--radius);
  background: rgba(9, 9, 15, .55); border: 1px solid rgba(255, 255, 255, .06);
  opacity: .42; transform: translateX(10px);
  transition: opacity .35s, transform .35s var(--ease), border-color .35s, background .35s, box-shadow .35s;
}
.ladder b { font-family: var(--f-mono); font-size: 15px; font-weight: 600; letter-spacing: .1em; color: var(--c); }
.ladder span { font-family: var(--f-mono); font-size: 13px; color: var(--dim); justify-self: end; }
.ladder em { grid-column: 1 / -1; font-style: normal; font-size: 14px; color: var(--dim); }
.ladder li.past { opacity: .75; transform: none; }
.ladder li.on { opacity: 1; transform: none; border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, rgba(9, 9, 15, .7)); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 30%, transparent); }
.ladder li.on em { color: var(--text); }
.ghosts { position: relative; height: 150px; margin-top: 18px; }
.ghost { position: absolute; bottom: 0; height: auto; opacity: 0; transform: translateY(30px) scale(.6); transition: opacity .5s, transform .6s var(--ease); filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); animation: float 3s ease-in-out infinite; }
.g-pale { left: 2%; width: 22%; }
.g-violet { left: 28%; width: 28%; animation-delay: -1s; }
.g-crimson { left: 58%; width: 36%; animation-delay: -2s; }
.ghost.on { opacity: 1; transform: none; }
.ghost.big { transform: scale(1.18); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.ot-banner {
  position: absolute; left: 50%; top: calc(var(--hud-h) + 26px); transform: translate(-50%, -12px) scale(.96);
  display: grid; justify-items: center; gap: 6px; text-align: center;
  font-size: clamp(22px, 3.2vw, 40px); color: var(--t7);
  opacity: 0; transition: opacity .4s, transform .5s var(--ease);
  pointer-events: none;
}
.ot-banner small { font-family: var(--f-mono); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: #ffc0e8; }
.overtime.is-overspam .ot-banner { opacity: 1; transform: translate(-50%, 0); }

/* ---------- GALLERY ---------- */
.gallery { background: linear-gradient(#12060f, var(--bg) 30%); }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(120px, 13vw, 170px); grid-auto-flow: dense; gap: 12px; }
.mosaic li { border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.mosaic button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--panel-solid); cursor: zoom-in; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .4s; filter: brightness(.9); }
.mosaic button:hover img, .mosaic button:focus-visible img { transform: scale(1.05); filter: brightness(1.05); }
.m-big { grid-column: span 2; grid-row: span 2; }
.m-wide { grid-column: span 2; }

.lightbox { position: fixed; inset: 0; z-index: 150; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 24px; background: rgba(5, 5, 9, .94); backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; gap: 12px; justify-items: center; }
.lightbox img { max-height: calc(100svh - 120px); width: auto; max-width: 100%; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line-strong), 0 30px 90px rgba(0, 0, 0, .8); }
.lb-cap { color: var(--dim); font-size: 14px; text-align: center; max-width: 60em; }
.lb-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 16px; }
.lb-nav { width: 48px; height: 48px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 18px; }
.lb-nav:hover, .lb-close:hover { border-color: var(--ember-l); }

/* ---------- PORTAL / COMING SOON ---------- */
.portal { overflow: hidden; background: radial-gradient(ellipse 50% 60% at 80% 50%, rgba(186, 110, 255, .2), transparent 70%), var(--bg); }
.portal::before { content: ""; position: absolute; right: -10%; top: 50%; width: min(70vw, 760px); aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(186, 110, 255, .22), transparent 30%, rgba(94, 217, 232, .16), transparent 60%, rgba(186, 110, 255, .2), transparent); filter: blur(30px); animation: spin 24s linear infinite; z-index: 0; pointer-events: none; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.portal-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.portal .title { font-size: clamp(34px, 5.6vw, 76px); }
.portal-copy .lead { color: var(--dim); max-width: 30em; margin-bottom: 30px; }
.fine { margin-top: 22px; font-size: 14px; color: var(--faint); }
.devlog { padding: 24px 26px; }
.devlog-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; color: var(--ember-l); padding-bottom: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.devlog-head small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.devlog li { display: grid; grid-template-columns: 82px 1fr; gap: 12px; padding: 10px 0; font-size: 14.5px; line-height: 1.45; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.devlog li:last-child { border-bottom: 0; }
.devlog b { font-family: var(--f-mono); font-size: 13px; color: var(--arcane); font-weight: 500; }
.devlog span { color: var(--dim); }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); background: #07070c; }
.footer-grid { display: grid; grid-template-columns: auto 1fr; gap: 18px 40px; align-items: center; }
.footer-logo { font-size: 18px; line-height: 0; text-decoration: none; }
.footer nav { justify-self: end; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.footer nav a { color: var(--dim); text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.footer-fine { grid-column: 1 / -1; font-size: 13px; color: var(--faint); line-height: 1.6; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hud-stage { display: none; }
  .hud-nav { display: none; }
  .hud { grid-template-columns: auto 1fr; }
  .hud-clock { justify-self: end; }
}
@media (max-width: 960px) {
  .pitch-grid, .boss-grid, .ot-grid, .portal-grid { grid-template-columns: 1fr; }
  .shot-tilt, .js .shot-tilt.reveal.in { transform: none; }
  .js .shot-tilt.reveal { transform: translateY(28px); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats li:nth-child(4) { border-left: 0; }
  .stats li:nth-child(n+4) { border-top: 1px solid var(--line); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .select { grid-template-columns: 1fr; }
  .select-list { grid-auto-flow: column; grid-auto-columns: minmax(132px, 1fr); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .select-list button { scroll-snap-align: start; flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px; }
  .select-list small { display: none; }
  .select-list b { font-size: 15px; white-space: nowrap; }
  .select-list button:hover { transform: none; }
  .select-stage { min-height: 0; }
  .poi { grid-template-columns: repeat(2, 1fr); }
  .poi-wide img { aspect-ratio: 16 / 9; }
  .poi-wide .poi-text { position: static; width: auto; padding: 18px 20px 22px; background: none; }
  .loop { grid-template-columns: 1fr; }
  .loop-card { display: grid; grid-template-columns: 42% 1fr; align-items: center; }
  .loop-card img { height: 100%; }
  .boss-visual { margin-top: 10px; }
  .lineup { grid-template-columns: repeat(5, 1fr); }
  .lineup small { display: none; }
  .ot-sticky { align-items: start; padding-top: calc(var(--hud-h) + 28px); }
  .ot-copy p:not(.lead):not(.kicker):not(.ot-dare) { display: none; }
  .ot-copy .lead { font-size: 17px; }
  .ladder li { padding: 8px 12px; }
  .ladder em { display: none; }
  .ladder li.on em { display: block; }
  .ghosts { height: 110px; margin-top: 10px; }
  .ot-banner { top: auto; bottom: 26px; }
  .overtime.is-overspam .ghosts { opacity: 0; transition: opacity .3s; }
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer nav { justify-self: start; }
}
@media (max-width: 640px) {
  :root { --hud-h: 56px; }
  .hud-logo { font-size: 11px; }
  .hud-clock { gap: 8px; }
  .hud-timer { font-size: 18px; }
  .hud-segs i { width: 6px; }
  .hud-tier { min-width: 0; font-size: 10px; }
  .hud-d { display: none; }
  .hero { align-items: end; padding-bottom: 96px; }
  .hero-bg img { object-position: 70% 50%; }
  .hero::before { background: linear-gradient(to top, var(--bg) 6%, rgba(9, 9, 15, .82) 48%, rgba(9, 9, 15, .3) 80%, rgba(9, 9, 15, .5) 100%); }
  .hero-meta { gap: 6px 16px; margin-top: 28px; }
  .hero-meta li + li::before { display: none; }
  .scroll-cue { display: none; }
  .select-list { grid-auto-columns: 132px; }
  .hero-portrait { margin-inline: auto; width: 100%; }
  .btn { padding: 13px 18px; font-size: 14px; }
  .features { grid-template-columns: 1fr; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 260px; }
  .poi { grid-template-columns: 1fr; }
  .loop-card { grid-template-columns: 1fr; }
  .lineup { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .lineup b { font-size: 14px; }
  .reel-head { flex-direction: column; align-items: flex-start; }
  .reel-btns { display: none; }
  .reel { grid-auto-columns: 82vw; }
  .boss-render { width: 44%; left: -2%; }
  .mosaic { grid-auto-rows: 110px; gap: 8px; }
  .devlog li { grid-template-columns: 1fr; gap: 2px; }
  .lightbox { grid-template-columns: 1fr; padding: 16px; }
  .lb-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-embers { display: none; }
}
