@font-face {
  font-family: "Saira";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
  src: url("../fonts/saira-latin.woff2") format("woff2");
}

:root {
  --space: #06070b;
  --ink: #f3efe8;
  --ink-soft: #c9c3b8;
  --mute: #9d9b97;
  /* The one accent: the main action and the designation. Colour otherwise belongs to the planets. */
  --amber: #f0a44b;
  --line: rgb(243 239 232 / 0.38);
  --line-strong: rgb(243 239 232 / 0.7);

  /* HUD frames: a 1px line with two cut corners, over a near-opaque fill */
  --frame-line: rgb(243 239 232 / 0.42);
  --frame-fill: rgb(9 11 16 / 0.9);
  --cut: 12px;
  --chamfer: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --bar-h: 4.5rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* One family, two widths: wide for names and labels, normal for reading */
  --font: "Saira", "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
  --wide: 125%;
  --semi: 112%;

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-color: #3a3530 var(--space); }

body {
  margin: 0;
  background: var(--space);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--amber); color: var(--space); }

a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.skip {
  position: fixed;
  top: 0.75rem;
  left: var(--gutter);
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--space);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* The frame. Applied by selector so the markup stays plain. */

.control,
.stops a,
.parts--callouts .part,
.frame {
  position: relative;
  isolation: isolate;
}
.control::before,
.stops a::before,
.parts--callouts .part::before,
.frame::before,
.control::after,
.stops a::after,
.parts--callouts .part::after,
.frame::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: var(--chamfer);
  transition: background-color 0.3s var(--ease-out);
}
.control::before,
.stops a::before,
.parts--callouts .part::before,
.frame::before { inset: 0; background: var(--frame-line); }
.control::after,
.stops a::after,
.parts--callouts .part::after,
.frame::after { inset: 1px; background: var(--frame-fill); }

/* Top bar */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  height: var(--bar-h);
  padding-inline: var(--gutter);
}

.bar__name {
  font-size: 0.9375rem;
  font-weight: 600;
  font-stretch: var(--wide);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

/* A live readout, like the clocks on a mission-control wall. Real time only. */
.clock {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  color: var(--mute);
  font-size: 0.875rem;
  font-stretch: var(--semi);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.clock::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.bar__nav { display: flex; gap: 2rem; }

.bar__nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  font-stretch: var(--semi);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-underline-offset: 0.4em;
  color: var(--ink);
}
.bar__nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--amber); }

/* The one control shape: a cut-corner outline. The bar's control is the main action, in amber. */

.control {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  --cut: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  font-stretch: var(--semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
.control:hover::after { background: rgb(243 239 232 / 0.14); }
.control--small { min-height: 2.5rem; padding: 0 1rem; font-size: 0.8125rem; }
.control--main::before { background: var(--amber); }
.control--main::after { background: rgb(40 28 12 / 0.92); }
.control--main:hover { color: var(--space); }
.control--main:hover::after { background: var(--amber); }

/* The journey: a pinned stage the scroll films */

.journey { position: relative; height: 1500vh; }

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: radial-gradient(120% 90% at 20% 50%, #0b0d14 0%, var(--space) 60%);
}

.stage__film { position: absolute; inset: 0; width: 100%; height: 100%; }

.stage__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(6 7 11 / 0.9) 0%, rgb(6 7 11 / 0.62) 30%, rgb(6 7 11 / 0) 58%),
    linear-gradient(180deg, rgb(6 7 11 / 0.88) 0%, rgb(6 7 11 / 0.6) 8%, rgb(6 7 11 / 0) 19%),
    linear-gradient(0deg, rgb(6 7 11 / 0.8) 0%, rgb(6 7 11 / 0) 32%);
}

.stage__shade--deploy {
  opacity: 0;
  background: linear-gradient(90deg, rgb(6 7 11 / 0.85) 0%, rgb(6 7 11 / 0.6) 36%, rgb(6 7 11 / 0) 60%);
}

.chapter {
  position: absolute;
  left: var(--gutter);
  max-width: min(38rem, 46vw);
}

/* The opening: a planet's night side under a calm sunrise, the name above
   it. It covers the scene until the first flight, then fades into it. */
.hero {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background: var(--space);
}

/* The sky, drawn in CSS: stars, a calm sunrise haze and the planet's rim.
   Approved by Edgar as final on 2026-11-29 (no generated image). */
