/* G23 — game23.io */

:root {
  --bg: #02050f;
  --bg-2: #040a1c;
  --line: rgba(96, 180, 255, .16);
  --line-2: rgba(96, 200, 255, .34);
  --neon: #4fd8ff;
  --neon-2: #2b84ff;
  --ice: #a6f4fc;
  --white: #eafcff;
  --text: #a9c3ea;
  --muted: #5f7aa6;
  --dim: #2c4672;
  --warn: #ffd84d;
  --warn-2: #ffb020;

  --f-pixel: 'Press Start 2P', ui-monospace, monospace;
  --f-label: 'Silkscreen', ui-monospace, monospace;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
  --chamfer: 22px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.65 var(--f-mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; }
a { color: inherit; }
p { margin: 0; }
::selection { background: var(--neon); color: var(--bg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 10px; left: 10px; z-index: 100;
  padding: 10px 14px; background: var(--neon); color: var(--bg);
  font: 700 12px var(--f-label); text-transform: uppercase; letter-spacing: .1em;
  transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }

:focus-visible { outline: 2px solid var(--warn); outline-offset: 3px; }

/* ---------- global screen FX ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.fx-scan {
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .22) 2px 3px);
  opacity: .55;
}
.fx-noise {
  inset: -50%;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise .9s steps(5) infinite;
}
@keyframes noise {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); }
  40% { transform: translate(5%, -7%); } 60% { transform: translate(-3%, 8%); }
  80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}

/* ---------- buttons ---------- */
.btn {
  --cut: 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 12px/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: background-color .2s, color .2s, box-shadow .2s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-ghost {
  padding: 11px 18px;
  color: var(--neon);
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    rgba(79, 216, 255, .55);
  box-shadow: inset 0 0 0 1px rgba(79, 216, 255, .55);
}
.btn-ghost:hover { background: var(--neon); color: var(--bg); }
.btn-primary {
  padding: 0 26px; min-height: 52px;
  color: var(--bg); background: var(--neon);
}
.btn-primary:hover { background: var(--white); box-shadow: 0 0 28px rgba(79, 216, 255, .55); }
.btn-primary[disabled] { cursor: progress; background: var(--muted); }
.btn-primary span::before { content: '[ '; }
.btn-primary span::after { content: ' ]'; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: clamp(14px, 3vw, 32px);
  padding: 20px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background-color .35s, padding .35s, border-color .35s, backdrop-filter .35s;
}
.nav.is-scrolled {
  padding-block: 12px;
  background: rgba(2, 5, 15, .74);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border-color: var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font: 16px/1 var(--f-pixel); color: var(--white); text-decoration: none; letter-spacing: .04em;
}
.brand img {
  width: 20px; height: auto; image-rendering: pixelated;
  filter: drop-shadow(0 0 6px rgba(79, 216, 255, .6));
  transition: transform .3s;
}
.brand:hover img { transform: translateY(-2px); }
.brand span { text-shadow: 0 0 14px rgba(79, 216, 255, .55); }
.nav-links { display: flex; gap: clamp(16px, 3vw, 34px); margin-left: auto; }
.nav-links a {
  position: relative; padding: 6px 0;
  font: 400 13px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text); text-decoration: none; transition: color .2s;
}
.nav-links a::before {
  content: '>'; position: absolute; left: -14px; color: var(--neon);
  opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--white); }
.nav-links a:hover::before, .nav-links a.is-active::before { opacity: 1; transform: none; }
.nav-status {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 11px/1 var(--f-mono); letter-spacing: .14em; color: var(--muted);
}
.nav-status i, .dot {
  width: 7px; height: 7px; background: var(--neon);
  box-shadow: 0 0 10px var(--neon); animation: blink 1.6s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: .2; } }

