/* RePiT — Animation 01
   Lightweight screenshot-state animation. No framework, no canvas, no video.
   The 1488×528 master coordinate system allows 1-, 2- and 3-cell states to
   remain perfectly aligned while the visible stage grows and shrinks. */

.repit-sequence {
  --repit-max-width: 1488px;
  --repit-ratio-w: 1488;
  --repit-ratio-h: 528;
  --repit-stage-width: 35.483871%; /* 528 / 1488 */
  --repit-transition-ms: 420ms;
  --repit-ease: cubic-bezier(.22, .61, .36, 1);
  position: relative;
  width: min(100%, var(--repit-max-width));
  margin-inline: auto;
  aspect-ratio: var(--repit-ratio-w) / var(--repit-ratio-h);
  overflow: visible;
  isolation: isolate;
}

.repit-sequence__stage {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--repit-stage-width);
  height: 100%;
  transform: translateX(-50%);
  overflow: hidden;
  transition: width var(--repit-transition-ms) var(--repit-ease);
  will-change: width;
}

.repit-sequence__state {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity var(--repit-transition-ms) var(--repit-ease);
  will-change: opacity;
}

.repit-sequence__state.is-active {
  opacity: 1;
}

/* The stage clips the wider states during multiplication. Each image keeps
   height:100% + width:auto, so its native aspect ratio is never distorted. */

@media (prefers-reduced-motion: reduce) {
  .repit-sequence__stage,
  .repit-sequence__state {
    transition: none !important;
  }
}
