:root {
  color-scheme: dark;
  --ink: #f4f7f4;
  --muted: #93aaa9;
  --gold: #eab149;
  --teal: #2f9489;
  --deep: #06131d;
  --progress: 0;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--deep);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  overscroll-behavior-y: none;
}

a { color: inherit; }

.journey { min-height: 500vh; }

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 72%, rgba(49, 139, 143, .16), transparent 34%),
    linear-gradient(180deg, #06131d 0%, #0b2530 54%, #12333a 100%);
}

.sky-glow {
  position: absolute;
  width: 82vw;
  height: 82vw;
  left: 50%;
  top: 48%;
  translate: -50% -50%;
  border-radius: 50%;
  opacity: calc(.45 + var(--progress) * .25);
  background: radial-gradient(circle, rgba(238, 177, 73, .12), rgba(47, 148, 137, .07) 34%, transparent 68%);
  transform: scale(calc(.82 + var(--progress) * .3));
  will-change: transform, opacity;
}

.stars {
  position: absolute;
  inset: 0;
  opacity: calc(.52 - var(--progress) * .28);
  background-image:
    radial-gradient(circle, rgba(255,255,255,.65) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,255,255,.28) 0 1px, transparent 1.5px);
  background-position: 0 0, 36px 42px;
  background-size: 86px 86px, 117px 117px;
}

.masthead {
  position: absolute;
  z-index: 20;
  top: clamp(20px, 4vw, 44px);
  left: clamp(20px, 5vw, 72px);
  right: clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Segoe UI", Arial, sans-serif;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.03em;
}

.brand-name,
.study-label {
  color: rgba(244, 247, 244, .7);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.scene-copy {
  position: absolute;
  z-index: 10;
  width: min(560px, calc(100vw - 40px));
  left: clamp(20px, 8vw, 120px);
  top: clamp(118px, 20vh, 190px);
  transition: opacity .25s ease;
}

.eyebrow {
  color: var(--gold);
  font: 600 .72rem/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
}

h1 {
  max-width: 650px;
  margin: 14px 0 12px;
  font: 600 clamp(3rem, 7vw, 7.5rem)/.9 "Segoe UI", Arial, sans-serif;
  letter-spacing: -.065em;
}

.scene-copy p {
  max-width: 400px;
  margin: 0;
  color: rgba(244, 247, 244, .65);
  font-size: clamp(.95rem, 1.3vw, 1.12rem);
  line-height: 1.6;
}

.route {
  position: absolute;
  z-index: 3;
  left: 8vw;
  right: 8vw;
  top: 61%;
  height: 1px;
  opacity: .55;
}

.route-line {
  height: 1px;
  width: calc(var(--progress) * 100%);
  background: linear-gradient(90deg, var(--gold), rgba(234,177,73,.15));
  box-shadow: 0 0 18px rgba(234,177,73,.4);
}

.route-dot {
  position: absolute;
  top: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(234,177,73,.08);
}

.route-dot--origin { left: 0; }
.route-dot--destination { right: 0; }

.world {
  position: absolute;
  z-index: 5;
  inset: 0;
}

.ship {
  position: absolute;
  width: clamp(330px, 48vw, 720px);
  left: 0;
  top: 55%;
  transform-origin: 50% 75%;
  will-change: transform;
}

.ship svg { display: block; width: 100%; overflow: visible; }

.ship-containers rect {
  stroke: rgba(4, 31, 40, .4);
  stroke-width: 2;
}

.cargo-container {
  position: absolute;
  z-index: 8;
  width: clamp(54px, 6vw, 86px);
  aspect-ratio: 1.92 / 1;
  left: 10vw;
  top: 56%;
  overflow: hidden;
  border: 2px solid #efca75;
  border-radius: 3px;
  background: linear-gradient(135deg, #e7ae40, #c97a2e);
  box-shadow: 0 16px 35px rgba(0,0,0,.35);
  will-change: transform, opacity;
}

.cargo-container span {
  float: left;
  width: 20%;
  height: 100%;
  border-right: 1px solid rgba(77,37,5,.35);
}

.cargo-container b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #18333a;
  font: 700 clamp(.55rem, 1vw, .85rem)/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: .15em;
}

.port {
  position: absolute;
  z-index: 3;
  width: min(260px, 24vw);
  height: 35vh;
  bottom: 17vh;
  opacity: .82;
}

.port--origin { left: -2vw; }
.port--destination { right: -2vw; transform: scaleX(-1); }
.port--destination .port-label { transform: scaleX(-1); }

.port-label {
  position: absolute;
  left: 34%;
  bottom: -27px;
  color: rgba(244,247,244,.5);
  font: 600 .65rem/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: .22em;
}

.crane { position: absolute; inset: 0 0 12px 0; }

.crane-tower {
  position: absolute;
  left: 18%;
  bottom: 0;
  width: 7%;
  height: 82%;
  border: 3px solid #68888a;
  border-width: 3px 7px;
  transform: skew(-4deg);
}

.crane-arm {
  position: absolute;
  left: 19%;
  top: 11%;
  width: 67%;
  height: 7px;
  background: #789597;
  transform-origin: left center;
  transform: rotate(3deg);
}

.crane-cable {
  position: absolute;
  left: 70%;
  top: 15%;
  width: 1px;
  height: 37%;
  background: #789597;
}

.crane-hook {
  position: absolute;
  left: calc(70% - 3px);
  top: 51%;
  width: 8px;
  height: 8px;
  border: 2px solid var(--gold);
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 8px 0;
}

.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 13px;
  background: #557377;
}

