/* Choreography from the supplied reference film. The document still scrolls natively. */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-scene: cubic-bezier(.22, .61, .36, 1);
}
.opening-sequence { position: relative; isolation: isolate; background: #06100d; }
.scenes-stage { display: contents; }
.story-anchor { height: 0; }

/* One stage underneath five scroll chapters: the opening and four photographs. */
.story-enhanced .hero {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 0;
  max-height: none;
  z-index: 0;
}
.story-enhanced .hero-world {
  opacity: var(--hero-opacity, 1);
  transform: scale(var(--hero-scale, 1));
}
.story-enhanced .hero-content {
  opacity: var(--hero-copy-opacity, 1);
  transform: translate3d(0, var(--hero-copy-y, 0px), 0);
  will-change: transform, opacity;
}
.story-enhanced .hero-image { transform: translate3d(0, var(--hero-front-y, 0px), 0) scale(1.035); transition: none; }
.story-enhanced .scroll-cue { opacity: var(--cue-opacity, 1); }
.story-enhanced .hero.is-past { pointer-events: none; }
.story-enhanced .story-anchor { position: absolute; top: 100svh; width: 1px; }
.story-enhanced .scenes { position: relative; z-index: 1; height: 520svh; margin-top: -100svh; pointer-events: none; }
.story-enhanced .scenes-stage { display: block; position: sticky; top: 0; height: 100svh; }
.story-enhanced .photo-section {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  max-height: none;
  opacity: 0;
  background: transparent;
  transition: opacity 280ms ease-in;
}
.story-enhanced .photo-section.is-current {
  opacity: 1;
  transition: opacity 600ms var(--ease-scene) 110ms;
}
.story-enhanced:not(.story-ready) .photo-section,
.story-enhanced:not(.story-ready) .photo-copy > * { transition: none !important; }
.story-enhanced .scene-image {
  transform: translate3d(0, var(--scene-image-y, 0px), 0) scale(var(--scene-scale, 1.025));
}
.story-enhanced .photo-copy { opacity: 1; transform: none; }
.story-enhanced .photo-copy > * {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 180ms ease-in, transform 180ms ease-in;
}
.story-enhanced .is-current .photo-copy > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 500ms ease-out, transform 650ms var(--ease-out);
}
.story-enhanced .is-current .photo-copy .eyebrow { transition-delay: 160ms; }
.story-enhanced .is-current .photo-copy h2 { transition-delay: 230ms; }
.story-enhanced .is-current .photo-copy > p:last-child { transition-delay: 330ms; }

/* The lower page arrives as an inset sheet and opens out to the viewport edges. */
.story-enhanced .collection {
  position: relative;
  z-index: 3;
  margin-top: -22svh;
  background: var(--bg);
  clip-path: inset(0 var(--sheet-inset, 32px) 0 round var(--sheet-radius, 30px) var(--sheet-radius, 30px) 0 0);
}
.site-header { transition: background 240ms ease, padding 240ms ease, transform 360ms var(--ease-out); }
.site-header.is-hidden { transform: translateY(calc(-100% - 38px)); pointer-events: none; }
.site-header:has(:focus-visible), body:has(dialog[open]) .site-header { transform: none; pointer-events: auto; }
.desktop-nav a[aria-current="location"]:after { transform: scaleX(1); }

/* Small artwork runs only while it is visible. The tab content remains user controlled. */
.material-study img { animation-play-state: paused; }
.material-study.is-in-view img { animation-play-state: running; }
.page-hidden .material-study img { animation-play-state: paused; }
.js-reveal .reveal { transform: translateY(20px); transition-duration: 500ms, 650ms; }
.js-reveal .reveal.is-visible { transform: none; }

.motion-paused .photo-section,
.motion-paused .photo-copy > *,
.motion-paused .site-header { transition: none !important; }
.motion-paused .hero-content { will-change: auto; }
@media (max-width: 760px) {
  .story-enhanced .hero-content { padding-top: 45px; padding-bottom: 45px; }
  .story-enhanced .photo-copy { padding: 80px 24px; }
  .story-enhanced .collection { margin-top: -15svh; }
  .photo-three .scene-image { object-position: 70% center; }
  .photo-four .scene-image { object-position: 78% center; }
}
@media (max-height: 650px) and (min-width: 761px) {
  .story-enhanced .hero h1 { font-size: clamp(48px, 5vw, 70px); }
  .story-enhanced .hero-content { padding-block: 70px 20px; }
  .story-enhanced .hero-eyebrow { margin-bottom: 16px; }
  .story-enhanced .hero-description { margin-top: 16px; }
  .story-enhanced .hero-explore { margin-top: 14px; }
  .story-enhanced .hero-links { margin-top: 14px; }
  .story-enhanced .scroll-cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
  .material-study img { animation: none; }
}
/* Living typography overlays the hero and Contact headings. Their text is hidden only while strands are displaced. */
.hero h1, #contact h2 { position: relative; }
.living-type-canvas { position: absolute; z-index: 1; pointer-events: none; user-select: none; }
.hero h1.living-type-active .emerge-line > span,
.hero h1.living-type-active .accent-stop,
#contact h2.living-type-active .emerge-line > span { color: transparent; -webkit-text-fill-color: transparent; }