.hero__sky {
  position: absolute;
  inset: 0;
  transform-origin: 50% 78%;
  background:
    radial-gradient(1px 1px at 12% 18%, rgb(243 239 232 / 0.7), transparent),
    radial-gradient(1px 1px at 27% 41%, rgb(243 239 232 / 0.45), transparent),
    radial-gradient(1px 1px at 38% 12%, rgb(243 239 232 / 0.55), transparent),
    radial-gradient(1px 1px at 61% 27%, rgb(243 239 232 / 0.5), transparent),
    radial-gradient(1px 1px at 72% 9%, rgb(243 239 232 / 0.7), transparent),
    radial-gradient(1px 1px at 86% 36%, rgb(243 239 232 / 0.45), transparent),
    radial-gradient(1px 1px at 93% 15%, rgb(243 239 232 / 0.55), transparent),
    radial-gradient(1px 1px at 6% 52%, rgb(243 239 232 / 0.4), transparent),
    radial-gradient(1px 1px at 48% 31%, rgb(243 239 232 / 0.35), transparent),
    radial-gradient(1px 1px at 79% 50%, rgb(243 239 232 / 0.35), transparent),
    radial-gradient(70% 42% at 50% var(--glow-y, 74%), rgb(240 164 75 / 0.16) 0%, rgb(240 164 75 / 0.05) 45%, transparent 70%),
    radial-gradient(34% 20% at 50% var(--glow-y, 72%), rgb(243 239 232 / 0.16) 0%, transparent 70%),
    var(--space);
}
.hero__sky::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 72%;
  width: 260vw;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, #040508 96%, #0d0e12 99.6%, rgb(243 239 232 / 0.9) 100%);
  box-shadow:
    0 -1px 0 rgb(243 239 232 / 0.75),
    0 -0.6vh 2.4vh rgb(243 239 232 / 0.18),
    0 -3vh 12vh rgb(240 164 75 / 0.14);
}

.intro {
  position: absolute;
  inset: 0 var(--gutter) 34%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
}