/* sound toggle */
.sound {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-2);
  font: 400 12px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase;
  transition: color .2s, border-color .2s, box-shadow .2s;
}
.sound svg { width: 18px; height: 15px; }
.sound .on { display: none; }
.sound.is-on .on { display: inline; }
.sound.is-on .off { display: none; }
.sound-label::after { content: ' Off'; }
.sound.is-on .sound-label::after { content: ' On'; }
.sound:hover { color: var(--white); border-color: var(--neon); }
.sound.is-on { color: var(--neon); border-color: rgba(79, 216, 255, .55); box-shadow: 0 0 14px rgba(79, 216, 255, .18); }
.sound.is-armed { animation: armed 1.6s ease-in-out infinite; }
@keyframes armed { 50% { border-color: var(--neon); box-shadow: 0 0 14px rgba(79, 216, 255, .35); } }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 3px; height: 3px; background: currentColor; opacity: .6; }
.sound.is-on .eq i { opacity: 1; animation: eq .9s steps(4) infinite; }
.sound.is-on .eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.2s; }
.sound.is-on .eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.5s; }
.sound.is-on .eq i:nth-child(4) { animation-duration: .8s; animation-delay: -.35s; }
@keyframes eq { 0%, 100% { height: 3px; } 25% { height: 12px; } 50% { height: 6px; } 75% { height: 10px; } }

/* ================= HERO ================= */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 44%, rgba(43, 132, 255, .17), transparent 62%),
    radial-gradient(ellipse 55% 30% at 50% 62%, rgba(79, 216, 255, .1), transparent 70%),
    var(--bg);
}
.hero-bg::after { /* vignette */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(0, 0, 4, .78) 100%);
}
#dust { position: absolute; inset: 0; width: 100%; height: 100%; }

.grid-floor {
  position: absolute; inset: auto 0 0; height: 40%;
  perspective: 380px; perspective-origin: 50% 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%);
  mask-image: linear-gradient(to bottom, transparent, #000 40%);
  transition: filter .5s;
}
.grid-plane {
  position: absolute; left: -80%; right: -80%; top: 0; height: 260%;
  transform-origin: 50% 0; transform: rotateX(74deg);
  background-image:
    linear-gradient(to right, rgba(79, 216, 255, .34) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79, 216, 255, .34) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: grid-run 1.6s linear infinite;
}
@keyframes grid-run { to { background-position: 0 56px; } }
.horizon {
  position: absolute; left: 0; right: 0; bottom: 40%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon) 30%, var(--white) 50%, var(--neon) 70%, transparent);
  box-shadow: 0 0 22px 3px rgba(79, 216, 255, .5);
  opacity: .55;
  transition: filter .5s;
}

#hero-canvas, #alert-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#hero-canvas {
  filter: drop-shadow(0 0 5px rgba(79, 216, 255, .75)) drop-shadow(0 0 22px rgba(43, 132, 255, .5));
}
#alert-canvas {
  filter: drop-shadow(0 0 5px rgba(255, 216, 77, .9)) drop-shadow(0 0 24px rgba(255, 176, 32, .5));
}
.hero-flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse 60% 45% at 50% 46%, rgba(255, 246, 200, .5), rgba(255, 216, 77, .12) 45%, transparent 72%);
}
.hero-flash.go { animation: flash .8s ease-out; }
@keyframes flash { 0% { opacity: 1; } 12% { opacity: .2; } 20% { opacity: .8; } 100% { opacity: 0; } }

/* ALERT state */
.alert-band {
  position: absolute; left: 0; right: 0; height: 12px; z-index: 2;
  background: repeating-linear-gradient(-45deg, var(--warn) 0 12px, #07070a 12px 24px);
  box-shadow: 0 0 22px rgba(255, 216, 77, .45);
  transform: scaleX(0);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
  animation: hazard .9s linear infinite paused;
}
.alert-band.a { top: var(--band-a, 30%); transform-origin: 0 50%; }
.alert-band.b { top: var(--band-b, 70%); transform-origin: 100% 50%; }
.hero.is-alert .alert-band { transform: scaleX(1); animation-play-state: running; }
@keyframes hazard { to { background-position: 33.94px 0; } }
.alert-tag {
  position: absolute; left: var(--gutter); bottom: calc(100% + 10px);
  font: 500 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--warn); white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 216, 77, .6);
  animation: blink .5s steps(2, jump-none) infinite;
}
.hero.is-alert .grid-floor, .hero.is-alert .horizon { filter: hue-rotate(-148deg) saturate(1.8) brightness(1.1); }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0;
  box-shadow: inset 0 0 180px 20px rgba(255, 176, 32, .38);
  transition: opacity .3s;
}
.hero.is-alert::after { opacity: 1; animation: siren 1.1s ease-in-out infinite; }
@keyframes siren { 50% { opacity: .35; } }
.hero.is-alert .hud { color: rgba(255, 216, 77, .75); }
.hero.is-alert .frame i { border-color: var(--warn); }

