/* partain.dev — Orbit, with the Signal Space landing.
   Layers: one fixed planet canvas (z 0) → landing + stage (z 1) → About / Contact / footer (z 2, opaque).
   html.js       — set inline in <head>; the hero draws the live ASCII bust instead of the baked <pre>.
   html.stage-on — set by js/stage.js; the ten projects become one pinned stage. Without it they stack.
   html.no-gl    — set by js/space.js when WebGL is missing; a CSS planet limb stands in. */

/* ── Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--void); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background: var(--void); color: var(--on); font-family: var(--f-body); font-size: 17px; line-height: 1.55; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
button { cursor: pointer; }
::selection { background: var(--cobalt); color: #fff; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--cobalt-text); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.silver { color: transparent; background: var(--silver-text); -webkit-background-clip: text; background-clip: text; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--on); color: var(--void); }
.skip:focus { top: 12px; }

/* ── Tokens ────────────────────────────────────────────────────────── */
:root {
  /* type: Geist for every word you read, Geist Mono for ≤12px labels,
     Michroma only for the background PARTAIN, JetBrains Mono only inside the ASCII canvases */
  --f-display: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --f-body: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-wide: "Michroma", "Geist", sans-serif;
  --f-glyph: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* space */
  --void: #030409;
  --void-2: #070912;
  --void-3: #0c0f1a;

  /* ink — all AA on --void */
  --on: #f3f5f9;            /* 18.6:1 */
  --on-2: #b9c0cf;          /* 10.4:1 */
  --on-3: #8a92a4;          /* 6.1:1 */
  --hair: rgba(200, 212, 240, .14);
  --hair-2: rgba(200, 212, 240, .28);

  /* silver */
  --silver-text: linear-gradient(180deg, #ffffff 0%, #e8ebf1 42%, #a6adbb 100%);
  --silver-edge: linear-gradient(160deg, #f4f6fa 0%, #8d94a3 28%, #2b2f38 55%, #b7bdc9 78%, #4b505b 100%);

  /* the one accent: cobalt (the atmosphere, the one filled button, the hologram's mids) */
  --cobalt: #2558f0;        /* button fill — white text 5.6:1 */
  --cobalt-hover: #3567ff;
  --cobalt-text: #8eadff;   /* cobalt as text on void — 8.3:1 */
  --atmo: #5d86ff;

  /* layout */
  --container: 1240px;
  --gutter: 20px;
  --section-y: clamp(88px, 11vw, 160px);
  --rail-w: 120px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-pill: 999px;
  --shadow-object: 0 50px 70px -40px rgba(0, 0, 0, .95), 0 20px 30px -20px rgba(0, 0, 0, .8);

  --ease: cubic-bezier(.22, .7, .2, 1);
  --ease-rise: cubic-bezier(.16, .84, .24, 1);

  /* the planet's horizon (px from the top of the viewport) and radius; js/space.js keeps these live */
  --apex: 81svh;
  --pr: max(115vw, 1150px);
}
/* without JS the horizon sits where the landing puts the bust (js/space.js takes over when it runs) */
@media (max-width: 599px) { :root { --apex: calc(max(700px, 100svh) - 340px); } }
@media (min-width: 600px) and (max-width: 1099px) { :root { --apex: 66svh; } }
@media (min-width: 600px)  { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }
/* the landing keeps Signal Space's wider column */
.nav, .hero, .specs { --container: 1280px; }
@media (min-width: 1024px) { .nav, .hero, .specs { --gutter: 40px; } }

/* ── Type ramp ─────────────────────────────────────────────────────── */
.t-display { font-family: var(--f-display); font-weight: 600; line-height: .9; letter-spacing: -.045em; }
.t-h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(44px, 7.2vw, 104px); line-height: .96; letter-spacing: -.045em; }
.t-h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 3vw, 42px); line-height: 1.2; letter-spacing: -.025em; }
.t-lede { font-family: var(--f-body); font-weight: 400; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; }
.t-body { font-family: var(--f-body); font-weight: 400; font-size: 17px; line-height: 1.55; }
.t-small { font-family: var(--f-body); font-weight: 400; font-size: 15px; line-height: 1.45; }
.t-eyebrow { font-family: var(--f-mono); font-weight: 500; font-size: 12px; line-height: 1.3; letter-spacing: .16em; text-transform: uppercase; }
.t-num { font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums lining-nums; }

