:root {
  --paper: #F4F2EC;
  --ink: #131313;
  --night: #161616;
  --muted: #6E6C66;
  --volt: #E4FF3A;
  --flare: #FF5B2E;
  --sky: #3D5AFE;
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--volt); color: var(--ink); }
:focus-visible { outline: 2px solid var(--flare); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--volt); color: var(--ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Wordmark ---------- */
.wordmark { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 800; letter-spacing: -0.045em; font-size: 21px; line-height: 1; }
.wordmark .stone { width: .32em; height: .32em; border-radius: 50%; background: var(--volt); border: 2px solid currentColor; transition: transform .4s var(--ease-pop); }
.wordmark:hover .stone { transform: translate(4px, -10px) scale(1.15); }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav { display: flex; gap: 6px; font-size: 14px; font-weight: 500; }
.nav a { padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s, transform .25s var(--ease-pop); }
.nav a:hover { background: var(--ink); color: var(--paper); transform: rotate(-3deg); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--volt); }
.on-dark .site-header { color: var(--paper); background: var(--night); }
.on-dark .nav a:hover { background: var(--paper); color: var(--ink); }
.on-dark .nav a[aria-current="page"] { background: var(--volt); color: var(--ink); }

/* ---------- Type helpers ---------- */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.display { font-weight: 800; letter-spacing: -0.055em; line-height: .88; margin: 0; font-size: clamp(52px, 9vw, 148px); }
.display .serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.02em; }
.lede { font-size: clamp(18px, 1.7vw, 23px); line-height: 1.4; max-width: 30ch; margin: 0; }

/* ---------- HERO (playable) ---------- */
.hero {
  position: relative; background: var(--night); color: var(--paper);
  min-height: max(640px, calc(100svh - 72px));
  overflow: hidden; display: flex; flex-direction: column;
  user-select: none; -webkit-user-select: none;
}
.hero::before { /* faint grid = playfield */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: linear-gradient(var(--paper) 1px, transparent 1px), linear-gradient(90deg, var(--paper) 1px, transparent 1px);
  background-size: 64px 64px;
}
.hero-copy { position: relative; z-index: 2; padding-top: clamp(24px, 5vw, 64px); display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--gutter); align-items: end; }
.hero-copy .lede { color: #BDBAB2; justify-self: end; }
.hero-copy .lede strong { color: var(--paper); font-weight: 500; }
.hero .display .serif { color: var(--volt); }

.hud {
  position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: clamp(20px, 3vw, 36px); color: #8E8B83;
}
.hud .score { color: var(--volt); }
.hud .hint { display: inline-flex; align-items: center; gap: 10px; }
.hud .hint i { width: 8px; height: 8px; border-radius: 50%; background: var(--flare); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.arena { position: relative; flex: 1; min-height: 240px; }
.giant {
  position: absolute; left: var(--gutter); bottom: 0; margin: 0;
  font-weight: 800; letter-spacing: -0.06em; line-height: .74;
  font-size: clamp(64px, 16.5vw, 250px); white-space: nowrap; color: var(--paper);
}
.giant .ch { display: inline-block; transform-origin: 50% 100%; will-change: transform; transition: color .5s; }
.giant .ch.hit { color: var(--volt); transition: none; }
.giant .ch.ko { color: var(--flare); transition: none; }

.sling-band { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.sling-band line { stroke: var(--volt); stroke-width: 2; stroke-linecap: round; }
.sling-post { position: absolute; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--volt); transform: translate(-50%, -50%); z-index: 3; pointer-events: none; }
.ball {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; background: var(--volt); border: 3px solid var(--ink);
  box-shadow: 0 0 0 2px var(--volt); z-index: 4; cursor: grab; touch-action: none; padding: 0;
}
.ball:active { cursor: grabbing; }
.ball::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: .75; top: 4px; left: 6px; }
.dust { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--volt); pointer-events: none; z-index: 3; }