/* static fallback (reduced motion / no JS) */
.hero-static {
  display: none; text-align: center; padding: 0 var(--gutter);
  font: 400 clamp(11px, 1.6vw, 16px)/2 var(--f-pixel); text-transform: uppercase; color: var(--text);
}
.hero-static-g {
  font-size: clamp(64px, 16vw, 200px); line-height: 1.1; color: var(--white);
  text-shadow: 0 0 12px var(--neon), 0 0 40px var(--neon-2);
}
.hero-static-t { color: var(--white); margin-top: 8px; }
.hero-static-t b { color: var(--warn); font-weight: 400; text-shadow: 0 0 12px var(--warn-2); margin-left: .6em; }
html:not(.js) .hero-static { display: block; }
html.rm .hero-static { display: block; }
html.rm .hero-static-g { visibility: hidden; height: 0; overflow: hidden; } /* G23 itself is drawn on the canvas */
html.rm .hero-static { position: absolute; top: 60%; left: 0; right: 0; z-index: 3; }

/* HUD */
.frame { position: absolute; inset: 86px var(--gutter) 22px; pointer-events: none; z-index: 2; }
.frame i { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(79, 216, 255, .55); transition: border-color .3s; }
.frame i:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.frame i:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.frame i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.frame i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.hud {
  position: absolute; z-index: 3;
  display: grid; gap: 4px;
  font: 500 11px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); transition: color .3s;
}
.hud-tl { top: 108px; left: calc(var(--gutter) + 22px); }
.hud-tl { transition: opacity .5s, color .3s; }
.hero[data-seq]:not([data-seq="1"]) .hud-tl { opacity: 0; }
.hud-tr { top: 108px; right: calc(var(--gutter) + 22px); text-align: right; }
.hud-bl { bottom: 46px; left: calc(var(--gutter) + 22px); }
.hud-br { bottom: 46px; right: calc(var(--gutter) + 22px); justify-items: end; }
#bootlog {
  margin: 0; font: 400 11px/1.75 var(--f-mono); letter-spacing: .02em; text-transform: none;
  color: rgba(79, 216, 255, .78); white-space: pre;
}
#bootlog .ok { color: var(--ice); }
#bootlog .cl { color: var(--warn); }
#hud-clock { color: var(--text); font-variant-numeric: tabular-nums; }
#hud-seq.warn { color: var(--warn); }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 6px; height: 10px; background: var(--dim); transition: background-color .15s; }
.meter i.on { background: var(--neon); box-shadow: 0 0 6px rgba(79, 216, 255, .7); }
.hero.is-alert .meter i.on { background: var(--warn); box-shadow: 0 0 6px rgba(255, 216, 77, .7); }

.hero-foot {
  position: absolute; left: 50%; bottom: 28px; z-index: 3; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 14px; text-align: center;
}
.hero-role {
  font: 400 12px/1 var(--f-label); letter-spacing: .3em; text-transform: uppercase; color: var(--text);
  white-space: nowrap;
}
.hero-role span { color: var(--neon); }
.scroll-cue {
  display: grid; justify-items: center; gap: 8px; text-decoration: none;
  font: 500 10px/1 var(--f-mono); letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  transition: color .2s;
}
.scroll-cue svg { color: var(--neon); animation: bob 1.4s steps(4) infinite; }
.scroll-cue:hover { color: var(--white); }
@keyframes bob { 50% { transform: translateY(5px); } }

