/* =========================================================================
   ZALTURI — shared design system
   8-bit / CRT aesthetic · dark amber palette · Press Start 2P + VT323
   ========================================================================= */

/* ---- self-hosted fonts (latin) ---- */
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/press-start-2p.woff2') format('woff2');
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/vt323.woff2') format('woff2');
}

/* ---- tokens ---- */
:root {
  --z-bg: #1a1209;
  --z-bg-2: #231a0e;
  --z-bg-3: #2e2210;
  --z-black: #050302;
  --z-card: #0c0804;
  --z-text: #f5e6c8;
  --z-text-2: #ecdab0;
  --z-gold: #d4a843;
  --z-amber: #e8c56a;
  --z-rust: #c0440a;
  --z-rust-2: #e0520d;
  --z-moss: #4f8a3c;
  --z-foam: #f7f0e0;
  --z-muted: #8a7055;
  --z-border: #3d2e14;

  --font-pixel: 'Press Start 2P', ui-monospace, 'Courier New', monospace;
  --font-term: 'VT323', ui-monospace, 'Courier New', monospace;

  --wrap: 1120px;
  --shadow-hard: 5px 5px 0 #000;
}

/* ---- reset ---- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--z-bg);
  color: var(--z-text-2);
  font-family: var(--font-term);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  text-rendering: optimizeSpeed;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--z-gold); text-decoration: none; }
a:hover { color: var(--z-amber); }

:focus-visible {
  outline: 3px solid var(--z-amber);
  outline-offset: 3px;
}

/* ---- accessibility helpers ---- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--z-gold);
  color: var(--z-black);
  font-family: var(--font-pixel);
  font-size: 9px;
  text-transform: uppercase;
  box-shadow: var(--shadow-hard);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; color: var(--z-black); }

/* ---- CRT overlay (scanlines + vignette), site-wide ---- */
.crt::before,
.crt::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
}
.crt::before {
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0) 0, rgba(0,0,0,0) 3px,
    rgba(0,0,0,0.16) 3px, rgba(0,0,0,0.16) 5px);
  opacity: 0.22;
  mix-blend-mode: multiply;
}
.crt::after {
  background: radial-gradient(115% 95% at 50% 45%, transparent 60%, rgba(0,0,0,0.36) 100%);
}

/* ---- layout ---- */
.wrap {
  width: min(var(--wrap), calc(100% - 28px));
  margin-inline: auto;
}
.section {
  position: relative;
  z-index: 2;
  padding: 38px 0;
}

/* ---- nav ---- */
.nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 0 10px;
}
.logo {
  font-family: var(--font-pixel);
  font-size: 13px;
  line-height: 1.4;
  color: var(--z-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.logo:hover { color: var(--z-amber); }
.menu {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.menu a {
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--z-muted);
  text-transform: uppercase;
}
.menu a:hover,
.menu a[aria-current="page"] { color: var(--z-amber); }
.menu a[aria-current="page"] { text-shadow: 2px 2px 0 #000; color: var(--z-gold); }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 15px 20px;
  border: 3px solid var(--z-border);
  box-shadow: var(--shadow-hard);
  background: var(--z-bg-2);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--z-text) !important;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease, color 0.12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #000; }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 #000; }
.btn-main {
  background: var(--z-rust);
  border-color: var(--z-text-2);
  box-shadow: var(--shadow-hard), 0 0 24px rgba(192,68,10,0.42);
}
.btn-main:hover { background: var(--z-rust-2); }
.btn-ghost { background: var(--z-bg-2); color: var(--z-gold) !important; }
.btn-ghost:hover { background: var(--z-bg-3); color: var(--z-amber) !important; }

/* ---- kicker / badge ---- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  padding: 8px 11px;
  background: #000;
  border: 2px solid var(--z-border);
  box-shadow: 4px 4px 0 #000;
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.6;
  color: var(--z-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.blip {
  width: 8px; height: 8px;
  background: var(--z-rust);
  box-shadow: 0 0 14px rgba(192,68,10,0.95);
  animation: z-blink 1.1s steps(2, start) infinite;
}
@keyframes z-blink { 50% { opacity: 0.25; } }

/* ---- headings ---- */
.h-title {
  margin: 0;
  font-family: var(--font-pixel);
  text-transform: uppercase;
  color: var(--z-text);
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-shadow: 4px 4px 0 var(--z-rust), 8px 8px 0 #000;
}
.section-title {
  margin: 0 0 18px;
  font-family: var(--font-pixel);
  font-size: clamp(15px, 3vw, 26px);
  line-height: 1.45;
  color: var(--z-gold);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--z-rust), 6px 6px 0 #000;
}
.eyebrow {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--z-muted);
  text-transform: uppercase;
}