/* ── The sky: one fixed WebGL canvas for the whole page ────────────── */
.space { position: fixed; inset: 0; z-index: 0; pointer-events: none; transition: opacity .6s var(--ease); }
.space canvas { width: 100%; height: 100%; }
.space.is-off { opacity: 0; }
/* no WebGL / no JS: a still, shaded planet limb at the same horizon and radius the shader would draw */
.space__fallback { display: none; position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(1px 1px at 12% 22%, #cfd8ee 50%, transparent), radial-gradient(1px 1px at 68% 14%, #aeb9d4 50%, transparent), radial-gradient(1.5px 1.5px at 84% 38%, #e6ecfa 50%, transparent), radial-gradient(1px 1px at 31% 46%, #8f9ab3 50%, transparent), radial-gradient(1px 1px at 52% 8%, #c3cce0 50%, transparent), radial-gradient(1px 1px at 90% 12%, #b8c2da 50%, transparent), var(--void); }
.space__fallback i { position: absolute; left: 50%; top: var(--apex); width: calc(2 * var(--pr)); height: calc(2 * var(--pr)); margin-left: calc(-1 * var(--pr)); border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, #05060b 92%, #0d1220 97.5%, #3b4a6e 99.6%, #c9d6f5 100%);
  box-shadow: 0 0 0 1px rgba(200, 215, 255, .5), 0 -6px 26px -4px rgba(60, 100, 255, .55), 0 -30px 90px -30px rgba(37, 88, 240, .6); }
.no-gl .space canvas, html:not(.js) .space canvas { display: none; }
.no-gl .space__fallback, html:not(.js) .space__fallback { display: block; }

/* ── Nav (on the landing) ──────────────────────────────────────────── */
.nav { position: absolute; inset: 0 0 auto 0; z-index: 20; }
.nav__row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; padding: 10px 0; font-family: var(--f-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.nav__brand i { width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt-text); }
.nav__links { display: none; align-items: center; gap: var(--s-6); font-size: 15px; font-weight: 500; color: var(--on-2); }
.nav__links a { padding: 10px 0; transition: color .2s; }
.nav__links a:hover { color: var(--on); }
.nav__links .nav__gh { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--hair-2); border-radius: var(--radius-pill); color: var(--on); }
.nav__links .nav__gh:hover { border-color: var(--on-2); }
.nav__menu { position: relative; }
.nav__menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--hair-2); border-radius: 50%; font-size: 20px; }
.nav__menu summary::-webkit-details-marker { display: none; }
.nav__sheet { position: absolute; right: 0; top: 52px; min-width: 210px; display: grid; padding: var(--s-2); background: var(--void-3); border-radius: var(--radius-m); box-shadow: 0 0 0 1px var(--hair-2), 0 30px 60px -20px #000; }
.nav__sheet a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); border-radius: 12px; font-weight: 500; }
.nav__sheet a:hover { background: rgba(255, 255, 255, .06); }
@media (min-width: 760px) { .nav__links { display: flex; } .nav__menu { display: none; } }

/* ── Buttons + links ───────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: var(--radius-pill);
  background: var(--cobalt); color: #fff; font-size: 16px; font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 14px 30px -14px rgba(0, 0, 0, .9);
  transition: background-color .2s var(--ease), transform .2s var(--ease); }
.btn:hover { background: var(--cobalt-hover); transform: translateY(-1px); }
.go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--hair-2); border-radius: var(--radius-pill);
  color: var(--on); font-size: 15px; font-weight: 500; transition: border-color .2s, background-color .2s; }
.go:hover { border-color: var(--on-2); background: rgba(255, 255, 255, .05); }
.go--quiet { border-color: transparent; padding-inline: 10px; color: var(--on-2); }
.go--quiet:hover { color: var(--on); border-color: transparent; background: none; text-decoration: underline; text-underline-offset: 4px; }

/* ── Landing (Signal Space): the hologram over the horizon ─────────── */
.hero { position: relative; z-index: 1; overflow: hidden; scroll-snap-align: start; --hero-hz: 37svh; }
.hero__stage { position: relative; height: max(640px, 100svh); }
.hero__word { position: absolute; left: var(--gutter); right: var(--gutter); top: 21%; text-align: center; line-height: 0; pointer-events: none; }
.word { display: inline-block; white-space: nowrap; font-family: var(--f-wide); font-weight: 400;
  font-size: 13vw; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: transparent;
  background: linear-gradient(180deg, rgba(150, 172, 230, .30) 0%, rgba(110, 140, 220, .16) 55%, rgba(80, 110, 200, .02) 100%);
  -webkit-background-clip: text; background-clip: text; }