.dock-stack {
  position: absolute;
  bottom: 15px;
  width: 26%;
  height: 15%;
  border: 2px solid rgba(5,34,43,.6);
  background: #b26735;
}

.dock-stack--one { left: 1%; }
.dock-stack--two { left: 29%; bottom: 15px; background: #1f736f; }

.ocean {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  height: 31vh;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(19,77,87,.82), #071e2a 82%);
  box-shadow: inset 0 1px rgba(180,234,229,.22);
}

.wave {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 44px;
  opacity: .35;
  background: radial-gradient(60px 14px at 50% 0, transparent 49%, rgba(130,202,196,.5) 50% 52%, transparent 54%) 0 0 / 120px 28px repeat-x;
  animation: wave-drift 9s linear infinite;
}

.wave--one { top: 10px; }
.wave--two { top: 58px; opacity: .18; animation-duration: 13s; animation-direction: reverse; }
.wave--three { top: 115px; opacity: .12; animation-duration: 17s; }

.wake {
  position: absolute;
  top: 7px;
  left: 0;
  width: 19vw;
  height: 25px;
  opacity: calc(var(--progress) * .7);
  background: linear-gradient(90deg, transparent, rgba(211,246,239,.5));
  filter: blur(5px);
  transform-origin: right center;
  will-change: transform;
}

.scroll-cue {
  position: absolute;
  z-index: 20;
  left: clamp(20px, 5vw, 72px);
  bottom: clamp(20px, 4vh, 42px);
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(244,247,244,.65);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: calc(1 - min(1, var(--progress) * 6));
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 46px;
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.2);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  animation: cue 1.8s ease-in-out infinite;
}

.progress {
  position: absolute;
  z-index: 20;
  right: clamp(20px, 5vw, 72px);
  bottom: clamp(20px, 4vh, 42px);
  width: min(180px, 28vw);
  height: 2px;
  background: rgba(255,255,255,.15);
}

.progress-fill {
  display: block;
  width: calc(var(--progress) * 100%);
  height: 100%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(234,177,73,.5);
}

.scroll-space { height: 500vh; }

@keyframes wave-drift { to { transform: translateX(120px); } }
@keyframes cue { 0% { transform: translateX(-100%); } 50%, 100% { transform: translateX(100%); } }

@media (max-width: 720px) {
  .brand-name { display: none; }
  .study-label { font-size: .58rem; }
  .scene-copy { top: 16vh; }
  h1 { font-size: clamp(2.7rem, 15vw, 4.7rem); }
  .scene-copy p { max-width: 285px; }
  .ship { width: 92vw; top: 55%; }
  .port { width: 38vw; bottom: 20vh; opacity: .62; }
  .port--origin { left: -10vw; }
  .port--destination { right: -10vw; }
  .route { top: 64%; }
  .ocean { height: 28vh; }
  .scroll-cue span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wave,
  .scroll-cue i::after { animation: none; }
  .sky-glow,
  .ship,
  .cargo-container,
  .wake { will-change: auto; }
}
