/* flip.css - the flipbook player (js/flip.js). Each [data-flip] holds a still <img class="flip__still"> and two
   empty <i> layers. The layers show one frame each of a horizontal strip (data-src) and cross-fade with GSAP.
   Until the player starts (strip loaded, motion on), and whenever motion is off, only the still shows.
   Position: the element itself is positioned by its own component (.peeker__img is absolute, .hero__face relative). */
.flip__still {
  position: relative;
  z-index: 3;             /* above the layers, so it cross-fades into the frames when the player starts */
  display: block;
  width: 100%;
  height: 100%;
}
.flip > i {
  position: absolute;
  inset: 0;
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: calc(var(--flip-n, 1) * 100%) 100%;
  /* frame index --f (0-based): 0% shows the first frame, 100% the last */
  background-position: calc(var(--f, 0) * 100% / max(var(--flip-n, 2) - 1, 1)) 0;
}
.flip.is-on > i {
  visibility: visible;
  will-change: opacity;
}
