body.design-scroll {
  --paper: #f3f1e9;
  --white: #faf8f2;
  --ink: #202723;
  --muted: #505d56;
  --line: #c1c9bf;
  --night: #0e1518;
  --night-alt: #1a2527;
  --night-line: #4b5c58;
  --muted-dark: #c5cfc8;
  --bright: #f8d080;
  --lime: #f8d080;
  --lime-line: #aaaa90;
  --accent-ink: #285248;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", serif;
  --width: 1220px;
}

.design-scroll .masthead {
  background: #0e1518;
  color: #faf8f2;
  box-shadow: 0 1px 0 #c3d0c748;
}

.design-scroll .section-nav a { color: #c6d2cd; }
.design-scroll .section-nav a:is(:hover,[aria-current]) { color: #fff; }
.design-scroll .section-nav a[aria-current]::after, .design-scroll .reading-line { background: #f8d080; }

.journey {
  --stage-height: calc(100svh - var(--header-height));
  --copy-inset: max(var(--gutter), calc((100vw - var(--width)) / 2));
  --apple: #70dec5;
  --next: #f8d080;
  --pixar: #f4a9ce;
  position: relative;
  isolation: isolate;
  background: #0e1518;
  color: #fcf8ee;
}

.journey-scene {
  position: sticky;
  top: var(--header-height);
  height: var(--stage-height);
  overflow: hidden;
  background: #111d20;
}

.journey-portrait {
  position: absolute;
  inset: 0 0 0 auto;
  width: 62%;
  opacity: .78;
  transition: opacity .42s ease-out;
}

.journey-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  filter: grayscale(1) contrast(1.08);
}

.journey-portrait::after, .journey-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.journey-portrait::after {
  background: linear-gradient(90deg,#111d20 1%,#111d200d 51%,#111d2038 100%);
}

.journey-scene::after {
  background: linear-gradient(0deg,#0e1518 0%,#0e1518de 10%,#0e151826 31%,transparent 43%);
}

.journey:not([data-phase="0"]) .journey-portrait { opacity: .07; }

.journey-outcome {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease-out;
  background: #0c1418;
}

.journey-outcome img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  filter: grayscale(.7) contrast(1.05);
}

.journey-outcome::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #101b20 3%, #101b2055 60%, #101b200e);
}

.journey[data-phase="4"] .journey-outcome { opacity: .63; }

.journey-graph { position: absolute; z-index: 1; inset: 0; }

.journey-key {
  position: absolute;
  z-index: 1;
  right: var(--copy-inset);
  top: 31%;
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 5px 15px;
  font: 650 12px/1.4 var(--mono);
  color: #e0ece6;
  text-shadow: 0 1px 3px #0e1518;
}

.journey[data-phase="0"] .journey-key { top: 52%; }
.journey:not([data-phase="0"]):not([data-phase="1"]) .portrait-source,
.journey:not([data-phase="2"]) .animation-source,
.journey:not([data-phase="3"]) .next-source,
.journey:not([data-phase="4"]) .keynote-source { display: none; }

.journey-key span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-inline: 0 6px;
  border-radius: 50%;
  background: var(--key);
}

.key-apple { --key: var(--apple); }
.key-next { --key: var(--next); }
.key-pixar { --key: var(--pixar); }

.journey-canvas { display: block; width: 100%; height: 100%; }
.journey:not(.is-live) :is(.journey-key, .journey-progress) { display: none; }

.journey-edge {
  position: absolute;
  z-index: 2;
  inset: auto var(--copy-inset) 0;
  min-height: 46px;
  border-top: 1px solid #a9bdb340;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: #bac9c3;
}

.journey-credit, .journey-sources { z-index: 2; }
.journey-sources { text-align: right; }

.journey-progress {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.journey-progress span {
  display: block;
  width: 16px;
  height: 2px;
  background: #7a8b84;
}

.journey[data-phase="0"] .journey-progress span:nth-child(1),
.journey[data-phase="1"] .journey-progress span:nth-child(2),
.journey[data-phase="2"] .journey-progress span:nth-child(3),
.journey[data-phase="3"] .journey-progress span:nth-child(4),
.journey[data-phase="4"] .journey-progress span:nth-child(5) { background: var(--next); }

.journey-steps {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * var(--stage-height));
  pointer-events: none;
}

.journey-step {
  display: flex;
  align-items: center;
  min-height: max(83svh, 420px);
  padding: 24px var(--copy-inset) 56px;
  scroll-margin-top: var(--header-height);
}

.journey-step:not(.journey-cover) { align-items: start; padding-top: clamp(50px, 13svh, 124px); }

.journey-cover { min-height: var(--stage-height); }
.journey-step:last-child { min-height: calc(var(--stage-height) + clamp(105px, 23svh, 240px)); }

.journey-copy { max-width: min(48vw, 540px); pointer-events: auto; }
.journey-cover .journey-copy { max-width: min(50vw, 625px); }

.journey.is-live .journey-step:not(.is-current) .journey-copy:not(:focus-within) {
  opacity: 0;
  pointer-events: none;
}

.journey.is-live .is-current .journey-copy {
  transform: translateY(var(--caption-offset, 0px));
  animation: caption-in .26s ease-out;
}

@keyframes caption-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.journey-name, .journey-year {
  margin-bottom: 20px;
  color: var(--next);
  font: 700 clamp(15px, 1.5vw, 21px)/1.3 var(--mono);
  letter-spacing: -.025em;
}

.journey-name span { border-left: 1px solid #8a9993; padding-left: 11px; margin-left: 7px; font-size: .7em; }

.journey-role {
  display: block;
  margin-bottom: 18px;
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: 700;
}

.journey-title {
  display: block;
  width: max-content;
  font: 750 clamp(64px, 8.25vw, 124px)/.99 var(--serif);
  letter-spacing: -.08em;
  text-shadow: 0 6px 24px #0e151875;
}

.journey-deck {
  margin-top: 24px;
  font-size: clamp(14px, 1.32vw, 18px);
  line-height: 1.75;
}

.journey-step:not(.journey-cover) h2 {
  font: 750 clamp(31px, 3.7vw, 56px)/1.18 var(--serif);
  letter-spacing: -.055em;
}

.journey-step:not(.journey-cover) h2 + p {
  max-width: 22em;
  margin-top: 19px;
  color: #dbe4dd;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.85;
}

.journey-continue {
  display: inline-flex;
  position: relative;
  gap: 13px;
  align-items: center;
  min-height: 44px;
  margin-top: 19px;
  padding-inline: 13px;
  color: #fff9e8;
  background: #111d2090;
  border: 1px solid #bba471;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  transition: background-color .15s ease, color .15s ease;
}

.journey-continue:hover { background: var(--next); color: #192023; }

.design-scroll .story-intro h2, .design-scroll .chapter h3 { font-family: var(--serif); text-wrap: balance; }
.design-scroll .chapter-range, .design-scroll .chapter-nav a:is(:hover,[aria-current]) { background: #dce9df; }
.design-scroll .visual-stage { background: #162221; }

@media (max-width: 850px) {
  .journey-title { font-size: clamp(48px, 8vw, 68px); }
  .journey-portrait { width: 70%; }
  .journey-break { display: none; }
}

@media (max-width: 650px) {
  .journey-cover { align-items: start; padding-top: clamp(23px, 6.7svh, 66px); }
  .journey-copy, .journey-cover .journey-copy { max-width: 100%; }
  .journey-title { font-size: clamp(28px, 9.3vw, 58px); }
  .journey-title br { display: none; }
  .journey-name, .journey-year { margin-bottom: 9px; }
  .journey-role { font-size: 13px; margin-bottom: 9px; }
  .journey-deck { margin-top: 12px; max-width: 24em; text-wrap: pretty; word-break: auto-phrase; }
  .journey-cover .journey-continue { margin-top: 13px; }
  .journey-portrait { width: 100%; }
  .journey-portrait img { object-position: 56% 15%; }
  .journey[data-phase="0"] .journey-portrait { opacity: .45; }
  .journey-portrait::after { background: linear-gradient(90deg,#111d2090,#111d200a), linear-gradient(0deg,#0e1518,transparent 80%); }
  .journey-key { left: var(--copy-inset); right: auto; top: 6%; }
  .journey[data-phase="0"] .journey-key { top: 45%; }
  .journey .journey-step:not(.journey-cover) {
    min-height: max(82svh, 350px);
    align-items: end;
    padding-top: 24px;
    padding-bottom: clamp(57px, 9svh, 88px);
  }
  .journey-step:not(.journey-cover) .journey-copy {
    max-width: 24em;
    background: #111d20ec;
    padding: 12px 14px 13px;
    border-left: 1px solid #9d8658;
  }
  .journey-step:not(.journey-cover) h2 { font-size: clamp(24px, 7vw, 37px); }
  .journey-step:not(.journey-cover) h2 + p { margin-top: 9px; font-size: 15px; line-height: 1.65; }
  .journey.is-live .journey-step:not(.journey-cover) {
    align-items: start;
    padding-top: calc(var(--stage-height) * .55);
    padding-bottom: 0;
  }
  .journey .journey-step:last-child { min-height: calc(var(--stage-height) + clamp(100px, 23svh, 180px)); }
  .journey-edge { min-height: 52px; align-items: end; padding-bottom: 8px; font-size: 10px; }
  .journey-progress { top: 6px; }
  .journey-credit { max-width: 47%; }
}

@media (max-width: 650px) and (max-height: 585px) {
  .journey-cover { padding-top: 19px; }
  .journey[data-phase="0"] .journey-key { top: 53%; }
  .journey-step:not(.journey-cover) { padding-bottom: 59px; }
  .journey.is-live .journey-step:not(.journey-cover) { padding-top: calc(var(--stage-height) * .51); }
}

@media (prefers-reduced-motion: reduce) {
  .journey-portrait, .journey-outcome, .journey-continue { transition: none; }
  .journey.is-live .is-current .journey-copy { animation: none; }
}

/* The scroll narrative keeps its diagram over the historical setting. */
.journey-film {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  background-image: linear-gradient(90deg, #0c171aed 0%, #0c171a8c 41%, #0c171a12 100%), var(--backdrop);
  background-size: cover;
  background-position: center, 62% 45%;
}
.film-animation { --backdrop: url("assets/animation.jpg"); }
.film-next { --backdrop: url("assets/nextcube-webserver.jpg"); }
.journey[data-phase="1"] .journey-portrait { opacity: .76; }
.journey[data-phase="2"] .film-animation, .journey[data-phase="3"] .film-next { opacity: 1; }
.journey[data-phase="4"] .journey-outcome { opacity: .95; }
.journey-credit { text-shadow: 0 1px 4px #000; }
@media (max-width: 650px) {
  .journey-film { background-position: center, 67% center; }
}
@media (prefers-reduced-motion: reduce) {
  .journey-film { transition: none; }
}

/* The three reference sections read like spreads in a printed monograph. */
.design-scroll :is(.overview,.timeline,.quotes) {
  --book-face: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  --book-rule: #bfb09a;
}
.design-scroll :is(.overview,.timeline,.quotes) h2 {
  font: 500 clamp(34px,4.3vw,66px)/1.28 var(--book-face);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.design-scroll :is(.overview,.quotes) h2::before { content: none; }
.design-scroll .overview {
  --book-wine: #702e3c;
  grid-template-columns: minmax(0,.87fr) minmax(0,1.13fr);
  grid-template-rows: auto 1fr;
  gap: 32px clamp(44px,8vw,122px);
  padding-block: clamp(64px,7.5vw,116px);
}
.overview .overview-intro { border-top: 3px double var(--book-rule); padding-top: 22px; }
.overview .overview-intro h2 { color: var(--book-wine); }
.overview .overview-intro p { margin-top: 20px; line-height: 1.95; }
.overview-portrait { width: min(100%, 310px); }
.overview-portrait img {
  width: 100%; height: auto;
  padding: 7px; border: 1px solid #c8bca8; background: #fbf8ef;
  box-shadow: 0 9px 16px -12px #57442a85;
}
.overview-portrait figcaption {
  margin-top: 10px; font-size: 11px; line-height: 1.75; color: #585246;
}
.overview-portrait figcaption span { display: block; font: 500 14px/1.65 var(--book-face); }
.overview .achievements {
  grid-column: 2; grid-row: 1 / 3;
  border-top: 3px double var(--book-rule);
}
.overview .achievements li { padding: clamp(22px,2.7vw,40px) 0; border-color: var(--book-rule); }
.overview .achievements li::before { content: none; }
.overview .achievements strong {
  font: 600 clamp(21px,2.1vw,32px)/1.55 var(--book-face);
  letter-spacing: -.028em; text-wrap: pretty; margin-bottom: 10px;
}
.overview .achievements p { color: #48453f; line-height: 1.88; }
.overview .text-sources { margin-top: 11px; color: #665441; }
.design-scroll .timeline {
  --lime-line: #52645e;
  --accent-ink: #ead1a6;
  color: #faf4e9;
  background: radial-gradient(ellipse at 5% 0,#293e35,transparent 68%),#142823;
  border-block: 1px solid #847451;
}
.timeline .reading-section { padding-block: clamp(55px,6vw,90px); }
.timeline .milestones { border-color: #9f9577; margin-top: clamp(27px,4vw,58px); }
.timeline .milestones a { padding-block: 24px 20px; }
.timeline .milestones a::before {
  width: 7px; height: 7px; background: #e5c99a; border: 1px solid #e5c99a;
}
.timeline .milestones span {
  font: 400 clamp(34px,4.8vw,74px)/1 var(--book-face);
  letter-spacing: -.045em; color: #f0d8ae; font-variant-numeric: lining-nums tabular-nums;
}
.timeline .milestones strong { font: 600 clamp(16px,1.5vw,22px)/1.5 var(--book-face); }
.timeline .milestones small { color: #cacec2; }
.timeline .milestones a:hover span, .timeline .milestones a:focus-visible span { color: white; }
.timeline .timeline-details { margin-top: 20px; }
.timeline .timeline-details summary { padding-block: 13px; font-weight: 500; letter-spacing: .035em; }
.timeline .timeline-details summary span {
  display: grid; place-items: center; width: 29px; height: 29px;
  border: 1px solid #8a937d; border-radius: 50%; line-height: 1;
}
.timeline .timeline-full tbody th {
  font: 400 18px/1.5 var(--book-face); font-variant-numeric: tabular-nums; color: #eed5a8;
}
.timeline .timeline-full :is(th,td) { padding-block: 12px; }
.timeline .timeline-full thead { color: #d4d9cf; font-size: 13px; }
.design-scroll .quotes { background: #f3eee3; color: #342a29; }
.quotes .reading-section { max-width: 1080px; }
.quotes .quotes-note { color: #695c50; margin: 12px 0 26px; font-size: 13px; }
.quotes .quote-grid { display: block; background: transparent; padding: 0; }
.quotes .quote {
  display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr);
  align-items: center; gap: clamp(32px,6vw,100px);
  background: transparent; border-bottom: 1px solid var(--book-rule);
  padding: clamp(26px,3.7vw,54px) clamp(16px,3.8vw,56px);
}
.quotes .quote:first-child {
  background: linear-gradient(116deg,#522831,#361b25);
  color: #fff7e8; border: 1px solid #64363b;
  box-shadow: inset 0 0 0 6px #43212a,inset 0 0 0 7px #a5866b;
  padding-block: clamp(38px,5vw,73px);
}
.quotes .quote blockquote, .quotes .quote:first-child blockquote {
  margin: 0; font: 500 clamp(23px,2.55vw,39px)/1.62 var(--book-face);
  letter-spacing: -.025em; text-wrap: pretty;
}
.quotes .quote blockquote::before { content: none; }
.quotes .quote:first-child blockquote::before {
  content: "“"; display: block; color: #e3bc89; font: 400 70px/.65 Georgia,serif;
}
.quotes .quote figcaption { color: #544b42; font-size: 14px; line-height: 1.95; }
.quotes .quote .text-sources { margin-top: 11px; color: #685743; }
.quotes .quote:first-child :is(figcaption,.text-sources) { color: #eadccc; }
.quotes .quote a:hover { color: #743743; }
.quotes .quote:first-child a:hover { color: #fff; }

@media (max-width: 760px) {
  .design-scroll .overview {
    grid-template-columns: minmax(0,1fr) minmax(125px,.55fr);
    grid-template-rows: auto auto; gap: 26px 18px;
  }
  .overview .achievements { grid-column: 1 / -1; grid-row: 2; }
  .overview-portrait { align-self: center; }
  .overview .overview-intro p { font-size: 15px; margin-top: 12px; }
}
@media (max-width: 650px) {
  .design-scroll :is(.overview,.timeline,.quotes) h2 { font-size: clamp(29px,7.3vw,40px); }
  .timeline .milestones a { padding: 10px 0 10px 18px; grid-template-columns: 80px 1fr; }
  .timeline .milestones a::before { top: calc(50% - 3px); }
  .timeline .milestones span { font-size: 32px; }
  .timeline .timeline-full tbody th { width: 81px; }
  .quotes .quote { grid-template-columns: minmax(0,1fr); gap: 17px; padding: 26px 8px; }
  .quotes .quote:first-child { padding: 33px 24px; }
  .quotes .quote:first-child blockquote::before { font-size: 58px; }
}
@media (max-width: 480px) {
  .design-scroll .overview { display: block; }
  .overview .overview-intro { padding-top: 15px; }
  .overview-portrait { display: flex; align-items: end; gap: 14px; margin-block: 22px; width: 100%; }
  .overview-portrait img { width: 100px; padding: 3px; }
  .overview-portrait figcaption { margin: 0 0 3px; }
}
