/* ════════════════════════════════════════════════════════════════
   THE BACKROOM · Brand & Design System
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  /* type scale */
  --font-pixel:          'Press Start 2P', 'Courier New', monospace;
  --font-pixel-readable: 'VT323', 'Courier New', monospace;
  --font-mono:           'Courier New', ui-monospace, monospace;
  --font-serif:          Georgia, 'Times New Roman', serif;

  /* core palette */
  --void:        #04020a;
  --void-soft:   #0a0612;
  --void-card:   #08050e;
  --gold:        #f4d47c;
  --gold-dim:    #c0a868;
  --gold-deep:   #5c4848;
  --pink:        #ff3aa8;
  --pink-soft:   #ff7ac8;
  --pink-deep:   #a01872;
  --cyan:        #00d4ff;
  --cyan-soft:   #a8e8ff;
  --cream:       #e8d8b0;
  --paper:       #c0a868;
  --line:        #3a3038;
  --line-soft:   #2a2228;
  --muted:       #7a6868;
  --rim:         #5c4a4a;
  --silver:      #d8d8e0;
  --phoenix:     #ff70a8;

  /* spacing scale (matches a vertical rhythm) */
  --gap-xxs: 4px;
  --gap-xs:  8px;
  --gap-sm:  14px;
  --gap-md:  24px;
  --gap-lg:  40px;
  --gap-xl:  72px;
  --gap-xxl: 120px;

  /* z-stack */
  --z-nav:     50;
  --z-modal:   100;
  --z-hud:     200;
  --z-overlay: 300;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: #c8c8c8;
  font-family: 'Courier New', ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body { min-height: 100vh; overflow-x: hidden; }

::selection { background: var(--gold); color: var(--void); }

/* ─────── typography ─────── */
.serif        { font-family: Georgia, 'Times New Roman', serif; }
.italic       { font-style: italic; }
.bold         { font-weight: bold; }
.mono         { font-family: 'Courier New', ui-monospace, monospace; }
.pixel        { font-family: var(--font-pixel); letter-spacing: 1px; }
.pixel-r      { font-family: var(--font-pixel-readable); letter-spacing: 1px; }

.tagline {
  font-family: 'Courier New', monospace;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
  font-weight: normal;
}

.tagline-gold {
  font-family: 'Courier New', monospace;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold);
}

.eyebrow {
  font-family: 'Courier New', monospace;
  letter-spacing: 6px;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--gold-dim);
}

h1.display {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: bold;
  font-size: clamp(64px, 13vw, 180px);
  letter-spacing: 2px;
  color: var(--gold);
  line-height: 0.92;
  margin: 0;
  text-shadow: 0 0 40px rgba(244, 212, 124, 0.15);
}

h2.section-title {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: bold;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: 2px;
  color: var(--gold);
  margin: 0 0 var(--gap-sm) 0;
  line-height: 1;
}

h3.minor-title {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: bold;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 1px;
  color: var(--gold);
  margin: 0;
  line-height: 1.05;
}

p.body {
  font-family: Georgia, serif;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.7;
  color: #c0b8a8;
  max-width: 60ch;
}

p.body-large {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.6;
  color: var(--cream);
  max-width: 50ch;
}

.fineprint {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* ─────── decoration ─────── */

.draft-grid {
  background-image: radial-gradient(circle at 0.5px 0.5px, rgba(255, 255, 255, 0.04) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
}

.scanlines-overlay {
  position: relative;
}
.scanlines-overlay::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.14),
    rgba(0, 0, 0, 0.14) 1px,
    transparent 1px, transparent 3px);
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 1;
}

.divider-line {
  width: 100%;
  height: 1px;
  background: var(--line);
  position: relative;
}
.divider-line::before,
.divider-line::after,
.divider-line span {
  content: '';
  position: absolute;
  width: 1px; height: 6px;
  background: var(--line);
  top: -3px;
}
.divider-line::before { left: 25%; }
.divider-line::after  { left: 75%; }
.divider-line span    { left: 50%; height: 10px; top: -5px; }

.tick-corners {
  position: relative;
}
.tick-corners::before,
.tick-corners::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  pointer-events: none;
  opacity: 0.55;
}
.tick-corners::before {
  top: 16px; left: 16px;
  border-top: 1px solid var(--rim);
  border-left: 1px solid var(--rim);
}
.tick-corners::after {
  bottom: 16px; right: 16px;
  border-bottom: 1px solid var(--rim);
  border-right: 1px solid var(--rim);
}

/* ─────── buttons ─────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 14px 28px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.btn:hover {
  background: var(--gold);
  color: var(--void);
  letter-spacing: 5px;
  box-shadow: 0 0 30px rgba(244, 212, 124, 0.4);
}
.btn-primary {
  background: var(--gold);
  color: var(--void);
}
.btn-primary:hover {
  background: var(--gold-dim);
  letter-spacing: 5px;
}
.btn-pink {
  border-color: var(--pink);
  color: var(--pink);
}
.btn-pink:hover {
  background: var(--pink);
  color: var(--void);
  box-shadow: 0 0 30px rgba(255, 58, 168, 0.4);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.6);
}
.btn:disabled:hover,
.btn[aria-disabled="true"]:hover {
  background: transparent;
  color: var(--gold);
  letter-spacing: 4px;
  box-shadow: none;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--muted);
}
.btn-ghost:hover {
  border-color: var(--gold-dim);
  color: var(--gold-dim);
  background: transparent;
}

/* ─────── nav ─────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  background: rgba(4, 2, 10, 0);
  backdrop-filter: blur(0px);
  transition: all 0.3s;
}
.nav.scrolled {
  background: rgba(4, 2, 10, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .brand {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: bold;
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav .brand .star { color: var(--pink); }
.nav-links {
  display: flex;
  gap: var(--gap-md);
  margin-left: auto;
}
.nav-links a {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.active { color: var(--gold); }

@media (max-width: 720px) {
  .nav { padding: 16px 20px; }
  .nav-links { gap: var(--gap-sm); flex-wrap: wrap; }
  .nav-links a { font-size: 10px; letter-spacing: 2px; }
}

/* ─────── card / cabinet wrapper ─────── */