/* ---------- ticker ---------- */
.ticker {
  position: relative; overflow: hidden;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(43, 132, 255, .08), rgba(79, 216, 255, .04), rgba(43, 132, 255, .08));
  padding: 13px 0;
}
.ticker-track {
  display: flex; gap: 28px; width: max-content; align-items: center;
  font: 400 12px/1 var(--f-label); letter-spacing: .2em; text-transform: uppercase; color: var(--text);
  animation: ticker 48s linear infinite;
}
.ticker-track b { color: var(--neon); font-weight: 400; font-size: 9px; }
.ticker-track .warn { color: var(--warn); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ================= SECTIONS ================= */
.section { position: relative; padding: clamp(96px, 13vw, 168px) var(--gutter); }
.wrap { position: relative; max-width: var(--maxw); margin: 0 auto; }
.sec-head { display: grid; gap: 16px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head.center { justify-items: center; text-align: center; }
.sec-idx {
  font: 400 12px/1 var(--f-label); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.sec-idx span { color: var(--neon); margin-right: 8px; }
.sec-title {
  margin: 0;
  font: 400 clamp(20px, 3.6vw, 40px)/1.35 var(--f-pixel); text-transform: uppercase; color: var(--white);
  text-shadow: 0 0 18px rgba(79, 216, 255, .45);
}
.sec-sub {
  font: 400 12px/1.6 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.sec-sub span { color: var(--neon); margin: 0 6px; }
.projects .sec-head::after {
  content: ''; height: 1px; margin-top: 10px;
  background: linear-gradient(90deg, var(--neon), var(--line) 30%, transparent);
}

/* reveal */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .files [data-reveal]:nth-child(2) { transition-delay: .12s; }

/* ---------- project files ---------- */
.files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }

.file {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  position: relative; padding: 1px; outline: none;
  background: linear-gradient(160deg, var(--line-2), var(--line) 40%, var(--line-2));
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)));
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: background .35s, transform .5s cubic-bezier(.2, .7, .2, 1);
}
.js .file[data-reveal].is-in { transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)); }
.file.is-tilting { transition: background .35s, transform .08s linear; }
.file:hover, .file:focus-visible, .file.is-open {
  background: linear-gradient(160deg, var(--neon), rgba(43, 132, 255, .5) 45%, var(--neon));
}
.file:focus-visible { outline: none; }
.file:focus-visible .file-in { box-shadow: inset 0 0 0 2px var(--warn); }
.file-in {
  position: relative; height: 100%;
  background: linear-gradient(180deg, #071330, #030917 70%);
  clip-path: polygon(0 0, calc(100% - var(--chamfer) + .5px) 0, 100% calc(var(--chamfer) - .5px), 100% 100%, calc(var(--chamfer) - .5px) 100%, 0 calc(100% - var(--chamfer) + .5px));
}
.file-in::after { /* glare */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle 280px at var(--gx) var(--gy), rgba(79, 216, 255, .12), transparent 70%);
  transition: opacity .3s;
}
.file:hover .file-in::after { opacity: 1; }

.file-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 20px; border-bottom: 1px solid var(--line);
  font: 500 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.rec { display: inline-flex; align-items: center; gap: 7px; color: var(--warn); }
.rec i { width: 7px; height: 7px; background: var(--warn); box-shadow: 0 0 8px var(--warn); animation: blink 1s steps(2, jump-none) infinite; }

