:root {
  --ink: #17151f;
  --night: #201533;
  --cabinet: #2a2438;
  --panel: #f6f0df;
  --paper: #fff8e8;
  --cyan: #00c2d1;
  --mint: #2bd983;
  --pink: #ff4f81;
  --amber: #f9b33d;
  --violet: #7c5cff;
  --shadow: rgba(18, 13, 30, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 194, 209, 0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 79, 129, 0.08) 1px, transparent 1px),
    #f4ead1;
  background-size: 32px 32px;
  font-family: "Courier New", Courier, monospace;
  line-height: 1.45;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(16px, 5vw, 56px);
  color: var(--paper);
  background: rgba(32, 21, 51, 0.96);
  border-bottom: 4px solid var(--amber);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.1;
  text-transform: uppercase;
}

.brand small {
  color: #c6ffe3;
  font-size: 0.72rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--night);
  background: var(--mint);
  border: 3px solid var(--paper);
  box-shadow: 4px 4px 0 var(--pink);
  font-weight: 900;
}

.topnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topnav a {
  color: var(--paper);
  text-decoration: none;
  padding: 8px 10px;
  border: 2px solid transparent;
}

.topnav a:hover,
.topnav a:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  min-height: calc(100svh - 72px);
  padding: clamp(24px, 5vw, 64px) clamp(16px, 5vw, 56px) 32px;
}

.hero-copy {
  max-width: 680px;
}

.kicker {
  margin: 0 0 10px;
  color: #ae234e;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 7vw, 5.75rem);
  line-height: 0.95;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 4vw, 3.25rem);
  line-height: 1;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.hero-copy p:not(.kicker),
.roadmap-section p {
  max-width: 58ch;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.cabinet {
  position: relative;
  width: min(100%, 880px);
  justify-self: center;
  padding: clamp(10px, 2vw, 18px);
  background: var(--cabinet);
  border: 6px solid var(--ink);
  box-shadow: 12px 12px 0 var(--shadow), inset 0 0 0 4px #514462;
}

.cabinet::before {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 2px dashed rgba(246, 240, 223, 0.28);
}

.cabinet-screen {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: #0c0a16;
  border: 5px solid #13101d;
  box-shadow: inset 0 0 0 4px #40394d;
}

#game-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  image-rendering: pixelated;
  background: #101320;
}

.cabinet-controls {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
}

.icon-btn,
.action-btn {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 42px;
  color: var(--paper);
  background: #3d3150;
  border: 3px solid #151020;
  box-shadow: 0 4px 0 #151020;
}

.icon-btn:hover,
.icon-btn:focus-visible,
.action-btn:hover,
.action-btn:focus-visible {
  background: var(--cyan);
  color: var(--night);
  outline: none;
}

.action-btn {
  min-width: 70px;
  background: var(--pink);
  font-weight: 900;
}

