@font-face { font-family: 'Poppins'; src: url('/fonts/Poppins-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/Poppins-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/Poppins-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/Poppins-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Caxo'; src: url('/fonts/Caxo.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'Draco'; src: url('/fonts/Draco.otf') format('opentype'); font-display: swap; }
:root {
  --night: #1a1110;      /* page background (your #1A1110) */
  --night-2: #261a18;    /* cards and panels: a step lighter */
  --line: #4a2b27;       /* borders: dark red-brown */
  --blood: #8a0303;      /* your red: accents, wordmark, glow */
  --bone: #f0e6d6;       /* main text: warm off-white */
  --muted: #b5a394;      /* secondary text */
  --gold: #d4af37;       /* your gold: buttons and highlights */
  --gold-ink: #1a1110;   /* text on gold */
  --win: #8fc46b;
  --loss: #ee5a45;       /* brighter than --blood so it reads on dark */
  --focus: #f0d77a;
  --display: 'Caxo', 'Arial Narrow', Impact, sans-serif;
  --body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; font-synthesis-weight: none; }
body { margin: 0; background: radial-gradient(900px 500px at 12% -5%, rgba(138,3,3,.38), transparent 70%), radial-gradient(700px 420px at 100% 100%, rgba(138,3,3,.18), transparent 70%), var(--night); background-attachment: fixed; color: var(--bone); font: 400 16px/1.5 var(--body); }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.1; letter-spacing: .03em; margin: 0 0 12px; }
h1 { font-size: clamp(40px, 7vw, 68px); }
h2 { font-size: 30px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small-text { font-size: 14px; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* coin */
.coin {
  display: inline-block; width: .8em; height: .8em; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f6e39a, var(--gold) 55%, #8f7120);
  vertical-align: -.05em; margin-right: .3em;
}
.tok { color: var(--gold); font-weight: 600; white-space: nowrap; }

/* buttons */
.btn {
  border: 1px solid transparent; border-radius: 4px; padding: 10px 18px; cursor: pointer;
  font-weight: 600; background: var(--gold); color: var(--gold-ink);
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { border-color: var(--bone); filter: none; }
.btn.small { padding: 5px 12px; font-size: 14px; }
.btn.link { background: none; color: var(--muted); padding: 5px 4px; text-decoration: underline; }
.btn.big { padding: 14px 28px; font-size: 18px; }
.btn.loss { background: transparent; color: var(--loss); border-color: var(--loss); }

/* top bar */
.top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.brand {
  position: relative; isolation: isolate;
  font: 400 58px/1 'Draco', var(--display); letter-spacing: .02em; margin-right: auto; padding: .08em .3em .08em .4em; margin-left: -.34em;
  color: transparent;
  filter: drop-shadow(0 0 2px rgba(255,90,70,.95)) drop-shadow(0 0 14px rgba(255,26,10,.85)) drop-shadow(0 0 34px rgba(255,10,0,.6));
}
.brand::before, .brand::after {
  content: attr(data-text); position: absolute; inset: 0; padding: inherit; letter-spacing: inherit; font: inherit;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
/* metallic black outline behind the red letters */
.brand::before {
  -webkit-text-stroke: .13em transparent;
  background-image: linear-gradient(180deg, #9a9aa2 0%, #26262b 22%, #050506 46%, #3a3a40 62%, #0a0a0b 82%, #5c5c64 100%);
}
.brand::after {
  background-image: linear-gradient(180deg, #ff6a55 0%, #ff2a1a 24%, #c40a06 48%, #8a0303 62%, #e02a1a 80%, #7a0505 100%);
}
.who { color: var(--muted); }
.balance { font: 800 28px/1 var(--display); color: var(--gold); }
.shell { max-width: 1080px; margin: 0 auto; padding: 28px 20px 72px; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .field > .label { font-weight: 500; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; background: var(--night); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px;
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair .field { margin-bottom: 0; }
.stack { display: grid; gap: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.players-list { list-style: none; margin: 8px 0 0; padding: 0; }
.players-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.mark { color: var(--win); font-size: 14px; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; width: 100%; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.opp-card { border-left: 3px solid var(--loss); padding-left: 16px; margin: 16px 0; }
.series { font: 800 clamp(28px, 5vw, 44px)/1 var(--display); margin-bottom: 6px; }
textarea { resize: vertical; min-height: 64px; }
.hint { color: var(--muted); font-size: 14px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; width: fit-content; max-width: 100%; }
.seg label { position: relative; padding: 9px 22px; cursor: pointer; font-weight: 600; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--bone); color: var(--night); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.chip:hover { border-color: var(--gold); }
.chip.on { border-color: var(--gold); color: var(--gold); }
.err { color: var(--loss); min-height: 1.5em; margin: 0 0 8px; }

/* auth */
.landing { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; background: #0d0706; }
.landing::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, #120908 0%, #120908 38%, rgba(18,9,8,.85) 48%, rgba(18,9,8,0) 66%), linear-gradient(0deg, rgba(18,9,8,.7), transparent 30%); }
.landing .hot { color: #ff2a1a; text-shadow: 0 0 18px rgba(255,26,10,.7); }
.landing .cta { margin: 6px 0 22px; }
.landing .btn.ghost { background: rgba(18,9,8,.6); border: 1px solid var(--gold); color: var(--gold); }
.landing > .auth { position: relative; z-index: 2; width: 100%; }
.auth { display: block; max-width: 1280px; margin: 0 auto; padding: 72px 48px; align-items: center; }
.auth .lead { font-size: 18px; max-width: 38ch; color: var(--bone); }
.games { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 22px; }
.gtile { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line); background: rgba(38,26,24,.7); font-size: 14px; font-weight: 500; letter-spacing: .02em; }
.gtile img { width: 28px; height: 28px; object-fit: contain; }
.auth form { background: var(--night-2); padding: 44px 44px 40px; border-top: 3px solid var(--gold); border: 1px solid rgba(255,42,26,.55); box-shadow: 0 0 0 1px rgba(255,42,26,.25), 0 0 22px rgba(255,42,26,.55), 0 0 70px rgba(255,20,10,.35), inset 0 0 30px rgba(255,42,26,.08); }
.auth .switch { margin-top: 14px; }
.notice { border-left: 3px solid var(--line); padding-left: 12px; color: var(--muted); font-size: 14px; max-width: 44ch; }

/* lobby */
.lobby { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; }
.find { background: var(--night-2); padding: 24px; border-top: 3px solid var(--gold); align-self: start; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows.matches li { align-items: center; }
.rows.history li { grid-template-columns: 4rem 1fr auto; }
.win-text { color: var(--win); font-weight: 600; }
.loss-text { color: var(--loss); font-weight: 600; }
.empty { color: var(--muted); padding: 10px 0; }
.side > section { margin-bottom: 36px; }

/* searching */
.searching { max-width: 560px; }
.timer { font: 800 clamp(64px, 14vw, 120px)/1 var(--display); margin: 8px 0 16px; }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .45; } }
}

/* match room */
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; padding: 8px 0 22px; border-bottom: 1px solid var(--line); }
.team { min-width: 0; }
.team .name { font: 800 clamp(28px, 6vw, 56px)/1 var(--display); overflow-wrap: anywhere; }
.team.you { border-left: 4px solid var(--win); padding-left: 14px; }
.team.opp { border-right: 4px solid var(--loss); padding-right: 14px; text-align: right; }
.team .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.pot { text-align: center; }
.pot .amt { font: 800 clamp(34px, 7vw, 64px)/1 var(--display); color: var(--gold); }
.pot .sub { color: var(--muted); font-size: 14px; }
.room-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 32px; margin-top: 24px; }
.box { background: var(--night-2); padding: 20px; margin-bottom: 20px; }
.kv { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.idform { display: flex; gap: 8px; margin: 12px 0; }
.idform input { flex: 1; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: .04em; }
.plain-list { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.banner { padding: 16px 18px; border-left: 4px solid var(--gold); background: var(--night-2); margin-bottom: 20px; }
.banner.win { border-color: var(--win); }
.banner.loss { border-color: var(--loss); }
.banner .big-line { font: 800 36px/1.1 var(--display); margin-bottom: 6px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.evidence { border-top: 1px solid var(--line); padding: 10px 0; }
.evidence q { color: var(--muted); }

/* chat */
.chat { display: flex; flex-direction: column; background: var(--night-2); height: 460px; }
.log { flex: 1; overflow-y: auto; padding: 14px; }
.msg { margin: 0 0 8px; overflow-wrap: anywhere; }
.msg.sys { color: var(--muted); font-style: italic; font-size: 14px; }
.msg.mine strong { color: var(--win); }
.chat form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat form input { flex: 1; }

/* admin */
.dispute { background: var(--night-2); padding: 20px; margin-bottom: 20px; border-left: 4px solid var(--gold); }
.dispute .log-excerpt { max-height: 160px; overflow: auto; margin: 12px 0; padding: 10px; background: var(--night); }
.dispute form { display: flex; gap: 8px; margin-top: 10px; }
.dispute form input { flex: 1; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--bone); color: var(--night);
  padding: 10px 18px; border-radius: 4px; font-weight: 500; max-width: 90vw; opacity: 0; pointer-events: none;
}
#toast.show { opacity: 1; }

@media (max-width: 860px) {
  .auth, .lobby, .room-body { grid-template-columns: 1fr; gap: 32px; }
  .auth { padding: 32px 20px; }
  .landing { align-items: flex-start; }
}
@media (max-width: 760px) {
  .two-col, .pair { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .scoreboard { grid-template-columns: 1fr 1fr; }
  .pot { grid-column: 1 / -1; order: -1; }
  .top { padding: 12px 16px; }
}

/* FIELD additions */
select {
  width: 100%; background: var(--night); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px;
  color: inherit; font: inherit;
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two > div { display: grid; gap: 4px; }
.seg { flex-wrap: wrap; max-width: 100%; }
.seg label { padding: 9px 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.idcard { border-left: 3px solid var(--line); padding-left: 14px; margin: 14px 0; }
.mono-s { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; overflow-wrap: anywhere; }
.score { font: 800 28px/1 var(--display); margin-top: 6px; }
.rows.board li { grid-template-columns: 4.5rem 1fr auto 3rem; }
.staff h3 { margin-top: 18px; }
.staff > div > h3:first-child { margin-top: 0; }
.desk-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.desk-card h3 { margin: 0 0 2px; }
.desk-card p { margin: 0; }
.accform { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }
.accform input { flex: 1 1 180px; width: auto; }
@media (max-width: 640px) {
  .two { grid-template-columns: 1fr; }
  .rows.board li { grid-template-columns: 4.5rem 1fr 3rem; }
  .rows.board li .tok { grid-column: 2; }
  .desk-card { flex-direction: column; align-items: flex-start; }
}
.shell > section { margin-bottom: 28px; }
.staff > div + div { margin-top: 22px; }

/* email check, Steam, player boxes */
a { color: var(--gold); }
.verify { max-width: 520px; margin: 0 auto; }
.verify .field { margin-top: 18px; }
.change { margin-top: 24px; color: var(--muted); }
.change summary { cursor: pointer; }
.change form { margin-top: 12px; }
.players { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.players legend { padding: 0; font-weight: 500; margin-bottom: 4px; }
.prow { display: grid; grid-template-columns: 5.5rem 1fr; gap: 12px; align-items: center; margin-top: 8px; }
.prow label { color: var(--muted); font-size: 14px; }
.steam-linked { margin: 0 0 8px; }
.verify h1 { font-size: clamp(34px, 6vw, 46px); margin-bottom: 16px; }
.plist { margin: 8px 0 0; }
.prow2 { display: grid; grid-template-columns: 6rem 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.prow2:last-child { border-bottom: 0; }
.review { text-align: center; }
.review .btn-row { justify-content: center; }
.review .idcard { text-align: left; max-width: 420px; margin: 16px auto 0; }
.top .brand { font-size: 38px; }
@media (max-width: 600px) { .brand { font-size: 44px; } .top .brand { font-size: 30px; } }

.auth .brand { font-size: clamp(44px, 5vw, 72px); width: max-content; padding-right: .3em; margin-bottom: 36px !important; }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .auth .brand { font-size: 10.5vw; margin-bottom: 24px !important; } .auth { padding: 28px 20px; gap: 36px; } .auth form { padding: 28px 22px; } }

.auth form { display: none; }
.landing.open .auth form { display: block; position: fixed; z-index: 10; right: max(24px, 5vw); top: 50%; transform: translateY(-50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; background: rgba(38,26,24,.94); backdrop-filter: blur(6px); }
.auth form .close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; }
.auth form .close:hover { color: var(--bone); }
.landing .hero { max-width: 560px; }
@media (max-width: 600px) {
  .stage { --px: .7; }
  .landing::before { background: linear-gradient(0deg, rgba(18,9,8,.97) 35%, rgba(18,9,8,.6)); }
  .landing.open .auth form { right: 16px; left: 16px; width: auto; }
}

/* ---------------------------------------------------------------- hero scene
   Layers, back to front: arena picture (with screen lights and the gamer), light beams,
   haze, embers. Everything inside .stage is placed in percentages of hero.jpg (1717 x 916),
   and .stage is sized like background-size: cover, so the effects stay on their spots. */
.hero-bg { position: absolute; inset: -3%; z-index: 0; pointer-events: none; overflow: hidden; container-type: size; }
.cam { position: absolute; inset: 0; transform-origin: 72% 45%; scale: 1.05; }
.stage {
  --ar: 1.8745;
  position: absolute; width: 100%; height: 100%; left: 0; top: 0; /* fallback for very old browsers */
  --sw: max(100cqw, 100cqh * var(--ar));
  width: var(--sw); height: calc(var(--sw) / var(--ar));
  left: calc((100cqw - var(--sw)) * var(--px, 1)); top: calc((100cqh - var(--sw) / var(--ar)) / 2);
}
.lyr { position: absolute; inset: 0; }
.plate { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; }

/* the three character screens */
.scr { position: absolute; overflow: hidden; }
.scr::before { content: ''; position: absolute; left: 0; right: 0; top: -40%; height: 40%; opacity: .4; will-change: transform, opacity; background: linear-gradient(180deg, transparent, rgba(255,90,70,.45) 45%, rgba(255,235,230,.35) 50%, rgba(255,90,70,.4) 55%, transparent); }
.scr-l { left: 52.30%; top: 6.55%; width: 11.88%; height: 44.76%; clip-path: polygon(27.9% 0%, 100% 15.9%, 83.3% 100%, 0% 92.7%); }
.scr-m { left: 69.48%; top: 15.07%; width: 8.97%; height: 39.52%; }
.scr-r { left: 83.17%; top: 11.35%; width: 10.72%; height: 39.52%; clip-path: polygon(0% 9.9%, 78.3% 0%, 100% 93.4%, 13% 100%); }
.halo { position: absolute; opacity: .35; background: radial-gradient(closest-side, transparent 72%, rgba(255,40,20,.45) 86%, transparent 100%); will-change: opacity; }
.halo-l { left: 50.5%; top: 2%; width: 15.5%; height: 54%; }
.halo-m { left: 67.6%; top: 11%; width: 12.8%; height: 48%; }
.halo-r { left: 82%; top: 7%; width: 13.8%; height: 48%; }

/* the gamer, cut out of hero.jpg so he can breathe without moving the room */
.gamer { position: absolute; left: 59.99%; top: 32.75%; width: 37.16%; height: 51.97%; transform-origin: 48.6% 100%; }
.gamer img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rim { opacity: .18; } .rim-flash, .glint { opacity: 0; }
.gamer img, .scr::before, .spot, .smoke, .halo, .wash { will-change: transform, opacity; }

/* spotlights and lasers */
.spot { position: absolute; width: 11%; height: 78%; translate: -50% 0; transform-origin: 50% 0; rotate: var(--a); opacity: .34;
  -webkit-mask: conic-gradient(from 180deg at 50% 0, #000 0deg, transparent 8deg, transparent 352deg, #000 360deg);
  mask: conic-gradient(from 180deg at 50% 0, #000 0deg, transparent 8deg, transparent 352deg, #000 360deg); }
.spot.white { background: linear-gradient(180deg, rgba(255,240,236,.55), rgba(255,170,160,.16) 45%, transparent 88%); }
.spot.red { background: linear-gradient(180deg, rgba(255,120,100,.6), rgba(255,40,25,.16) 45%, transparent 88%); }
.spot.violet { background: linear-gradient(180deg, rgba(230,170,255,.5), rgba(200,90,180,.13) 45%, transparent 85%); }
.laser { position: absolute; width: 2px; height: 95%; translate: -50% 0; transform-origin: 50% 0; rotate: var(--a); opacity: 0;
  background: linear-gradient(180deg, rgba(255,230,220,.95), rgba(255,40,25,.85) 12%, rgba(255,30,20,.35) 60%, transparent);
  box-shadow: 0 0 6px 1px rgba(255,40,25,.75), 0 0 16px 3px rgba(255,20,10,.35); }

/* haze: drifting smoke and the room-wide red wash that fires with the screen flashes */
.smoke { position: absolute; border-radius: 50%; }
.s1 { left: 48%; top: 38%; width: 46%; height: 30%; background: radial-gradient(closest-side, rgba(255,200,195,.13), transparent); }
.s2 { left: 64%; top: 52%; width: 40%; height: 26%; background: radial-gradient(closest-side, rgba(255,80,60,.14), transparent); }
.s3 { left: 36%; top: 58%; width: 38%; height: 34%; background: radial-gradient(closest-side, rgba(170,30,25,.18), transparent); }
.wash { position: absolute; left: 38%; top: 0; width: 62%; height: 72%; opacity: 0; background: radial-gradient(58% 76% at 58% 44%, rgba(255,40,20,.26), transparent 70%); will-change: opacity; }

/* embers float above the picture (drawn by app.js) */
.embers { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); z-index: 1; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .cam { animation: cam 38s ease-in-out infinite alternate; }
  @keyframes cam { 0% { scale: 1.05; translate: 0 0; } 50% { scale: 1.085; translate: -1.1% .5%; } 100% { scale: 1.06; translate: .7% -.4%; } }

  .scr::before { animation: scr-scan 9s linear infinite, scr-flicker 7s steps(1, end) infinite; }
  .scr-m::before { animation-delay: -2.3s, -3.1s; }
  .scr-r::before { animation-delay: -4.9s, -5.6s; }
  @keyframes scr-flicker { 0% { opacity: .3; } 9% { opacity: .55; } 11% { opacity: .22; } 34% { opacity: .42; } 36% { opacity: .7; } 37% { opacity: .32; } 63% { opacity: .5; } 81% { opacity: .28; } 83% { opacity: .62; } }
  @keyframes scr-scan { from { translate: 0 0; } to { translate: 0 350%; } }
  .halo { animation: halo 5.5s ease-in-out infinite alternate; }
  .halo-m { animation-delay: -1.8s; } .halo-r { animation-delay: -3.4s; }
  @keyframes halo { 0% { opacity: .2; } 40% { opacity: .45; } 43% { opacity: .28; } 100% { opacity: .5; } }

  /* one shared 12 s cycle: the screens, the room and the gamer's rim light flash together */
  .scr::after, .wash, .rim-flash { animation: flash 12s ease-out infinite; }
  .scr::after { content: ''; position: absolute; inset: 0; background: rgba(255,60,40,.6); opacity: 0; }
  @keyframes flash { 0%, 58% { opacity: 0; } 60% { opacity: .75; } 62.5% { opacity: .12; } 64% { opacity: .6; } 72%, 100% { opacity: 0; } }
  .rim { animation: rim 6s ease-in-out infinite alternate; }
  @keyframes rim { from { opacity: .12; } to { opacity: .32; } }

  .gamer { animation: breathe 5.4s ease-in-out infinite; }
  @keyframes breathe { 0%, 100% { scale: 1 1; } 42% { scale: 1.0035 1.0068; } 55% { scale: 1.003 1.006; } }
  .glint { animation: glint 8s ease-in-out infinite; }
  @keyframes glint { 0%, 48% { opacity: 0; } 64% { opacity: .9; } 70% { opacity: .55; } 84%, 100% { opacity: 0; } }

  .spot { animation: sway var(--t) ease-in-out infinite alternate; }
  @keyframes sway { from { rotate: var(--a); } to { rotate: var(--b); } }
  .laser { animation: laser var(--t) ease-in-out var(--w) infinite alternate; }
  @keyframes laser { 0% { rotate: var(--a); opacity: 0; } 12% { opacity: .55; } 50% { opacity: .35; } 88% { opacity: .6; } 100% { rotate: var(--b); opacity: 0; } }

  .s1 { animation: drift1 34s ease-in-out infinite alternate; }
  .s2 { animation: drift2 41s ease-in-out infinite alternate; }
  .s3 { animation: drift3 47s ease-in-out infinite alternate; }
  @keyframes drift1 { to { translate: -9% 4%; scale: 1.15; } }
  @keyframes drift2 { to { translate: 8% -5%; scale: .9; } }
  @keyframes drift3 { to { translate: 12% -3%; scale: 1.2; } }

  /* logo: a soft neon halo behind it breathes in and out */
  .brand-glow { animation: neon 4.6s ease-in-out infinite; }
  @keyframes neon { 0%, 100% { opacity: .35; scale: .97; } 50% { opacity: .85; scale: 1.03; } }
  .landing .hot { animation: hot 3.8s ease-in-out infinite; }
  @keyframes hot { 0%, 100% { text-shadow: 0 0 18px rgba(255,26,10,.7); } 50% { text-shadow: 0 0 10px rgba(255,60,40,.85), 0 0 30px rgba(255,26,10,.75); } }

  /* entrance, first view only */
  .landing.intro .hero > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .landing.intro .hero > :nth-child(2) { animation-delay: .12s; }
  .landing.intro .hero > :nth-child(3) { animation-delay: .24s; }
  .landing.intro .hero > :nth-child(4) { animation-delay: .34s; }
  .landing.intro .hero > :nth-child(5) { animation-delay: .44s; }
  .landing.intro .hero > :nth-child(6) { animation-delay: .54s; }
  .landing.intro .hero-bg { animation: scene-in 1.6s ease-out both; }
  @keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
  @keyframes scene-in { from { opacity: 0; } to { opacity: 1; } }
}

/* buttons on the landing page */
.landing .cta .btn { position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, background-color .25s, color .25s, border-color .25s; }
.landing .cta .btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%) 160% 0 / 250% 100% no-repeat; pointer-events: none; }
.landing .cta .btn:not(.ghost):hover { filter: none; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(212,175,55,.32), 0 0 0 1px rgba(255,230,150,.45) inset; }
.landing .cta .btn.ghost:hover { transform: translateY(-2px); background: rgba(212,175,55,.12); border-color: #f0d77a; color: #f0d77a; box-shadow: 0 0 22px rgba(255,42,26,.35), 0 0 0 1px rgba(240,215,122,.35) inset; }
.landing .cta .btn:active { transform: translateY(0) scale(.98); transition-duration: .08s; }
@media (prefers-reduced-motion: no-preference) {
  .landing .cta .btn:hover::after { transition: background-position .7s ease; background-position: -60% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .landing .cta .btn:hover, .landing .cta .btn:active { transform: none; }
}

/* logo halo (pulsed above) */
.brand-wrap { position: relative; width: max-content; max-width: 100%; }
.brand-glow { position: absolute; inset: -30% -8% -30% -6%; z-index: -1; pointer-events: none; opacity: .5; background: radial-gradient(closest-side, rgba(255,36,16,.55), rgba(255,20,8,.18) 55%, transparent); will-change: opacity; }
.brand-wrap .brand { margin-bottom: 0 !important; }
.landing .brand-wrap { margin-bottom: 36px; isolation: isolate; }
@media (max-width: 600px) { .landing .brand-wrap { margin-bottom: 24px; } }

/* lighter scene for slower devices (switched on by app.js after measuring the frame rate) */
.landing.lite .spot, .landing.lite .smoke, .landing.lite .halo, .landing.lite .scr::before,
.landing.lite .gamer .rim, .landing.lite .gamer .glint { display: none; }
