/* ==========================================================================
   GRIZZBOX — Indie Game Studio
   Single stylesheet. No build step. Edit tokens in :root to retheme.
   ========================================================================== */

:root {
  /* Brand */
  --orange: #fd6400;
  --orange-hi: #ff8a3d;
  --orange-lo: #b84800;
  --white: #ffffff;

  /* Surfaces */
  --bg: #0b0b0d;
  --bg-alt: #101014;
  --surface: #16161c;
  --surface-2: #1d1d25;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #f2f2f4;
  --muted: #a3a3b0;
  --dim: #6b6b78;

  /* 8-bit accent (C64 light blue) */
  --retro: #8b7ff0;
  --retro-lo: #352879;

  /* Type */
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Press Start 2P", "Courier New", monospace;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --radius-sm: 10px;
  --nav-h: 116px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--orange); color: #000; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--orange); color: #000; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type helpers ---------- */
h1, h2, h3 { line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h3 { font-size: 1.35rem; }
.accent { color: var(--orange); }

.eyebrow {
  font-family: var(--pixel);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.link { color: var(--orange); font-weight: 700; }
.link:hover { color: var(--orange-hi); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--orange);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn--primary {
  background: var(--orange); color: #111;
  box-shadow: 0 0 0 0 rgba(253, 100, 0, 0), 0 8px 0 var(--orange-lo);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(253, 100, 0, .45), 0 11px 0 var(--orange-lo);
}
.btn--primary:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--orange-lo); }
.btn--ghost { border: 2px solid var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--retro); color: #fff; background: rgba(139, 127, 240, .12); transform: translateY(-3px); }
.btn--8bit {
  background: var(--retro); color: #0b0820;
  box-shadow: 0 8px 0 var(--retro-lo);
}
.btn--8bit:hover { transform: translateY(-3px); box-shadow: 0 0 40px rgba(139, 127, 240, .45), 0 11px 0 var(--retro-lo); }
.btn--8bit:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--retro-lo); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  transition: background .3s, border-color .3s, backdrop-filter .3s, height .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  height: 84px;
  background: rgba(11, 11, 13, .78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav__logo img { height: 80px; width: auto; transition: height .3s var(--ease); }
.nav.is-scrolled .nav__logo img { height: 54px; }
.nav__menu { display: flex; align-items: center; gap: 6px; }
.nav__menu a {
  padding: 10px 14px; border-radius: 10px; font-weight: 500; color: var(--muted);
  transition: color .2s, background .2s;
}
.nav__menu a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav__menu .nav__cta { color: #111; background: var(--orange); font-weight: 700; margin-left: 6px; }
.nav__menu .nav__cta:hover { background: var(--orange-hi); color: #111; }

.nav__toggle { display: none; width: 44px; height: 44px; position: relative; border-radius: 10px; }
.nav__toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav__toggle span:nth-child(1) { top: 15px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle span:nth-child(3) { top: 27px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  :root { --nav-h: 80px; }
  .nav, .nav.is-scrolled { height: var(--nav-h); }
  .nav__toggle { display: block; }
  .nav__logo img, .nav.is-scrolled .nav__logo img { height: 50px; }
  .nav__menu {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: rgba(11, 11, 13, .97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease), opacity .25s;
  }
  .nav__menu.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__menu a { padding: 14px 16px; font-size: 1.1rem; }
  .nav__menu .nav__cta { margin: 8px 0 0; text-align: center; }
  .nav { background: rgba(11, 11, 13, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 110px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before { /* orange glow */
  content: ""; position: absolute; z-index: -1;
  width: 900px; height: 900px; right: -220px; top: -160px;
  background: radial-gradient(circle, rgba(253, 100, 0, .22), transparent 62%);
  filter: blur(20px);
}
.hero::after { /* bottom fade */
  content: ""; position: absolute; inset: auto 0 0 0; height: 200px; z-index: -1;
  background: linear-gradient(transparent, var(--bg));
}
.hero__stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.hero__grid { /* synthwave floor */
  position: absolute; inset: auto -50% -10% -50%; height: 55%; z-index: -2;
  background-image:
    linear-gradient(rgba(253, 100, 0, .35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(253, 100, 0, .35) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: top center;
  mask-image: linear-gradient(transparent, #000 40%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 40%, #000 70%, transparent);
  animation: grid-move 4s linear infinite;
  opacity: .5;
}
@keyframes grid-move { to { background-position: 0 60px, 0 0; } }

.hero__inner {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__title {
  font-size: clamp(2.8rem, 6.2vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: .92;
  margin-bottom: 26px;
  text-transform: uppercase;
  font-style: italic;
}
.hero__title .accent {
  background: linear-gradient(100deg, var(--orange) 20%, var(--orange-hi) 50%, var(--orange) 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shine 5s linear infinite;
  padding-right: .1em; /* italic overhang */
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@keyframes shine { to { background-position: -200% 0; } }
.hero__lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 34em; margin-bottom: 36px; }
.hero__lead strong { color: var(--text); font-weight: 700; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--pixel); font-size: .58rem; letter-spacing: .15em; color: var(--muted);
  animation: blink 1.4s steps(1) infinite;
}
.hero__scroll svg { width: 20px; height: 20px; fill: var(--orange); }

/* ---------- CRT ---------- */
.crt { perspective: 1200px; }
.crt__bezel {
  position: relative;
  background: linear-gradient(160deg, #2a2a33, #15151b 60%);
  border-radius: 28px;
  padding: 22px 22px 14px;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, .8),
    0 0 0 1px rgba(255, 255, 255, .06) inset,
    0 2px 0 rgba(255, 255, 255, .08) inset,
    0 0 120px rgba(253, 100, 0, .15);
  transform: rotateY(-9deg) rotateX(4deg);
  transition: transform .6s var(--ease);
}
.crt:hover .crt__bezel { transform: rotateY(-3deg) rotateX(1deg); }
.crt__screen {
  position: relative; overflow: hidden;
  border-radius: 18px / 22px;
  background: #000;
  aspect-ratio: 4 / 3;
  box-shadow: 0 0 0 4px #0a0a0d, inset 0 0 60px rgba(0, 0, 0, .9);
}
#demo {
  width: 100%; height: 100%;
  image-rendering: pixelated; image-rendering: crisp-edges;
  filter: saturate(1.2) contrast(1.05);
}
.crt__scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.crt__glare {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .65) 100%),
    linear-gradient(155deg, rgba(255, 255, 255, .12), transparent 35%);
  animation: flicker 6s infinite;
}
@keyframes flicker { 0%, 100% { opacity: 1; } 47% { opacity: .92; } 48% { opacity: 1; } 72% { opacity: .96; } }
.crt__chin { display: flex; justify-content: space-between; align-items: center; padding: 12px 6px 0; }
.crt__brand { font-family: var(--pixel); font-size: .55rem; letter-spacing: .25em; color: #6b6b78; }
.crt__led { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); }

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .crt { max-width: 560px; width: 100%; margin: 0 auto; }
  .crt__bezel { transform: none; }
  .hero { padding-bottom: 120px; }
}
@media (max-width: 400px) {
  .nav__logo img, .nav.is-scrolled .nav__logo img { height: 42px; }
}
@media (max-width: 480px) {
  .hero__ctas .btn { width: 100%; justify-content: center; }
  .crt__bezel { padding: 14px 14px 10px; border-radius: 20px; }
}

/* ==========================================================================
   MARQUEE
   ========================================================================== */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  background: var(--orange); color: #111;
  transform: rotate(-1.2deg) scale(1.02);
  margin: -20px 0 0;
  position: relative; z-index: 2;
}
.marquee__track {
  display: flex; align-items: center; gap: 28px; width: max-content;
  padding: 16px 0;
  font-family: var(--pixel); font-size: .8rem; letter-spacing: .08em;
  animation: marquee 40s linear infinite;
}
.marquee__track i { font-style: normal; opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding: clamp(80px, 12vw, 150px) 0; position: relative; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section__head h2 { margin-bottom: 18px; }
.section__lead { color: var(--muted); font-size: 1.12rem; max-width: 40em; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   WORLDS
   ========================================================================== */
.worlds { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.world {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: flex-start;
  transition: transform .4s var(--ease), border-color .4s;
}
.world:hover { transform: translateY(-6px); }
.world--pc:hover { border-color: rgba(253, 100, 0, .5); }
.world--8bit:hover { border-color: rgba(139, 127, 240, .55); }
.world__glow {
  position: absolute; z-index: -1; width: 460px; height: 460px; right: -160px; top: -200px;
  border-radius: 50%; filter: blur(30px); opacity: .55; transition: opacity .4s;
}
.world--pc .world__glow { background: radial-gradient(circle, rgba(253, 100, 0, .45), transparent 65%); }
.world--8bit .world__glow { background: radial-gradient(circle, rgba(139, 127, 240, .45), transparent 65%); }
.world:hover .world__glow { opacity: 1; }
.world--8bit::after { /* pixel dither corner */
  content: ""; position: absolute; right: 0; bottom: 0; width: 180px; height: 180px; z-index: -1;
  background-image: radial-gradient(var(--retro) 1.5px, transparent 1.6px);
  background-size: 10px 10px;
  mask-image: linear-gradient(135deg, transparent 40%, #000);
  -webkit-mask-image: linear-gradient(135deg, transparent 40%, #000);
  opacity: .35;
}
.world--pc::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 220px; height: 220px; z-index: -1;
  background: repeating-linear-gradient(-45deg, rgba(253, 100, 0, .18) 0 2px, transparent 2px 14px);
  mask-image: linear-gradient(135deg, transparent 40%, #000);
  -webkit-mask-image: linear-gradient(135deg, transparent 40%, #000);
}
.world__tag {
  font-family: var(--pixel); font-size: .6rem; letter-spacing: .1em;
  padding: 7px 10px; border-radius: 6px; margin-bottom: 22px;
  background: rgba(253, 100, 0, .14); color: var(--orange);
}
.world__tag--free { background: rgba(139, 127, 240, .16); color: var(--retro); }
.world h3 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 14px; }
.world p { color: var(--muted); margin-bottom: 22px; max-width: 30em; }
.world__list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 10px; }
.world__list li { display: flex; align-items: center; gap: 12px; }
.world__list li::before {
  content: ""; width: 10px; height: 10px; flex: none;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
}
.world--8bit .world__list li::before { background: var(--retro); box-shadow: 0 0 10px var(--retro); }
.world .btn { margin-top: auto; }

@media (max-width: 860px) {
  .worlds { grid-template-columns: 1fr; }
  .world .btn { white-space: normal; }
}

/* ==========================================================================
   GAMES
   ========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip {
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted); font-size: .9rem; font-weight: 500;
  transition: all .2s;
}
.chip:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.chip[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #111; font-weight: 700; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.game {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  animation: pop .5s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.game:hover {
  transform: translateY(-6px);
  border-color: rgba(253, 100, 0, .45);
  box-shadow: 0 24px 50px -20px rgba(253, 100, 0, .35);
}
.game__cover { position: relative; aspect-ratio: 4 / 3; background: #000; overflow: hidden; }
.game__open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.game__open:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.game__shots {
  position: absolute; right: 12px; bottom: 12px; z-index: 1; pointer-events: none;
  font-family: var(--pixel); font-size: .48rem; letter-spacing: .08em;
  padding: 6px 8px; border-radius: 5px; background: rgba(0, 0, 0, .75); color: #fff;
}
.game__cover canvas, .game__cover img {
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated;
  transition: transform .6s var(--ease);
}
.game__cover img { image-rendering: auto; }
.game:hover .game__cover canvas, .game:hover .game__cover img { transform: scale(1.06); }
.game__cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px);
}
.game__status {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  font-family: var(--pixel); font-size: .52rem; letter-spacing: .08em;
  padding: 6px 8px; border-radius: 5px;
  background: rgba(0, 0, 0, .75); color: #fff; backdrop-filter: blur(4px);
}
.game__status--released { background: var(--orange); color: #111; }
.game__status--dev { background: rgba(0, 0, 0, .75); color: #ffd23c; }
.game__sample {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  font-family: var(--pixel); font-size: .48rem; padding: 6px 8px; border-radius: 5px;
  background: #fff; color: #000;
}
.game__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.game__meta { font-family: var(--mono); font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.game__title { font-size: 1.3rem; margin-bottom: 8px; }
.game__tagline { color: var(--orange); font-weight: 600; font-size: .92rem; margin: -4px 0 8px; }
.game__desc {
  color: var(--muted); font-size: .97rem; margin-bottom: 16px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
}
.game__actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.game__actions .game__link { margin-top: 0; }
.game__more {
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-strong);
  color: var(--text); font-weight: 600; font-size: .9rem; background: none; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.game__more:hover { border-color: var(--orange); background: rgba(253, 100, 0, .1); }
.game__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tag {
  font-family: var(--mono); font-size: .72rem; padding: 4px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.tag--free { color: var(--retro); border-color: rgba(139, 127, 240, .35); }
.game__link {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--orange);
}
.game__link span { transition: transform .25s var(--ease); }
.game__link:hover span { transform: translateX(4px); }
.game__link--soon { color: var(--dim); font-weight: 500; }
.games__empty { color: var(--muted); padding: 40px 0; text-align: center; font-family: var(--mono); }

/* Game details dialog */
html.has-dialog { overflow: hidden; }
.gamebox {
  width: min(960px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8);
}
.gamebox::backdrop { background: rgba(5, 5, 8, .82); backdrop-filter: blur(4px); }
.gamebox[open] { animation: pop .35s var(--ease) both; }
.gamebox__inner { max-height: calc(100dvh - 34px); overflow-y: auto; padding: clamp(18px, 4vw, 36px); }
.gamebox__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.gamebox__head .eyebrow { margin-bottom: 6px; }
.gamebox__head h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.1; }
.gamebox__tagline { color: var(--orange); font-weight: 600; margin-top: 6px; }
.gamebox__close {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font-size: 1.1rem; cursor: pointer;
}
.gamebox__close:hover { border-color: var(--orange); color: var(--orange); }
.gamebox__stage { margin: 0; aspect-ratio: 4 / 3; max-height: min(62vh, 560px); width: 100%; background: #000; border-radius: var(--radius-sm); overflow: hidden; }
.gamebox__stage img { width: 100%; height: 100%; object-fit: contain; }
.gamebox__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin: 12px 0 24px; }
.gamebox__thumb {
  padding: 0; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #000;
  border: 2px solid transparent; cursor: pointer; opacity: .6; transition: opacity .2s, border-color .2s;
}
.gamebox__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gamebox__thumb:hover { opacity: 1; }
.gamebox__thumb[aria-pressed="true"] { opacity: 1; border-color: var(--orange); }
.gamebox__facts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.gamebox__facts div { padding: 8px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.gamebox__facts dt { font-family: var(--mono); font-size: .66rem; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.gamebox__facts dd { margin: 0; font-weight: 600; }
.gamebox__text { display: grid; gap: 28px; color: var(--muted); line-height: 1.65; }
.gamebox__text h3 { color: var(--text); font-size: 1.15rem; margin-bottom: 10px; }
.gamebox__text h4 { color: var(--text); font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; margin: 18px 0 6px; }
.gamebox__text p + p { margin-top: 10px; }
.gamebox__text strong { color: var(--text); }
.gamebox__text ul { padding-left: 1.2em; display: grid; gap: 4px; }
.gamebox__text li::marker { color: var(--orange); }
.gamebox__cta { margin-top: 28px; }
@media (min-width: 820px) {
  .gamebox__text { grid-template-columns: 1fr 1fr; }
  .gamebox__text section:only-child { grid-column: 1 / -1; }
}

/* ==========================================================================
   MACHINES
   ========================================================================== */
.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.machine {
  --m1: var(--orange); --m2: var(--orange-lo);
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 26px 22px 22px;
  transition: transform .35s var(--ease), border-color .35s, background .35s;
}
.machine:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--m1) 60%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--m1) 10%, var(--surface)), var(--surface) 70%);
}
.machine__bar {
  position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--m1), var(--m2));
}
.machine--spectrum .machine__bar { /* the iconic rainbow */
  background: linear-gradient(90deg, #d70000 0 25%, #d7d700 25% 50%, #00d700 50% 75%, #00d7d7 75%);
}
.machine h3 { font-size: 1.2rem; margin-bottom: 16px; }
.machine dl { display: grid; gap: 8px; }
.machine dl div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.machine dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.machine dt { font-family: var(--pixel); font-size: .52rem; color: var(--dim); padding-top: 4px; letter-spacing: .06em; }
.machine dd { font-family: var(--mono); font-size: .8rem; color: var(--text); text-align: right; }
.machine--more {
  border-style: dashed; border-color: var(--line-strong);
  background: transparent;
  display: flex; flex-direction: column; justify-content: center;
}
.machine--more p { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }

/* ==========================================================================
   STUDIO
   ========================================================================== */
.studio { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.studio__copy h2 { margin-bottom: 26px; }
.studio__copy p:not(.eyebrow) { color: var(--muted); margin-bottom: 18px; font-size: 1.08rem; }
.studio__sig { font-family: var(--mono); font-size: .9rem !important; color: var(--orange) !important; margin-top: 26px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 22px; display: flex; flex-direction: column; gap: 6px;
}
.stat__num { font-family: var(--pixel); font-size: clamp(1.4rem, 3vw, 2rem); color: var(--orange); line-height: 1.2; }
.stat__label { color: var(--muted); font-size: .92rem; }

.terminal {
  background: #2e2a6b; /* C64-ish */
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid rgba(139, 127, 240, .35);
  box-shadow: 0 20px 50px -20px rgba(53, 40, 121, .9);
}
.terminal__bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: rgba(0, 0, 0, .25);
}
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.terminal__bar i:first-child { background: var(--orange); }
.terminal__bar span { margin-left: 8px; font-family: var(--mono); font-size: .75rem; color: rgba(255, 255, 255, .55); }
.terminal__body {
  margin: 0; padding: 18px 20px 22px; min-height: 220px;
  font-family: var(--pixel); font-size: .62rem; line-height: 2;
  color: #a59ef5; white-space: pre-wrap; word-break: break-word;
}
.cursor { animation: blink 1s steps(1) infinite; color: #a59ef5; }

@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact__card {
  position: relative; overflow: hidden; isolation: isolate;
  text-align: center;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px);
  border-radius: 28px;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(253, 100, 0, .28), transparent 60%),
    var(--surface);
  border: 1px solid rgba(253, 100, 0, .3);
}
.contact__card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
}
.contact__card h2 { margin-bottom: 18px; }
.contact__card .section__lead { margin: 0 auto 36px; }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line-strong);
  font-weight: 500;
  transition: all .25s var(--ease);
}
.pill svg { width: 20px; height: 20px; fill: var(--orange); }
.pill:hover { background: var(--orange); color: #111; border-color: var(--orange); transform: translateY(-3px); }
.pill:hover svg { fill: #111; }
@media (max-width: 480px) { .pill { width: 100%; justify-content: center; } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.footer__logo { height: 100px; width: auto; opacity: .9; margin-bottom: 8px; }
.footer__tag { color: var(--muted); }
.footer__copy { color: var(--dim); font-size: .9rem; }
.footer__hint { font-family: var(--pixel); font-size: .5rem; color: #2b2b33; margin-top: 10px; letter-spacing: .15em; }

/* ==========================================================================
   TOAST + C64 MODE (Konami easter egg)
   ========================================================================== */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300;
  transform: translate(-50%, 140%);
  font-family: var(--pixel); font-size: .65rem; letter-spacing: .06em;
  background: var(--orange); color: #111; padding: 14px 18px; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  transition: transform .4s var(--ease);
  max-width: calc(100% - 32px); text-align: center;
}
.toast.is-on { transform: translate(-50%, 0); }

body.c64 {
  --bg: #352879; --bg-alt: #2e2370; --surface: #40318d; --surface-2: #4a3c9a;
  --text: #a59ef5; --muted: #8f87e6; --dim: #7a72d4;
  --orange: #a59ef5; --orange-hi: #ffffff; --orange-lo: #241b5c;
  --line: rgba(165, 158, 245, .2); --line-strong: rgba(165, 158, 245, .4);
  --font: "Press Start 2P", monospace;
  font-size: 13px; line-height: 1.9;
  box-shadow: inset 0 0 0 clamp(10px, 3vw, 36px) #6c5eb5;
}
body.c64 .hero__title { font-size: clamp(1.8rem, 5vw, 3.6rem); font-style: normal; line-height: 1.2; }
body.c64 h2 { font-size: clamp(1.4rem, 3.4vw, 2.4rem); line-height: 1.3; }
body.c64 .marquee { background: #6c5eb5; color: #fff; }
body.c64 .btn--primary, body.c64 .nav__cta { color: #352879 !important; }

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .blink, .hero__scroll, .cursor { animation: none; }
}
