/*
 * PIEB Valencia — movimiento editorial y discreto.
 * La clase de preparación se añade con JavaScript para evitar ocultar
 * contenidos si el navegador no admite IntersectionObserver.
 */

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
	.pieb-motion-ready .pieb-scroll-reveal {
		opacity: 0;
		transform: translate3d(0, 26px, 0);
		transition:
			opacity 0.72s cubic-bezier(0.22, 0.61, 0.36, 1),
			transform 0.72s cubic-bezier(0.22, 0.61, 0.36, 1);
		transition-delay: var(--pieb-motion-delay, 0ms);
		will-change: opacity, transform;
	}

	.pieb-motion-ready .pieb-scroll-reveal.is-visible {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}

	/* Las repeticiones son algo más rápidas y sin demora acumulada. */
	.pieb-motion-ready .pieb-scroll-reveal.pieb-motion-repeat {
		transition-duration: 0.48s;
		transition-delay: 0ms !important;
	}

	.pieb-motion-ready .pieb-scroll-reveal.pieb-motion-repeat:not(.is-visible) {
		transform: translate3d(0, 12px, 0);
	}

	/* Parallax muy contenido en imágenes principales. Se aplica a la imagen,
	 * no a su marco, para no alterar la composición ni el efecto de aparición. */
	.pieb-parallax-ready .pieb-parallax-media {
		transform:
			translate3d(0, var(--pieb-parallax-y, 0px), 0)
			scale(var(--pieb-parallax-scale, 1.06));
		transform-origin: 50% 50%;
		will-change: transform;
		transition: transform 90ms linear;
	}

	/* En Retiro, el pie permanece fijo por encima de la imagen transformada. */
	.pieb-parallax-ready .quart-retiro__photo {
		isolation: isolate;
	}

	.pieb-parallax-ready .quart-retiro__photo > img.pieb-parallax-media {
		position: relative;
		z-index: 1;
	}

	.pieb-parallax-ready .quart-retiro__photo > figcaption {
		position: relative;
		z-index: 2;
		background: #fff;
	}
}

@media (max-width: 1024px), (prefers-reduced-motion: reduce) {
	.pieb-scroll-reveal {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.pieb-parallax-media {
		transform: none !important;
		transition: none !important;
	}
}

