@font-face {
  font-family: Archivo Black;
  src: url("assets/archivo-black.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}
:root {
  --display: "Archivo Black", "Arial Black", Arial, sans-serif;
  --text: Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --ink: #0a0c0b;
  --paper: #f6f4e9;
  --pink: #ffb2cd;
  --gutter: clamp(17px, 1.55vw, 34px);
  color-scheme: dark;
  background: var(--ink);
  font-family: var(--text);
}
* { box-sizing: border-box; }
html, body, h1, p { margin: 0; }
button {
  appearance: none;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#voyage { height: 580vh; height: 580svh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  color: var(--ink);
  background: #0b0c0c;
}
.screen { position: absolute; inset: 0; transform-origin: center; will-change: transform; pointer-events: none; }
.cover, #scenery { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cover { object-fit: cover; object-position: 52% 50%; }
.edge-wash { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(235,241,235,.24), transparent 23%, transparent 77%, rgba(4,20,19,.24)); }
.mast { position: absolute; z-index: 2; inset: 0 0 auto; pointer-events: none; }
.identity { position: absolute; top: var(--gutter); left: var(--gutter); }
h1 { font: 900 clamp(53px, 5.75vw, 150px)/.85 var(--display); letter-spacing: -.068em; }
.title-lines, .title-lines > span { display: block; white-space: nowrap; }
.title-key { margin-top: clamp(11px,.9vw,20px); max-width: 95%; display: flex; align-items: center; justify-content: space-between; font: 500 clamp(9px,.72vw,16px)/1 Georgia, "Segoe UI Historic", serif; letter-spacing: .14em; }
.title-key i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.station, .menu { position: absolute; top: var(--gutter); font-size: clamp(10px,.77vw,15px); font-weight: 650; }
.station { left: 50%; display: grid; line-height: 1.23; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.menu { right: var(--gutter); display: flex; align-items: center; gap: clamp(13px,1.6vw,38px); pointer-events: auto; margin-top: -7px; }
.menu button, #next { display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 34px; white-space: nowrap; letter-spacing: .06em; }
.menu button:hover, #next:hover { text-decoration: underline; text-underline-offset: .33em; }
.play-mark { width: 0; height: 0; border-top: .36em solid transparent; border-bottom: .36em solid transparent; border-left: .58em solid currentColor; }
#film[aria-pressed=true] .play-mark { width: .55em; height: .7em; border: 0; border-inline: 2px solid currentColor; }
.chapter-copy { position: absolute; left: 50%; pointer-events: none; }
.harbour-copy { top: 66.5%; max-width: min(340px,37vw); color: white; }
.harbour-copy p, .sound-note, .crew-note { font-size: clamp(14px,1.05vw,19px); line-height: 1.72; font-weight: 600; letter-spacing: .018em; text-wrap: pretty; }
.harbour-copy p, .sound-note { text-shadow: 0 1px 6px #0b2726, 0 0 24px #0b2221; }
.sound-copy { top: 55.5%; width: 48%; color: var(--pink); opacity: 0; }
.route-fact, .crew-figures { font: 900 clamp(32px,3.65vw,88px)/.93 var(--display); letter-spacing: -.061em; }
.route-fact > span { display: block; overflow: hidden; padding-bottom: .035em; }
.route-fact b { display: block; font-weight: 900; text-shadow: 0 1px 12px #2f35484d; }
.sound-note { margin-top: 1em; color: white; }
.crew-layout { position: absolute; inset: 0; color: var(--paper); pointer-events: none; opacity: 0; }
.crew-note { position: absolute; left: var(--gutter); top: 46%; width: min(18%,245px); font-weight: 500; }
.crew-figures { position: absolute; left: 50%; top: var(--crew-caption,76%); transform: translateX(-50%); width: max-content; text-align: center; font-size: clamp(27px,3.6vw,80px); }
.stage.night .mast { color: var(--paper); }
.lower {
  position: absolute; z-index: 2; inset: auto 0 0; display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; padding: 0 var(--gutter) max(12px,env(safe-area-inset-bottom)); color: white;
  font-size: clamp(10px,.75vw,15px); font-weight: 650; text-shadow: 0 1px 6px #092a29;
}
.chapter-nav, .chapter-stops { display: flex; align-items: center; }
.chapter-nav { gap: 12px; }
#counter { font-variant-numeric: tabular-nums; letter-spacing: .07em; }
.chapter-stops button { position: relative; width: 25px; height: 34px; }
.chapter-stops button::before { content: ""; position: absolute; inset: calc(50% - 1px) 2px auto; height: 2px; background: #ffffff78; }
.chapter-stops button[aria-current=step]::before, .chapter-stops button:hover::before { background: white; }
.signature { position: absolute; left: 50%; font-size: .91em; letter-spacing: .01em; }
#next { justify-self: end; gap: 10px; }
.arrow { font-family: Arial,sans-serif; font-size: 1.5em; font-weight: 400; }
.offline { position: fixed; inset: auto 0 0; padding: 15px; color: white; background: #101616; z-index: 9; }
@media (min-width: 741px) and (max-height: 570px) {
  h1 { font-size: min(5.3vw,13vh); }
  .sound-copy { top: 46%; }
  .crew-figures { font-size: min(3.1vw,6vh); }
}
@media (max-width: 740px) {
  #voyage { height: 505vh; height: 505svh; }
  .identity { top: max(56px,calc(env(safe-area-inset-top) + 42px)); }
  h1 { font-size: clamp(53px,11.1vw,76px); }
  .title-key { margin-top: 10px; font-size: 9px; }
  .station { top: max(17px,env(safe-area-inset-top)); left: var(--gutter); font-size: 10px; display: flex; gap: 7px; align-items: center; }
  .station span:last-child { display: none; }
  .menu { top: max(17px,env(safe-area-inset-top)); gap: 16px; font-size: 12px; margin-top: -11px; }
  .menu button { min-height: 35px; }
  .menu .wide-link { display: none; }
  .edge-wash { background: linear-gradient(to bottom, rgba(235,241,235,.36), transparent 33%, transparent 55%, rgba(4,20,19,.36)); }
  .chapter-copy { left: var(--gutter); }
  .harbour-copy { top: auto; bottom: 14%; max-width: min(78%,340px); }
  .harbour-copy p, .crew-note, .sound-note { font-size: 14px; }
  .sound-copy { top: auto; bottom: 13%; width: calc(100% - var(--gutter) * 2); }
  .route-fact { font-size: clamp(35px,8vw,53px); }
  .crew-note { left: var(--gutter); top: var(--crew-note-top,62%); width: min(83%,430px); line-height: 1.6; }
  .crew-figures { text-align: right; left: auto; right: var(--gutter); transform: none; font-size: clamp(26px,7.8vw,48px); }
  .signature { display: none; }
  .lower { font-size: 11px; padding-bottom: max(13px,env(safe-area-inset-bottom)); }
  .chapter-stops button { width: 29px; min-height: 40px; }
}
@media (max-width: 740px) and (max-height: 630px) {
  .crew-note { font-size: 12px; }
  .crew-figures { font-size: 24px; }
  .harbour-copy { bottom: 15%; }
}
@media (max-height: 490px) and (orientation: landscape) {
  .identity { top: var(--gutter); }
  h1 { font-size: min(7.6vw,13vh); }
  .station { display: none; }
  .crew-note { left: var(--gutter); top: 45%; width: 22%; font-size: 11px; }
  .crew-figures { left: 50%; right: auto; transform: translateX(-50%); text-align: center; font-size: min(3.2vw,6vh); }
  .harbour-copy, .sound-copy { left: 50%; top: 54%; bottom: auto; max-width: 44%; }
  .route-fact { font-size: min(5vw,7vh); }
  .sound-note { margin-top: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
