/* ==========================================================================
   EXOMOON STUDIO — Brand Manual v1.0 tokens
   Copy rules (No.5 Copy) live in design-system.md.
   ========================================================================== */
@font-face {
  font-family: "PP Supply Sans";
  src: url("assets/fonts/PPSupplySans-Regular.woff2") format("woff2"),
       url("assets/fonts/PPSupplySans-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colors (No.1 Color) */
  --pink: #f18fbb;
  --orange: #ea5231;
  --blue: #5cb5e7;
  --green: #10a651;
  --black: #000000;
  --white: #ffffff;

  /* Semantic */
  --bg: var(--black);
  --surface: #0c0c0c;
  --surface-2: #151515;
  --line: rgba(255, 255, 255, .14);
  --text: #f5f5f5;
  --text-muted: #a3a3a3;

  --font: "PP Supply Sans", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale */
  --fs-label: .8125rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.25rem, 1.05rem + .9vw, 1.75rem);
  --fs-h3: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  --fs-h2: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
  --fs-h1: clamp(3rem, 1.4rem + 4.6vw, 7rem);

  /* Spacing (8pt) */
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(96px, 12vw, 176px);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --header-h: 72px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  word-spacing: .14em; /* PP Supply Sans sets words close together; a little air keeps them apart */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; line-height: .98; letter-spacing: -.02em; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--white); color: var(--black); padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--gutter); }

.label {
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.muted { color: var(--text-muted); }

.c-pink { color: var(--pink); }
.c-orange { color: var(--orange); }
.c-blue { color: var(--blue); }
.c-green { color: var(--green); }
.c-white { color: var(--white); }
.bg-pink { background: var(--pink); }
.bg-orange { background: var(--orange); }
.bg-blue { background: var(--blue); }
.bg-green { background: var(--green); }
.bg-white { background: var(--white); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid var(--white); border-radius: 999px;
  background: var(--white); color: var(--black);
  font: inherit; font-size: .9375rem; text-transform: uppercase; letter-spacing: .06em;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), transform .2s var(--ease-out);
  touch-action: manipulation;
}
.btn:hover { background: var(--pink); border-color: var(--pink); }
.btn:active { transform: scale(.97); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }
/* Game end screen: the two ways on, in brand colors so "skip" is easy to see */
.lander-panel .btn-pink { background: var(--pink); border-color: var(--pink); color: var(--black); }
.lander-panel .btn-blue { background: var(--blue); border-color: var(--blue); color: var(--black); }
.lander-panel .btn-pink:hover, .lander-panel .btn-blue:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .8125rem; }
.btn .i { width: 18px; height: 18px; transition: transform .25s var(--ease-out); }
.btn:hover .i { transform: translate(2px, -2px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo img { width: clamp(150px, 16vw, 210px); height: auto; }
.nav { display: flex; gap: 8px; }
.nav a {
  padding: 10px 14px; text-decoration: none;
  font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted);
  transition: color .2s;
}
.nav a:hover, .nav a.is-active { color: var(--white); }
.nav a.is-active::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--pink); vertical-align: middle; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(40px, 8vh, 96px));
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.hero-grid { display: grid; align-items: center; flex: 1; }
.hero-copy { position: relative; z-index: 1; max-width: 760px; }
/* The first line ("Out-there ideas,", about 7.3 times the font size wide) always stays on one line */
/* Its three lines are set by hand and never break further (Safari's line balancing split "brought back") */
.hero-title { font-size: min(var(--fs-h1), calc((100vw - 32px) / 7.4)); margin: 24px 0 32px; text-wrap: wrap; }
.hero-lede { font-size: var(--fs-lead); line-height: 1.4; max-width: 34ch; color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(16, 166, 81, .2); }

.orbit-system { position: relative; width: min(100%, 520px); aspect-ratio: 1; }
.orbit-system .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-1 { color: var(--blue); opacity: .55; animation: spin 90s linear infinite; }
.planet {
  position: absolute; inset: 37%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffc3dc, var(--pink) 45%, #a3456f 100%);
  box-shadow: 0 0 120px rgba(241, 143, 187, .35);
}
.moon-track { position: absolute; inset: 6%; border-radius: 50%; border: 1px solid var(--line); animation: spin 24s linear infinite; }
.moon { position: absolute; top: 50%; right: -9px; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--orange); }
@keyframes spin { to { transform: rotate(360deg); } }


/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section); }
.section.theme { padding-block: clamp(64px, 8vw, 112px); }

.section-head { display: flex; flex-direction: column; gap: 20px; margin-bottom: clamp(24px, 3vw, 44px); }
.section-title { font-size: var(--fs-h2); }
/* "Always looking up." stays on one line: it shrinks with its column instead of wrapping
   (the text is about 8.2 times as wide as its font size) */
.about-copy { container-type: inline-size; }
#about-title { white-space: nowrap; font-size: min(var(--fs-h2), 100cqi / 8.4); }

/* Project details (used in the project pop-up) */
.project-badge {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3); color: var(--white);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em;
}
.project-title { font-size: var(--fs-h3); }
.project-text { color: var(--text-muted); max-width: 48ch; }

/* About */
/* Text and portrait as one centered composition, middles aligned */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 30vw, 420px);
  gap: clamp(32px, 6vw, 96px); align-items: center;
  max-width: 1120px; margin-inline: auto;
}
.about-statement { font-size: var(--fs-lead); line-height: 1.35; max-width: 32ch; }
.about-text { margin-top: 20px; color: var(--text-muted); max-width: 52ch; }

.founder { margin: 0; }
.founder-photo { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: var(--surface-2); }
.founder-photo video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Contact */
/* Contact: one slim band, headline and line on the left, the address on the right */
.contact.section.theme { padding-block: clamp(48px, 6vw, 80px); }
.contact-band { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 64px; }
.contact-head .section-title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); }
/* "Make contact." stays on one line: on small screens it shrinks to the screen width instead
   (the text is about 6 times as wide as its font size) */
