/* Native anchor navigation resumes its own easing when the wheel glide ends. */
html.lenis-smooth { scroll-behavior: auto; }

/* The image and its translation share a single travel distance. The frame stays put. */
@media (prefers-reduced-motion: no-preference) {
  .hero-art {
    --hero-travel: 29%;
    --hero-zoom: .04;
    inset: -2% 0 0;
    transform-origin: 52% 49%;
    transform: translate3d(0, calc(var(--hero-passage, 0) * var(--hero-travel)), 0)
               scale(calc(1 + var(--hero-passage, 0) * var(--hero-zoom)));
  }

  [data-depth] {
    --travel: clamp(26px, 8svh, 80px);
    --direction: 1;
  }

  [data-depth] > .depth-image {
    top: calc(0px - var(--travel) - 1px);
    height: calc(100% + var(--travel) + var(--travel) + 2px);
    transform: translate3d(0, calc(var(--scene-phase, 0) * var(--direction) * var(--travel)), 0);
  }

  .panorama {
    --travel: clamp(44px, 12svh, 124px);
  }

  .room-primary .room-photo {
    --travel: clamp(28px, 4.5vw, 66px);
  }

  .room-guest .room-photo {
    --travel: clamp(22px, 3.5vw, 52px);
    --direction: -.78;
  }

  .pool-hero {
    --travel: clamp(42px, 13svh, 126px);
  }

  .village-photo {
    --travel: clamp(34px, 9svh, 92px);
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .hero-art {
    --hero-travel: 17%;
    --hero-zoom: .018;
  }

  .panorama,
  .pool-hero {
    --travel: clamp(26px, 6svh, 48px);
  }

  .room-primary .room-photo,
  .room-guest .room-photo {
    --travel: clamp(17px, 4vw, 32px);
  }

  .village-photo {
    --travel: clamp(22px, 4.5svh, 38px);
  }
}

@media (max-width: 480px) {
  .room-guest .room-photo {
    --direction: 1;
  }
}

@media (prefers-reduced-motion: reduce), print {
  .hero-art {
    inset: 0;
    transform: none;
  }

  [data-depth] > .depth-image {
    top: 0;
    height: 100%;
    transform: none;
  }
}
