:root {
  --journey-top: 78px;
  --journey-height: calc(100svh - var(--journey-top));
}

.whale-journey {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  background: var(--bone);
}

.whale-journey__stage,
.whale-journey__skip { display: none; }

.whale-journey__chapter {
  padding: clamp(64px, 8vw, 112px) var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.whale-journey__chapter-image {
  margin: 0 0 34px;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.whale-journey__chapter-image img {
  width: 100%;
  max-height: 78svh;
  object-fit: contain;
}

.whale-journey__copy { max-width: 620px; }
.whale-journey__eyebrow {
  color: #007e9b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.whale-journey__copy h2,
.whale-journey__copy h3 {
  max-width: 9ch;
  margin: 16px 0 22px;
  font: 900 clamp(64px, 7.5vw, 122px)/.8 var(--display);
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.whale-journey__copy > p {
  max-width: 510px;
  margin: 0;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
}

.whale-journey__copy .whale-journey__ko {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whale-journey__copy ul {
  display: flex;
  flex-wrap: wrap;
  margin: 24px 0 0;
  padding: 0;
  border-block: 1px solid var(--rule);
  list-style: none;
}

.whale-journey__copy li {
  padding: 9px 14px 8px 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.whale-journey__copy li + li {
  padding-left: 14px;
  border-left: 1px solid var(--rule);
}

.whale-journey__cue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.whale-journey__cue span { color: var(--coral); font-size: 18px; }
.whale-journey__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 24px; }
.whale-journey__actions .button { min-width: 188px; }
.whale-journey__actions .text-link { min-width: 190px; }

.whale-journey.is-ready .whale-journey__stage {
  position: sticky;
  top: var(--journey-top);
  z-index: 1;
  display: block;
  width: 100%;
  height: var(--journey-height);
  overflow: hidden;
  background: var(--bone);
}

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

.whale-journey.is-ready .whale-journey__chapter {
  display: flex;
  align-items: center;
  min-height: 60svh;
  padding: clamp(42px, 5vw, 72px) var(--gutter);
  border: 0;
}

.whale-journey.is-ready .whale-journey__chapter-image { display: none; }
.whale-journey.is-ready .whale-journey__copy {
  position: relative;
  width: min(39vw, 510px);
  padding: clamp(22px, 2.8vw, 34px);
  border: 1px solid var(--ink);
  background: var(--paper);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .38s var(--ease), transform .48s var(--ease);
  pointer-events: none;
}

.whale-journey.is-ready .whale-journey__copy::before {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 6px;
  background: var(--pacific);
  content: "";
}

.whale-journey.is-ready .whale-journey__chapter:nth-child(4) .whale-journey__copy::before,
.whale-journey.is-ready .whale-journey__chapter:nth-child(6) .whale-journey__copy::before { background: var(--coral); }

.whale-journey.is-ready .whale-journey__chapter.is-active .whale-journey__copy {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.whale-journey.is-ready .whale-journey__copy h2,
.whale-journey.is-ready .whale-journey__copy h3 { font-size: clamp(54px, 5.8vw, 92px); }

.whale-journey__media,
.whale-journey__frame,
.whale-journey__frame img,
.whale-journey__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.whale-journey__media { overflow: hidden; background: var(--bone); }
.whale-journey__frame {
  z-index: 0;
  display: block;
  opacity: 0;
  transition: opacity .55s var(--ease);
  will-change: opacity;
}

.whale-journey__frame.is-active { z-index: 1; opacity: 1; }
.whale-journey__frame img {
  object-fit: cover;
  object-position: center;
  transform: scale(1.015);
  transform-origin: center;
  will-change: transform;
}

.whale-journey__video {
  z-index: 8;
  display: none;
  object-fit: cover;
  object-position: center;
  background: var(--bone);
  transition: opacity .12s linear;
}

.whale-journey.has-video .whale-journey__video { display: block; }
.whale-journey.has-video:not(.video-seeking) .whale-journey__frame { opacity: 0; }
.whale-journey.video-seeking .whale-journey__video { opacity: 0; }

.whale-journey__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 12;
  height: 4px;
  background: rgba(16, 16, 16, .18);
}

.whale-journey__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.whale-journey__rail {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  z-index: 14;
  display: grid;
  width: 132px;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
  transform: translateY(-50%);
}

.whale-journey__rail button {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  color: #77736d;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.whale-journey__rail button:last-child { border-bottom: 0; }
.whale-journey__rail button span:first-child { font: 800 15px/1 var(--display); }
.whale-journey__rail button span:last-child { overflow: hidden; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.whale-journey__rail button:hover,
.whale-journey__rail button[aria-current="step"] { color: var(--ink); }
.whale-journey__rail button[aria-current="step"] { border-color: var(--coral); }

.whale-journey.is-ready .whale-journey__skip {
  position: fixed;
  top: calc(var(--journey-top) + 14px);
  right: var(--gutter);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.whale-journey.is-ready.is-in-view .whale-journey__skip { opacity: 1; pointer-events: auto; }

/* Keep focused journey controls above the adjacent hero's content layer. */
.whale-journey:focus-within { z-index: 3; }

.whale-journey.is-ready .whale-journey__skip:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transition: none;
}

@media (max-width: 1080px) {
  .whale-journey.is-ready .whale-journey__copy { width: min(49vw, 480px); }
  .whale-journey__rail { width: 56px; padding-inline: 8px; }
  .whale-journey__rail button { grid-template-columns: 1fr; text-align: center; }
  .whale-journey__rail button span:last-child { display: none; }
}

@media (max-width: 700px) {
  .site-header { background: var(--bone); }
  .mobile-brief-cta { transition: opacity .2s ease, transform .2s ease; }
  body.journey-final-active .mobile-brief-cta { opacity: 0; transform: translateY(10px); pointer-events: none; }
  .whale-journey__chapter { padding: 48px var(--gutter); }
  .whale-journey__copy h2,
  .whale-journey__copy h3 { font-size: clamp(54px, 16vw, 76px); }
  .whale-journey.is-ready .whale-journey__chapter { align-items: flex-end; min-height: 64svh; padding: 82px 20px max(74px, calc(18px + env(safe-area-inset-bottom))); }
  .whale-journey.is-ready .whale-journey__copy { width: 100%; max-width: none; padding: 17px 17px 15px 20px; }
  .whale-journey.is-ready .whale-journey__copy h2,
  .whale-journey.is-ready .whale-journey__copy h3 { max-width: 11ch; margin: 10px 0 10px; font-size: clamp(42px, 12vw, 58px); line-height: .86; }
  .whale-journey.is-ready .whale-journey__copy > p { font-size: 13px; line-height: 1.46; }
  .whale-journey.is-ready .whale-journey__copy .whale-journey__ko { margin-top: 5px; font-size: 11px; }
  .whale-journey.is-ready .whale-journey__copy ul { margin-top: 11px; }
  .whale-journey.is-ready .whale-journey__copy li { padding-block: 6px 5px; font-size: 8px; }
  .whale-journey__cue { margin-top: 11px; }
  .whale-journey__actions { gap: 8px 16px; margin-top: 14px; }
  .whale-journey__actions .button { width: 100%; min-height: 46px; }
  .whale-journey__actions .text-link { width: 100%; min-height: 40px; }
  .whale-journey__rail { top: 10px; right: 12px; left: 12px; width: auto; padding: 0; border: 0; background: transparent; grid-template-columns: repeat(6, 1fr); transform: none; }
  .whale-journey__rail button { min-height: 34px; border-bottom: 2px solid rgba(16, 16, 16, .18); background: rgba(252, 250, 245, .84); font-size: 12px; }
  .whale-journey.is-ready .whale-journey__skip { top: calc(var(--journey-top) + 52px); right: 12px; }
}

@media (max-width: 440px) {
  .whale-journey.is-ready .whale-journey__chapter { min-height: 66svh; }
  .whale-journey.is-ready .whale-journey__copy h2,
  .whale-journey.is-ready .whale-journey__copy h3 { font-size: clamp(39px, 11.5vw, 52px); }
  .whale-journey.is-ready .whale-journey__copy > p { font-size: 12px; }
  .whale-journey.is-ready .whale-journey__copy .whale-journey__ko { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .whale-journey.is-ready .whale-journey__stage,
  .whale-journey.is-ready .whale-journey__skip { display: none; }
  .whale-journey.is-ready .whale-journey__chapters { margin-top: 0; pointer-events: auto; }
  .whale-journey.is-ready .whale-journey__chapter { display: block; min-height: 0; padding: clamp(54px, 8vw, 92px) var(--gutter); border-bottom: 1px solid var(--rule); }
  .whale-journey.is-ready .whale-journey__chapter-image { display: block; }
  .whale-journey.is-ready .whale-journey__copy { width: auto; max-width: 620px; padding: 0; border: 0; background: transparent; opacity: 1; transform: none; pointer-events: auto; }
  .whale-journey.is-ready .whale-journey__copy::before { display: none; }
}