#contact-title { white-space: nowrap; font-size: min(clamp(2rem, 1.4rem + 2.4vw, 3.5rem), (100vw - 2 * var(--gutter)) / 6.3); }
.contact-reach { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.contact-lede { margin-top: 12px; color: var(--text-muted); font-size: 1.125rem; line-height: 1.4; max-width: 40ch; }
.contact-email {
  display: inline-block; margin: 0;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.05;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .4s var(--ease-out), color .3s;
}
.contact-email:hover { color: var(--pink); background-size: 100% 2px; }
.contact-phone {
  display: inline-block; margin-top: -8px;
  font-size: clamp(1rem, .9rem + .4vw, 1.25rem); line-height: 1.2; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease-out), color .3s;
}
.contact-phone:hover { color: var(--pink); background-size: 100% 1px; }
.theme .contact-phone:hover { color: var(--white); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; position: relative; z-index: 1; }
.copy-status { font-size: .875rem; color: var(--green); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.color-bar { display: grid; grid-template-columns: repeat(5, 1fr); height: 8px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 40px; flex-wrap: wrap; }
.footer-logo { width: 160px; height: auto; }
.footer-top { text-decoration: none; min-height: 44px; }
.footer-top:hover { color: var(--white); }
.footer-legal { text-decoration: none; opacity: .6; min-height: 44px; display: inline-flex; align-items: center; }
.footer-legal:hover { opacity: 1; color: var(--white); }
.footer-meta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* Legal notice page (impressum.html) */
.legal-page .site-header { position: sticky; }
.legal-back { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.legal-back:hover { color: var(--white); }
.legal { max-width: 760px; padding-block: 64px 96px; }
.legal h1 { margin: 12px 0 48px; }
.legal section { padding: 22px 0; border-top: 1px solid var(--line); }
.legal h2 { display: block; margin-bottom: 10px; line-height: 1.5; white-space: nowrap; } /* labels are flex elsewhere, which split these headings into pieces */
.legal p { line-height: 1.6; }
.legal a { color: inherit; }
.legal .para { font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0; } /* the brand font has no § */

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .founder { max-width: 300px; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .contact-actions .btn { flex: 1 1 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

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

/* ==========================================================================
   Brand-color sections (pink / blue / green from the brand manual)
   ========================================================================== */
.theme { color: var(--black); --text: var(--black); --text-muted: rgba(0, 0, 0, .72); --line: rgba(0, 0, 0, .22); }
.theme-pink { background: var(--pink); --section-bg: var(--pink); }
.theme-blue { background: var(--blue); --section-bg: var(--blue); }
.theme-green { background: var(--green); --section-bg: var(--green); }

.theme :focus-visible { outline-color: var(--black); }
.theme .btn { background: var(--black); color: var(--white); border-color: var(--black); }
.theme .btn:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.theme .btn-ghost { background: transparent; color: var(--black); border-color: var(--black); }
.theme .btn-ghost:hover { background: var(--black); color: var(--white); }

.theme .founder-photo { background: rgba(0, 0, 0, .15); }
.theme .contact-email:hover { color: var(--white); }
.theme .copy-status { color: var(--black); }


.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


/* ==========================================================================
   Work: the moon world (moon.js + projects.js)
   ========================================================================== */
.world {
  position: relative; height: 150svh; min-height: 960px;
  /* Links to Work land exactly on the moon: the fixed canvas doesn't need the room for the header,
     and stopping short of it would count as stuck between the landing page and the moon */
  scroll-margin-top: calc(var(--header-h) * -1);
}


/* Show reel: a wall of 4:3 screens (4 × 3, so 16:9 in all; on phones 3 × 4, a square), fixed in the middle while
   its section scrolls by. script.js draws the tiles on the canvas, each in the hologram style of the
   project window (thin bright edge, soft glow, scanlines, light sweep), and turns the wall gently (--turn). */
.reel { position: relative; z-index: 1; height: 260vh; pointer-events: none; }
.reel-stick {
  position: fixed; inset: 0; display: grid; place-items: center;
  visibility: hidden;
}
.reel-stick.is-on { visibility: visible; }
.reel-frame {
  position: relative; aspect-ratio: var(--wall-ar, 16 / 9);
  width: min(76vw, 1120px, (100svh - var(--header-h) * 2 - 90px) * var(--wall-ar-n, 1.7778));
  transform: perspective(1600px) rotateY(var(--turn, 0deg)); /* a gentle turn while scrolling */
  will-change: transform;
}
.reel-canvas { display: block; width: 100%; height: 100%; animation: reel-shimmer 7s ease-in-out infinite; }
/* the faint, uneven flicker of the hologram */
@keyframes reel-shimmer { 0%, 100% { opacity: 1; } 37% { opacity: .9; } 41% { opacity: 1; } 68% { opacity: .94; } }
/* the source film only feeds the canvas; kept "visible" (but unseen) so browsers keep decoding it */
.reel-video { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .reel-canvas { animation: none; } }
@media (max-width: 767px) {
  .reel { height: 220vh; }
  .reel-frame { width: min(92vw, (100svh - var(--header-h) - 120px) * var(--wall-ar-n, 1.3333)); }
}

/* lvh: the height doesn't change when a phone's address bar shrinks during scrolling */
.moon-stage { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: 0; }
.moon-canvas {
  display: block; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.2s var(--ease-out);
  cursor: grab; touch-action: pan-y;
}
.moon-stage.is-dragging .moon-canvas { cursor: grabbing; }
.moon-stage.is-ready .moon-canvas { opacity: 1; }

.moon-labels { position: absolute; inset: 0; pointer-events: none; }
.moon-stage:not(.is-ready):not(.is-fallback) .moon-labels { visibility: hidden; }
.moon-label {
  position: absolute; top: 0; left: 0; margin: -19px 0 0 32px;
  display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 18px;
  background: rgba(0, 0, 0, .72); color: var(--white);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  font: inherit; font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap;
  cursor: pointer; pointer-events: auto; will-change: transform;
  transition: background-color .2s, color .2s, border-color .2s;
}
.moon-label i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
/* "Your project": an open invitation, drawn as an outline instead of a filled dot */
.moon-label.is-invite { border-style: dashed; border-color: rgba(255, 255, 255, .5); }
.moon-label.is-invite i { background: none; border: 1.5px solid var(--green); }
.moon-label:hover { background: var(--white); color: var(--black); }
.moon-label.is-away { pointer-events: none; }
/* Client logos instead of names (moon.js sets each one's height so they look equally big) */
.moon-label img { display: block; height: var(--lh, 16px); width: auto; transform: translateY(calc(var(--lh, 16px) * var(--nudge, 0))); filter: brightness(0) invert(1); transition: filter .2s; }
.moon-label:hover img { filter: brightness(0); }
.moon-label.is-wide { letter-spacing: .32em; padding-right: calc(18px - .32em); } /* the spacing after the last letter, taken back */
/* Without WebGL the labels become a simple list of projects */
.moon-stage.is-fallback { position: absolute; }
.moon-stage.is-fallback .moon-labels {
  position: absolute; inset: auto 0 15% 0; display: flex; flex-wrap: wrap; gap: 10px;
  padding-inline: var(--gutter); pointer-events: auto;
}
.moon-stage.is-fallback .moon-label { position: static; margin: 0; }

/* Phones and tablets: arrows above and below the moon, to the stop before or after it (moon.js) */
.moon-step {
  position: absolute; left: 50%; z-index: 2; display: none; width: 44px; height: 44px; margin-left: -22px; padding: 0;
  place-items: center; border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%; background: rgba(0, 0, 0, .35);
  color: var(--white); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
  -webkit-tap-highlight-color: transparent;
}
.moon-step svg { width: 20px; height: 20px; }
.moon-step.is-up { top: calc(var(--header-h) + 14px); }
.moon-step.is-down { top: calc(100vh - 66px - env(safe-area-inset-bottom)); }
/* The moon's stage is as tall as the screen without the browser's bars (lvh); measured from the top of
   what's actually visible, the arrow stays above Safari's bottom bar */
@supports (height: 100dvh) { .moon-step.is-down { top: calc(100dvh - 66px - env(safe-area-inset-bottom)); } }
.moon-step.is-shown { opacity: 1; visibility: visible; }
.moon-step:active { background: var(--white); color: var(--black); }
@media (max-width: 767px), (pointer: coarse) { .moon-step { display: grid; } }
.moon-hint {
  position: absolute; top: 0; left: 0; z-index: 1;
  display: inline-flex; align-items: center; gap: 12px;
  font-size: clamp(1rem, .9rem + .35vw, 1.1875rem); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; color: var(--white);
  pointer-events: none; transition: opacity .6s; will-change: transform;
  animation: twinkle 3.6s ease-in-out infinite;
}
.moon-hint em { font-style: normal; color: var(--pink); }
.hint-star { width: 6px; height: 6px; border-radius: 50%; background: var(--white); box-shadow: 0 0 10px 2px rgba(255, 255, 255, .6); }
/* A distant star: brightens and dims slowly, in a steady rhythm */
@keyframes twinkle {
  0%, 100% { opacity: .5; text-shadow: none; }
  50% { opacity: 1; text-shadow: 0 0 14px rgba(255, 255, 255, .45); }
}
.moon-stage:not(.is-ready) .moon-hint, .moon-hint.is-hidden { opacity: 0; }

/* The legend: what the colors of the dots mean. Each row comes in after the other on arrival:
   the dot lights up with a pulse, then its words are drawn in from left to right. */
.moon-legend { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; white-space: nowrap; animation: none; }
.moon-legend li { display: flex; align-items: center; gap: 16px; }
.moon-legend i { position: relative; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c); box-shadow: 0 0 10px 1px var(--c); }
.moon-legend i::after { content: ""; position: absolute; inset: -1px; border: 1px solid var(--c); border-radius: 50%; opacity: 0; }
.moon-legend span { display: grid; gap: 4px; }
.moon-legend b { font-weight: inherit; font-size: .9375rem; letter-spacing: .1em; }
.moon-legend small { font-size: .8125rem; text-transform: none; letter-spacing: .02em; color: rgba(255, 255, 255, .55); }
.moon-legend i, .moon-legend span { opacity: 0; }
/* With the project list underneath, each dot stays next to its heading */
.moon-legend li { align-items: flex-start; }
.moon-legend li > i { margin-top: .45em; }
/* Under each kind, its projects (moon.js): click one and the moon turns to it, then opens it */
.legend-projects { display: grid; gap: 2px; margin: 10px 0 0; padding: 0; list-style: none; pointer-events: auto; }
.legend-projects button {
  padding: 3px 0; border: 0; background: none; color: rgba(255, 255, 255, .78); cursor: pointer;
  font: inherit; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; text-align: left;
  transition: color .2s, transform .2s;
}
.legend-projects button:hover, .legend-projects button:focus-visible { color: var(--c); transform: translateX(4px); }
.moon-legend { --step: .5s; } /* time between one row and the next */
.moon-legend.is-in i { animation: legend-dot .8s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--n) * var(--step) + .2s); }
.moon-legend.is-in i::after { animation: legend-ping 1.4s ease-out both; animation-delay: calc(var(--n) * var(--step) + .45s); }
.moon-legend.is-in span { animation: legend-text 1s cubic-bezier(.25, .7, .2, 1) both; animation-delay: calc(var(--n) * var(--step) + .4s); }
/* Leaving: the entrance played backwards. The last row goes first, the words wipe back toward
   the dot, then the dot shrinks away. The curves and delays are the entrance's, mirrored
   (the entrance takes 2.4s: each delay here is 2.4s minus the entrance's delay and duration).
   Own keyframes: reusing the entrance's would count as the same, already finished animation. */
.moon-legend.is-out i { animation: legend-dot-out .8s cubic-bezier(.7, -.3, .8, .1) both; animation-delay: calc(1.4s - var(--n) * var(--step)); }
.moon-legend.is-out span { animation: legend-text-out 1s cubic-bezier(.8, 0, .75, .3) both; animation-delay: calc(1s - var(--n) * var(--step)); }
@keyframes legend-dot-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0); } }
@keyframes legend-text-out {
  from { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
  to { opacity: 0; transform: translateX(-8px); clip-path: inset(0 100% 0 0); }
}
@keyframes legend-dot { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes legend-ping { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
@keyframes legend-text {
  from { opacity: 0; transform: translateX(-8px); clip-path: inset(0 100% 0 0); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .moon-legend.is-in i, .moon-legend.is-in span { animation: none; opacity: 1; }
}
/* The small hand that shows how to turn the moon. Its fingertip sits on the element's origin. */
.moon-gesture { position: absolute; top: 0; left: 0; z-index: 1; color: var(--white); opacity: 0; pointer-events: none; will-change: transform, opacity; }
.moon-gesture svg { position: absolute; top: -3px; left: -13px; width: 40px; max-width: none; height: 40px; transform-origin: 13px 3px; transition: transform .15s; filter: drop-shadow(0 1px 5px rgba(0, 0, 0, .9)); }
.moon-gesture i { position: absolute; top: -15px; left: -15px; width: 30px; height: 30px; border: 1px solid var(--white); border-radius: 50%; background: rgba(255, 255, 255, .14); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.moon-gesture.is-pressed svg { transform: scale(.92); }
.moon-gesture.is-pressed i { opacity: 1; transform: scale(1); }

@media (max-width: 600px) {
  .moon-label {
    margin: -16px 0 0 18px; min-height: 32px; padding: 0 12px; gap: 0;
    font-size: .75rem; letter-spacing: .06em;
    transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
  }
  .moon-label i { display: none; } /* the dot on the moon already shows the color */
  .moon-label img { height: calc(var(--lh, 16px) * .8); }
  .moon-label.is-wide { padding-right: calc(12px - .32em); }
}

@media (hover: none) and (pointer: coarse) {
  /* More room on the moon before About arrives */
  .world { height: 200lvh; }
  .moon-label { touch-action: pan-y; } /* up and down scrolls the page, also when starting on a name */
}

/* Project pop-up */
html:has(.project-dialog[open]) { overflow: hidden; }
.project-dialog {
  width: min(960px, calc(100vw - 32px)); max-width: none; max-height: calc(100svh - 32px);
  padding: 0; border: 0; background: transparent; color: var(--text); overflow: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent;
}
.project-dialog::backdrop { background: rgba(0, 0, 0, .35); animation: backdrop-in .4s ease-out; }
@keyframes backdrop-in { from { background: rgba(0, 0, 0, 0); } }
.project-dialog[open] { box-shadow: 0 0 44px rgba(255, 255, 255, .16); border-radius: 6px; }
.project-dialog-inner {
  position: relative; background: rgba(13, 15, 19, .9); border: 1px solid rgba(255, 255, 255, .38); border-radius: 6px; overflow: hidden;
  box-shadow: inset 0 0 34px rgba(255, 255, 255, .06);
}
/* The hologram surface: fine scanlines over everything, and a faint uneven shimmer */
.project-dialog-inner::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 3px);
}
.project-dialog .project-title { text-shadow: 0 0 16px rgba(255, 255, 255, .4); }
.dialog-media video { opacity: .92; animation: holo-shimmer 7s ease-in-out infinite; }
@keyframes holo-shimmer { 0%, 100% { opacity: .92; } 37% { opacity: .84; } 41% { opacity: .93; } 68% { opacity: .87; } }
/* The light that projects it */
.holo-beam { position: fixed; inset: 0; z-index: 300; pointer-events: none; filter: blur(9px); }
.holo-beam i { position: absolute; inset: 0; display: block; }
.holo-scan {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5; height: 30px; margin-top: -15px; pointer-events: none;
  background: linear-gradient(transparent, rgba(255, 255, 255, .55), transparent); filter: blur(2px);
}
.dialog-media { position: relative; aspect-ratio: var(--ar, 16 / 9); max-height: 64svh; width: 100%; background: var(--accent, var(--surface-2)); display: grid; place-items: center; }
/* Square or very tall clips are shown whole, with black around them */
.dialog-media.has-video { background: var(--black); }
.dialog-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.dialog-media:not(.has-video) video { display: none; }
.dialog-media.has-video .dialog-placeholder { display: none; }
.dialog-placeholder { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--black); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; }
.dialog-placeholder svg { width: clamp(80px, 14vw, 140px); height: auto; aspect-ratio: 1; }
.project-badge:empty { display: none; }
/* Before/after slider (moon.js): the canvas shows the two versions, the video only feeds it */
.dialog-media:not(.is-compare) :is(.compare-view, .compare-range, .compare-line) { display: none; }
.dialog-media.is-compare video { opacity: 0; animation: none; }
.compare-view {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: .92; animation: holo-shimmer 7s ease-in-out infinite;
  cursor: ew-resize; touch-action: pan-y;
}
.compare-range { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.compare-line {
  position: absolute; top: 0; left: 0; z-index: 1; width: 2px; margin-left: -1px;
  background: var(--white); box-shadow: 0 0 12px rgba(255, 255, 255, .5); pointer-events: none;
}
.compare-handle {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, .72); border: 1px solid rgba(255, 255, 255, .7); color: var(--white);
}
.compare-handle svg { width: 22px; height: 22px; }
.compare-range:focus-visible ~ .compare-line .compare-handle { outline: 2px solid var(--white); outline-offset: 2px; }
/* Same line and height as the close button, in the opposite corner */
.dialog-sound {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px;
  background: rgba(0, 0, 0, .6); color: var(--white); cursor: pointer;
  font: inherit; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em;
  transition: background-color .2s, color .2s;
}
.dialog-sound[hidden], .dialog-arrow[hidden] { display: none; }
/* Steps through a project's films; same look as the close button */
.dialog-arrow {
  position: absolute; top: 50%; z-index: 4; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: var(--white); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.dialog-arrow.is-prev { left: 12px; }
.dialog-arrow.is-next { right: 12px; }
.dialog-arrow svg { width: 20px; height: 20px; }
@media (hover: hover) { .dialog-arrow:hover { background: var(--white); color: var(--black); } }
@media (hover: hover) { .dialog-sound:hover { background: var(--white); color: var(--black); } }
.dialog-sound svg { width: 20px; height: 20px; }
.dialog-sound .sound-waves, .dialog-sound.is-on .sound-mute { display: none; }
.dialog-sound.is-on .sound-waves { display: inline; }
/* Play/pause and the bar along the bottom: they fade away while the film plays (moon.js) */
.dialog-player {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 4;
  display: flex; align-items: center; gap: 12px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.dialog-player.is-on { opacity: 1; pointer-events: auto; }
.dialog-player[hidden], .dialog-media:not(.has-video) .dialog-player { display: none; }
/* A soft shade behind them, so they stay readable on bright footage */
.dialog-player::before {
  content: ""; position: absolute; left: -12px; right: -12px; bottom: -12px; height: 96px; z-index: -1; pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}
.dialog-media.has-video video { cursor: pointer; }
.player-toggle {
  position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: var(--white); cursor: pointer;
  transition: background-color .2s, color .2s;
}
@media (hover: hover) { .player-toggle:hover { background: var(--white); color: var(--black); } }
.player-toggle svg { width: 20px; height: 20px; }
.player-toggle .icon-pause, .player-toggle.is-playing .icon-play { display: none; }
.player-toggle.is-playing .icon-pause { display: inline; }
.player-bar { position: relative; flex: 1; height: 44px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.player-track { position: relative; width: 100%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.player-fill { position: absolute; inset: 0; border-radius: 2px; background: var(--white); transform: scaleX(0); transform-origin: left; }
.player-thumb { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--white); }
.player-bar:focus-visible { outline: 2px solid var(--white); outline-offset: -8px; border-radius: 4px; }
.dialog-text { max-width: none; white-space: pre-line; }
.dialog-credits { display: grid; gap: 8px; }
.dialog-credits[hidden] { display: none; }
.dialog-credit { color: var(--text-muted); }
.dialog-credit span { color: var(--white); margin-left: 8px; }
.dialog-credit a { color: var(--white); margin-left: 8px; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); transition: border-color .2s; }
.dialog-credit a:hover { border-color: var(--white); }
/* Client on the left, the project's badge on the right */
.dialog-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.dialog-client { display: flex; align-items: center; gap: 12px; }
.dialog-logo { display: block; width: auto; max-width: 45vw; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.dialog-logo[hidden], .dialog-client span:empty { display: none; }
.keep-case { text-transform: none; }
/* Moving chain of stills below the text, edge to edge */
.dialog-stills { overflow: hidden; padding-bottom: clamp(24px, 4vw, 40px); cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dialog-stills[hidden] { display: none; }
.dialog-stills.is-dragging { cursor: grabbing; }
.stills-track { display: flex; width: max-content; will-change: transform; }
.stills-track img { flex: none; display: block; width: clamp(150px, 22vw, 220px); aspect-ratio: 1; margin-right: 8px; object-fit: cover; pointer-events: none; }
.dialog-info { display: flex; flex-direction: column; gap: 12px; padding: clamp(24px, 4vw, 40px); }
.dialog-close {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: var(--white); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.dialog-close:hover { background: var(--white); color: var(--black); }
.dialog-close svg { width: 20px; height: 20px; }
/* While a film plays, everything fades away except the close button (moon.js sets .is-away) */
.dialog-sound, .dialog-arrow { transition: background-color .2s, color .2s, opacity .25s; }
.is-away .dialog-sound, .is-away .dialog-arrow { opacity: 0; pointer-events: none; }
/* Phones: 30% smaller so they cover less of the video; the invisible ::after keeps a full-size tap area */
@media (max-width: 600px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  /* A strip above the film for the close and sound buttons, so they don't cover the picture */
  .project-dialog:not(.request-dialog) .project-dialog-inner { padding-top: 47px; }
  .project-dialog:not(.request-dialog) .dialog-sound { top: -39px; }
  .dialog-close { top: 8px; right: 8px; width: 31px; height: 31px; }
  .dialog-sound { top: 8px; left: 8px; height: 31px; gap: 5px; padding: 0 11px 0 8px; font-size: .55rem; }
  .dialog-close svg, .dialog-sound svg { width: 14px; height: 14px; }
  .dialog-close::after, .dialog-sound::after, .player-toggle::after, .player-bar::after { content: ''; position: absolute; inset: -7px; }
  .dialog-player { left: 8px; right: 8px; bottom: 8px; gap: 10px; }
  .dialog-player::before { left: -8px; right: -8px; bottom: -8px; height: 72px; }
  .player-toggle, .player-bar { height: 31px; }
  .player-toggle { width: 31px; }
  .player-toggle svg { width: 14px; height: 14px; }
}

@media (max-width: 860px) {
  .moon-hint { white-space: normal; text-align: center; width: max-content; max-width: calc(100vw - 32px); font-size: .9375rem; }
}
/* Tall screens: the legend sits above the moon as one row, names only */
@media (max-aspect-ratio: 23 / 20) {
  .moon-legend { display: flex; gap: 22px; white-space: nowrap; }
  .moon-legend li { gap: 9px; }
  .moon-legend i { width: 8px; height: 8px; }
  .moon-legend b { font-size: .8125rem; letter-spacing: .08em; }
  .moon-legend small { display: none; }
  .moon-legend li { align-items: center; }
  .moon-legend li > i { margin-top: 0; }
  .legend-projects { display: none; } /* tall screens and phones: the names are on the moon */
}

/* Sections after Work cover the fixed 3D background */
.section.theme, .site-footer { position: relative; z-index: 1; }
.site-footer { background: var(--bg); }

/* ==========================================================================
   Intro: overview of the star system, then the flight to the moon (moon.js)
   ========================================================================== */
.intro { display: none; }
html.has-intro { overflow: hidden; }
html.has-intro .intro {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: clamp(48px, 11vh, 128px);
  transition: opacity .6s var(--ease-out);
}
html.is-flying .intro { opacity: 0; pointer-events: none; }
.intro-logo {
  position: absolute; top: clamp(56px, 11vh, 120px); left: 50%; transform: translateX(-50%);
  width: clamp(260px, 44vw, 680px); height: auto;
  animation: starlight 11s ease-in-out infinite;
}
/* A soft halo that swells and fades unevenly, like a distant star's light through the atmosphere */
@keyframes starlight {
  0%   { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .35)) drop-shadow(0 0 22px rgba(255, 255, 255, .12)); opacity: .9; }
  18%  { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .5)) drop-shadow(0 0 34px rgba(255, 255, 255, .2)); opacity: 1; }
  31%  { filter: drop-shadow(0 0 7px rgba(255, 255, 255, .4)) drop-shadow(0 0 26px rgba(255, 255, 255, .14)); opacity: .94; }
  55%  { filter: drop-shadow(0 0 12px rgba(255, 255, 255, .55)) drop-shadow(0 0 40px rgba(255, 255, 255, .24)); opacity: 1; }
  72%  { filter: drop-shadow(0 0 5px rgba(255, 255, 255, .3)) drop-shadow(0 0 18px rgba(255, 255, 255, .1)); opacity: .86; }
  86%  { filter: drop-shadow(0 0 9px rgba(255, 255, 255, .45)) drop-shadow(0 0 30px rgba(255, 255, 255, .18)); opacity: .97; }
  100% { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .35)) drop-shadow(0 0 22px rgba(255, 255, 255, .12)); opacity: .9; }
}
.intro-enter { min-width: 200px; letter-spacing: .14em; }
.intro-skip {
  position: absolute; right: var(--gutter); bottom: 20px; min-height: 44px; padding: 0 8px;
  border: 0; background: none; color: var(--text-muted); font: inherit; font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: .08em; cursor: pointer;
}
.intro-skip:hover { color: var(--white); }

/* The site waits behind the intro and eases in while the flight slows down:
   the headline, its line and the buttons rise in one after another, then the header */
.hero-copy > * { transition: opacity 1.4s var(--ease-out), transform 1.6s var(--ease-out), visibility 1.4s; }
.hero-copy > :nth-child(2) { transition-delay: .18s; }
.hero-copy > :nth-child(3) { transition-delay: .36s; }
.site-header { transition: opacity 1.4s var(--ease-out) .5s, visibility 1.4s .5s; }
html.has-intro .hero-copy > * { opacity: 0; transform: translateY(28px); visibility: hidden; }
html.has-intro .site-header,
html.has-intro .moon-labels, html.has-intro .moon-hint { opacity: 0; visibility: hidden; }

/* ==========================================================================
   About and Contact as hologram surfaces, like the project windows: brand
   color, slightly see-through, fine scanlines. The top edge fades in softly
   and reaches a little over whatever is above, so it is never a hard cut.
   ========================================================================== */
.theme.holo { --holo-rgb: 92 181 231; --holo-fade: clamp(70px, 9vw, 130px); background: none; }
.theme.holo.theme-green { --holo-rgb: 16 166 81; }
.theme.holo::before, .theme.holo::after {
  content: ""; position: absolute; inset: calc(var(--holo-fade) * -1) 0 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 var(--holo-fade));
  mask-image: linear-gradient(transparent, #000 var(--holo-fade));
}
.theme.holo::before { z-index: -1; background: rgb(var(--holo-rgb) / .9); }
/* Runs on under the next section and fades there, so the next color has no visible starting line */
.theme.holo:has(+ .holo)::before {
  bottom: calc(var(--holo-fade) * -1);
  -webkit-mask-image: linear-gradient(transparent, #000 var(--holo-fade), #000 calc(100% - var(--holo-fade)), transparent);
  mask-image: linear-gradient(transparent, #000 var(--holo-fade), #000 calc(100% - var(--holo-fade)), transparent);
}
/* Fine scanlines over everything */
.theme.holo::after {
  z-index: 2;
  background: repeating-linear-gradient(0deg, rgb(255 255 255 / .09) 0 1px, transparent 1px 3px);
}
.theme.holo > .container { position: relative; z-index: 1; }
.theme.holo .founder-photo { position: relative; }
.theme.holo .founder-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgb(255 255 255 / .06) 0 1px, transparent 1px 3px);
}

/* ==========================================================================
   Contact: the choice between the landing game and the address
   ========================================================================== */
.contact-gate { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.contact-gate[hidden], .contact-open[hidden] { display: none; }
.contact-open { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.contact-open.is-revealed { animation: contact-in .6s var(--ease-out) both; }
@keyframes contact-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   The landing game (game.js): full screen, the play field in the middle, the slider below
   ========================================================================== */
html.lander-open { overflow: hidden; }
.lander {
  position: fixed; inset: 0; z-index: 2000; background: #000; color: var(--white);
  display: flex; flex-direction: column; justify-content: flex-end;
  animation: lander-in .4s var(--ease-out) both;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
@keyframes lander-in { from { opacity: 0; } to { opacity: 1; } }
.lander-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lander-hud {
  position: absolute; top: max(18px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(52vw, 260px);
  display: grid; justify-items: center; gap: 6px; pointer-events: none; font-variant-numeric: tabular-nums;
}
.lander-hud .label { color: var(--white); letter-spacing: .14em; }
.lander-signal b { font-weight: inherit; color: var(--green); }
/* The signal bar: fills as you go deeper; the mark is where the message is sent */
.lander-bar { position: relative; width: 100%; height: 4px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 2px; }
.lander-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--white); box-shadow: 0 0 8px rgba(255, 255, 255, .5); transition: width .2s linear; }
.lander-bar.is-sent i { background: var(--green); box-shadow: 0 0 10px var(--green); }
.lander-bar u { position: absolute; left: 60%; top: -5px; bottom: -5px; width: 1px; background: var(--green); }
.lander-stats { display: flex; gap: 14px; opacity: .75; }
.lander-hull { letter-spacing: .2em; color: var(--pink); }
.lander-msg {
  position: absolute; left: 50%; top: 50%; transform: translateX(-50%); width: min(86vw, 380px);
  text-align: center; font-size: 1rem; line-height: 1.45; text-transform: uppercase; letter-spacing: .08em;
  text-shadow: 0 0 14px rgba(255, 255, 255, .4); opacity: 0; transition: opacity .3s; pointer-events: none;
}
.lander-msg.is-on { opacity: 1; }
/* The mission over the intro, animated like the Work legend: the dot lights up with a pulse, then the words
   are drawn in from left to right; leaving, it wipes back out, last word first. */
.lander-mission {
  position: absolute; left: 50%; top: 26%; transform: translateX(-50%); width: min(86vw, 420px); margin: 0;
  text-align: center; font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); line-height: 1.3;
  text-shadow: 0 0 18px rgba(0, 0, 0, .9); pointer-events: none;
}
.lander-mission i {
  position: relative; display: block; width: 8px; height: 8px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px var(--green); opacity: 0;
}
.lander-mission i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green); opacity: 0; }
.lander-mission span { display: inline-block; opacity: 0; }
.lander-mission.is-in i { animation: legend-dot .5s var(--ease-out) both; }
.lander-mission.is-in i::after { animation: legend-ping 1.2s .3s var(--ease-out) both; }
.lander-mission.is-low { top: 62%; }
.lander-mission.is-in span { animation: legend-text .55s var(--ease-out) both; animation-delay: calc(.35s + var(--n) * var(--step, .07s)); }
.lander-mission.is-out i { animation: legend-dot-out .5s cubic-bezier(.7, -.3, .8, .1) both; animation-delay: .5s; }
.lander-mission.is-out span { animation: legend-text-out .45s cubic-bezier(.8, 0, .75, .3) both; animation-delay: calc(var(--r) * .03s); }
@media (prefers-reduced-motion: reduce) {
  .lander-mission.is-in i, .lander-mission.is-in span { animation: none; opacity: 1; }
  .lander-mission.is-out { opacity: 0; transition: opacity .3s; }
}
.lander-btn {
  position: absolute; top: max(12px, env(safe-area-inset-top)); width: 44px; height: 44px; z-index: 4;
  display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: var(--white); cursor: pointer;
}
.lander-btn[hidden] { display: none; }
.lander-btn svg { width: 20px; height: 20px; }
.lander-btn:hover { background: var(--white); color: var(--black); }
.lander-close { right: 12px; }
.lander-sound { left: 12px; }
.lander-sound .off, .lander-sound.is-off .on { display: none; }
.lander-sound.is-off .off { display: inline; }
.lander-controls {
  position: relative; z-index: 1; display: flex; justify-content: center; align-items: center;
  height: calc(104px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
}
.lander-track {
  position: relative; height: 56px; cursor: grab; touch-action: none; outline: none;
}
.lander-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255, 255, 255, .35);
  box-shadow: 0 0 8px rgba(255, 255, 255, .3);
}
.lander-track::after { /* ticks at the ends and the middle */
  content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 6px); height: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px) 0 0 / 50% 100% repeat-x;
  border-right: 1px solid rgba(255, 255, 255, .5);
}
.lander-track.is-dragging { cursor: grabbing; }
.lander-track.is-locked { opacity: .35; pointer-events: none; }
.lander-track:focus-visible .lander-knob { outline: 2px solid var(--pink); outline-offset: 3px; }
.lander-knob {
  position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; z-index: 1;
  display: grid; place-items: center; border-radius: 50%; background: var(--white); color: var(--black);
  box-shadow: 0 0 18px rgba(255, 255, 255, .35);
}
.lander-knob svg { width: 22px; height: 22px; }
.lander-track:not(.is-dragging) .lander-knob { transition: left .35s cubic-bezier(.3, 1.4, .5, 1); } /* springs back to the middle */
.lander-track:not(.is-dragging) .lander-knob { transition: left .35s cubic-bezier(.3, 1.4, .5, 1), background .3s, color .3s, box-shadow .3s; }
/* The intro's how-to: while the module shows a move, the slider lights up with it. Left and right: the
   line glows blue toward that side. The boost: the knob turns orange and pulses, the way to fire it below. */
