/* Native flow remains available outside committed transition landings. */
html.homepage-scroll, html.chapter-scroll { scroll-snap-type: none !important; scroll-behavior: auto; overflow-anchor: none; }
main[data-scroll-timeline] { position: relative; padding-block: 0 !important; overflow: visible; }
main[data-scroll-timeline] > [data-scroll-scene] {
  position: fixed !important;
  inset: 0 0 auto;
  width: 100%;
  margin-block: 0 !important;
  min-height: 100svh;
  transition: none !important;
  will-change: transform, opacity;
}
/* Visible scenes retain native pointer hit-testing. The window capture
   listener receives wheel input without covering links or hover targets. */
html[data-scroll-timeline] body > footer { z-index: 50; }
main[data-scroll-timeline] .will-reveal { opacity: 1; transform: none; transition: none; }
html[data-scroll-timeline] :is(.home-expertise__checkpoint, .expertise-sequence__checkpoint, .approach-checkpoint) { height: calc(100svh * var(--sequence-step, 1.1)); }
html[data-scroll-timeline] :is(.home-expertise__stage, .expertise-sequence__stage, .approach-track > .approach-section) {
  position: absolute !important;
  inset: 0 0 auto;
  transform: translateY(var(--scene-read, 0px));
}
html[data-scroll-timeline] .home-expertise__slide figure,
html[data-scroll-timeline] .expertise-sequence__element,
html[data-scroll-timeline] .expertise-sequence__strip,
html[data-scroll-timeline] .approach-panel :is(.approach-image, .approach-phase, .approach-copy) { animation: none !important; transition: none !important; }
html[data-scroll-timeline] .expertise-sequence__strip { transform: translateX(calc(var(--expertise-progress, 0) * -100%)); }
html[data-scroll-timeline] .expertise-sequence__element { opacity: 1; transform: none; }
html[data-scroll-timeline] .expertise-page .approach-track .approach-panel { visibility: visible; }
html[data-scroll-timeline] .home-introduction__sentence,
html[data-scroll-timeline] .contact-bubble { animation: none !important; transition: none !important; }
/* The introduction releases into the destination background before expertise
   content enters. Both phases scrub and reverse with actual scroll position. */
html[data-scroll-timeline] [data-background-first] > .home-expertise__stage {
  opacity: var(--scene-content, 1);
  transform: translateY(calc(var(--scene-read, 0px) + (1 - var(--scene-content, 1)) * 24px));
}
.scroll-scene-background { position: fixed; inset: 0; pointer-events: none; transition: none; will-change: opacity; }
/* Stable section furniture stays visible between panels. The parent scene
   still handles the complete section's arrival and departure. */
html[data-scroll-timeline] :is(.home-expertise__topline, .home-expertise__footer, .expertise-sequence__topline, .expertise-sequence__footer, .approach-track .section-topline, .approach-heading, .approach-footer) { opacity: 1; transition: none; }
html[data-scroll-timeline] .home-introduction > .scroll-indicator { opacity: calc(.5 * (1 - var(--introduction-exit, 0))); }
/* Project captions follow the text exit even if a pointer remains over a strip. */
html[data-scroll-timeline] .work-mosaic__strip:is(:hover, :focus-visible) .work-mosaic__name {
  opacity: calc(1 - var(--work-text-exit, 0));
  transition: none;
}

/* Phones keep native scrolling and momentum. Sticky sequences still follow the
   scroll position, without a second timed transition trailing behind a swipe. */
@media (max-width: 767px), (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  html.homepage-scroll, html.chapter-scroll {
    overflow-anchor: auto;
    scroll-snap-type: y mandatory !important;
    scroll-padding-block: 0;
  }
  /* Let the browser land on real chapter boundaries without intercepting swipes.
     Oversized chapters remain freely readable between their start and end. */
  html:is(.homepage-scroll, .chapter-scroll) main > :is(section, div):not([aria-hidden="true"]):not(.cinema-background) {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin-block: 0;
  }
  /* A small marker inside a long chapter would trap native scrolling at its
     edge. The real, oversized chapter supplies both boundaries instead. */
  html:is(.homepage-scroll, .chapter-scroll) :is(.portfolio__start, .portfolio__end, .agency-editorial__start, .agency-editorial__end, .case-gallery-track__start, .case-gallery-track__end) {
    display: none;
  }
  /* Honor both gutter insets instead of extending a full-width label past them. */
  .homepage .studio-section .studio-topline { width: auto; }
  .homepage-scroll .home-expertise[data-enhanced="true"] .home-expertise__slide figure,
  .expertise-scroll .expertise-sequence[data-enhanced="true"] :is(.expertise-sequence__element, .expertise-sequence__strip),
  .expertise-scroll .approach-track[data-enhanced="true"] .approach-panel :is(.approach-image, .approach-phase, .approach-copy) {
    animation: none !important;
    transition: none !important;
  }
  .expertise-scroll .expertise-sequence[data-enhanced="true"] .expertise-sequence__strip {
    transform: translateX(calc(var(--expertise-progress, 0) * -100%));
  }
  /* Offscreen process artwork must not widen the page during a vertical swipe.
     Clip, unlike hidden/auto, preserves the stage's native sticky scrolling. */
  .expertise-scroll .approach-track[data-enhanced="true"] { overflow-x: clip; }
  /* Child opacity handles the exit and entry between checkpoints; switching the
     whole panel at the rounded index would cut that reversible motion short. */
  html.expertise-scroll .expertise-page .approach-track[data-enhanced="true"] .approach-panel {
    visibility: visible;
  }
}