.file-view { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #01040c; border-bottom: 1px solid var(--line); }
.file-img {
  width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated;
  filter: saturate(.85) brightness(.8) contrast(1.05);
  transform: scale(1.03);
  transition: transform 1.4s cubic-bezier(.2, .7, .2, 1), filter .6s;
}
.file:hover .file-img, .file:focus-visible .file-img, .file.is-open .file-img { transform: scale(1.09); filter: saturate(1.1) brightness(1) contrast(1.05); }
.file-mask { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.file-scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 10, 30, .0) 0 2px, rgba(0, 10, 30, .35) 2px 4px);
}
.file-scan::after {
  content: ''; position: absolute; left: 0; right: 0; height: 30%; top: -30%;
  background: linear-gradient(to bottom, transparent, rgba(79, 216, 255, .14) 85%, rgba(166, 244, 252, .5));
  animation: sweep 3.6s linear infinite;
}
@keyframes sweep { to { top: 100%; } }
.file-stamp {
  position: absolute; left: 50%; top: 50%;
  padding: 10px 14px 9px;
  font: 400 clamp(12px, 1.7vw, 18px)/1 var(--f-pixel); text-transform: uppercase; letter-spacing: .08em;
  color: var(--warn); border: 3px solid var(--warn);
  background: rgba(2, 5, 15, .55);
  box-shadow: 0 0 18px rgba(255, 216, 77, .3), inset 0 0 12px rgba(255, 216, 77, .2);
  text-shadow: 0 0 10px rgba(255, 176, 32, .6);
  transform: translate(-50%, -50%) rotate(-7deg);
  transition: opacity .35s, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.file:hover .file-stamp, .file:focus-visible .file-stamp, .file.is-open .file-stamp {
  opacity: 0; transform: translate(-50%, -50%) rotate(-7deg) scale(1.35);
}
.file-hud {
  position: absolute; inset: auto 12px 10px; display: flex; justify-content: space-between;
  font: 500 10px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: rgba(166, 244, 252, .7);
  text-shadow: 0 0 6px rgba(0, 0, 0, .9);
}
.file-hint::before { content: '▶ Hover to decrypt'; }
@media (hover: none) { .file-hint::before { content: '▶ Tap to decrypt'; } }
.file:hover .file-hint::before, .file.is-open .file-hint::before { content: 'Signal unstable'; color: var(--warn); }

.file-body { display: grid; gap: 20px; padding: 24px 22px 26px; }
.status {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content; flex-wrap: wrap;
  padding: 8px 12px;
  font: 400 12px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--neon);
  border: 1px solid rgba(79, 216, 255, .35); background: rgba(79, 216, 255, .06);
}
.status .sep { color: var(--dim); }
.status .cls { color: var(--warn); text-shadow: 0 0 8px rgba(255, 216, 77, .4); }
.cn-label { font: 500 11px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.codename {
  margin: 0;
  font: 400 clamp(15px, 2vw, 22px)/1.5 var(--f-pixel); text-transform: uppercase; color: var(--white);
  text-shadow: 0 0 14px rgba(79, 216, 255, .45);
}
.cn-pre { color: var(--neon); }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; }
.specs dt { font: 500 10px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.specs dd { margin: 0; }
.redact {
  position: relative; display: block; width: var(--w, 70%); height: 12px;
  background: linear-gradient(90deg, #13254a 0 40%, #2a4b85 50%, #13254a 60% 100%);
  background-size: 300% 100%;
  animation: shimmer 2.6s linear infinite;
}
.redact::after {
  content: 'Redacted'; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  font: 500 10px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--warn);
  opacity: 0; transition: opacity .2s;
}
.specs div:hover .redact { background: #1a1205; animation: none; }
.specs div:hover .redact::after { opacity: 1; padding-left: 6px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.decrypt {
  display: flex; align-items: center; gap: 12px;
  font: 500 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.decrypt-label { min-width: 13ch; }
.decrypt-bar { flex: 1; height: 10px; padding: 2px; border: 1px solid var(--line-2); }
.decrypt-bar i {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--neon) 0 6px, transparent 6px 8px);
  transition: width .12s steps(2);
}
.decrypt-pct { min-width: 4ch; text-align: right; color: var(--neon); font-variant-numeric: tabular-nums; }
.decrypt.is-denied .decrypt-label, .decrypt.is-denied .decrypt-pct { color: var(--warn); }
.decrypt.is-denied .decrypt-bar { border-color: rgba(255, 216, 77, .5); }
.decrypt.is-denied .decrypt-bar i { background: repeating-linear-gradient(90deg, var(--warn) 0 6px, transparent 6px 8px); animation: blink .25s steps(2, jump-none) infinite; }

/* ---------- access ---------- */
.access { overflow: hidden; padding-bottom: clamp(150px, 20vw, 240px); }
.access-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 50% 34%, rgba(43, 132, 255, .16), transparent 70%),
    linear-gradient(to bottom, var(--bg), var(--bg-2) 60%, var(--bg));
}
.access-bg .grid-floor { height: 46%; }
.access-mark {
  width: 48px; height: auto; image-rendering: pixelated; margin-bottom: 10px;
  filter: drop-shadow(0 0 10px rgba(79, 216, 255, .6)) drop-shadow(0 0 30px rgba(43, 132, 255, .4));
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.access-title {
  display: grid; gap: .35em; margin: 8px 0 6px;
  font: 400 clamp(20px, 4.6vw, 54px)/1.25 var(--f-pixel); text-transform: uppercase; color: var(--white);
  text-shadow: 0 0 20px rgba(79, 216, 255, .4);
}
.access-title > span:first-child { font-size: .55em; color: var(--text); letter-spacing: .06em; }
.glitch {
  position: relative; display: inline-block;
  color: var(--neon);
  text-shadow: 0 0 12px rgba(79, 216, 255, .8), 0 0 40px rgba(43, 132, 255, .6);
}
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  clip-path: inset(0 0 100% 0);
}
.glitch::before { color: #ff2d6f; transform: translateX(-3px); text-shadow: none; animation: glitch-a 3.2s steps(1) infinite; }
.glitch::after { color: var(--ice); transform: translateX(3px); text-shadow: none; animation: glitch-b 3.2s steps(1) infinite; }
@keyframes glitch-a {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); }
  87% { clip-path: inset(10% 0 62% 0); } 89% { clip-path: inset(55% 0 20% 0); }
  91% { clip-path: inset(30% 0 48% 0); } 93% { clip-path: inset(75% 0 4% 0); }
}
@keyframes glitch-b {
  0%, 87%, 100% { clip-path: inset(0 0 100% 0); }
  88% { clip-path: inset(40% 0 35% 0); } 90% { clip-path: inset(5% 0 80% 0); }
  92% { clip-path: inset(66% 0 12% 0); }
}
.access-copy { max-width: 540px; margin-top: 8px; color: var(--text); }

