:root {
  --bg: #0b0c1b; --page-bg: #0b0c1b; --panel: #11132a; --panel-2: #161936; --line: #23264a;
  --ink: #fff; --muted: #9a9cbd; --faint: #5e6184; --cyan: #5ef2ff; --sun: #ff8a40; --amber: #ffd166; --go: #4dff9a;
  --font: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); padding: 0 16px; overflow-x: clip; }
[hidden] { display: none !important; }
a { color: inherit; }
.wrap { max-width: 1040px; margin: 0 auto; }
.eyebrow { font: 500 11.5px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.hero { position: relative; padding: 36px 0 20px; display: flex; flex-direction: column; gap: 10px; }
/* a little of the game's horizon behind the title: violet, then the sun's orange, very low */
.hero::before { content: ""; position: absolute; inset: -40px 0 -20px 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 60% 70% at 18% 95%, rgba(255,138,82,.2), transparent 70%), radial-gradient(ellipse 70% 80% at 60% 40%, rgba(90,60,160,.3), transparent 70%); filter: blur(12px); }
.hero h1 { margin: 0; font-size: clamp(40px, 8vw, 64px); letter-spacing: .08em; font-weight: 700; line-height: 1; }
/* the title: SKY light, in the sky's cyan going violet; HOOK heavy and white. A faint haze under it, like the sister pages */
.logo { filter: drop-shadow(0 6px 24px rgba(94,242,255,.18)); }
.logo .sky { font-weight: 400; letter-spacing: .1em; background: linear-gradient(100deg, var(--cyan) 20%, #9fd8ff 60%, #b9a6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 0; color: var(--muted); font-size: 17px; max-width: 48ch; }
.btn { appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 700 14px var(--font); letter-spacing: .03em; cursor: pointer; }
.btn.go { background: var(--ink); color: #000; border-color: var(--ink); }
.btn.go span { color: #666; font: 500 12px var(--mono); }
.btn:hover { filter: brightness(1.1); }

/* the stage: the picture, and a thin layer of type over it */
.stage { position: relative; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #1a1538; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; box-shadow: 0 40px 90px -50px rgba(80, 50, 170, .7), 0 0 0 1px rgba(255,255,255,.02) inset; }
.floor { position: relative; height: min(585px, 82vh); min-height: 300px; }
.floor canvas { width: 100%; height: 100%; display: block; }
.floor.failed::after { content: "3D didn't load here."; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.stage.idle .hl, .stage.idle .hr { opacity: 0; }
.hud { position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; padding: 16px 18px; pointer-events: none; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.hl { display: flex; flex-direction: column; gap: 2px; }
.hl b { font: 700 34px/1 var(--font); letter-spacing: .02em; }
.hl span { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); transition: color .2s; }
.hl span.hot { color: var(--cyan); }
.hr { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.hr b { font: 700 34px/1 var(--font); letter-spacing: .02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stage.zone .hr b { color: #ffd166; text-shadow: 0 0 16px rgba(255,140,40,.8), 0 2px 14px rgba(0,0,0,.6); }
.tape { display: inline-block; font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #1a1020; background: #f2efe2; padding: 6px 10px; border-radius: 4px; }
/* the chain: under the tape, the count, the last move, and a bar draining through the four seconds you have */
.hm { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chain { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 4px 10px 6px; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; pointer-events: none; }
.chain.on { opacity: 1; transform: none; }
.chain b { font: 700 26px/1 var(--font); color: #ffd166; text-shadow: 0 0 14px rgba(255,140,40,.8), 0 2px 10px rgba(0,0,0,.7); }
.chain span { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.85); text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.chain i { position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: #ffd166; transform-origin: left; box-shadow: 0 0 8px rgba(255,140,40,.8); }
.chain.up b { animation: chainup .35s cubic-bezier(.2,.9,.3,1.4); }
@keyframes chainup { 0% { transform: scale(1.6); } 100% { transform: none; } }
.chain.broke b, .chain.broke i { color: #ff7a6a; background: #ff7a6a; text-shadow: none; box-shadow: none; }
.hint { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font: 500 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.75); text-shadow: 0 2px 14px rgba(0,0,0,.6); opacity: 0; transition: opacity .3s; pointer-events: none; }
.hint.on { opacity: 1; }
.pop { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -100%); font: 700 20px var(--font); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; opacity: 0; white-space: nowrap; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.pop.show { animation: rise .9s ease forwards; }
.pop.good { color: var(--cyan); } .pop.warn { color: #ff7a6a; } .pop.fire { color: #ffd166; text-shadow: 0 0 18px rgba(255,140,40,.9), 0 2px 12px rgba(0,0,0,.8); }
.pop.big { font-size: 34px; letter-spacing: .1em; }
.pop.big.show { animation: slam .9s cubic-bezier(.2,.9,.3,1.2) forwards; }
@keyframes slam { 0% { opacity: 0; transform: translate(-50%, -90%) scale(2.2) skewX(-8deg); } 15% { opacity: 1; transform: translate(-50%, -100%) scale(1) skewX(-8deg); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -150%) scale(1.05) skewX(-8deg); } }
/* the zone: the numbers run hot */
.stage.zone .hl b, .stage.zone .hl span { color: #ffd166; text-shadow: 0 0 16px rgba(255,140,40,.8), 0 2px 14px rgba(0,0,0,.6); }
.stage.zone .tape { background: #ffd166; color: #2a1200; animation: tapePulse 1s ease-in-out infinite; }
@keyframes tapePulse { 0%, 100% { box-shadow: 0 0 0 rgba(255,140,40,0); } 50% { box-shadow: 0 0 22px rgba(255,140,40,.8); } }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, -90%); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -170%); } }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .3s ease-out; }
@keyframes flash { 0% { opacity: .35; } 100% { opacity: 0; } }
.fade { position: absolute; inset: 0; background: #0a0d24; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.fade.on { opacity: .55; }
/* the start and the result sit over the picture: a few words and two buttons, nothing boxed */
.start, .result { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; z-index: 4; text-align: center; text-shadow: 0 2px 18px rgba(0,0,0,.7); background: radial-gradient(ellipse at 50% 55%, rgba(8,10,30,.55), rgba(8,10,30,.1) 70%); }
.result h2 { margin: 0; font-size: 72px; line-height: 1; letter-spacing: .02em; }
.result p { margin: 0; color: rgba(255,255,255,.8); font-size: 14.5px; }
.result .eyebrow { color: rgba(255,255,255,.7); }
.keys { margin: 0; color: rgba(255,255,255,.75); font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.keys kbd { font: inherit; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; padding: 1px 6px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 4px 0; }
.btn { box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.below { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; padding: 8px 2px 0; }
@media (pointer: coarse) { .btn.go span { display: none; } }
.link { appearance: none; background: none; border: 0; color: var(--muted); font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; padding: 4px 0; }
.link:hover { color: var(--ink); }
.how { padding: 40px 0 10px; }
.how h2 { margin: 0; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
/* three cards, each with a glyph in the game's own colours: cyan for your gear, amber for the city, green for go */
.cols > div { background: linear-gradient(to bottom, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; }
.cols svg { display: block; width: 44px; height: 44px; margin-bottom: 12px; }
.cols h3 { margin: 0 0 6px; font-size: 16px; }
.cols p { margin: 0; color: var(--muted); font-size: 14.5px; }
.cols kbd { font: 500 12px var(--mono); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0 36px; color: var(--faint); font: 500 12px/1.7 var(--mono); letter-spacing: .06em; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.line-note { margin: 14px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--muted); font-size: 14px; line-height: 1.55; }
.line-note b { color: var(--ink); font-weight: 700; }

@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } .floor { height: min(460px, 82vh); } }
@media (max-width: 560px) {
  .below .eyebrow { visibility: hidden; }
  .floor { height: 62vh; min-height: 380px; }
  .hl b, .hr b { font-size: 26px; }
  .hud { padding: 12px 14px; }
  .result h2 { font-size: 52px; }
  .keys { font-size: 11px; padding: 0 12px; }
}
/* a phone on its side: a short header, so the city is on screen */
@media (max-height: 520px) { .hero { padding: 10px 0 8px; gap: 4px; } .hero h1 { font-size: 28px; } .lede { font-size: 13px; } .studio-bar { padding-top: 6px; padding-bottom: 6px; } .floor { height: 70vh; min-height: 240px; } }
@media (prefers-reduced-motion: reduce) { .pop.show, .flash.go, .stage.zone .tape, .chain.up b { animation: none; } .pop.show { opacity: 1; } .fade { transition: none; } }