.lander-track::before { transition: background .3s, box-shadow .3s; }
.lander-track.is-demo-left::before {
  height: 2px; margin-top: -.5px;
  background: linear-gradient(90deg, var(--blue), rgba(92, 181, 231, .35) 50%, rgba(255, 255, 255, .35) 50%);
  box-shadow: 0 0 12px rgba(92, 181, 231, .7);
}
.lander-track.is-demo-right::before {
  height: 2px; margin-top: -.5px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .35) 50%, rgba(92, 181, 231, .35) 50%, var(--blue));
  box-shadow: 0 0 12px rgba(92, 181, 231, .7);
}
.lander-track.is-demo-left .lander-knob, .lander-track.is-demo-right .lander-knob { color: var(--blue); box-shadow: 0 0 22px rgba(92, 181, 231, .8); }
.lander-track.is-demo-boost .lander-knob { background: var(--orange); color: var(--white); animation: lander-boost .8s var(--ease-out) infinite; }
@keyframes lander-boost {
  from { box-shadow: 0 0 18px rgba(234, 82, 49, .8), 0 0 0 0 rgba(234, 82, 49, .7); }
  to { box-shadow: 0 0 18px rgba(234, 82, 49, .8), 0 0 0 18px rgba(234, 82, 49, 0); }
}
.lander-hint {
  position: absolute; left: 50%; top: calc(50% + 34px); transform: translate(-50%, 4px); white-space: nowrap;
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--orange);
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
}
.lander-track.is-demo-boost .lander-hint { opacity: 1; transform: translate(-50%, 0); }
.lander-panel {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 16px; padding: var(--gutter); text-align: center; background: rgba(0, 0, 0, .55);
  animation: lander-in .6s var(--ease-out) both;
}
.lander-panel[hidden] { display: none; }
.lander-panel .label { letter-spacing: .14em; }
.lander-kicker { color: var(--green); }
.lander-kicker.is-lost { color: var(--orange); }
.lander-note { color: var(--text-muted); font-size: 1.0625rem; }
.lander-score-line { color: var(--white); opacity: .7; font-variant-numeric: tabular-nums; }
.lander-panel-more { display: flex; gap: 24px; }
.lander-link {
  border: 0; background: none; padding: 6px 0; color: var(--white); font: inherit; font-size: .8125rem; cursor: pointer;
  text-transform: uppercase; letter-spacing: .1em; border-bottom: 1px solid rgba(255, 255, 255, .35);
}
.lander-link:hover { border-color: var(--white); }
.lander-panel .section-title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); }
.lander-panel .contact-actions { justify-content: center; }
.lander.is-done .lander-controls, .lander.is-done .lander-hud { opacity: 0; transition: opacity .4s; }

