/* ==========================================================================
   Journey — four full-screen scenes that crossfade as you scroll.
   Without JS: scenes simply stack as normal full-height blocks.
   With JS (.js): the section becomes tall, the stage sticks to the screen,
   and journey.js crossfades the scenes based on scroll position.
   ========================================================================== */

.journey {
  position: relative;
  background: var(--bg);
}

.scene {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

/* ---------- Photo (phones: full-bleed behind the text) ---------- */
.scene__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  --photo-shade: linear-gradient(
    180deg,
    rgb(18 11 8 / 0.55) 0%,
    rgb(18 11 8 / 0) 30%,
    rgb(18 11 8 / 0.25) 50%,
    rgb(18 11 8 / 0.94) 88%
  );
}

.scene__media {
  will-change: opacity;
}
.scene__media img {
  will-change: transform;
}

/* ---------- Text ---------- */
.scene__text {
  position: relative;
  display: grid;
  gap: var(--space-4);
  padding-block: var(--space-9) calc(var(--space-9) + var(--space-4));
  color: var(--on-photo);
}

.scene .eyebrow {
  color: var(--kraft);
}

.scene__title {
  font-size: var(--fs-2xl);
}

.scene__body {
  max-width: 34ch;
  font-size: var(--fs-md);
  color: var(--on-photo-muted);
}

/* ---------- Sticky mode (JS on) ---------- */
.js .journey {
  height: calc(var(--scene-count, 4) * 100svh);
}

.js .journey__stage {
  position: sticky;
  inset-block-start: 0;
  height: 100svh;
  overflow: hidden;
}

.js .scene {
  position: absolute;
  inset: 0;
  min-height: 0;
}

/* Before journey.js runs its first frame, only the first scene shows */
.js .scene:not(:first-child) {
  opacity: 0;
}

/* ---------- Progress dots ---------- */
.journey__dots {
  position: absolute;
  inset-inline-end: var(--gutter);
  inset-block-start: 50%;
  z-index: var(--z-base);
  display: grid;
  gap: var(--space-3);
  transform: translateY(-50%);
}

.journey__dot {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
}

.journey__dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(244 238 230 / 0.4);
  transition:
    transform var(--dur) var(--ease-out),
    background-color var(--dur);
}

.journey__dot[aria-current="step"]::before {
  background: var(--kraft);
  transform: scale(1.7);
  box-shadow: 0 0 0 4px rgb(198 160 122 / 0.18);
}

.journey__dot:hover::before {
  background: var(--kraft-light);
}
