:root {
  --bg-color: #FFFFFF;
  --ink: #0a0a0a;
  --line: #181815;
  --cream: #f3f0df;
  --signal: #e7ff37;
  --orange: #ff6b26;
  --blue: #6bc6ff;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg-color);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg-color);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(14px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg-color) 92%, transparent);
  border-bottom: 3px solid var(--ink);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 950;
  letter-spacing: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  object-fit: cover;
}

.brand span {
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(8px, 1.8vw, 22px);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 2px;
}

.site-nav a.unlocked::after {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  background: var(--signal);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 11px;
}

.buy-link,
.header-buy,
.solid-cta {
  min-height: 42px;
  padding: 10px 16px;
  background: var(--signal);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 950;
  text-transform: uppercase;
}

.buy-link:hover,
.buy-link:focus-visible,
.header-buy:hover,
.header-buy:focus-visible,
.solid-cta:hover,
.solid-cta:focus-visible,
.overlay-button:hover,
.overlay-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 3px solid var(--ink);
  background: var(--bg-color);
}

.header-buy {
  display: none;
  font-size: 12px;
}

.menu-toggle span {
  width: 20px;
  height: 3px;
  background: var(--ink);
}

main { min-height: 100vh; }

.game-stage {
  min-height: 100svh;
  padding: var(--header-h) 0 0;
  background: var(--bg-color);
}

.game-world {
  position: relative;
  height: calc(100svh - var(--header-h));
  min-height: 560px;
  overflow: hidden;
  background: var(--bg-color);
  touch-action: manipulation;
  user-select: none;
}

.hero-copy {
  position: absolute;
  top: clamp(42px, 8vh, 84px);
  left: clamp(18px, 6vw, 82px);
  z-index: 4;
  width: min(760px, 52vw);
  pointer-events: none;
}

.hero-copy h1 {
  font-size: clamp(48px, 7vw, 104px);
}

.hero-subhead {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 900;
  line-height: 1.05;
}

.hero-body {
  position: absolute;
  left: clamp(18px, 6vw, 82px);
  bottom: 22px;
  z-index: 4;
  width: min(620px, 76vw);
  margin: 0;
  font-size: clamp(12px, 1.15vw, 16px);
  font-weight: 800;
  line-height: 1.3;
  pointer-events: none;
}

.ground-strip {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--ground-y, 62%);
  height: clamp(92px, 16vw, 170px);
  background-image: url("assets/game/sprite_ground_line.png");
  background-size: auto 100%;
  background-repeat: repeat-x;
  background-position: var(--ground-x, 0px) center;
  transform: translateY(-35%);
}

.robot-sprite {
  position: absolute;
  left: var(--robot-x, 58%);
  top: calc(var(--ground-y, 62%) + clamp(28px, 3vw, 40px));
  z-index: 2;
  width: clamp(120px, 15vw, 190px);
  height: clamp(168px, 20.9vw, 265px);
  max-height: 52svh;
  object-fit: contain;
  object-position: bottom center;
  transform: translate(-50%, -100%) translateY(var(--robot-lift, 0px));
  transform-origin: bottom center;
  transition: transform 90ms linear;
  will-change: transform;
  pointer-events: none;
}

.robot-sprite.jump {
  animation: robot-jump 460ms ease-out;
}

@keyframes robot-jump {
  0%, 100% { transform: translate(-50%, -100%) translateY(0); }
  50% { transform: translate(-50%, -100%) translateY(clamp(-180px, -18svh, -132px)); }
}

.hurdle-sprite {
  position: absolute;
  left: var(--hurdle-x, 110%);
  top: var(--ground-y, 62%);
  z-index: 1;
  width: clamp(70px, 9vw, 118px);
  object-fit: contain;
  transform: translate(-50%, -75%);
  pointer-events: none;
  opacity: 0;
}

.hurdle-sprite.visible { opacity: 1; }

.run-prompt {
  position: absolute;
  left: var(--robot-x, 58%);
  top: calc(var(--ground-y, 62%) + 46px);
  z-index: 3;
  width: min(440px, 88vw);
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  font-size: clamp(18px, 3vw, 32px);
  font-weight: 950;
  letter-spacing: 0;
  animation: prompt-pulse 920ms steps(2, jump-none) infinite;
}

@keyframes prompt-pulse {
  50% { opacity: .32; }
}

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg-color) 68%, transparent);
}

.overlay-button {
  border: 4px solid var(--ink);
  background: var(--orange);
  padding: clamp(16px, 3vw, 28px) clamp(22px, 5vw, 56px);
  box-shadow: 5px 5px 0 var(--ink);
  font-size: clamp(34px, 8vw, 92px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: .92;
  text-align: center;
}

.content-section {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(88px, 12vw, 150px) clamp(18px, 6vw, 82px);
  border-top: 4px solid var(--ink);
}

.section-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg-color);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

h1,
h2 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 6rem);
  line-height: .9;
  letter-spacing: 0;
  overflow-wrap: break-word;
  word-break: normal;
  text-transform: uppercase;
}

.section-subhead {
  max-width: 560px;
  margin: 24px 0 0;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.05;
}

.section-body {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 700;
  line-height: 1.35;
}

.cta-row {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(8px, 2vw, 14px);
  margin-top: 30px;
}

.content-section > .cta-row {
  grid-column: 1 / -1;
}

.cta-row a {
  white-space: nowrap;
}

.text-cta {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 3px solid var(--ink);
  background: var(--bg-color);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 950;
  text-transform: uppercase;
}

