@font-face {
  font-family: "RoomPixel";
  src: url("fonts/RoomPixel.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #060509;
  --bg2: #0d0a11;
  --bone: #d9d0bd;
  --bone-dim: #6d665a;
  --red: #b3122a;
  --red-dark: #4a0712;
  --ember: #ff5a1f;
  --cyan: #2fb7b0;
  --pixel: "RoomPixel", ui-monospace, monospace;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font: 17px/1.6 var(--mono);
  overflow-x: hidden;
}
main, .footer { overflow-x: clip; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.void { color: var(--red); }

/* Whole-page CRT: scanlines + vignette + flicker */
.crt {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.28) 3px 4px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.7) 100%);
  animation: flicker 4s steps(1) infinite;
}
@keyframes flicker { 0%, 100% { opacity: 1; } 47% { opacity: .85; } 48% { opacity: 1; } 91% { opacity: .9; } }

/* Page shake used by big hits (site.js toggles the class) */
html.shake body { animation: shake .32s steps(2) both; }
html.shake-big body { animation: shake-big .5s steps(2) both; }
@keyframes shake {
  0% { transform: translate(6px, -4px); } 25% { transform: translate(-5px, 3px); }
  50% { transform: translate(3px, 4px); } 75% { transform: translate(-2px, -2px); } 100% { transform: none; }
}
@keyframes shake-big {
  0% { transform: translate(14px, -9px); } 20% { transform: translate(-12px, 8px); }
  40% { transform: translate(8px, 6px); } 60% { transform: translate(-6px, -5px); }
  80% { transform: translate(3px, 2px); } 100% { transform: none; }
}

/* ------------------------------------------------------------------ NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 40px);
  font-family: var(--pixel); font-size: 15px; letter-spacing: .08em;
  background: linear-gradient(to bottom, rgba(6,5,9,.9), rgba(6,5,9,0));
  transition: background .2s;
}
.nav.solid { background: rgba(6,5,9,.94); border-bottom: 2px solid #1d1820; }
.nav__logo { text-decoration: none; font-size: 18px; }
.nav__links { display: flex; gap: 22px; margin-left: auto; }
.nav__links a { text-decoration: none; text-transform: uppercase; opacity: .75; }
.nav__links a:hover { opacity: 1; color: var(--red); }
.sound {
  font: inherit; color: var(--bone); background: transparent; cursor: pointer;
  border: 2px solid var(--bone-dim); padding: 6px 10px;
}
.sound[aria-pressed="true"] { border-color: var(--red); color: var(--red); background: rgba(179,18,42,.12); }

/* ----------------------------------------------------------------- HERO */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px;
  overflow: hidden; background: var(--bg);
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated; cursor: crosshair;
}
.hero__copy {
  position: absolute; left: 0; right: 0; top: 64%;
  text-align: center; padding: 0 16px; pointer-events: none;
}
.hero__copy a, .hero__copy button { pointer-events: auto; }
.tagline {
  position: relative; display: inline-block; margin: 0;
  font-family: var(--pixel); font-size: clamp(18px, 3.4vw, 44px); letter-spacing: .12em;
  color: var(--bone); opacity: 0;
  text-shadow: 3px 0 var(--red), -3px 0 rgba(47,183,176,.6);
}
.tagline.on { animation: tag-in .5s steps(6) both, tag-glitch 3.2s steps(1) 1s infinite; }
@keyframes tag-in {
  0% { opacity: 0; transform: scaleX(3); filter: blur(4px); }
  40% { opacity: 1; transform: scaleX(.8); }
  70% { transform: scaleX(1.1) translateX(8px); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes tag-glitch {
  0%, 100% { transform: none; text-shadow: 3px 0 var(--red), -3px 0 rgba(47,183,176,.6); }
  31% { transform: translateX(-6px) skewX(-8deg); text-shadow: 8px 0 var(--red), -8px 0 rgba(47,183,176,.8); }
  32% { transform: translateX(4px); }
  33% { transform: none; }
  77% { clip-path: inset(40% 0 30% 0); transform: translateX(10px); }
  78% { clip-path: none; transform: none; }
}
.hero__sub { margin: 14px 0 0; color: var(--bone-dim); opacity: 0; transition: opacity .6s .5s; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 22px; opacity: 0; transition: opacity .6s .8s; }
.hero.ready .hero__sub, .hero.ready .hero__cta { opacity: 1; }
.hero__hint {
  position: absolute; left: 50%; top: 18%; transform: translateX(-50%); margin: 0;
  font-family: var(--pixel); font-size: 13px; letter-spacing: .2em; color: var(--red);
  opacity: 0; transition: opacity 1s 2s; pointer-events: none;
}
.hero.ready .hero__hint { opacity: .7; animation: blink 1.2s steps(1) 3s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__scroll {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  font-family: var(--pixel); font-size: 22px; text-decoration: none; color: var(--bone-dim);
  animation: bob 1s steps(2) infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* -------------------------------------------------------------- BUTTONS */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  font-family: var(--pixel); font-size: 16px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bone); background: var(--bg2);
  border: 3px solid var(--bone); padding: 12px 22px;
  box-shadow: 5px 5px 0 var(--red-dark);
  transition: transform .06s steps(1), box-shadow .06s steps(1);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--red); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--red); }