.games-section,
.roadmap-section {
  padding: 54px clamp(16px, 5vw, 56px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 22px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-height: 410px;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
}

.game-card.is-locked {
  filter: saturate(0.65);
}

.mini-scene {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  background: #18213a;
  border-bottom: 4px solid var(--ink);
}

.mini-runner {
  background:
    linear-gradient(#25203b 0 24%, #d7b56b 24% 67%, #2a2e38 67% 100%);
}

.pixel-sun,
.pixel-road,
.pixel-runner,
.pixel-slip,
.maze-wall,
.maze-chip,
.maze-player,
.tease-box,
.tease-light {
  position: absolute;
  display: block;
}

.pixel-sun {
  top: 18px;
  right: 38px;
  width: 62px;
  height: 12px;
  background: var(--paper);
  box-shadow: inset 10px 3px 0 var(--amber);
}

.pixel-road {
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  background:
    repeating-linear-gradient(90deg, #1c1f27 0 3px, transparent 3px 54px),
    repeating-linear-gradient(90deg, #2a2e38 0 54px, #343945 54px 108px);
}

.mini-runner::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 42px;
  height: 86px;
  background: repeating-linear-gradient(
    90deg,
    #b9484a 0 52px,
    #7d3a3e 52px 64px,
    #d7b56b 64px 88px
  );
}

.pixel-runner {
  left: 48px;
  bottom: 34px;
  width: 26px;
  height: 42px;
  background: var(--pink);
  box-shadow:
    8px -12px 0 #ffe0a8,
    8px 34px 0 #111,
    24px 34px 0 #111,
    26px 6px 0 #00c2d1;
}

.pixel-slip {
  right: 54px;
  bottom: 44px;
  width: 28px;
  height: 30px;
  background: var(--paper);
  box-shadow: 0 -8px 0 var(--pink), -18px 8px 0 #24202e;
}

.mini-maze {
  background: #101320;
}

.mini-maze::before {
  content: "";
  position: absolute;
  inset: 16px;
  background:
    linear-gradient(var(--cyan), var(--cyan)) 0 0 / 100% 8px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 0 100% / 100% 8px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 0 0 / 8px 100% no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 100% 0 / 8px 100% no-repeat;
}

.maze-wall {
  background: var(--violet);
}

.wall-a {
  left: 64px;
  top: 50px;
  width: 120px;
  height: 10px;
}

.wall-b {
  right: 52px;
  bottom: 54px;
  width: 10px;
  height: 70px;
}

.maze-chip {
  width: 14px;
  height: 14px;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(249, 179, 61, 0.22);
}

.chip-a {
  top: 36px;
  right: 96px;
}

.chip-b {
  left: 82px;
  bottom: 36px;
}

.maze-player {
  left: 56px;
  top: 76px;
  width: 24px;
  height: 24px;
  background: var(--mint);
  box-shadow: 24px 24px 0 var(--pink);
}

.mini-space {
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(0, 194, 209, 0.16) 22px 24px),
    #101320;
}

.space-star,
.space-door,
.space-console,
.space-janitor,
.bounce-brick,
.bounce-ball,
.bounce-paddle,
.dodge-lane,
.dodge-token,
.dodge-player,
.chase-floor,
.chase-pass,
.chase-player,
.chase-hazard {
  position: absolute;
  display: block;
}

.space-star {
  width: 8px;
  height: 8px;
  background: var(--paper);
}

.star-a {
  top: 24px;
  left: 42px;
  box-shadow: 74px 32px 0 var(--amber), 188px 20px 0 var(--mint), 264px 78px 0 var(--paper);
}

.star-b {
  right: 58px;
  bottom: 38px;
  box-shadow: -92px -18px 0 var(--cyan), -168px 20px 0 var(--pink);
}

.space-door {
  right: 42px;
  top: 42px;
  width: 46px;
  height: 86px;
  background: #2f67a0;
  border: 8px solid var(--cyan);
}

.space-console {
  left: 108px;
  bottom: 34px;
  width: 78px;
  height: 38px;
  background: #3d3150;
  border-top: 10px solid var(--amber);
}

.space-janitor {
  left: 58px;
  bottom: 38px;
  width: 24px;
  height: 38px;
  background: var(--mint);
  box-shadow: 0 -14px 0 #ffe0a8, 24px 12px 0 var(--pink), 8px 38px 0 #111;
}

.mini-bounce {
  background: #15243a;
}

.bounce-brick {
  top: 28px;
  width: 88px;
  height: 18px;
  background: var(--pink);
}

.brick-a {
  left: 42px;
  box-shadow: 104px 0 0 var(--amber), 208px 0 0 var(--mint);
}

.brick-b {
  left: 96px;
  top: 58px;
  background: var(--cyan);
  box-shadow: 104px 0 0 var(--violet);
}

.bounce-ball {
  left: 178px;
  top: 96px;
  width: 18px;
  height: 18px;
  background: var(--paper);
}

.bounce-paddle {
  left: 132px;
  bottom: 28px;
  width: 112px;
  height: 16px;
  background: var(--pink);
  box-shadow: 0 8px 0 var(--amber);
}

.mini-dodge {
  background:
    repeating-linear-gradient(90deg, #111629 0 54px, #17213d 54px 108px);
}

.dodge-lane {
  top: 0;
  bottom: 0;
  width: 6px;
  background: rgba(0, 194, 209, 0.55);
}

.lane-a {
  left: 34%;
}

.lane-b {
  left: 66%;
}

.dodge-token {
  top: 36px;
  left: 48%;
  width: 22px;
  height: 22px;
  background: var(--amber);
  box-shadow: 0 48px 0 var(--mint), 92px 18px 0 var(--pink);
}

.dodge-player {
  left: 45%;
  bottom: 28px;
  width: 38px;
  height: 42px;
  background: var(--cyan);
  box-shadow: 12px -14px 0 #ffe0a8, 24px 20px 0 var(--pink);
}

.mini-chase {
  background: #1a2832;
}

.chase-floor {
  inset: 22px;
  border: 8px solid var(--cyan);
  box-shadow: inset 0 0 0 8px #101320;
}

.chase-pass {
  right: 56px;
  top: 42px;
  width: 28px;
  height: 24px;
  background: var(--paper);
  box-shadow: 0 -8px 0 var(--pink);
}

.chase-player {
  left: 64px;
  bottom: 46px;
  width: 28px;
  height: 28px;
  background: var(--mint);
}

.chase-hazard {
  right: 96px;
  bottom: 54px;
  width: 28px;
  height: 28px;
  background: var(--pink);
  box-shadow: -84px -44px 0 var(--amber);
}

.mini-tease {
  background:
    linear-gradient(135deg, #112d35 0 50%, #3c2445 50% 100%);
}

.tease-box {
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  transform: translate(-50%, -50%);
  background: var(--paper);
  border: 8px solid var(--ink);
}

.tease-light {
  left: calc(50% - 8px);
  top: 40px;
  width: 16px;
  height: 16px;
  background: var(--pink);
  box-shadow: 0 28px 0 var(--mint), 0 56px 0 var(--amber);
}

.game-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.game-tag {
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 4px 8px;
  color: var(--night);
  background: var(--mint);
  border: 2px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.game-card p {
  margin-bottom: 18px;
}

.play-btn {
  margin-top: auto;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--paper);
  background: var(--night);
  border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--pink);
  font-weight: 900;
}

.play-btn:hover,
.play-btn:focus-visible {
  color: var(--night);
  background: var(--amber);
  outline: none;
}

.play-btn:disabled {
  color: #57515f;
  background: #bdb4a5;
  box-shadow: none;
}

.roadmap-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: center;
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(43, 217, 131, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 194, 209, 0.14) 1px, transparent 1px),
    var(--night);
  background-size: 28px 28px;
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
}

.roadmap-section .kicker {
  color: var(--mint);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px clamp(16px, 5vw, 56px);
  color: var(--paper);
  background: #151020;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    max-width: 760px;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: auto;
  }

  .roadmap-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    justify-content: flex-start;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .hero {
    padding-top: 28px;
  }

  .cabinet {
    border-width: 4px;
    box-shadow: 6px 6px 0 var(--shadow);
  }

  .cabinet-controls {
    gap: 8px;
  }

  .icon-btn {
    min-width: 40px;
  }

  .action-btn {
    min-width: 54px;
  }
}
