:root {
  --bg: #f7e7b7;
  --bg-deep: #e2c677;
  --ink: #2e1f13;
  --brown: #6d3b1b;
  --brown-dark: #47240e;
  --cream: #fff5cf;
  --blue: #1a8fcb;
  --blue-deep: #0c5e99;
  --orange: #f48c1f;
  --orange-deep: #c75e0b;
  --mint: #77c79f;
  --shadow: #130b07;
  --panel-shadow: 0 8px 0 var(--shadow);
  --page-width: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "VT323", monospace;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    linear-gradient(180deg, #f7e7b7 0%, #f2d995 52%, #e6c06e 100%);
  image-rendering: pixelated;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(46, 31, 19, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 31, 19, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.42;
}

a {
  color: inherit;
  text-decoration: none;
}

.pixel-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 60%, rgba(0, 0, 0, 0.3) 0 1px, transparent 1px);
  background-size: 9px 9px, 11px 11px;
}

.pixel-page {
  position: relative;
  width: var(--page-width);
  margin: 0 auto;
  padding: 18px 0 30px;
}

.topbar,
.panel,
.screen-frame,
.cartridge-card,
.feature-card,
.level-card,
.contact-panel,
.marquee-band {
  border: 4px solid var(--ink);
  box-shadow: var(--panel-shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  background: var(--cream);
}

.brand,
.pixel-nav,
.hero-actions,
.stat-strip,
.chip-row,
.screen-header,
.screen-footer,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--orange);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
}

.pixel-nav {
  flex-wrap: wrap;
  gap: 10px;
}

.pixel-nav a,
.pixel-button {
  padding: 10px 14px;
  border: 4px solid var(--ink);
  background: #fff8dd;
  font-family: "Press Start 2P", monospace;
  font-size: 0.6rem;
  line-height: 1.5;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 120ms steps(2);
}

.pixel-nav a:hover,
.pixel-nav a:focus-visible,
.pixel-button:hover,
.pixel-button:focus-visible {
  transform: translate(-2px, -2px);
  outline: none;
}

.pixel-button-primary {
  background: var(--orange);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 24px;
  padding: 28px 0 18px;
}

.hero-copy,
.hero-visual,
.game-layout,
.feature-grid,
.level-grid {
  display: grid;
  gap: 18px;
}

.hud-label,
.panel-kicker {
  margin: 0 0 16px;
  color: var(--brown);
  font-family: "Press Start 2P", monospace;
  font-size: 0.58rem;
  line-height: 1.8;
  text-transform: uppercase;
}

.hero h1,
.section-title h2,
.contact-panel h2,
.cartridge-card h2 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1.55rem, 4vw, 3.3rem);
  line-height: 1.34;
  text-transform: uppercase;
}

.hero-text,
.panel p,
.feature-card p,
.contact-panel p,
.cartridge-card p {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.05;
}

.stat-strip,
.chip-row {
  flex-wrap: wrap;
  gap: 12px;
}

.stat-strip {
  margin-top: 28px;
}

.stat-box {
  min-width: 108px;
  padding: 12px 14px;
  border: 4px solid var(--ink);
  background: #fff9e2;
  box-shadow: 4px 4px 0 var(--shadow);
}