/* ---------- Ticker ---------- */
.ticker { background: var(--volt); color: var(--ink); overflow: hidden; border-block: 3px solid var(--ink); }
.ticker-track { display: flex; width: max-content; animation: tick 30s linear infinite; }
.ticker span { font-weight: 800; letter-spacing: -0.035em; font-size: clamp(22px, 3vw, 40px); padding: 10px 0; white-space: nowrap; display: inline-flex; align-items: center; }
.ticker span::after { content: ""; display: inline-block; width: .5em; height: .5em; background: var(--flare); margin: 0 .7em; transform: rotate(45deg); }
.ticker span:nth-child(3n)::after { background: var(--sky); border-radius: 50%; transform: none; }
.ticker span:nth-child(3n+1)::after { background: var(--ink); border-radius: 50%; transform: none; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 11vw, 160px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(32px, 5vw, 64px); }
.section-head h2 { margin: 0; font-weight: 800; letter-spacing: -0.055em; line-height: .9; font-size: clamp(44px, 7vw, 112px); }
.section-head h2 .serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.02em; }

.intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--gutter); align-items: end; }
.intro .big { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.8vw, 76px); line-height: 1; letter-spacing: -0.02em; margin: 0; }
.intro .big em { background: var(--volt); padding: 0 .1em; }
.intro p.copy { margin: 0; max-width: 40ch; font-size: clamp(17px, 1.4vw, 20px); color: #3D3B37; }

/* Sticker tiles */
.tiles { list-style: none; padding: 0; margin: clamp(48px, 7vw, 96px) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); }
.tile {
  position: relative; padding: clamp(22px, 2.4vw, 34px); border: 3px solid var(--ink); border-radius: 22px;
  min-height: clamp(240px, 24vw, 340px); display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 6px 6px 0 var(--ink); transition: transform .35s var(--ease-pop), box-shadow .35s var(--ease-pop);
}
.tile:nth-child(1) { background: var(--volt); transform: rotate(-1.5deg); }
.tile:nth-child(2) { background: var(--flare); transform: rotate(1deg) translateY(14px); }
.tile:nth-child(3) { background: var(--sky); color: #fff; transform: rotate(-.8deg); }
.tile:hover { transform: rotate(0) translateY(-6px); box-shadow: 10px 12px 0 var(--ink); }
.tile .n { font-family: var(--mono); font-size: 13px; }
.tile h3 { margin: 0; font-weight: 800; letter-spacing: -0.05em; line-height: .9; font-size: clamp(34px, 3.6vw, 56px); }
.tile p { margin: 10px 0 0; font-size: 16px; max-width: 26ch; }
.tile .glyph { position: absolute; top: clamp(18px, 2vw, 28px); right: clamp(18px, 2vw, 28px); width: 48px; height: 48px; transition: transform .6s var(--ease-pop); }
.tile:hover .glyph { transform: rotate(90deg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; white-space: nowrap;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink); transition: transform .3s var(--ease-pop), background .15s, color .15s;
}
.btn:hover { background: var(--volt); color: var(--ink); transform: rotate(-3deg) scale(1.04); }
.btn span { transition: transform .3s var(--ease-pop); }
.btn:hover span { transform: translateX(4px); }

/* ---------- Game cartridges ---------- */
.games-band { background: var(--night); color: var(--paper); }
.games-band .section-head .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.games-band .section-head .btn:hover { background: var(--volt); border-color: var(--volt); }
.games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); }
.game {
  --c: var(--volt);
  position: relative; border-radius: 22px; background: #242422; padding: 12px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .4s var(--ease-pop);
}
.game:nth-child(3n+2) { --c: var(--flare); }
.game:nth-child(3n+3) { --c: var(--sky); }
.game:hover { transform: translateY(-8px) rotate(-1.2deg); }
.game:nth-child(even):hover { transform: translateY(-8px) rotate(1.2deg); }
.game-art { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--c); display: grid; place-items: center; }
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.game-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.game-meta { display: flex; justify-content: space-between; align-items: center; padding: 2px 8px 0; font-family: var(--mono); font-size: 12px; color: #9C998F; }
.game h3 { margin: 0; padding: 0 8px; font-weight: 800; letter-spacing: -0.04em; font-size: clamp(24px, 2.2vw, 32px); line-height: 1; }
.game p { margin: 0; padding: 0 8px; color: #B3B0A7; font-size: 15px; }
.game .store { margin: 0 8px 8px; align-self: flex-start; }

.game.is-locked .game-art {
  background: radial-gradient(circle, rgba(0,0,0,.2) 1.5px, transparent 2px) 0 0 / 16px 16px, var(--c);
}
.game.is-locked .q { font-weight: 800; font-size: clamp(120px, 13vw, 200px); line-height: 1; color: var(--ink); letter-spacing: -0.06em; transition: transform .5s var(--ease-pop); }
.game.is-locked:hover .q { transform: rotate(14deg) scale(1.08); }
.game.is-locked .sticker {
  position: absolute; top: 14px; left: 14px; background: var(--ink); color: var(--c);
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; transform: rotate(-4deg);
}
.load { padding: 0 8px 10px; }
.load-bar { height: 10px; border-radius: 999px; background: #353531; overflow: hidden; position: relative; }
.load-bar i {
  position: absolute; inset: 0 auto 0 0; width: var(--p, 40%); border-radius: inherit;
  background: repeating-linear-gradient(-45deg, var(--c) 0 6px, rgba(0,0,0,.28) 6px 12px), var(--c);
  background-blend-mode: normal; background-size: 17px 17px; animation: stripes .8s linear infinite;
}
@keyframes stripes { to { background-position: 17px 0; } }
.load-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: #8E8B83; margin-top: 8px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Inner page hero ---------- */
.page-hero { position: relative; padding: clamp(48px, 9vw, 140px) 0 clamp(48px, 7vw, 100px); overflow: hidden; }
.page-hero .eyebrow { display: inline-block; margin-bottom: 28px; background: var(--ink); color: var(--paper); padding: 6px 12px; border-radius: 999px; transform: rotate(-2deg); }
.page-hero .lede { margin-top: 28px; }
.dark-page, .dark-page main { background: var(--night); color: var(--paper); }
.dark-page .page-hero .eyebrow { background: var(--volt); color: var(--ink); }
.dark-page .lede { color: #BDBAB2; }
.dark-page .display .serif { color: var(--volt); }

/* ---------- About ---------- */
.about-body { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--gutter); align-items: start; }
.about-body .copy p { font-size: clamp(20px, 2vw, 28px); line-height: 1.35; letter-spacing: -0.01em; margin: 0 0 1em; max-width: 34ch; }
.about-body .copy p:last-child { margin: 0; }
.badge-stack { position: relative; min-height: 300px; }
.badge {
  position: absolute; display: grid; place-items: center; text-align: center; border-radius: 50%;
  border: 3px solid var(--ink); font-weight: 800; letter-spacing: -0.03em; line-height: 1; box-shadow: 5px 5px 0 var(--ink);
  transition: transform .4s var(--ease-pop); padding: 12px;
}
.badge:hover { transform: rotate(0) scale(1.08) !important; }
.badge.b1 { width: 180px; height: 180px; background: var(--volt); left: 0; top: 0; transform: rotate(-10deg); font-size: 24px; }
.badge.b2 { width: 130px; height: 130px; background: var(--flare); left: 150px; top: 110px; transform: rotate(8deg); font-size: 17px; }
.badge.b3 { width: 100px; height: 100px; background: var(--sky); color: #fff; left: 40px; top: 200px; transform: rotate(-4deg); font-size: 12px; font-family: var(--mono); font-weight: 400; letter-spacing: .04em; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 3px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--paper); box-shadow: 6px 6px 0 var(--ink); }
.facts li { padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.facts li + li { border-left: 3px solid var(--ink); }
.facts li span:first-child { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.facts li span:last-child { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; word-break: break-word; }
.facts a { border-bottom: 2px solid var(--volt); }
.facts a:hover { background: var(--volt); }

/* ---------- Contact ---------- */
.contact-page main { background: var(--volt); }
.mail {
  display: inline-block; margin-top: clamp(36px, 6vw, 80px); position: relative;
  font-weight: 800; letter-spacing: -0.055em; line-height: .95; font-size: clamp(30px, 8vw, 132px);
  word-break: break-word; transition: transform .4s var(--ease-pop);
}
.mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: .08em; background: var(--ink); transform-origin: left; transition: transform .4s var(--ease-pop); }
.mail:hover { transform: rotate(-1.5deg); }
.mail:hover::after { transform: scaleX(.25); }
.copy-row { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.copy-btn { font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; padding: 12px 20px; border-radius: 999px; background: transparent; color: var(--ink); border: 2px solid var(--ink); transition: transform .3s var(--ease-pop), background .15s, color .15s; }
.copy-btn:hover { background: var(--ink); color: var(--volt); transform: rotate(2deg); }
.contact-orbit { position: absolute; right: -4vw; top: 2vw; width: clamp(200px, 32vw, 500px); aspect-ratio: 1; pointer-events: none; z-index: 0; }
.contact-orbit circle { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.contact-orbit .spin { transform-origin: 200px 200px; animation: orbit 9s linear infinite; }
.contact-orbit .spin2 { transform-origin: 200px 200px; animation: orbit 5s linear infinite reverse; }
.contact-orbit .moon { fill: var(--ink); stroke: none; }
.contact-orbit .moon2 { fill: var(--flare); stroke: var(--ink); stroke-width: 2; }
.contact-page .page-hero .wrap { position: relative; z-index: 1; }
@keyframes orbit { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #EDEBE4; padding: clamp(56px, 8vw, 96px) 0 24px; overflow: hidden; }
.site-footer .grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--gutter); }
.site-footer .tag { color: #9B9890; margin: 12px 0 0; font-size: 15px; }
.site-footer h2 { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #8A877F; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.site-footer a { transition: color .15s; }
.site-footer a:hover { color: var(--volt); }
.footer-giant {
  margin: clamp(48px, 7vw, 96px) 0 0; font-weight: 800; letter-spacing: -0.06em; line-height: .78;
  font-size: clamp(60px, 18.5vw, 290px); white-space: nowrap;
  color: #242422; user-select: none;
}
.footer-giant span { display: inline-block; transition: color .2s, transform .4s var(--ease-pop); }
.footer-giant span:hover { color: var(--volt); transform: translateY(-.08em) rotate(-6deg); }
.site-footer .legal { margin-top: 24px; padding-top: 18px; border-top: 1px solid #2E2E2C; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #8A877F; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .games { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 200px; }
  .tile:nth-child(2) { transform: rotate(1deg); }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 3px solid var(--ink); }
}
@media (max-width: 820px) {
  .hero-copy, .intro, .about-body { grid-template-columns: 1fr; }
  .hero-copy .lede { justify-self: start; }
  .site-footer .grid { grid-template-columns: 1fr 1fr; }
  .site-footer .grid > :first-child { grid-column: 1 / -1; margin-bottom: 8px; }
}
@media (max-width: 560px) {
  .games { grid-template-columns: 1fr; }
  .nav { gap: 2px; }
  .nav a { padding: 7px 10px; }
  .wordmark { font-size: 19px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hud .hint span { display: none; }
  .facts { grid-template-columns: 1fr; }
  .facts li + li, .facts li:nth-child(3) { border-left: 0; border-top: 3px solid var(--ink); }
  .ball { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.hero > .wrap { width: 100%; }
.contact-page { background: var(--volt); }