/* "Your project" request form (in the project pop-up's hologram style) */
.request-dialog { width: min(640px, calc(100vw - 32px)); }
.request-form, .request-done { position: relative; z-index: 4; padding: clamp(24px, 5vw, 44px); }
.request-form .label, .request-done .label { gap: 8px; }
.request-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--green); }
.request-form .project-title, .request-done .project-title { margin: 10px 0 24px; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
.request-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.request-optional { margin: 26px 0 12px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field.is-wide { grid-column: 1 / -1; }
.field-label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: 0; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px;
  background: rgba(0, 0, 0, .45); color: var(--white); font: inherit; font-size: 1rem; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, .35); }
.field input:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16, 166, 81, .25); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--orange); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px; font-size: .8125rem; letter-spacing: .04em; transition: background .2s, color .2s, border-color .2s;
}
.chips label:hover span { border-color: var(--white); }
.chips input:checked + span { background: var(--green); border-color: var(--green); color: var(--black); }
.chips input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.chips .chip-input {
  position: static; opacity: 1; pointer-events: auto; /* not a hidden radio like the chips */
  min-height: 40px; width: 140px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px;
  background: rgba(0, 0, 0, .45); color: var(--white); font: inherit; font-size: .8125rem; outline: none;
}
.chips .chip-input::placeholder { color: rgba(255, 255, 255, .45); }
.chips .chip-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16, 166, 81, .25); }
/* The close button sits above the form (both are positioned) */
.request-dialog .dialog-close { z-index: 6; }
.request-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.request-send { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.btn-send { background: var(--green); border-color: var(--green); color: var(--black); }
.btn-send:hover { background: var(--white); border-color: var(--white); }
.btn-send[disabled] { opacity: .6; cursor: progress; }
.request-note { font-size: .75rem; color: var(--text-muted); max-width: 260px; }
.request-note a { color: inherit; }
.request-status { margin-top: 14px; font-size: .875rem; color: var(--orange); min-height: 1.2em; }
.request-status a { color: inherit; }
.request-done .btn { margin-top: 28px; }
@media (max-width: 600px) {
  .request-grid { grid-template-columns: 1fr; }
  .request-send .btn { width: 100%; }
}

.nowrap { white-space: nowrap; }

/* Phones held sideways (wide but short screens) */
@media (min-aspect-ratio: 23 / 20) and (max-height: 560px) {
  /* The legend shows only the three kinds: the project names are on the moon, and the lists wouldn't fit */
  .moon-legend { gap: 14px; }
  .moon-legend small, .legend-projects { display: none; }
  .moon-legend li { align-items: center; }
  .moon-legend li > i { margin-top: 0; }
  /* At the moon the header slides away, so the moon gets the whole height (moon.js sets .at-moon) */
  .site-header { transition: transform .45s var(--ease-out), opacity .45s; }
  html.at-moon .site-header { transform: translateY(-100%); opacity: 0; pointer-events: none; }
  /* Smaller project names on the moon */
  .moon-label { margin: -13px 0 0 16px; min-height: 26px; padding: 0 10px; gap: 6px; font-size: .6875rem; letter-spacing: .06em; }
  .moon-label i { width: 7px; height: 7px; }
  .moon-label img { height: calc(var(--lh, 16px) * .7); }
  .moon-label.is-wide { padding-right: calc(10px - .32em); }
  /* The arrows sit on the right, one above the other, beside the moon instead of on it */
  .moon-step { left: auto; right: 20px; margin-left: 0; }
  .moon-step.is-up, .moon-step.is-down { bottom: auto; }
  .moon-step.is-up { top: calc(50svh - 50px); }
  .moon-step.is-down { top: calc(50svh + 6px); }
  /* The first page: headline, text and button all fit on the screen */
  .hero-title { font-size: min(var(--fs-h1), 9.5svh); margin: 4px 0 12px; }
  .hero-lede { font-size: .875rem; max-width: 46ch; }
  .hero-actions { margin-top: 14px; }
  /* The grid fills the space below the header, with the same small gap above and below it */
  .reel-stick { padding-top: var(--header-h); bottom: auto; height: 100svh; box-sizing: border-box; }
  .reel-frame { width: min(92vw, (100svh - var(--header-h) - 28px) * var(--wall-ar-n, 1.7778)); }
}
