/* hurb: the sky is the page. Fonts: Archivo Black + Archivo (OFL), JetBrains Mono (OFL) for the address only. */
@font-face { font-family: "Archivo Black"; src: url("/fonts/archivo-black.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #5E8CEB; --ink: #fff; --accent: #FFB03A;
  --stencil: #1B1B1F; --nose: #C2281E; --paper: #26262b;
  --font-display: "Archivo Black", Impact, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
html, body { height: 100%; overflow: hidden; }
body { background: linear-gradient(#2F62DA, #5E8CEB 55%, #BFD8F8); overscroll-behavior: none; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; cursor: grab; }
body.flying #sky:active { cursor: grabbing; }

/* ---- the rocket's own paint: everything below is in rocket pixels (1512 x 596), scaled by the camera ---- */
.hull { --k: 1; position: fixed; left: 0; top: 0; width: calc(1512px * var(--k)); height: calc(596px * var(--k)); transform-origin: 0 0; pointer-events: none; z-index: 2; opacity: 0; }
body.ready .hull { opacity: 1; transition: opacity .3s ease-out; }
.hull a, .hull button, .hull code { pointer-events: auto; }
.hull :focus-visible { outline: max(3px, calc(6px * var(--k))) solid var(--accent); outline-offset: max(3px, calc(6px * var(--k))); }

.tick { position: absolute; left: calc(118px * var(--k)); top: calc(176px * var(--k)); width: calc(250px * var(--k)); margin: 0; text-align: center;
  font: max(16px, calc(50px * var(--k)))/1 var(--font-display); color: var(--stencil); opacity: .86; mix-blend-mode: multiply; letter-spacing: -.01em; }

.roundel { position: absolute; top: calc(135px * var(--k)); width: calc(140px * var(--k)); height: calc(140px * var(--k)); margin-left: calc(-70px * var(--k)); border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  text-decoration: none; color: var(--stencil); transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.roundel.r1 { left: calc(460px * var(--k)); } .roundel.r2 { left: calc(729px * var(--k)); } .roundel.r3 { left: calc(999px * var(--k)); }
.roundel img { width: calc(76px * var(--k)); height: calc(76px * var(--k)); object-fit: contain; align-self: center; }
.roundel span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.roundel:hover { transform: scale(1.08); }
.roundel:active { transform: scale(.94); transition-duration: .035s; }
.roundel.is-off { opacity: .5; }

.panel { position: absolute; left: calc(284px * var(--k)); top: calc(304px * var(--k)); width: calc(838px * var(--k)); height: calc(92px * var(--k)); display: flex; align-items: center; }
.panel code { flex: 1; padding: 0 calc(12px * var(--k)) 0 calc(18px * var(--k)); letter-spacing: -.03em; font: 500 max(16px, calc(40px * var(--k)))/1.02 var(--font-mono); color: var(--stencil); opacity: .9;
  letter-spacing: -.01em; text-transform: none; cursor: text; }
.panel code:empty::before, .panel code.is-off { content: ""; }
.copy { flex: none; width: calc(214px * var(--k)); height: calc(92px * var(--k)); min-height: 0; padding: 0; border: 0; border-left: calc(4px * var(--k)) dashed rgba(27,27,31,.35);
  background: none; color: var(--nose); font: max(16px, calc(40px * var(--k)))/1 var(--font-display); text-transform: uppercase; cursor: pointer;
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), color .2s; }
.copy:hover { transform: scale(1.06); }
.copy:active { transform: scale(.94); transition-duration: .035s; }

.band { position: absolute; left: calc(300px * var(--k)); top: calc(410px * var(--k)); width: calc(850px * var(--k)); margin: 0; text-align: center;
  font: max(16px, calc(28px * var(--k)))/1 var(--font-display); text-transform: uppercase; color: var(--stencil); opacity: .75; mix-blend-mode: multiply; white-space: nowrap; }

.nose { position: absolute; left: calc(1196px * var(--k)); top: calc(140px * var(--k)); width: calc(300px * var(--k)); height: calc(316px * var(--k)); display: flex; align-items: center;
  padding-left: calc(30px * var(--k)); text-decoration: none; border-radius: 0 50% 50% 0 / 0 50% 50% 0; }
.nose span { font: max(16px, calc(44px * var(--k)))/1 var(--font-display); text-transform: uppercase; color: #fff; opacity: .92; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.nose:hover span { transform: translateX(calc(10px * var(--k))); }

/* small camera (phones): the paint gets bigger letters, fewer words */
.hull.small .band { font-size: max(16px, calc(46px * var(--k))); top: calc(404px * var(--k)); }
.hull.small .band .more { display: none; }
.hull.small .panel code { font-size: max(16px, calc(42px * var(--k))); }
.hull.small .copy { font-size: max(16px, calc(40px * var(--k))); }
/* portrait crop shows the nose, not the tail: the ticker and Copy move onto the lower band, the address takes the whole panel */
.hull.crop .tick { display: none; }

/* flight counter, the only interface the game has */
.hud { position: fixed; left: max(20px, env(safe-area-inset-left)); top: max(16px, env(safe-area-inset-top)); margin: 0; z-index: 3;
  font: clamp(22px, 2.2vw, 34px)/1 var(--font-display); color: #fff; text-shadow: 0 2px 0 rgba(27,40,90,.35); pointer-events: none; font-variant-numeric: tabular-nums; }

/* ---- orbit: photo prints floating in zero g ---- */
.prints { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.print { position: absolute; left: 0; top: 0; width: clamp(170px, 15vw, 270px); aspect-ratio: 348 / 395; padding: 0; border: 0; min-height: 0;
  background: url("/img/s/print.webp") center / 100% 100% no-repeat; cursor: grab; pointer-events: auto; touch-action: none;
  filter: drop-shadow(0 10px 14px rgba(5,10,40,.35)); }
.print.held { cursor: grabbing; }
.print .photo { position: absolute; left: 7.2%; top: 7.1%; width: 85.6%; height: 71.6%; object-fit: cover; pointer-events: none; }
.print .cap { position: absolute; left: 5%; right: 5%; top: 78.5%; bottom: 0; display: grid; place-items: center; text-align: center;
  font: 700 clamp(16px, 1.15vw, 20px)/1 var(--font-body); text-transform: uppercase; color: var(--paper); pointer-events: none; }
.print:focus-visible { outline: 4px solid var(--accent); }

.viewer { width: min(88vw, calc(80vh * 348 / 395)); aspect-ratio: 348 / 395; padding: 0; border: 0; overflow: visible;
  background: url("/img/s/print.webp") center / 100% 100% no-repeat; color: var(--paper); }
.viewer::backdrop { background: rgba(8, 16, 60, .4); }
.viewer[open] { animation: pop .3s cubic-bezier(.3,1.4,.5,1); }
@keyframes pop { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
.viewer .big { position: absolute; left: 7.2%; top: 7.1%; width: 85.6%; height: 71.6%; object-fit: cover; }
.viewer .cap { position: absolute; left: 7%; right: 7%; top: 79.5%; margin: 0; text-align: center; font: 700 clamp(16px, 2.4vh, 24px)/1.1 var(--font-body); text-transform: uppercase; }
.viewer .acts { position: absolute; left: 7%; right: 7%; bottom: 2.5%; display: flex; justify-content: center; gap: 10%; }
.viewer .acts a, .viewer .acts button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; border: 0; background: none;
  font: clamp(16px, 2.2vh, 22px)/1 var(--font-display); text-transform: uppercase; color: var(--nose); text-decoration: none; cursor: pointer; }
.viewer .acts img { width: 22px; height: 22px; }
.viewer .shut { position: absolute; right: 1%; top: 0; width: 48px; height: 48px; min-height: 0; padding: 0; border: 0;
  background: none; color: var(--paper); font: 34px/1 var(--font-display); cursor: pointer; }

/* ---- 404: the sky where he got stuck ---- */
body.lost { --u: calc(max(100vw, 177.78vh) / 100); }
.stage { position: fixed; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(56.25vw, 100vh); transform: translate(-50%, -50%); }
.plate { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.smoke { position: absolute; left: 6%; top: 4%; margin: 0; color: #fff; font: calc(var(--u) * 12)/1 var(--font-display);
  text-shadow: 0 0 calc(var(--u) * .6) #fff, 0 0 calc(var(--u) * 1.6) rgba(255,255,255,.8); filter: blur(.6px); letter-spacing: .02em;
  transform: rotate(-4deg); }
.smoke.small { top: 21%; left: 6.5%; font-size: calc(var(--u) * 2.6); }
.legs { position: absolute; left: 34%; top: 54%; width: 22%; height: 40%; display: flex; align-items: flex-end; justify-content: center; text-decoration: none; }
.legs span { white-space: nowrap; color: #fff; font: calc(var(--u) * 1.6)/1.1 var(--font-display); text-transform: uppercase; text-shadow: 0 0 10px #fff, 0 2px 0 rgba(27,40,90,.3); padding-bottom: 4%; }
.legs:hover span { text-decoration: underline; }
@media (orientation: portrait) {
  .smoke { left: 50%; top: 6%; transform: translateX(-50%) rotate(-4deg); font-size: calc(var(--u) * 5.5); }
  .smoke.small { left: 50%; top: 17%; font-size: calc(var(--u) * 1.3); white-space: nowrap; }
  .legs span { font-size: calc(var(--u) * 1.15); }
}
@media (prefers-reduced-motion: reduce) { .viewer[open] { animation: none; } }

.band .bt { display: none; }
.hull.crop .band { display: flex; justify-content: space-between; align-items: center; gap: 12px; left: calc(300px * var(--k)); width: calc(610px * var(--k)); top: calc(404px * var(--k)); height: calc(56px * var(--k)); }
.hull.crop .band .bt { display: inline; }
.hull.crop .panel .copy { font-size: max(16px, calc(40px * var(--k))); position: absolute; left: calc(640px * var(--k)); top: calc(130px * var(--k)); transform: translateY(-50%); width: calc(200px * var(--k)); height: max(44px, calc(56px * var(--k))); border-left: 0; }
.hull.crop .panel code { padding: 0 calc(16px * var(--k)); font-size: max(13px, calc(42px * var(--k))); line-height: 1; letter-spacing: -.04em; }
@media (max-width: 359px) { .hull.crop .band .hint { display: none; } }
.hull.crop .panel .copy:hover { transform: translateY(-50%) scale(1.06); }
.hull.crop .panel .copy:active { transform: translateY(-50%) scale(.94); }
.band .short { display: none; }
.hull.crop .band .long { display: none; }
.hull.crop .band .short { display: inline; }

/* v2: the stencils are painted into the rocket texture; the nose is a hotspot over the painted label */
.nose:focus-visible { outline-offset: -6px; }
.roundel img { mix-blend-mode: multiply; }
/* a moment: a moving print slides in from the corner, then drops away */
.snap { position: fixed; left: max(18px, env(safe-area-inset-left)); bottom: 18px; z-index: 3; margin: 0; width: clamp(150px, 15vw, 230px); aspect-ratio: 348 / 395;
  background: url("/img/s/print.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 10px 14px rgba(5,10,40,.35));
  transform: translate(-130%, 0) rotate(-14deg); pointer-events: none; }
.snap img { position: absolute; left: 7.2%; top: 7.1%; width: 85.6%; height: 71.6%; object-fit: cover; }
.snap .cap { position: absolute; left: 5%; right: 5%; top: 79%; bottom: 0; display: grid; place-items: center; text-align: center;
  font: 700 clamp(13px, 1vw, 17px)/1 var(--font-body); text-transform: uppercase; color: var(--paper); }
.snap.in { transform: translate(0, 0) rotate(-6deg); transition: transform .45s cubic-bezier(.2,1.4,.4,1); }
.snap.out { transform: translate(-10%, 140%) rotate(18deg); transition: transform .6s cubic-bezier(.5,0,.8,.4); }
