@font-face {
  font-family: Archivo;
  src: url(archivo.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url(plex-mono.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --paper: #f1f2e8;
  --lime: #cafa69;
  --dim: #abb4a7;
  --edge: #354132;
  --pad: clamp(22px, 4.9vw, 94px);
  --mono: Plex, Consolas, monospace;
  --head: Archivo, Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #090d0a;
  color: var(--paper);
  font: 400 1rem/1.5 var(--head);
  -webkit-font-smoothing: antialiased;
}
a,
button {
  color: inherit;
}
a {
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
.orbit-area:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
}
.skip {
  position: fixed;
  top: -6rem;
  left: 1rem;
  background: var(--lime);
  color: #111;
  padding: 12px;
  z-index: 20;
}
.skip:focus {
  top: 1rem;
}
.mast {
  height: clamp(66px, 9svh, 90px);
  padding: 0 var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9;
}
.mast:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: linear-gradient(90deg, #aec3a939, #aec3a91c);
}
.wordmark {
  display: flex;
  align-items: center;
}
.wordmark img {
  display: block;
  width: 104px;
  height: auto;
  filter: brightness(0) invert(0.96);
}
.mast nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.95rem;
  font-weight: 550;
}
.mast nav a:hover,
footer a:hover {
  color: var(--lime);
}
.contact {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  border: 1px solid #6c7b64;
  border-radius: 2px;
  padding: 0.53em 1.05em;
}
.terminal-corner {
  width: 7px;
  height: 7px;
  box-shadow: inset -2px -2px var(--lime);
}
.journey {
  position: relative;
  height: 700vh;
  height: 700svh;
}
.anchors {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.anchors i {
  flex: 1;
}
.stage {
  position: sticky;
  top: 0;
  isolation: isolate;
  height: 100vh;
  height: 100svh;
  min-height: 330px;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 68% 43%,
    #263725 0,
    #101b13 35%,
    #090d0b 72%
  );
}
.stage:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.042;
  background-image: url(noise.png);
}
.world,
.poster,
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.world {
  z-index: -2;
}
.poster {
  background: url(system.webp) center/cover no-repeat;
  opacity: 1;
}
.stage[data-chapter="1"] .poster {
  background-image: url(airframe.webp);
}
.stage[data-shot="bench"] .poster {
  background-image: url(bench.webp);
}
.stage[data-shot="daq"] .poster {
  background-image: url(daq.webp);
}
#scene {
  display: block;
  opacity: 0;
}
.world.ready #scene {
  opacity: 1;
}
.world.ready .poster {
  opacity: 0;
}
.copy-zone {
  position: absolute;
  left: var(--pad);
  width: 37%;
  top: 48%;
  transform: translateY(-48%);
  display: grid;
  pointer-events: none;
}
.chapter {
  grid-area: 1/1;
  align-self: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition:
    opacity 0.32s,
    transform 0.55s,
    visibility 0.32s;
}
.chapter.active {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.chapter.active a {
  pointer-events: auto;
}
.overline,
.deck-label,
.drag-tip,
.controls button,
.callout,
.note-link {
  font: 400 0.77rem/1.3 var(--mono);
  letter-spacing: 0.07em;
}
.overline {
  margin: 0 0 21px;
  color: var(--lime);
  display: flex;
  align-items: center;
  gap: 11px;
  letter-spacing: 0.13em;
}
.overline i {
  display: block;
  width: 22px;
  height: 8px;
  background: repeating-linear-gradient(
    114deg,
    transparent 0 3px,
    var(--lime) 3px 5px
  );
}
h1,
h2,
h3,
p {
  margin: 0;
}
.chapter h1,
.chapter h2 {
  font-weight: 590;
  line-height: 0.83;
  letter-spacing: -0.083em;
  font-size: clamp(5rem, min(8.15vw, 16svh), 10.5rem);
  margin-left: -0.063em;
}
.chapter h1 span,
.chapter h2 span,
.notes h2 span {
  color: var(--lime);
}
.lede {
  font-size: clamp(1rem, 1.24vw, 1.35rem);
  color: #c1c8bb;
  line-height: 1.5;
  max-width: 22em;
  margin: 1.8rem 0;
}
.action {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 46px;
  background: var(--lime);
  color: #14200b;
  padding: 0 20px;
  font-size: 0.92rem;
  font-weight: 680;
  border-radius: 2px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.action:hover {
  background: #d9ff91;
  transform: translateY(-2px);
}
.scan-mark {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.scan-mark:after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.orbit-area {
  position: absolute;
  top: 12%;
  bottom: 14%;
  left: 41%;
  right: 1.5%;
  cursor: grab;
  touch-action: pan-y;
}
.orbit-area:active {
  cursor: grabbing;
}
.callout {
  position: absolute;
  pointer-events: none;
  display: none;
  align-items: center;
  white-space: nowrap;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: #cee5b5;
  text-shadow: 0 1px 4px #000;
}
.callout b {
  position: relative;
  width: clamp(16px, 2.8vw, 54px);
  height: 1px;
  background: linear-gradient(90deg, #bada8eaa, #9bbb6d33);
}
.callout b:before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  height: 5px;
  width: 5px;
  background: var(--lime);
}
.deck {
  position: absolute;
  bottom: 3.5svh;
  left: var(--pad);
  right: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #b3c8a72d;
}
.sequence,
.sequence nav,
.controls,
.controls button {
  display: flex;
  align-items: center;
}
.sequence {
  gap: clamp(16px, 3.5vw, 70px);
}
.deck-label,
.drag-tip {
  color: #a3ad9c;
}
.deck-label {
  text-transform: uppercase;
}
.sequence nav {
  gap: clamp(12px, 2.6vw, 42px);
}
.sequence a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a5aea0;
  font-size: 0.91rem;
}
.sequence a:before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid #63715e;
  transform: rotate(45deg);
}
.sequence a[aria-current] {
  color: var(--paper);
}
.sequence a[aria-current]:before {
  border-color: var(--lime);
  background: var(--lime);
}
.controls {
  gap: 22px;
}
.controls button {
  background: transparent;
  color: var(--paper);
  gap: 10px;
  min-height: 40px;
  padding: 4px 0 4px 12px;
  border: 0;
}
.pause-glyph {
  width: 10px;
  height: 11px;
  display: block;
  border-left: 3px solid var(--lime);
  border-right: 3px solid var(--lime);
}
[aria-pressed="true"] .pause-glyph {
  border: 0;
  border-left: 9px solid var(--lime);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  height: 0;
  width: 0;
}
.progress {
  position: absolute;
  bottom: 0;
  height: 2px;
  left: 0;
  right: 0;
}
.progress i {
  display: block;
  width: calc(100% / 7);
  height: 100%;
  background: #b8e85e;
  transform-origin: left;
}
.notes {
  padding: clamp(68px, 8vw, 132px) var(--pad);
  background: #10150f;
  border-top: 1px solid var(--edge);
}
.notes-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 18px;
}
.notes-heading h2 {
  font-size: clamp(3.4rem, 6vw, 7rem);
  font-weight: 550;
  letter-spacing: -0.073em;
  line-height: 0.95;
}
.notes-heading > p {
  max-width: 240px;
  color: var(--dim);
}
.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3.6vw, 70px);
}
.note-image {
  overflow: hidden;
  background: #171e18;
  aspect-ratio: 1.9;
}
.note-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.note:hover img {
  transform: scale(1.035);
}
.note-copy {
  padding: 22px 0;
}
.note-copy .overline {
  margin-bottom: 10px;
}
.note h3 {
  font-size: clamp(1.6rem, 2.6vw, 3rem);
  font-weight: 550;
  letter-spacing: -0.05em;
}
.note p {
  color: var(--dim);
  margin: 0.4em 0 0.9em;
}
.note-link {
  color: var(--paper);
  border-bottom: 1px solid var(--lime);
  padding-bottom: 3px;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding: 32px var(--pad);
  border-top: 1px solid var(--edge);
  font-size: 0.95rem;
}
@media (max-width: 750px) and (min-height: 481px) {
  .mast {
    height: 60px;
  }
  .wordmark img {
    width: 83px;
  }
  .mast nav {
    gap: 16px;
    font-size: 0.85rem;
  }
  .contact {
    padding: 0.43em 0.75em;
  }
  .copy-zone {
    top: clamp(74px, 11.5svh, 110px);
    left: var(--pad);
    right: var(--pad);
    width: auto;
    transform: none;
  }
  .chapter h1,
  .chapter h2 {
    font-size: clamp(3.1rem, 11vw, 5rem);
    line-height: 0.94;
    letter-spacing: -0.07em;
  }
  .chapter h1 br,
  .chapter h2 br {
    display: none;
  }
  .chapter h1 br:after,
  .chapter h2 br:after {
    content: " ";
  }
  .chapter[data-chapter="6"] h2 br {
    display: initial;
  }
  .chapter[data-chapter="6"] h2 br:after {
    content: none;
  }
  .chapter h1,
  .chapter h2 {
    white-space: normal;
  }
  .chapter .overline {
    font-size: 0.75rem;
    margin-bottom: 10px;
  }
  .lede {
    font-size: 1rem;
    max-width: 25em;
    margin: 0.65rem 0 0.85rem;
    line-height: 1.32;
  }
  .action {
    min-height: 38px;
    font-size: 0.85rem;
    padding: 0 13px;
  }
  .orbit-area {
    inset: 34% 0 12%;
  }
  .deck {
    bottom: max(15px, env(safe-area-inset-bottom));
    padding-top: 9px;
  }
  .deck-label,
  .drag-tip,
  .motion-text {
    display: none;
  }
  .sequence nav {
    gap: 16px;
  }
  .sequence a {
    font-size: 0.82rem;
  }
  .controls button {
    width: 38px;
    justify-content: center;
    padding: 0;
  }
  .callout {
    font-size: 0.66rem;
  }
  .notes-heading {
    align-items: start;
    flex-direction: column;
  }
  .notes-heading > p {
    max-width: none;
  }
  .notes-grid {
    grid-template-columns: 1fr;
  }
  .notes {
    padding: 60px var(--pad);
  }
  footer {
    justify-content: start;
  }
  footer .wordmark {
    width: 100%;
  }
}
@media (max-height: 580px) and (min-aspect-ratio: 1/1) {
  .mast {
    height: 46px;
  }
  .mast .wordmark img {
    width: 80px;
  }
  .chapter h1,
  .chapter h2 {
    font-size: min(9vw, 16vh);
  }
  .chapter .overline {
    margin-bottom: 11px;
  }
  .lede {
    margin: 12px 0;
    font-size: 0.95rem;
  }
  .action {
    min-height: 35px;
  }
  .deck {
    bottom: 8px;
    padding-top: 4px;
  }
  .copy-zone {
    top: 50%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}

.mast {
  position: fixed;
  transition: background 0.25s;
}
.past-stage .mast {
  background: #0b100cf5;
}
.controls [hidden],
.poster-mode .drag-tip,
.poster-mode .callout {
  display: none !important;
}
.poster-mode .world {
  z-index: -2;
}
.poster-mode .orbit-area {
  display: none;
}
.notes {
  scroll-margin-top: 4rem;
}
@media (max-width: 750px) and (min-height: 481px) {
  .poster {
    background-image: url(system-mobile.webp);
  }
  .stage[data-chapter="1"] .poster {
    background-image: url(airframe-mobile.webp);
  }
  .stage[data-shot="bench"] .poster {
    background-image: url(bench-mobile.webp);
  }
  .stage[data-shot="daq"] .poster {
    background-image: url(daq-mobile.webp);
  }
}

.studio-menu {
  position: relative;
}
.studio-menu summary {
  list-style: none;
  cursor: pointer;
}
.studio-menu summary::-webkit-details-marker {
  display: none;
}
.studio-menu summary span {
  color: var(--lime);
  font: 1rem var(--mono);
}
.studio-menu[open] summary span {
  transform: rotate(45deg);
}
.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  min-width: 165px;
  background: #151c15;
  border: 1px solid #637056;
  box-shadow: 0 8px 30px #0005;
}
.menu-list a {
  display: block;
  padding: 11px 15px;
}
.menu-list a:hover,
.menu-list a:focus-visible {
  background: #26321f;
}
.callout {
  pointer-events: auto;
  min-height: 32px;
  padding-right: 6px;
}
.callout:hover {
  color: white;
}
.studio-menu summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.stage[data-shot="pdb"] .poster {
  background-image: url(pdb.webp);
}
.stage[data-shot="fc"] .poster {
  background-image: url(fc.webp);
}
.stage[data-shot="esc"] .poster {
  background-image: url(esc.webp);
}
.stage.loading-pose .world.ready #scene {
  opacity: 0;
}
.stage.loading-pose .world.ready .poster {
  opacity: 1;
}
.stage.loading-pose .orbit-area,
.stage.loading-pose .drag-tip {
  visibility: hidden;
}
.reader-section {
  position: relative;
  background: #0c110e;
  border-top: 1px solid var(--edge);
  scroll-margin-top: 0;
}
.reader-rail {
  scroll-margin-top: 80px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px var(--pad);
  background: #101810;
  border-bottom: 1px solid var(--edge);
  font: 400 0.8rem/1.4 var(--mono);
}
.reader-rail span {
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.reader-rail a {
  color: #ced6ca;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.dossier {
  display: block;
  min-width: 0;
  scroll-margin-top: 80px;
}
.archive,
.studio-section {
  scroll-margin-top: 66px;
}
.loop-tail {
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  background: #090d0b;
}
.stage.return-stage {
  position: fixed;
  inset: var(--tail-top) 0 auto;
  z-index: 4;
  overflow: hidden;
}
.no-scroll {
  overflow: hidden;
}
.studio-menu:not([open]) .menu-list {
  display: none;
}
@media (min-width: 1050px) {
  .reader-section {
    display: grid;
    grid-template-columns: minmax(220px, 25%) 1fr;
  }
  .reader-rail {
    height: 100vh;
    height: 100svh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: start;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid var(--edge);
    border-bottom: 0;
    padding: 16vh clamp(18px, 3vw, 60px);
    background: linear-gradient(145deg, #172016, #0b110c);
  }
  .reader-rail span {
    color: #ecf2df;
    font: 550 clamp(1.6rem, 3vw, 3.8rem) / 0.99 var(--head);
    letter-spacing: -0.06em;
    text-transform: none;
    margin-bottom: 10px;
  }
  .reading-stage {
    position: fixed;
    left: 1.7vw;
    top: 39vh;
    width: 21.5vw;
    height: 32vh;
    min-height: 160px;
    z-index: 3;
    border: 1px solid #3c4d36;
    border-radius: 2px;
  }
  .reading-stage .copy-zone,
  .reading-stage .sequence,
  .reading-stage .progress,
  .reading-stage .drag-tip {
    display: none;
  }
  .reading-stage .orbit-area {
    inset: 0 0 34px;
  }
  .reading-stage .deck {
    bottom: 0;
    left: 12px;
    right: 12px;
    padding: 0;
    justify-content: end;
  }
  .reading-stage .controls button {
    font-size: 0.74rem;
    min-height: 32px;
  }
  .reading-stage .poster {
    background-position: 70% center;
  }
}
@media (max-width: 750px) and (min-height: 481px) {
  .stage[data-shot="pdb"] .poster {
    background-image: url(pdb-mobile.webp);
  }
  .stage[data-shot="fc"] .poster {
    background-image: url(fc-mobile.webp);
  }
  .stage[data-shot="esc"] .poster {
    background-image: url(esc-mobile.webp);
  }
  .deck {
    gap: 5px;
  }
  .sequence {
    min-width: 0;
    flex: 1;
  }
  .sequence nav {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }
  .sequence a {
    flex-direction: column;
    gap: 5px;
    padding: 4px 0;
    font-size: clamp(0.75rem, 3vw, 0.9rem);
  }
  .controls button {
    width: 28px;
  }
  .reader-rail {
    flex-wrap: wrap;
    gap: 14px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .stage:not(.reading-stage) .chapter {
    will-change: opacity, transform;
  }
}

@media (max-width: 1049px) {
  .reader-section {
    scroll-margin-top: clamp(60px, 9svh, 90px);
  }
}

@media (max-width: 1024px) and (min-aspect-ratio: 1/1) {
  .deck-label, .drag-tip { display: none; }
  .sequence nav { gap: clamp(8px, 2.5vw, 22px); }
}
@media (max-height: 400px) and (min-aspect-ratio: 1/1) {
  .copy-zone { width: 42%; top: 48%; }
  .chapter h1, .chapter h2 { font-size: min(8vw, 13vh); }
  .chapter .overline { margin-bottom: 8px; }
  .chapter .lede { margin: 7px 0 10px; line-height: 1.27; }
}

/* Keep all scenes reachable without crowding the deck. */
.deck { gap: clamp(12px, 2vw, 32px); }
.sequence { min-width: 0; flex: 1; gap: 18px; }
.sequence nav { min-width: 0; gap: clamp(14px, 1.7vw, 28px); overflow-x: auto; scrollbar-width: thin; scrollbar-color: #536848 transparent; padding: 8px 4px; overscroll-behavior-x: contain; }
.sequence a { flex: 0 0 auto; white-space: nowrap; min-height: 32px; }
.controls { flex: 0 0 auto; }
@media (max-width: 1350px) { .drag-tip, .deck-label { display: none; } }
@media (max-width: 750px) and (min-height: 481px) {
  .sequence nav { justify-content: flex-start; gap: 19px; padding: 4px; }
  .sequence a { font-size: 0.8rem; }
}
