/* Additive scroll choreography. No backgrounds, borders, image crops or layout rules.
   Content is fully visible before JS, after any failure, and with reduced motion. */
[data-ss-reveal] {
  --ss-y: 0px;
  --ss-scale: 1;
  --ss-inset-x: 0%;
  --ss-inset-y: 0%;
  --ss-opacity: 1;
}

/* Apertures belong to the existing media frame, never to the image inside it. */
[data-ss-reveal="film"],
[data-ss-reveal="photo"],
[data-ss-reveal="still"],
#work.film-reveal-ready #watchCard[data-ss-reveal="film"] {
  clip-path: inset(var(--ss-inset-y) var(--ss-inset-x));
  transform: translate3d(0,var(--ss-y),0) scale(var(--ss-scale));
  transform-origin: center center;
  opacity: var(--ss-opacity);
}

/* Vertical players get an unmasked depth-settle: native controls remain intact.
   These local overrides replace the older timed collection entrance, not the
   homepage slideshow / approach / portrait-profile choreography. */
#filmsView.collection-entering .opening-portrait[data-ss-reveal="vertical"],
[data-ss-reveal="vertical"] {
  animation: none;
  clip-path: none;
  transform: translate3d(0,var(--ss-y),0) scale(var(--ss-scale));
  transform-origin: center center;
  opacity: 1;
}

[data-ss-reveal="service"] {
  transform: perspective(1100px) translate3d(0,var(--ss-y),0) rotateX(calc((1 - var(--ss-scale)) * -140deg)) scale(var(--ss-scale));
  transform-origin:center bottom;
  opacity:var(--ss-opacity);
}
[data-ss-reveal="copy"], [data-ss-reveal="row"] {
  transform: translate3d(0,var(--ss-y),0);
  opacity: var(--ss-opacity);
}
[data-ss-reveal][data-ss-visible="true"] { will-change: transform, opacity; }
:is([data-ss-reveal="film"],[data-ss-reveal="photo"],[data-ss-reveal="still"])[data-ss-visible="true"] {
  will-change: transform, clip-path;
}

/* Avoid double entrances from collection-effects.css. No animation is removed
   from the opening slideshow, B&W approach reveal or holographic portraits. */
#work.film-reveal-ready .section-heading { transform: none; opacity: 1; }
#filmsView.collection-entering .film-intro-copy,
#photosView.collection-entering > .page-intro,
#photosView.collection-entering > .full-gallery { animation: none; }

/* Interaction settles the whole media ancestor immediately and permanently.
   This also covers paused native controls, focus, dragging and fullscreen. */
[data-ss-reveal][data-ss-locked="true"],
[data-ss-reveal]:focus-within,
#work.film-reveal-ready #watchCard[data-ss-locked="true"],
#filmsView.collection-entering .opening-portrait[data-ss-locked="true"] {
  transform: none;
  clip-path: none;
  opacity: 1;
  animation: none;
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  [data-ss-reveal],
  #work.film-reveal-ready #watchCard[data-ss-reveal],
  #filmsView.collection-entering .opening-portrait[data-ss-reveal] {
    transform: none;
    clip-path: none;
    opacity: 1;
    animation: none;
    will-change: auto;
  }
}

@media print {
  [data-ss-reveal] { transform: none !important; clip-path: none !important; opacity: 1 !important; }
}