.stat-number {
  display: block;
  font-family: "Press Start 2P", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

.stat-label {
  display: block;
  font-size: 1.4rem;
}

.screen-frame {
  padding: 14px;
  background: var(--brown);
  color: #fff8dd;
}

.screen-header,
.screen-footer {
  justify-content: space-between;
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
  line-height: 1.8;
  text-transform: uppercase;
}

.board-preview {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 14px 0;
  padding: 14px;
  border: 4px solid var(--ink);
  background: #e9c273;
}

.tile {
  display: block;
  aspect-ratio: 1;
  border: 3px solid rgba(46, 31, 19, 0.85);
}

.tile.wall {
  background: #6d3b1b;
}

.tile.floor {
  background: #f9ecbf;
}

.tile.goal {
  background:
    radial-gradient(circle, #ffdb89 0 34%, transparent 35%),
    #f4a63f;
}

.tile.crate {
  background:
    linear-gradient(90deg, transparent 42%, rgba(46, 31, 19, 0.9) 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, rgba(46, 31, 19, 0.9) 42% 58%, transparent 58%),
    var(--orange);
}

.tile.player {
  background:
    radial-gradient(circle at 50% 28%, #dff7ff 0 20%, transparent 21%),
    radial-gradient(circle at 50% 66%, #25a8df 0 36%, transparent 37%),
    #137fb0;
}

.cartridge-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 16px;
  background: #fff7da;
}

.cartridge-card img {
  width: 100%;
  border: 4px solid var(--ink);
  image-rendering: pixelated;
}

.marquee-band {
  overflow: hidden;
  padding: 10px 0;
  background: var(--orange);
}

.marquee-track {
  display: flex;
  gap: 32px;
  width: max-content;
  font-family: "Press Start 2P", monospace;
  font-size: 0.6rem;
  line-height: 1.8;
  text-transform: uppercase;
  animation: scroll-track 18s linear infinite;
}

.section {
  padding: 26px 0 12px;
}

.section-title {
  max-width: 920px;
  margin-bottom: 18px;
}

.game-layout {
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
}

.panel,
.feature-card,
.level-card {
  padding: 18px;
  background: #fff8dd;
}

.big-panel {
  background:
    linear-gradient(135deg, rgba(26, 143, 203, 0.12), transparent 45%),
    #fff8dd;
}

.panel h3,
.feature-card h3 {
  margin: 0 0 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.88rem;
  line-height: 1.8;
  text-transform: uppercase;
}

.chip-row span {
  padding: 8px 10px;
  border: 3px solid var(--ink);
  background: #dbf3ff;
  font-family: "Press Start 2P", monospace;
  font-size: 0.54rem;
  line-height: 1.8;
}

.feature-grid {
  grid-template-columns: repeat(4, 1fr);
}

.studio-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-index {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 10px;
  border: 3px solid var(--ink);
  background: var(--mint);
  font-family: "Press Start 2P", monospace;
  font-size: 0.58rem;
}

.level-grid {
  grid-template-columns: repeat(4, 1fr);
}

.level-card {
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(244, 140, 31, 0.1), transparent 55%),
    #fff8dd;
}

.level-card span,
.footer {
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
  line-height: 1.8;
  text-transform: uppercase;
}

.level-card strong {
  font-size: 2rem;
  line-height: 0.95;
}

.contact-zone {
  padding-top: 32px;
}

.contact-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(119, 199, 159, 0.22), transparent 42%),
    #fff8dd;
}

.contact-stack {
  min-width: 280px;
  padding: 16px;
  border: 4px solid var(--ink);
  background: #fff3c5;
  box-shadow: 4px 4px 0 var(--shadow);
}

.contact-label {
  display: block;
  margin-bottom: 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
  line-height: 1.8;
  text-transform: uppercase;
}

.contact-mail {
  display: inline-block;
  word-break: break-word;
  font-size: 2rem;
  line-height: 0.95;
}

.contact-link {
  display: inline-block;
  margin-top: 14px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.54rem;
  line-height: 1.9;
  text-transform: uppercase;
}

.footer {
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 6px;
}

.policy-page {
  display: grid;
  gap: 20px;
  padding: 28px 0 12px;
}

.policy-header,
.policy-section {
  padding: 20px;
  border: 4px solid var(--ink);
  background: #fff8dd;
  box-shadow: var(--panel-shadow);
}

.policy-header h1,
.policy-section h2 {
  margin: 0 0 12px;
  font-family: "Press Start 2P", monospace;
  text-transform: uppercase;
}

.policy-header h1 {
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  line-height: 1.45;
}

.policy-section h2 {
  font-size: 0.9rem;
  line-height: 1.8;
}

.policy-header p,
.policy-section p,
.policy-section li {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.08;
}

.policy-stack {
  display: grid;
  gap: 10px;
}

.policy-list {
  margin: 0;
  padding-left: 28px;
  display: grid;
  gap: 8px;
}

.policy-note {
  color: var(--brown);
}

.policy-inline-link {
  text-decoration: underline;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 260ms steps(4), transform 260ms steps(4);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scroll-track {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1100px) {
  .hero,
  .game-layout,
  .feature-grid,
  .studio-grid,
  .level-grid {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .pixel-page {
    width: min(100vw - 20px, 100%);
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .pixel-nav {
    width: 100%;
  }

  .pixel-nav a,
  .pixel-button {
    width: 100%;
    text-align: center;
  }

  .cartridge-card {
    grid-template-columns: 1fr;
  }

  .cartridge-card img {
    width: 128px;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