.bust { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); bottom: var(--hero-hz); height: 56%; width: 100%;
  display: flex; justify-content: center; align-items: flex-end; margin: 0; container-type: size; }
.bust canvas { display: block; max-width: none; }
/* the baked portrait: shown without JS (and if the live one can't load). 80 × 65 cells, JetBrains Mono. */
.bust__pre { display: none; margin: 0; font-family: var(--f-glyph); font-weight: 500; white-space: pre; letter-spacing: 0;
  font-size: min(calc(100cqh / 71.5), calc(99cqw / 48)); line-height: 1.1; color: #6f9bff; }
.bust__pre b { font-weight: 500; color: #e6ecf8; }
.bust__pre i { font-style: normal; color: var(--cobalt); }
html:not(.js) .bust canvas, .bust-failed .bust canvas { display: none; }
html:not(.js) .bust__pre, .bust-failed .bust__pre { display: block; }
.dust { position: absolute; inset: 0; z-index: 1; pointer-events: none; width: 100%; height: 100%; }
.hero__copy { position: absolute; z-index: 4; left: 0; right: 0; bottom: calc(var(--hero-hz) - 34svh); }
.hero__lead { display: grid; gap: var(--s-3); justify-items: start; max-width: 520px; }
.hero__lead .t-eyebrow { color: var(--cobalt-text); }
.hero__lead .t-h1 { font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -.035em; }
.hero__lead .t-lede { color: var(--on-2); max-width: 38ch; font-size: clamp(17px, 1.3vw, 19px); }
.readout { display: none; }
.hero__stage::after { content: ""; position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: calc(var(--hero-hz) - 26px); pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 4, 9, 0) 0%, rgba(3, 4, 9, .62) 34%, rgba(3, 4, 9, .86) 100%); }
@media (min-width: 1100px) { .hero__stage::after { display: none; } }
@media (max-width: 599px) {
  .hero { --hero-hz: 340px; }
  .hero__stage { height: max(700px, 100svh); }
  .hero__word { top: 104px; }
  .bust { height: min(110vw, 46svh); }
  .hero__copy { bottom: 22px; }
  .hero__lead { gap: var(--s-2); }
}
@media (min-width: 600px) and (max-width: 1099px) {
  .hero { --hero-hz: 34svh; }
  .hero__word { top: 120px; }
  .bust { height: 50%; }
  .hero__copy { bottom: 6svh; }
}
@media (min-width: 1100px) {
  .hero { --hero-hz: 19svh; }
  .hero__word { top: 17%; }
  .bust { height: 72%; }
  .hero__copy { bottom: calc(var(--hero-hz) + 8svh); display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-6); }
  .hero__lead { max-width: min(420px, calc(50vw - 300px)); }
  .readout { display: grid; width: 236px; margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
  .readout > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 9px 0; border-top: 1px solid var(--hair); }
  .readout > div:last-child { border-bottom: 1px solid var(--hair); }
  .readout dt { color: var(--on-3); }
  .readout dd { margin: 0; color: var(--on); }
  .live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--cobalt-text); vertical-align: 1px; }
}
html:not(.js) .readout { display: none; }

/* ── Spec strip ────────────────────────────────────────────────────── */
.specs { position: relative; z-index: 1; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); background: linear-gradient(180deg, rgba(4, 6, 16, .92), rgba(4, 6, 16, .98)); }
.specs__row { display: grid; grid-template-columns: 1fr 1fr; margin-block: 0; }
.spec { display: grid; align-content: start; gap: var(--s-2); padding: var(--s-6) var(--s-4) var(--s-6) 0; }
.spec:nth-child(even) { padding-left: var(--s-4); border-left: 1px solid var(--hair); }
.spec:nth-child(n+3) { border-top: 1px solid var(--hair); }
.spec dt { color: var(--on-3); }
.spec dd { margin: 0; }
.spec__value { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 2.8vw, 40px); line-height: 1; letter-spacing: -.035em; }
.spec .t-small { color: var(--on-2); max-width: 26ch; }
@media (min-width: 900px) {
  .specs__row { grid-template-columns: repeat(4, 1fr); }
  .spec { padding: var(--s-7) var(--s-5); border-top: 0 !important; }
  .spec:first-child { padding-left: 0; }
  .spec + .spec { border-left: 1px solid var(--hair); }
}