.btn--red { background: var(--red); border-color: var(--red); box-shadow: 5px 5px 0 #000; }
.btn--red:hover { box-shadow: 7px 7px 0 var(--bone); }

/* -------------------------------------------------------------- MARQUEE */
.marquee { position: relative; height: 190px; margin: -40px 0 0; overflow: hidden; z-index: 2; }
.marquee__band {
  position: absolute; left: -10%; width: 120%; display: flex; white-space: nowrap;
  font-family: var(--pixel); font-size: clamp(26px, 4.5vw, 54px); letter-spacing: .06em;
  padding: 10px 0;
}
.marquee__band span { flex: none; padding-right: .5em; animation: marquee 18s linear infinite; }
.marquee__band--red { top: 34px; background: var(--red); color: #0b0005; transform: rotate(-3deg); }
.marquee__band--dark {
  top: 100px; background: var(--bone); color: var(--bg); transform: rotate(2deg);
  font-size: clamp(18px, 2.6vw, 30px);
}
.marquee__band--dark span { animation-direction: reverse; animation-duration: 24s; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ------------------------------------------------------------- SECTIONS */
.section { position: relative; max-width: 1180px; margin: 0 auto; padding: 110px clamp(16px, 4vw, 40px); }
.title {
  position: relative; margin: 0 0 24px;
  font-family: var(--pixel); font-weight: normal; line-height: 1;
  font-size: clamp(44px, 10vw, 128px); letter-spacing: .04em;
  text-shadow: 5px 0 var(--red), -4px 0 rgba(47,183,176,.55);
}
.title::after {
  content: ""; display: block; width: 120px; height: 6px; margin-top: 18px; background: var(--red);
}
.lead { max-width: 720px; font-size: 19px; color: var(--bone); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 50px; }
.card {
  position: relative; padding: 28px 24px 26px; background: var(--bg2);
  border: 3px solid #1d1820; box-shadow: 8px 8px 0 #000;
  transition: transform .08s steps(1), border-color .08s steps(1);
}
.card:hover { transform: translate(-3px, -3px); border-color: var(--red); }
.card__num { font-family: var(--pixel); font-size: 54px; color: var(--red); line-height: 1; }
.card h3 { font-family: var(--pixel); font-weight: normal; font-size: 24px; letter-spacing: .06em; text-transform: uppercase; margin: 14px 0 10px; }
.card p { margin: 0; color: #b5ad9c; font-size: 16px; }

/* Pipeline */
.section--pipeline::before {
  content: ""; position: absolute; inset: 40px -50vw; z-index: -1;
  background:
    radial-gradient(ellipse at 85% 60%, rgba(179,18,42,.22), transparent 60%),
    linear-gradient(to bottom, transparent, rgba(179,18,42,.05), transparent);
}
.steps { list-style: none; padding: 0; margin: 54px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; counter-reset: s; }
.step {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 16px 22px; border: 3px solid #241d26; margin-right: -3px; background: var(--bg);
}
.step:not(:last-child)::after {
  content: ">"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); z-index: 2;
  font-family: var(--pixel); font-size: 26px; color: var(--red); background: var(--bg); padding: 0 2px;
}
.step__n { font-family: var(--pixel); color: var(--bone-dim); font-size: 14px; }
.step b { font-family: var(--pixel); font-weight: normal; font-size: 24px; text-transform: uppercase; letter-spacing: .05em; }
.step span:last-child { color: #a69f8f; font-size: 14px; }
.step--void { background: var(--red); border-color: var(--red); }
.step--void .step__n, .step--void span:last-child { color: #2a0309; }
.step.in { animation: step-hot .9s steps(3) calc(var(--i) * .12s + .2s) both; }
@keyframes step-hot { 0% { background: var(--bone); color: var(--bg); } 100% {} }

/* Games */
.game {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 0; margin-top: 50px;
  background: var(--bg2); border: 3px solid #241d26; box-shadow: 10px 10px 0 #000;
}
.game__media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.game__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: opacity .15s steps(2); }
.game__alt { opacity: 0; }
.game:hover .game__alt { opacity: 1; }
.game__body { padding: 30px 30px 34px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.game__body p { margin: 0; color: #b5ad9c; }
.game__logo { width: 100%; max-width: 360px; image-rendering: pixelated; }
.game__tags { font-family: var(--pixel); color: var(--red) !important; letter-spacing: .1em; font-size: 14px; }
.game__body h3 { font-family: var(--pixel); font-weight: normal; font-size: 40px; margin: 0; letter-spacing: .05em; text-transform: uppercase; }
.game__links { display: flex; flex-wrap: wrap; gap: 14px; }
.game--classified { grid-template-columns: 1fr 1fr; }

/* Nothing Simulator: a live timer instead of a screenshot */
.game--nothing { grid-template-columns: 1fr 1fr; }
.nothing-timer {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  min-height: 280px; padding: 30px 20px; text-align: center;
  background: #111310; font-family: var(--pixel); color: #8f9488;
}
.nothing-timer__label { font-size: 13px; letter-spacing: .18em; }
.nothing-timer__clock {
  font-size: clamp(48px, 7vw, 88px); line-height: 1; color: var(--bone); letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.game--nothing:hover .nothing-timer__clock { color: var(--red); }

/* Local AI statement */
.local {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center;
  margin-top: 70px; padding: 36px clamp(20px, 4vw, 44px);
  border: 3px solid var(--red); background: rgba(179,18,42,.08); box-shadow: 10px 10px 0 var(--red-dark);
}
.local__big {
  margin: 0; font-family: var(--pixel); font-size: clamp(32px, 5vw, 60px); line-height: 1.05; letter-spacing: .04em;
  text-shadow: 4px 0 var(--red), -3px 0 rgba(47,183,176,.5);
}
.local__body p { margin: 0 0 14px; color: #b5ad9c; }
.local__except { font-family: var(--pixel); font-size: 24px; color: var(--bone) !important; letter-spacing: .05em; margin: 0 !important; }
.local__except span { color: var(--red); }
.classified {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  min-height: 260px; padding: 34px; overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(179,18,42,.12) 0 14px, transparent 14px 28px),
    #08060a;
  font-family: var(--pixel); font-size: clamp(28px, 4vw, 48px); letter-spacing: .08em;
}
.classified::after {
  content: "CLASSIFIED"; position: absolute; right: -30px; bottom: 30px; transform: rotate(-12deg);
  border: 4px solid var(--red); color: var(--red); padding: 4px 18px; font-size: 26px;
  animation: blink 1.6s steps(1) infinite;
}
.redact i { font-style: normal; color: transparent; background: var(--bone-dim); }

/* ---------------------------------------------------------------- FOOTER */
.footer { padding: 90px 16px 50px; text-align: center; border-top: 3px solid #1d1820; color: var(--bone-dim); }
.footer__big { font-family: var(--pixel); font-size: clamp(42px, 9vw, 120px); color: var(--bone); margin: 0; line-height: 1; letter-spacing: .04em; }
.footer nav { display: flex; gap: 22px; justify-content: center; margin: 26px 0 14px; font-family: var(--pixel); letter-spacing: .08em; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--red); }
.footer__small { font-size: 13px; }

/* ---------------------------------------------------------------- LEGAL */
.legal { max-width: 820px; padding-top: 130px; }
.legal .title { font-size: clamp(40px, 8vw, 84px); }
.legal h2 { font-family: var(--pixel); font-weight: normal; font-size: 22px; letter-spacing: .06em; margin: 34px 0 8px; color: var(--red); }
.legal p { color: #b5ad9c; }

/* ----------------------------------------------------- INTRO VIDEO DIALOG */
.intro-dialog { padding: 0; border: 3px solid var(--red); background: #000; max-width: min(1100px, 94vw); box-shadow: 0 0 0 100vmax rgba(0,0,0,.85); }
.intro-dialog::backdrop { background: rgba(0,0,0,.85); }
.intro-dialog video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.intro-dialog .btn { margin: 12px; }

/* ------------------------------------------------------- SLAM REVEALS */
.js .slam { opacity: 0; }
.js .slam.in { animation: slam .42s cubic-bezier(.5, 0, .9, .5) calc(var(--i, 0) * .09s) both; }
@keyframes slam {
  0% { opacity: 0; transform: scale(2.4) translateY(-30px); filter: blur(3px); }
  70% { opacity: 1; transform: scale(.97); filter: none; }
  80% { transform: scale(1.02) translateX(-4px); }
  90% { transform: translateX(3px); }
  100% { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ RESPONSIVE */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { margin: 0 -3px -3px 0; }
  .step::after { display: none; }
  .game, .game--classified, .game--nothing, .local { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .sound { margin-left: auto; }
  .hero__copy { top: 60%; }
  .marquee { height: 150px; }
  .marquee__band--dark { top: 86px; }
  .section { padding: 80px 16px; }
  .game__body { padding: 22px 18px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .crt, .marquee__band span, .tagline.on, .hero__scroll, .classified::after { animation: none !important; }
  .js .slam, .js .slam.in { opacity: 1; animation: none; }
  .tagline { opacity: 1; }
  html.shake body, html.shake-big body { animation: none; }
}