.card-wrap {
  position: relative;
  background: var(--void-card);
  box-shadow: 0 20px 40px rgba(255, 80, 168, 0.06),
              0 0 1px rgba(244, 212, 124, 0.3);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card-wrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(255, 80, 168, 0.18),
              0 0 1px rgba(244, 212, 124, 0.6);
}
.card-wrap svg { width: 100%; height: auto; display: block; }

/* ─────── ambient animations ─────── */

@keyframes hover-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes shimmer {
  0%   { opacity: 0.5; }
  50%  { opacity: 1; }
  100% { opacity: 0.5; }
}
@keyframes fade-up {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(244, 212, 124, 0.2); }
  50%      { box-shadow: 0 0 40px rgba(244, 212, 124, 0.45); }
}

.hover-bob   { animation: hover-bob 6s ease-in-out infinite; }
.pulse       { animation: pulse 2s ease-in-out infinite; }
.shimmer     { animation: shimmer 3s ease-in-out infinite; }
.fade-up     { animation: fade-up 0.8s ease-out both; }
.glow-pulse  { animation: glow-pulse 4s ease-in-out infinite; }

/* keyframes used by Quarter SVGs */
@keyframes marqueeFlicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.55; }
  98% { opacity: 1; }
  99% { opacity: 0.7; }
}
@keyframes screenFlicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.85; }
  94% { opacity: 1; }
}
@keyframes shipMove {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(20px); }
}
@keyframes enemyMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); }
}
@keyframes laserShoot {
  0% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(-40px); opacity: 1; }
  100% { transform: translateY(-50px); opacity: 0; }
}
@keyframes joystickWobble {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
@keyframes coinSpin {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.15); }
}
@keyframes floorPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.75; }
}
@keyframes ballBounce {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(8px, -6px); }
  50% { transform: translate(0, -12px); }
  75% { transform: translate(-8px, -6px); }
}
@keyframes pongBall {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 8px); }
}
@keyframes ghostBob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-4px, 2px); }
}
@keyframes pacChomp {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.85); }
}
@keyframes asteroidDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-8px, 4px) rotate(180deg); }
}
@keyframes snakeBlink {
  0%, 80%, 100% { opacity: 1; }
  90% { opacity: 0.6; }
}

.marquee-flicker { animation: marqueeFlicker 5s linear infinite; }
.screen-flicker  { animation: screenFlicker 3s linear infinite; }
.ship-move       { animation: shipMove 2.4s ease-in-out infinite; transform-origin: center; }
.enemy-row       { animation: enemyMove 1.8s ease-in-out infinite alternate; }
.laser           { animation: laserShoot 0.9s linear infinite; transform-origin: center; }
.joystick        { animation: joystickWobble 1.6s ease-in-out infinite; transform-box: fill-box; }
.coin-spin       { animation: coinSpin 1.8s ease-in-out infinite; transform-box: fill-box; }
.floor-pulse     { animation: floorPulse 4s ease-in-out infinite; }
.ball-bounce     { animation: ballBounce 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pong-ball       { animation: pongBall 1.4s ease-in-out infinite alternate; transform-box: fill-box; }
.ghost-bob       { animation: ghostBob 1.5s ease-in-out infinite; transform-box: fill-box; }
.pac-chomp       { animation: pacChomp 0.4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.asteroid-drift  { animation: asteroidDrift 8s linear infinite; transform-box: fill-box; transform-origin: center; }
.snake-blink     { animation: snakeBlink 2s linear infinite; }

/* ─────── layout helpers ─────── */

.section {
  padding: var(--gap-xxl) 32px;
  position: relative;
}
.section-narrow {
  padding: var(--gap-xl) 32px;
  position: relative;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
}
.container-narrow {
  max-width: 880px;
  margin: 0 auto;
}

/* tier badges */
.tier-badge {
  display: inline-block;
  padding: 4px 10px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  border: 1px solid currentColor;
}
.tier-brass   { color: var(--gold); }
.tier-silver  { color: var(--silver); }
.tier-gold    { color: #ffe070; }
.tier-phoenix { color: var(--phoenix); }

/* utility */
.spacer-sm { height: var(--gap-md); }
.spacer-md { height: var(--gap-lg); }
.spacer-lg { height: var(--gap-xl); }
.center    { text-align: center; }
.flex      { display: flex; }
.flex-col  { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* responsive grid for cards */
.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap-md);
}

@media (max-width: 720px) {
  .section { padding: var(--gap-xl) 16px; }
  .cabinet-grid { gap: var(--gap-sm); }
}
