.chapter-copy:not(:focus-within) {
  opacity: var(--chapter-read,1);
  transform: translate3d(0,var(--chapter-slide,0px),0);
}
.chapter-copy:not(:focus-within) h2 {
  clip-path: inset(-9px -8px var(--chapter-clip,0%) -8px);
}
.chapter-copy:focus-within { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .service-panel:not([hidden]) { animation: operation-in .56s cubic-bezier(.2,.8,.25,1) both; }
}
@keyframes operation-in {
  from { opacity: .65; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .freight-shutter.is-active { display: none; }
}

.freight-shutter {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.freight-shutter.is-active { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .hero { height: 68svh; }
  .operations { height: 79svh; }
  .transfer { height: 84svh; }
  .dispatch { height: 92svh; }
  .dock { height: 105svh; }
  .ocean { height: 144svh; }
  body:not(.resource-page) .header { transition: opacity .18s ease; }
}
@media (min-width: 761px) {
  .transfer .chapter-copy { top: 14svh; margin-top: 17svh; }
  .transfer .chapter-copy h2 { font-size: clamp(2.25rem,4vw,4.2rem); }
}
body.logo-opening .header:not(:focus-within):not(:has(.mobile-nav[open])) {
  opacity: 0;
  pointer-events: none;
}
body.logo-opening .story .chapter:not(.hero) a:not(:focus) { pointer-events: none; }
.hero .skip:focus { pointer-events: auto; }
.stage-shade {
  background: linear-gradient(180deg,#090909dc,transparent 29%,transparent 53%,#080808f5 100%),
              radial-gradient(ellipse at center,transparent 48%,#0a0a0a50 100%);
}
.freight-word { display: inline-block; }
.chapter-copy:not(:focus-within) .freight-word {
  transform: translateY(var(--word-rise,0%));
  clip-path: inset(-.2em -.08em var(--word-clip,0%) -.08em);
}
#wake-transition {
  position: fixed;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  visibility: hidden;
}
#wake-transition.is-active { visibility: visible; }
.stage { opacity: var(--stage-opacity,1); }
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: var(--outro,0);
  background: linear-gradient(transparent 61%,#0c0c0c 100%);
}
.network-section .section-head { position: relative; z-index: 4; background: #0c0c0c; }
@media (prefers-reduced-motion: reduce) {
  #wake-transition { display: none; }
}

.harbor { transform: scale(var(--sea-scale,1.105)) translate(var(--sea-drift,0%),var(--sea-ascent,0%)); }
.contact-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--contact-light,0);
  background:
    radial-gradient(ellipse at var(--contact-x,66%) var(--contact-y,66%),#53ff8499 0%,#24c95867 27%,#0a5d2926 67%,transparent 100%),
    linear-gradient(157deg,#072c1480 0%,#17743b29 48%,#0b592669 100%);
  mix-blend-mode: screen;
}
.contact-light::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: var(--contact-pulse,0);
  background: radial-gradient(ellipse 38% 25% at var(--contact-x,50%) var(--contact-y,65%),#8effad75,transparent);
}
.stage[data-cargo-contact="ship"] .contact-light {
  background:
    radial-gradient(ellipse at var(--contact-x,75%) var(--contact-y,53%),#64ff8d8d 0%,#23d25c65 25%,#09713925 64%,transparent 100%),
    linear-gradient(178deg,#06382083 4%,#2bbe5655 51%,#0656287a 100%);
}
@media (prefers-reduced-motion: reduce) {
  .contact-light { opacity: calc(var(--contact-light,0) * .63); }
  .contact-light::after { display: none; }
  .harbor { transform: none; }
}

/* What Gantry does, under the logo while it fills the opening screen. */
.opening-line {
  margin: 0; width: max-content; max-width: 88vw;
  color: var(--white); text-align: center; text-wrap: balance;
  font: 600 clamp(1.25rem, 2.05vw, 2.1rem)/1.15 var(--display); letter-spacing: -.025em;
}
body.logo-opening .opening-line {
  position: fixed; z-index: 3; left: var(--logo-x, 50%); top: var(--logo-bottom, 64svh);
  transform: translateX(-50%); opacity: var(--opening-line, 1); pointer-events: none;
}
body:not(.logo-opening) .opening-line {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* Journey polish: the header clears over the journey so the scene has the whole screen. */
body:not(.resource-page).in-journey .header:not(:focus-within):not(:has(.mobile-nav[open])) {
  background: linear-gradient(180deg, #0b0b0bd9 0%, #0b0b0b66 62%, #0b0b0b00 100%);
  border-bottom-color: transparent;
}
/* A fine grain over the stage marries the drawn crane, truck and ship to the photographed sky and harbour. */
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .11; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
