/* A native-scroll photo journey. The default is a readable, static gallery. */
.journey {
  --journey-gutter: clamp(24px, 5vw, 88px);
  background: var(--background);
}
.journey-stage {
  position: relative;
  padding: 88px var(--journey-gutter);
}
.journey-heading {
  margin-bottom: 40px;
}
.journey-heading .eyebrow {
  margin-bottom: 12px;
}
.journey-scenes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.journey-scene {
  min-width: 0;
}
.journey-visual {
  overflow: hidden;
  background: #202020;
  border: 1px solid var(--line);
}
.journey-visual img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.journey-copy {
  padding-top: 24px;
}
.journey-location {
  color: var(--accent);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.journey-copy h3 {
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  margin-bottom: 18px;
}
.journey-copy > p:last-child {
  color: var(--muted);
  max-width: 430px;
}
.journey-footer {
  margin-top: 40px;
  display: flex;
  justify-content: flex-end;
}
.journey-progress {
  display: none;
}

@media screen and (prefers-reduced-motion: no-preference) and (min-height: 560px) {
  .journey.is-animated {
    height: 360svh;
  }
  .journey.is-animated .journey-stage {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    padding: 0;
    isolation: isolate;
  }
  .is-animated .journey-heading {
    position: absolute;
    z-index: 5;
    top: 125px;
    left: var(--journey-gutter);
    right: var(--journey-gutter);
    margin: 0;
    pointer-events: none;
  }
  .is-animated .journey-heading h2 {
    font-size: clamp(1.75rem, 3vw, 3rem);
  }
  .is-animated .journey-scenes,
  .is-animated .journey-scene {
    position: absolute;
    inset: 0;
    display: block;
  }
  .is-animated .journey-scene {
    pointer-events: none;
    opacity: var(--scene-opacity, 0);
  }
  .is-animated .journey-scene:first-child {
    --scene-opacity: 1;
  }
  .is-animated .journey-visual {
    position: absolute;
    inset: 0;
    /* A straight zoom keeps every edge parallel to the viewport. */
    transform: scale(var(--frame-scale, 1));
    border: 0;
  }
  .is-animated .journey-visual img {
    aspect-ratio: auto;
    transform: scale(var(--photo-scale, 1.04));
    object-position: center 52%;
  }
  .is-animated .journey-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(13, 13, 13, 0.8),
      rgba(13, 13, 13, 0.12) 40%,
      rgba(13, 13, 13, 0.8) 69%,
      rgba(13, 13, 13, 0.96)
    );
  }
  .is-animated .journey-copy {
    position: absolute;
    left: var(--journey-gutter);
    right: var(--journey-gutter);
    bottom: 118px;
    padding: 0;
    opacity: var(--copy-opacity, 1);
    transform: translateY(var(--copy-y, 0px));
  }
  .is-animated .journey-copy h3 {
    font-size: clamp(2.75rem, 5.3vw, 5.8rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 20px;
  }
  .is-animated .journey-copy > p:last-child {
    max-width: 410px;
    color: #e2ded5;
  }
  .is-animated .journey-footer {
    position: absolute;
    z-index: 5;
    left: var(--journey-gutter);
    right: var(--journey-gutter);
    bottom: 28px;
    margin: 0;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .is-animated .journey-footer > a {
    flex-shrink: 0;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
  }
  .is-animated .journey-progress {
    display: flex;
    gap: 20px;
    width: min(390px, 50%);
  }
  .journey-progress > span {
    position: relative;
    flex: 1;
    padding-top: 16px;
    color: #d1cbc0;
    font-size: 0.8125rem;
    white-space: nowrap;
  }
  .journey-progress > span::before,
  .journey-progress > span::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #706b61;
  }
  .journey-progress > span::after {
    background: var(--brand);
    transform: scaleX(var(--step-progress, 0));
    transform-origin: left;
  }
  .journey-progress > span > span {
    margin-left: 8px;
  }
  .hero.has-depth .hero-figure > img {
    transform: scale(var(--hero-scale, 1)) translateY(var(--hero-y, 0px));
  }
}

@media (max-width: 760px) {
  .journey-scenes {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .journey-stage {
    padding-block: 64px;
  }
  .journey-visual img {
    aspect-ratio: 4 / 3;
  }
  .journey.is-animated {
    height: 300svh;
  }
  .is-animated .journey-heading {
    top: 108px;
  }
  .is-animated .journey-heading .eyebrow {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }
  .is-animated .journey-copy h3 {
    font-size: clamp(2.2rem, 8.2vw, 3.5rem);
    margin-bottom: 16px;
  }
  .is-animated .journey-copy {
    bottom: 116px;
  }
  .is-animated .journey-location {
    font-size: 0.8125rem;
    margin-bottom: 12px;
  }
  .is-animated .journey-progress {
    width: 110px;
    gap: 10px;
  }
  .journey-progress > span > span {
    display: none;
  }
  .is-animated .journey-footer {
    bottom: 24px;
    gap: 16px;
  }
  .is-animated .journey-footer > a {
    gap: 12px;
    font-size: 0.8125rem;
  }
}

@media print {
  .journey {
    display: none;
  }
}
