/* Movimiento al hacer scroll (Sivar Design, 2026-11-23). Lo activa assets/js/motion.js.
   Titulares y textos suben y aparecen en cascada; las fotos se descubren de arriba abajo,
   pasan de un acercamiento alto a uno de reposo y luego se desplazan dentro de su marco. */
:root {
  --motion-ease: cubic-bezier(.22, .7, .2, 1);
  --motion-ease-photo: cubic-bezier(.22, 1, .36, 1);
}

/* Marco que se crea alrededor de una foto que no tiene uno propio */
.esps-photo-frame { display: block; width: fit-content; max-width: 100%; line-height: 0; overflow: hidden; }
.esps-photo-frame > .ui-image2-17-211 { width: 100%; }
.esps-photo-frame:has(> .ui-image2-17-211) { width: 80%; }

@media (prefers-reduced-motion: no-preference) {
  .esps-motion [data-rise] {
    opacity: 0;
    translate: 0 1.5rem;
    transition: opacity .8s var(--motion-ease), translate .8s var(--motion-ease);
    transition-delay: var(--d, 0s);
  }
  .esps-motion [data-rise].in { opacity: 1; translate: none; }

  .esps-motion [data-photo] { overflow: hidden; clip-path: inset(0 0 100% 0); transition: clip-path 2s var(--motion-ease-photo); }
  .esps-motion [data-photo].shown { clip-path: inset(0 round var(--frame-radius, 0px)); }
  .esps-motion [data-photo] img {
    scale: var(--zoom-from, 1.5);
    translate: 0 calc(var(--py, 0) * 1%);
    transform-origin: var(--origin, 50% 50%);
    transition: scale 2s var(--motion-ease-photo), transform var(--ui-transition-duration, .3s) ease-in-out;
    will-change: translate, scale;
  }
  .esps-motion [data-photo].shown img { scale: var(--zoom, 1.12); }
}