.term-form {
  display: flex; max-width: 660px; margin: 0 auto; padding: 6px;
  background: rgba(3, 10, 26, .85);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -30px rgba(43, 132, 255, .55);
  transition: border-color .25s, box-shadow .25s;
}
.term-form:focus-within {
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon), 0 0 34px rgba(79, 216, 255, .32), 0 30px 80px -30px rgba(43, 132, 255, .55);
}
.term-form.is-error { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn), 0 0 28px rgba(255, 216, 77, .25); }
.term-form.shake { animation: shake .4s steps(6); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* bot trap */
.field { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0 14px; min-width: 0; }
.prompt { font: 400 13px/1 var(--f-pixel); color: var(--neon); animation: blink 1.1s steps(2, jump-none) infinite; }
.field input {
  flex: 1; min-width: 0; padding: 15px 0;
  background: transparent; border: 0; outline: 0;
  font: 500 15px/1.2 var(--f-mono); color: var(--white); caret-color: var(--neon);
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.form-msg {
  min-height: 1.7em; margin: 18px auto 0; max-width: 660px; text-align: center;
  font: 500 13px/1.6 var(--f-mono); color: var(--neon);
}
.form-msg.is-err { color: var(--warn); }
.form-msg.is-ok { color: var(--ice); text-shadow: 0 0 12px rgba(79, 216, 255, .6); }
.access-note {
  margin-top: 10px; text-align: center;
  font: 500 11px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.access-note span { color: var(--neon); margin: 0 6px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--bg); padding: 26px var(--gutter); }
.foot-in {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.brand-sm { font-size: 12px; gap: 10px; }
.brand-sm img { width: 14px; }
.copy, .foot-meta { font: 500 11px/1.6 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.copy { color: var(--text); text-align: center; }
.foot-meta { text-align: right; white-space: nowrap; }
.foot-meta span { color: var(--neon); margin: 0 6px; }
.blink { color: var(--neon); animation: blink 1s steps(2, jump-none) infinite; }

/* ================= RESPONSIVE ================= */
@media (max-width: 960px) {
  .nav-status { display: none; }
}
@media (max-width: 860px) {
  .foot-in { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .foot-meta { text-align: center; }
  .files { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
  .hud-tr, .hud-br { display: none; }
}
@media (max-width: 640px) {
  .nav { gap: 14px; }
  .nav-links a::before { display: none; }
  .nav-links { gap: 16px; }
  .btn-ghost { padding: 10px 14px; }
  .sound { padding: 9px 10px; }
  .sound-label { display: none; }
  .hud-tl { top: 92px; }
  #bootlog { font-size: 10px; }
  .frame { inset: 74px 12px 14px; }
  .hud-bl { display: none; }
  .hero-foot { bottom: 30px; }
  .hero-role { letter-spacing: .18em; }
  .specs { grid-template-columns: 1fr 1fr; }
  .specs div:last-child { grid-column: 1 / -1; }
  .term-form { flex-direction: column; gap: 6px; }
  .btn-primary { width: 100%; }
}
@media (max-width: 500px) { /* phones: logo + sound + join only */
  .nav-links { display: none; }
  .sound { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .fx-noise { display: none; }
}