/* ── Lineup (Orbit). Without JS: ten stacked full pages ────────────── */
.lineup { position: relative; z-index: 1; }
.snaps { display: none; }
.models { list-style: none; margin: 0; padding: 0; }
.model { position: relative; min-height: 100svh; padding: var(--s-8) 0; display: grid; align-content: center; gap: var(--s-6); }
.model__name { text-align: center; white-space: nowrap; font-size: clamp(40px, 11vw, 168px); padding-bottom: .08em; }
.model__name .ln { display: inline; }
.model__name.is-broken .ln { display: block; }
.obj { position: relative; display: flex; justify-content: center; }
.model__info { display: grid; gap: var(--s-5); }
.model__about { display: grid; gap: var(--s-2); max-width: 60ch; }
.model__kicker { color: var(--cobalt-text); }
.model__about .t-body { color: var(--on); }
.model__stack { color: var(--on-2); }
.model__specs { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); margin: 0; }
.model__specs > div { display: grid; gap: 6px; }
.model__specs dt { color: var(--on-3); }
.model__specs dt, .model__specs dd { margin: 0; white-space: nowrap; }
.model__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
html:not(.stage-on) .model__name { white-space: normal; }
html:not(.stage-on) .model__name .ln { display: inline-block; }
html:not(.stage-on) .obj--phone .obj__in { height: min(64svh, 560px); }
html:not(.stage-on) .obj--slab .obj__in { width: min(100% - 2 * var(--gutter), 860px); }
html:not(.stage-on) .model + .model { border-top: 1px solid var(--hair); }

/* ── Devices ───────────────────────────────────────────────────────── */
.obj--phone .obj__in > img { height: 100%; width: auto; filter: drop-shadow(0 30px 30px rgba(0, 0, 0, .7)) drop-shadow(0 -1px 0 rgba(190, 208, 255, .45)); }
.slab { position: relative; padding: 1%; border-radius: 16px; background: var(--silver-edge);
  transform: perspective(2000px) rotateX(6deg); transform-origin: 50% 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 0 rgba(93, 134, 255, .7), 0 -1px 0 rgba(200, 216, 255, .5), var(--shadow-object); }
.slab__screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: #020308; box-shadow: 0 0 0 1px #000; }
.slab__screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.slab__screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(162deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .03) 34%, transparent 35%); }