.character-section {
  grid-template-columns: minmax(0, .9fr) minmax(280px, 1.1fr);
  background:
    linear-gradient(90deg, transparent 0 49%, var(--ink) 49% 50%, transparent 50%),
    var(--cream);
}

.character-art {
  position: relative;
  z-index: 1;
  min-height: 560px;
}

.character-art .headshot {
  position: absolute;
  right: 0;
  top: 0;
  width: min(78%, 560px);
  filter: drop-shadow(8px 8px 0 var(--ink));
}

.character-art .bent {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(38%, 230px);
  filter: drop-shadow(6px 6px 0 var(--ink));
}

.archive-section {
  grid-template-columns: minmax(300px, .95fr) minmax(280px, 1fr);
  background: var(--blue);
}

.archive-section > * {
  min-width: 0;
}

.archive-hero {
  align-self: end;
  filter: drop-shadow(8px 8px 0 var(--ink));
}

.placeholder-grid {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.placeholder-grid div,
.empty-ca {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 3px solid var(--ink);
  background: var(--bg-color);
  box-shadow: 4px 4px 0 var(--ink);
  text-align: center;
  font-weight: 950;
  text-transform: uppercase;
}

.marquee {
  position: relative;
  z-index: 5;
  width: 100%;
  height: clamp(60px, 5vw, 76px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
  color: var(--bg-color);
}

.marquee-track {
  display: flex;
  width: max-content;
  flex: none;
  will-change: transform;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-group {
  flex: none;
  margin: 0;
  padding-right: 1.25em;
  white-space: nowrap;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(22px, 2.1vw, 34px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.marquee-group span {
  display: inline-block;
  padding: 0 .55em;
  color: var(--signal);
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee-track {
    animation-play-state: paused;
  }
}

.image-section {
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  color: var(--bg-color);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.image-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(0,0,0,.82), rgba(0,0,0,.28));
}

.patch-section {
  background-image: url("assets/site/section_bg_press_conference.jpg");
}

.community-section {
  background-image: url("assets/site/section_bg_stadium.jpg");
}

@media (max-width: 1600px) {
  .patch-section {
    background-position: left center;
  }
}

.image-section .eyebrow,
.image-section .text-cta,
.image-section .placeholder-grid div {
  background: var(--bg-color);
  color: var(--ink);
}

.code-block pre {
  max-width: 560px;
  margin: 26px 0 0;
  padding: 22px;
  border: 3px solid var(--bg-color);
  background: rgba(0,0,0,.64);
  overflow-x: auto;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1.45;
}

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

.ca-section { background: var(--cream); }

.empty-ca {
  width: min(100%, 560px);
  min-height: 160px;
  margin-top: 28px;
  background: repeating-linear-gradient(-45deg, var(--bg-color), var(--bg-color) 12px, #ece8d0 12px, #ece8d0 24px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(18px, 6vw, 82px);
  background: var(--ink);
  color: var(--bg-color);
  font-weight: 950;
  text-transform: uppercase;
}

.site-footer p { margin: 0; }

.site-footer div {
  display: flex;
  gap: 16px;
}

.site-footer a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 900px) {
  .character-section,
  .archive-section {
    grid-template-columns: 1fr;
  }

  .character-art { min-height: 440px; }

  .placeholder-grid,
  .community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patch-section {
    background-position: 5% center;
  }

  .community-section {
    background-position: 88% center;
  }
}

@media (max-width: 767px) {
  :root { --header-h: 62px; }

  .site-header {
    gap: 8px;
    padding: 8px 10px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .brand {
    gap: 7px;
  }

  .brand span {
    font-size: 18px;
  }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: var(--bg-color);
    border-bottom: 3px solid var(--ink);
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    min-height: 48px;
    border-bottom: 2px solid var(--ink);
  }

  .site-nav .buy-link {
    display: inline-flex;
    align-self: stretch;
    justify-content: center;
    margin-top: 12px;
    border-bottom: 3px solid var(--ink);
  }

  .menu-toggle {
    display: inline-flex;
    order: 3;
    position: absolute;
    right: max(10px, calc(100vw - 382px + 10px));
    top: 8px;
  }

  .header-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 2;
    position: absolute;
    right: max(64px, calc(100vw - 382px + 64px));
    top: 11px;
    min-height: 38px;
    width: 66px;
    padding: 7px 10px;
    box-shadow: 3px 3px 0 var(--ink);
    font-size: 12px;
    line-height: .95;
    text-align: center;
    white-space: normal;
  }

  .game-world { min-height: 520px; }

  .hero-copy {
    top: 34px;
    width: calc(100% - 36px);
  }

  .hero-copy h1 {
    max-width: 350px;
    font-size: clamp(42px, 14vw, 62px);
  }

  .hero-subhead {
    max-width: 300px;
    margin-top: 12px;
    font-size: 18px;
  }

  .hero-body {
    bottom: 16px;
    width: calc(100% - 36px);
    font-size: 12px;
  }

  .robot-sprite {
    left: 55%;
    width: clamp(108px, 34vw, 148px);
    height: clamp(150px, 47.4vw, 206px);
  }

  .run-prompt {
    left: 50%;
    width: 94vw;
  }

  .hurdle-sprite { width: clamp(66px, 20vw, 92px); }

  .cta-row a {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 12px;
  }

  .marquee-track {
    animation-duration: 36s;
  }

  .patch-section {
    background-position: 10% center;
  }

  .community-section {
    background-position: 78% center;
  }

  .placeholder-grid,
  .community-grid {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .marquee-track {
    animation-duration: 60s !important;
    animation-iteration-count: infinite !important;
  }

  .robot-sprite.jump {
    animation-duration: 460ms !important;
    animation-iteration-count: 1 !important;
  }
}