.intro__name {
  margin: 0;
  font-size: clamp(2.75rem, 9.5vw, 8.5rem);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* The designation, set like a rank on a mission patch */
.intro__promise {
  display: block;
  margin: 1.25rem 0 0;
  color: var(--amber);
  font-size: clamp(0.9375rem, 1.3vw, 1.125rem);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.intro__title {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  text-wrap: pretty;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.hero__explore { margin-top: 2rem; padding: 0 1.75rem; letter-spacing: 0.18em; }

/* After landing the project opens in a framed panel at the left; the ship stands to the right. */
.chapter {
  top: calc(var(--bar-h) + 2vh);
  width: min(32rem, 38vw);
  max-width: none;
  padding: 1.5rem 1.75rem 1.75rem;
  opacity: 0;
  --cut: 16px;
}

.chapter__name {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1.05;
  letter-spacing: -0.005em;
}
/* A segmented rule under each name, like the status bars on a console */
.chapter__name::after {
  content: "";
  display: block;
  width: 7.5rem;
  height: 2px;
  margin-top: 0.85rem;
  background: linear-gradient(90deg,
    var(--ink) 0 26%, transparent 26% 31%,
    var(--ink) 31% 52%, transparent 52% 57%,
    var(--amber) 57% 78%, transparent 78% 83%,
    rgb(240 164 75 / 0.4) 83% 100%);
}

.chapter__problem {
  margin: 1rem 0 0;
  max-width: 30rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-wrap: pretty;
}

/* Weight marks the one idea a project section must not lose. */
.mark { color: var(--ink); font-style: normal; font-weight: 600; }

.chapter__links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 0; }
.chapter__status { margin: 1rem 0 0; color: var(--mute); font-size: 1rem; }

/* Parts: cut-corner tiles. On a desktop they become tags pinned to the planet. */

.parts { display: grid; gap: 0.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }

.part {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  --cut: 10px;
  text-decoration: none;
}
.part__name {
  font-size: 1rem;
  font-weight: 600;
  font-stretch: var(--semi);
  line-height: 1.25;
  letter-spacing: 0.03em;
  transition: color 0.3s var(--ease-out);
}
.part__line { color: var(--ink-soft); font-size: 1rem; line-height: 1.4; }
div.part { cursor: default; }
.part:hover .part__name,
.part:focus-visible .part__name { color: var(--amber); }

.preview {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  width: min(38rem, 40vw);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  opacity: 0;
  translate: 0 calc(-50% + 12px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), translate 0.5s var(--ease-out);
}
.preview.is-on { opacity: 1; translate: 0 -50%; }
.preview--column { right: auto; left: var(--gutter); width: auto; max-width: min(32rem, 38vw); max-height: 40vh; translate: 0 12px; }
.preview--column.is-on { translate: 0 0; }




/* The story: photo, three short paragraphs, the contact links */
.story__head { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.story__head .chapter__links { margin: 0 0 0 auto; }
.story__head .chapter__name::after { display: none; }
.story__photo { width: 88px; height: 88px; object-fit: cover; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.story__text { margin-top: 1.25rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.story__text p { margin: 0 0 0.8rem; }
/* The story is the longest panel: on a desktop it reads in three columns */
.chapter--story { width: min(66rem, 70vw); }
.story__text { columns: 3; column-gap: 1.75rem; }
/* The story never grows past the room above the stop tabs. Its text scrolls
   inside the frame, so the frame stays put; the foot fades while there is more. */
.chapter--story { display: flex; flex-direction: column; max-height: calc(100svh - var(--bar-h) - 2vh - 5rem); }
.chapter--story .story__text { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.story__text.is-more { mask-image: linear-gradient(180deg, #000 calc(100% - 3rem), transparent); }

/* The cut for a far jump */
.stage__warp { position: absolute; inset: 0; background: var(--space); opacity: 0; visibility: hidden; pointer-events: none; }
.story__text p { break-inside: avoid; }
.story__stack { color: var(--ink); }

/* The stop list: segmented tabs, like the view switch on a console */
.stops {
  position: absolute;
  right: var(--gutter);
  bottom: 1.75rem;
  display: flex;
  gap: 0.375rem;
}
.stops a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.9rem;
  --cut: 7px;
  color: var(--mute);
  font-size: 0.875rem;
  font-weight: 500;
  font-stretch: var(--semi);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
.stops a::before { background: rgb(243 239 232 / 0.22); }
.stops a::after { background: rgb(9 11 16 / 0.72); }
.stops a:hover { color: var(--ink); }
.stops a[aria-current] { color: var(--ink); }
.stops a[aria-current]::before { background: var(--line-strong); }
.stops a[aria-current]::after { background: rgb(60 66 62 / 0.85); }

/* Callouts: a desktop project's parts, pinned to the planet as tags */
.callouts { position: absolute; inset: 0; pointer-events: none; visibility: hidden; opacity: 0; }
.callouts__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.callouts__path,
.callouts__leader { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-opacity 0.3s var(--ease-out); }
.callouts__path { stroke-opacity: 0.45; }
.callouts__leader { stroke-opacity: 0.8; }
.callouts__dot { fill: var(--ink); }
.callouts__ring { fill: none; stroke: var(--ink); stroke-opacity: 0.85; }
.callouts__pulse { fill: none; stroke: var(--amber); stroke-opacity: 0.8; transform-box: fill-box; transform-origin: center; animation: pin 2.4s var(--ease-out) infinite; }
@keyframes pin {
  from { scale: 0.4; opacity: 1; }
  to { scale: 1.8; opacity: 0; }
}
.callouts.has-hot g:not(.is-hot) > * { stroke-opacity: 0.18; }
.callouts g.is-hot .callouts__path { stroke: var(--amber); stroke-opacity: 1; stroke-width: 1.5; }

.parts--callouts { position: absolute; inset: 0; margin: 0; display: block; }
.parts--callouts li {
  position: absolute;
  top: 0;
  left: 0;
  width: min(13.75rem, 14.5vw);
  pointer-events: auto;
}
.parts--callouts .part { padding: 0.6rem 0.85rem 0.7rem; }
.callouts.has-hot li:not(.is-hot) .part__name,
.callouts.has-hot li:not(.is-hot) .part__line { color: var(--mute); }
.callouts li.is-hot .part::before { background: var(--amber); }

/* Short screens: the whole panel still fits above the fold */
@media (max-height: 820px) and (min-width: 761px) {
  .chapter { top: calc(var(--bar-h) + 0.5vh); padding: 1.25rem 1.5rem 1.4rem; }
  .chapter__name { font-size: 2.25rem; }
  .story__text { line-height: 1.5; }
  .story__text p { margin-bottom: 0.6rem; }
  /* Too short for three columns: one column that scrolls, so it reads top to bottom */
  .chapter--story { width: min(38rem, 48vw); }
  .story__text { columns: auto; }
}

/* Phone: text sits low, over a bottom shade; parts stay a list of tiles */

@media (max-width: 760px) {
  .bar { gap: 1rem; }
  .bar__nav,
  .clock { display: none; }
  .bar__name { margin-right: auto; font-size: 0.875rem; letter-spacing: 0.1em; }

  .stage__shade {
    background:
      linear-gradient(0deg, rgb(6 7 11 / 0.94) 0%, rgb(6 7 11 / 0.7) 38%, rgb(6 7 11 / 0) 62%),
      linear-gradient(180deg, rgb(6 7 11 / 0.6) 0%, rgb(6 7 11 / 0) 16%);
  }
  .stage__shade--deploy { background: linear-gradient(0deg, rgb(6 7 11 / 0.94) 0%, rgb(6 7 11 / 0.86) 66%, rgb(6 7 11 / 0.55) 77%, rgb(6 7 11 / 0) 88%); }

  .chapter { left: var(--gutter); right: var(--gutter); width: auto; max-width: none; }
  .chapter { padding: 0; }
  .chapter.frame::before,
  .chapter.frame::after { display: none; }
  .chapter { top: auto; bottom: 2.5rem; translate: none; }
  .intro { bottom: 40%; }
  .intro__name { font-size: 17vw; line-height: 0.92; }
  .intro__promise { margin-top: 1rem; font-size: 0.8125rem; letter-spacing: 0.16em; }
  .hero__sky { transform-origin: 50% 64%; --glow-y: 63%; }
  .hero__sky::after { top: 64%; width: 420vw; }
  .intro__title { margin-top: 1rem; font-size: 1rem; }

  .chapter__name { font-size: 1.875rem; }
  .chapter__problem { font-size: 1rem; }
  .part { position: relative; isolation: isolate; padding: 0.6rem 0.85rem; }
  .part::before,
  .part::after { content: ""; position: absolute; z-index: -1; clip-path: var(--chamfer); }
  .part::before { inset: 0; background: rgb(243 239 232 / 0.3); }
  .part::after { inset: 1px; background: rgb(9 11 16 / 0.82); }
  .chapter--web .part__line { display: none; }
  .chapter--web .parts { grid-template-columns: 1fr 1fr; }

  .preview,
  .stops { display: none; }
  .story__photo { width: 64px; height: 64px; }
  .story__text { columns: auto; }
  /* On a phone the story scrolls inside its panel; a swipe above it flies the ship. */
  .chapter { max-height: calc(100svh - var(--bar-h) - 3.5rem); overflow-y: auto; overscroll-behavior: contain; }
  .chapter--story { overflow: hidden; }
  .story__head .chapter__links { margin-left: 0; flex-basis: 100%; }
}

/* No motion: still scenes, no scrubbing */

@media (prefers-reduced-motion: reduce) {
  .journey { height: auto; }
  .stage { position: relative; height: auto; min-height: 100svh; overflow: visible; }
  .hero { position: relative; inset: auto; z-index: auto; height: 100svh; }
  .bar { background: rgb(6 7 11 / 0.92); }
  .chapter { position: relative; top: auto; left: auto; width: auto; max-width: none; max-height: none; overflow: visible; margin-top: 0; padding: 5rem var(--gutter); background: var(--space); opacity: 1; }
  .chapter { bottom: auto; }
  .chapter.frame::before,
  .chapter.frame::after { display: none; }
  .control, .bar__nav a, .stops a { transition: none; }
}

/* No 3D (no WebGL, or the scene failed to build): the same flat page as
   reduced motion, read with a normal scroll. Set by js/boot.js. */

.no-3d .journey { height: auto; }
.no-3d .stage { position: relative; height: auto; min-height: 100svh; overflow: visible; }
.no-3d .stage__film,
.no-3d .stage__shade,
.no-3d .stops,
.no-3d .preview { display: none; }
.no-3d .hero { position: relative; inset: auto; z-index: auto; height: 100svh; }
.no-3d .bar { background: rgb(6 7 11 / 0.92); }
.no-3d .chapter { position: relative; top: auto; bottom: auto; left: auto; width: auto; max-width: none; max-height: none; overflow: visible; margin-top: 0; padding: 5rem var(--gutter); background: var(--space); opacity: 1; }
.no-3d .chapter.frame::before,
.no-3d .chapter.frame::after { display: none; }