/* CSS iPhone for Blue Bird (no screenshot exists) */
.cphone { height: 100%; aspect-ratio: 416 / 848; padding: 3.2%; border-radius: 15% / 7.4%; background: var(--silver-edge);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 -1px 0 rgba(200, 216, 255, .5), var(--shadow-object); }
.cphone__screen { position: relative; height: 100%; overflow: hidden; border-radius: 12.4% / 6%; background: #000; }

/* ── Illustrated objects: AI Ad Studio, AlgolRun, Blue Bird ───────── */
.slab__screen.ad { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr auto; gap: 4.5% 5%; padding: 5.5% 6% 5%;
  background: radial-gradient(90% 80% at 80% 10%, #121a33 0%, #05070d 70%); container-type: inline-size; }
.ad__label { font-family: var(--f-mono); font-size: 2.1cqw; letter-spacing: .14em; text-transform: uppercase; color: var(--on-3); }
.ad__brief { display: grid; align-content: start; gap: 3cqw; padding-top: 2cqw; }
.ad__prompt { font-size: 4.6cqw; line-height: 1.15; letter-spacing: -.03em; font-weight: 500; color: var(--on); }
.ad__agent { display: inline-flex; align-items: center; gap: 1.4cqw; justify-self: start; padding: 1.2cqw 2.2cqw; border-radius: 99px; border: 1px solid var(--hair-2); font-size: 2.3cqw; color: var(--on-2); }
.ad__agent i { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: var(--atmo); }
.ad__preview { position: relative; justify-self: center; height: 100%; aspect-ratio: 9 / 16; max-height: 46cqw; overflow: hidden; border-radius: 2.2cqw; padding: 3cqw;
  display: grid; align-content: start; gap: 2.4cqw;
  background: radial-gradient(120% 70% at 50% 110%, #2558f0 0%, #12245f 45%, #070a14 80%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.ad__preview b { position: relative; z-index: 1; font-size: 4.4cqw; line-height: 1; letter-spacing: -.04em; font-weight: 600; color: #fff; }
.ad__orb { position: absolute; left: 50%; bottom: -30%; width: 86%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 18%, #e8eeff 0%, #7d9cff 12%, #2558f0 34%, #0b1640 70%); }
.ad__timeline { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: repeat(8, 1fr) auto; gap: 1.2cqw; align-items: center; padding-top: 2cqw; border-top: 1px solid var(--hair); }
.ad__timeline i { aspect-ratio: 9 / 12; border-radius: .8cqw; background: linear-gradient(180deg, #1b2a5c, #2558f0 140%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ad__timeline i:nth-child(odd) { background: linear-gradient(180deg, #2a2f3a, #0d0f15); }
.ad__timeline i:nth-child(3) { box-shadow: inset 0 0 0 1px #8eadff; }
.ad__head { position: absolute; left: 26%; top: 0; bottom: -1cqw; width: 2px; background: #fff; }
.ad__export { margin-left: 1cqw; padding: 1cqw 2cqw; border-radius: 99px; background: #fff; color: #05070d; font-family: var(--f-mono); font-size: 2.2cqw; font-weight: 500; }

.slab__screen.run { background: #04060c; container-type: inline-size; }
.run__sky { position: absolute; inset: 0 0 46% 0; background: linear-gradient(180deg, #03050b 0%, #0b1537 70%, #2a4fc9 100%); }
.run__floor { position: absolute; inset: 54% 0 0 0; overflow: hidden; background: linear-gradient(180deg, #0a1230, #04060c 60%); }
.run__floor svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.run__rails path { fill: none; stroke: rgba(142, 173, 255, .5); stroke-width: .25; vector-effect: non-scaling-stroke; }
.run__ties path { fill: none; stroke: rgba(142, 173, 255, .38); stroke-width: 1; vector-effect: non-scaling-stroke; }
.run__lane { fill: rgba(37, 88, 240, .22); }
.run__floor::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, #cfdcff 50%, transparent); z-index: 1; }
.run__runner { position: absolute; left: 50%; top: 66%; width: 7cqw; aspect-ratio: 1; transform: translateX(-50%); }
.run__runner i { position: absolute; inset: 0; border-radius: 1.2cqw; background: linear-gradient(150deg, #ffffff, #b9c4dc 45%, #4a5674); box-shadow: 0 2.4cqw 2cqw -1cqw rgba(37, 88, 240, .7); }
.run__title { position: absolute; left: 0; right: 0; top: 16%; display: grid; justify-items: center; gap: 1.6cqw; text-align: center; }
.run__title b { font-size: 10cqw; font-weight: 600; letter-spacing: -.05em; line-height: .9; color: transparent; background: var(--silver-text); -webkit-background-clip: text; background-clip: text; }
.run__title span { font-family: var(--f-mono); font-size: 2.2cqw; letter-spacing: .16em; text-transform: uppercase; color: var(--on-2); }

.cphone__screen.bird { background: linear-gradient(180deg, #071233 0%, #183aa8 55%, #4f7cff 100%); container-type: inline-size; }
.bird__island { position: absolute; left: 50%; top: 2.4%; width: 30%; height: 3.6%; transform: translateX(-50%); border-radius: 99px; background: #000; z-index: 3; }
.pipe { position: absolute; width: 17%; border-radius: 1.6cqw; background: linear-gradient(90deg, #6b7386, #f1f3f8 35%, #a7afc1 70%, #5d6577); }
.pipe::after { content: ""; position: absolute; left: -9%; right: -9%; height: 5cqw; border-radius: 1.4cqw; background: inherit; }
.pipe--1 { right: 5%; top: 0; height: 17%; } .pipe--1::after { bottom: 0; }
.pipe--2 { right: 5%; bottom: 9%; height: 42%; } .pipe--2::after { top: 0; }
.pipe--3 { left: 5%; bottom: 9%; height: 24%; } .pipe--3::after { top: 0; }
.bird__b { position: absolute; left: 38%; top: 47%; width: 15%; aspect-ratio: 1.15; border-radius: 50% 55% 45% 50%; background: radial-gradient(circle at 35% 30%, #ffffff 0%, #d7e2ff 30%, #7d9cff 100%); transform: rotate(-12deg); box-shadow: 0 2cqw 3cqw rgba(0, 0, 0, .35); }
.bird__b::before { content: ""; position: absolute; right: 18%; top: 26%; width: 18%; aspect-ratio: 1; border-radius: 50%; background: #05070d; }
.bird__b::after { content: ""; position: absolute; right: -16%; top: 46%; width: 26%; height: 20%; border-radius: 0 50% 50% 0; background: #c7d2ea; }
.bird__b i { position: absolute; left: 8%; top: 46%; width: 44%; height: 34%; border-radius: 50%; background: #2558f0; transform: rotate(-18deg); }
.bird__title { position: absolute; left: 0; right: 0; top: 21%; display: grid; justify-items: center; gap: 2cqw; z-index: 2; }
.bird__title b { font-size: 12.5cqw; font-weight: 600; letter-spacing: -.05em; line-height: .9; color: #fff; }
.bird__title span { font-family: var(--f-mono); font-size: 4.2cqw; letter-spacing: .14em; text-transform: uppercase; color: #d6e0ff; }
.bird__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 9%; background: linear-gradient(180deg, #c9d1e2, #6d768a); }

/* ── Stage mode: one pinned page per project ───────────────────────── */
html.stage-on { scroll-snap-type: y proximity; }
.stage-on .track { position: relative; height: calc(100svh + var(--n) * 110svh); }
.stage-on .snaps { display: block; }
.stage-on .snaps i { position: absolute; left: 0; width: 1px; height: 1px; top: calc(var(--i) * 110svh + 55svh); scroll-snap-align: start; }
.stage-on .stage {
  --hy: 72svh; --name-top: 7svh; --dev-h: 46svh; --slab-w: min(46vw, 70svh, 780px); --info-gap: max(13svh, 104px);
  position: sticky; top: 0; height: 100svh; overflow: hidden;
}
/* a floor of shadow under the info row, so the curve of the limb never runs behind text */
.stage-on .stage::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(100svh - var(--hy) - 2svh); z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 4, 9, 0) 0%, rgba(3, 4, 9, .55) 45%, rgba(3, 4, 9, .8) 100%); }
.stage-on .models { position: absolute; inset: 0; }
.stage-on .model { position: absolute; inset: 0; min-height: 0; padding: 0; display: block; visibility: hidden; transition: visibility 0s linear 1.1s; }
.stage-on .model.is-active { visibility: visible; transition: visibility 0s; }

.stage-on .model__name { position: absolute; left: 0; right: 0; top: var(--name-top); margin: 0; z-index: 1;
  opacity: 0; transform: translateY(5svh); filter: blur(6px);
  transition: opacity .45s var(--ease), transform .7s var(--ease), filter .45s var(--ease); }
.stage-on .model.is-before .model__name { transform: translateY(-4svh); }
.stage-on .model.is-active .model__name { opacity: 1; transform: none; filter: none; transition: opacity .7s var(--ease) .18s, transform 1s var(--ease-rise) .12s, filter .7s var(--ease) .18s; }

/* the device layer is masked by the planet: products rise from behind the horizon.
   --pcx / --pcy / --pr are the same circle js/space.js hands the shader, in stage coordinates. */
.stage-on .obj { position: absolute; inset: 0; z-index: 2; display: block; pointer-events: none;
  -webkit-mask: radial-gradient(circle at var(--pcx, 50%) var(--pcy, 300vh), transparent 0, transparent calc(var(--pr) - 1px), #000 calc(var(--pr) + 14px));
          mask: radial-gradient(circle at var(--pcx, 50%) var(--pcy, 300vh), transparent 0, transparent calc(var(--pr) - 1px), #000 calc(var(--pr) + 14px)); }
.stage-on .obj__in { position: absolute; left: 50%; top: var(--hy); pointer-events: auto;
  transform: translate(-50%, 6%); transition: transform .8s cubic-bezier(.5, 0, .75, .2); }
.stage-on .model.is-active .obj__in { transform: translate(-50%, -95%); transition: transform 1.25s var(--ease-rise) .22s; }
.stage-on .obj--phone .obj__in { height: var(--dev-h); }
.stage-on .obj--slab .obj__in { width: var(--slab-w); }

.stage-on .model__info { position: absolute; left: 0; right: 0; top: calc(var(--hy) + var(--info-gap)); z-index: 3;
  opacity: 0; transform: translateY(14px); transition: opacity .3s var(--ease), transform .5s var(--ease); }
.stage-on .model.is-active .model__info { opacity: 1; transform: none; transition: opacity .6s var(--ease) .55s, transform .8s var(--ease) .5s; }

@media (min-width: 1024px) {
  .stage-on .model__info { grid-template-columns: minmax(0, 6fr) minmax(0, 3.4fr) minmax(0, 2.6fr); column-gap: var(--s-6); align-items: start; padding-right: calc(var(--rail-w) - var(--gutter) + 24px); width: auto; margin-inline: max(var(--gutter), (100vw - var(--container)) / 2); }
  .stage-on .model__specs { flex-wrap: nowrap; column-gap: var(--s-5); }
  .stage-on .model__links { justify-content: flex-end; }
}
@media (min-width: 1024px) and (max-height: 760px) {
  .stage-on .model__about .t-body { font-size: 16px; }
  .stage-on .model__kicker { display: none; }
}

/* ── Orbit rail: an arc with ten stations and a moon (desktop), a pill (phones) ── */
.orbit[hidden] { display: none; }
.orbit { position: absolute; z-index: 5; color: var(--on); }
.orbit__count { margin: 0; color: var(--on-3); white-space: nowrap; }
.orbit__count b { color: var(--on); font-weight: 500; }
.orbit__btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--hair-2); background: rgba(3, 4, 9, .5); color: var(--on); font-size: 18px; cursor: pointer; transition: border-color .2s, background-color .2s, opacity .2s; }
.orbit__btn:hover:not(:disabled) { border-color: var(--on-2); background: rgba(255, 255, 255, .06); }
.orbit__btn:disabled { opacity: .3; cursor: default; }
.orbit__arc { display: none; }

@media (min-width: 1024px) {
  .orbit { right: max(18px, var(--gutter) - 14px); top: 50%; transform: translateY(-50%); width: 80px; display: grid; justify-items: end; gap: var(--s-4); }
  .orbit__count { padding-right: 8px; }
  .orbit__arc { display: block; position: relative; width: 80px; height: 420px; }
  .orbit__path { position: absolute; inset: 0; width: 80px; height: 420px; overflow: visible; }
  .orbit__path path { fill: none; stroke: var(--hair-2); stroke-width: 1; }
  .orbit__stations { list-style: none; margin: 0; padding: 0; }
  .orbit__stations li { position: absolute; transform: translate(-50%, -50%); }
  .orbit__stations button { position: relative; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
  .orbit__stations button span { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--on-3); background: var(--void); transition: transform .2s, border-color .2s, background-color .2s; }
  .orbit__stations li.is-past button span { background: var(--on-3); }
  .orbit__stations button:hover span { transform: scale(1.4); border-color: var(--on); }
  .orbit__stations button::after { content: attr(aria-label); position: absolute; right: 34px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 13px; color: var(--on-2); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .orbit__stations button:hover::after, .orbit__stations button:focus-visible::after { opacity: 1; }
  .orbit__stations button[aria-current="true"]::after { display: none; }
  .orbit__moon { position: absolute; left: 0; top: 0; width: 15px; height: 15px; z-index: 1; pointer-events: none;
    offset-path: path("M64 10 A476.5 476.5 0 0 0 64 410"); offset-rotate: 0deg; offset-distance: calc(var(--k, 0) / 9 * 100%);
    transition: offset-distance 1s var(--ease-rise); }
  .orbit__moon::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 65% 32%, #fff 0, #dfe4ee 25%, #6f7788 70%, #262a33 100%); box-shadow: 0 0 0 3px var(--void), 0 0 0 4.5px var(--atmo); }
  .orbit__label { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 14px; font-weight: 500; letter-spacing: -.005em; color: var(--on); }
  .orbit__ticks { display: none; }
  .orbit__btns { display: flex; gap: var(--s-2); }
}
@media (min-width: 1024px) and (max-height: 760px) {
  .orbit { transform: translateY(-50%) scale(.8); transform-origin: 100% 50%; }
}

/* phones + tablets: a compact bottom bar */
@media (max-width: 1023px) {
  .stage-on .stage { --hy: 62svh; --name-top: max(18px, 3.5svh); --dev-h: 40svh; --slab-w: min(80vw, 60svh); --info-gap: 7svh; }
  .orbit { left: var(--gutter); right: var(--gutter); bottom: max(12px, 1.6svh); height: 60px; display: flex; align-items: center; gap: var(--s-3); padding: 0 8px 0 18px; border-radius: var(--radius-pill); background: rgba(5, 7, 14, .82); box-shadow: inset 0 0 0 1px var(--hair); }
  .orbit__count { order: 1; font-size: 12px; }
  .orbit__ticks { order: 2; flex: 1; list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 7px; }
  .orbit__ticks li { width: 5px; height: 5px; border-radius: 50%; background: rgba(200, 212, 240, .25); transition: background-color .3s, box-shadow .3s; }
  .orbit__ticks li:nth-child(1), .orbit__ticks li:nth-child(10) { translate: 0 4px; }
  .orbit__ticks li:nth-child(2), .orbit__ticks li:nth-child(9) { translate: 0 2.2px; }
  .orbit__ticks li:nth-child(3), .orbit__ticks li:nth-child(8) { translate: 0 1px; }
  .orbit__ticks li:nth-child(4), .orbit__ticks li:nth-child(7) { translate: 0 .3px; }
  .orbit__ticks li.past { background: var(--on-3); }
  .orbit__ticks li.on { background: #fff; box-shadow: 0 0 0 2px var(--void), 0 0 0 3px var(--atmo); }
  .orbit__btns { order: 3; display: flex; gap: 6px; }
  .model__info { padding-bottom: 0; }
  .stage-on .model__info { display: grid; grid-template-columns: 1fr; gap: var(--s-3); }
  .stage-on .model__kicker { display: none; }
  .stage-on .model__specs { gap: var(--s-3) var(--s-6); }
  .stage-on .model__specs .t-num { font-size: 19px; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .stage-on .stage { --hy: 62svh; --dev-h: 42svh; --slab-w: min(78vw, 64svh); --info-gap: 6svh; }
  .stage-on .model__info { grid-template-columns: 1fr auto; column-gap: var(--s-6); }
  .stage-on .model__about { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .stage-on .stage { --hy: 57svh; --dev-h: 36svh; --slab-w: 90vw; --info-gap: 5svh; }
  .stage-on .model__about .t-body { font-size: 16px; line-height: 1.5; }
  .stage-on .model__stack { font-size: 14px; }
  .stage-on .model__specs dt { font-size: 11px; }
  .stage-on .model__specs .t-num { font-size: 17px; }
  .stage-on .model__links .go { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .stage-on .model__links .go--quiet { padding: 0 8px; }
}

/* ── About + Contact (opaque: they slide over the planet) ──────────── */
.about, .contact { position: relative; z-index: 2; background: var(--void-2); }
.about { border-top: 1px solid var(--hair); box-shadow: 0 -60px 80px -20px rgba(3, 4, 9, .9); }
.about__grid, .contact__grid { display: grid; gap: var(--s-5); }
.about__label { color: var(--on-3); padding-top: 12px; }
.about__body { display: grid; gap: var(--s-6); max-width: 880px; }
.about__body .t-h2 { color: var(--on); }
.about__em { color: var(--on-3); }
.about__body .t-lede { color: var(--on-2); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tags li { padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--hair-2); font-size: 15px; color: var(--on-2); }
.contact { padding-bottom: var(--section-y); }
.contact__grid { padding-top: var(--s-8); border-top: 1px solid var(--hair); }
.contact__links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); margin-top: var(--s-6); }
.go--big { min-height: 56px; padding: 0 24px; font-size: clamp(16px, 1.6vw, 20px); overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .about__grid, .contact__grid { grid-template-columns: 3fr 9fr; column-gap: var(--s-7); }
}

/* ── Footer ────────────────────────────────────────────────────────── */
.foot { position: relative; z-index: 2; background: var(--void-2); border-top: 1px solid var(--hair); }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-6); padding-block: var(--s-5) var(--s-6); }
.foot p { color: var(--on-3); }
.foot__links { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }
.foot__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-2); }
.foot__links a:hover { color: var(--on); text-decoration: underline; text-underline-offset: 4px; }

/* ── 404: space ground, a still limb, one way home ─────────────────── */
.lost { position: relative; z-index: 1; min-height: 100svh; display: grid; align-content: center; justify-items: start; gap: var(--s-5); padding-block: 120px 34svh; }
.lost .t-h1 { padding-bottom: .06em; }
.lost .t-lede { color: var(--on-2); max-width: 40ch; }
.lost__code { color: var(--cobalt-text); }
.is-404 { --apex: 74svh; --pr: max(92vw, 900px); }
.is-404 .space__fallback { display: block; }

/* ── Reduced motion: still bust, still planet, the stage still pins, swaps are instant, no snap ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  html.stage-on { scroll-snap-type: none; }
  .stage-on .model__name { filter: none; }
}