/* ---- hero ---- */
.hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 34px;
  align-items: center;
  padding: 44px 0;
}
.hero-title { font-size: clamp(40px, 8.4vw, 96px); }
.hero-lead {
  max-width: 660px;
  margin: 22px 0 0;
  font-family: var(--font-term);
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1;
  color: var(--z-text-2);
}
.hero-lead span { color: var(--z-amber); }
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* ---- hero art frame + pixelation ---- */
.art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}
.art-frame {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(212,168,67,0.16), transparent 46%),
    rgba(0,0,0,0.32);
  border: 3px solid var(--z-border);
  box-shadow: 6px 6px 0 #000, 0 0 0 2px rgba(212,168,67,0.12) inset, 0 0 46px rgba(192,68,10,0.22);
}
.art-frame .tag-tl,
.art-frame .tag-br {
  position: absolute;
  z-index: 3;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.13em;
}
.art-frame .tag-tl { top: 14px; left: 14px; color: var(--z-muted); }
.art-frame .tag-br { right: 14px; bottom: 14px; color: var(--z-rust); }
.art-media {
  position: relative;
  z-index: 1;
  width: 86%;
  height: 92%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.art-media img,
.art-media canvas {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(8px 10px 0 rgba(0,0,0,0.7)) drop-shadow(0 0 22px rgba(232,197,106,0.16));
}
.art-media canvas { display: block; }
.pixels {
  position: absolute;
  inset: -18px;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(var(--z-rust), var(--z-rust)) 9% 18% / 10px 10px no-repeat,
    linear-gradient(var(--z-gold), var(--z-gold)) 87% 23% / 8px 8px no-repeat,
    linear-gradient(var(--z-amber), var(--z-amber)) 18% 86% / 7px 7px no-repeat,
    linear-gradient(var(--z-rust), var(--z-rust)) 77% 80% / 12px 12px no-repeat;
  opacity: 0.9;
}

/* ---- generic cards grid ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card {
  min-height: 158px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(35,26,14,0.98), rgba(11,7,4,0.98));
  border: 3px solid var(--z-border);
  box-shadow: var(--shadow-hard);
}
.card h3 {
  margin: 0 0 14px;
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.6;
  color: var(--z-amber);
  text-transform: uppercase;
}
.card p {
  margin: 0;
  font-size: 27px;
  line-height: 1;
  color: var(--z-text-2);
}

/* ---- music / player ---- */
.music-card {
  position: relative;
  padding: 22px;
  background: linear-gradient(180deg, rgba(35,26,14,0.96), rgba(5,3,2,0.98));
  border: 3px solid var(--z-border);
  box-shadow: 6px 6px 0 #000, 0 0 0 2px rgba(212,168,67,0.1) inset, 0 0 34px rgba(192,68,10,0.28);
  overflow: hidden;
}
.music-card::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(0deg,
    rgba(0,0,0,0) 0, rgba(0,0,0,0) 3px, rgba(0,0,0,0.20) 3px, rgba(0,0,0,0.20) 5px);
  opacity: 0.35;
}
.music-card > * { position: relative; z-index: 2; }
.music-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.music-top p {
  max-width: 680px;
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.05;
  color: var(--z-text-2);
}
.badge {
  flex: 0 0 auto;
  padding: 10px 12px;
  background: #000;
  border: 2px solid var(--z-border);
  box-shadow: 4px 4px 0 #000;
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.6;
  color: var(--z-rust);
  text-transform: uppercase;
  white-space: nowrap;
}
.player-shell {
  padding: 10px;
  background: #000;
  border: 3px solid var(--z-border);
  box-shadow: var(--shadow-hard), 0 0 0 2px rgba(232,197,106,0.08) inset;
}
.player-frame, .player-frame iframe {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
  background: #000;
}
.player-frame { overflow: hidden; border: 1px solid rgba(236,218,176,0.18); }
.links-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  margin-top: 20px;
}
.note {
  margin-top: 12px;
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.8;
  color: var(--z-muted);
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---- long-form prose (about) ---- */
.prose { max-width: 760px; }
.prose p {
  font-size: 24px;
  line-height: 1.35;
  color: var(--z-text-2);
  margin: 0 0 18px;
}
.prose p .hi { color: var(--z-amber); }
.prose h2 {
  margin: 40px 0 14px;
  font-family: var(--font-pixel);
  font-size: clamp(13px, 2.4vw, 18px);
  line-height: 1.5;
  color: var(--z-gold);
  text-transform: uppercase;
}
.prose ul { margin: 0 0 18px; padding-left: 24px; }
.prose li { font-size: 23px; line-height: 1.3; margin-bottom: 8px; }
.prose a { border-bottom: 2px solid var(--z-border); }
.lead {
  font-size: clamp(26px, 3.6vw, 38px) !important;
  line-height: 1.08 !important;
  color: var(--z-text) !important;
}
.prose .eyebrow {
  display: block;
  margin-top: 14px;
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 2;
  letter-spacing: 0.1em;
  color: var(--z-muted);
  text-transform: uppercase;
}

/* ---- arcade hub ---- */
.cab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.cab {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: linear-gradient(180deg, rgba(35,26,14,0.98), rgba(5,3,2,0.98));
  border: 3px solid var(--z-border);
  box-shadow: 6px 6px 0 #000;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.cab:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 #000; }
.cab-screen {
  position: relative;
  aspect-ratio: 14 / 9;
  margin-bottom: 16px;
  background: #000;
  border: 3px solid var(--z-border);
  box-shadow: inset 0 0 0 2px var(--z-bg-3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cab-screen canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.cab h3 {
  margin: 0 0 8px;
  font-family: var(--font-pixel);
  font-size: 13px;
  line-height: 1.4;
  color: var(--z-amber);
  text-transform: uppercase;
}
.cab p { margin: 0 0 16px; font-size: 23px; line-height: 1.1; color: var(--z-text-2); }
.cab .btn { margin-top: auto; }
.cab-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.chip {
  padding: 5px 8px;
  background: #000;
  border: 2px solid var(--z-border);
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--z-muted);
  text-transform: uppercase;
}

/* ---- footer ---- */
.footer {
  position: relative;
  z-index: 2;
  padding: 34px 0 44px;
  color: var(--z-muted);
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.9;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer a { color: var(--z-gold); }
.footer a:hover { color: var(--z-amber); }
.footer .row { margin-top: 10px; }

/* ---- breadcrumb ---- */
.crumb {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--z-muted);
  text-transform: uppercase;
  padding: 6px 0 0;
}
.crumb a { color: var(--z-muted); }
.crumb a:hover { color: var(--z-amber); }

/* ---- back-to-arcade strip on game pages ---- */
.game-wrap { padding: 12px 0 40px; }
.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 28px; }
  .art { min-height: auto; }
  .art-frame { width: min(380px, 94%); }
  .grid-3 { grid-template-columns: 1fr; }
  .cab-grid { grid-template-columns: 1fr; }
  .music-top { display: block; }
  .badge { display: inline-block; margin-top: 12px; }
  .links-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 19px; }
  .nav { flex-direction: column; align-items: flex-start; gap: 12px; }
  .menu { justify-content: flex-start; gap: 14px; }
  .hero-title { font-size: 40px; text-shadow: 3px 3px 0 var(--z-rust), 6px 6px 0 #000; }
  .hero-lead { font-size: 30px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .card p, .music-top p { font-size: 25px; }
  .prose p { font-size: 22px; }
  .player-frame, .player-frame iframe { height: 420px; }
}

/* ---- motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
