/* ==========================================================================
   Landaku Vitrina — movimiento (v2.1). Solo en la página pública.

   Todo es CSS: no hay JavaScript, no se esconde texto a Google y la página
   no "salta" al cargar. Las animaciones al bajar la página usan
   animation-timeline (Chrome, Edge y Safari recientes); en los navegadores
   que no la tienen, el contenido simplemente se ve quieto.
   Si la persona pidió "reducir movimiento" en su teléfono, no se anima nada.
   ========================================================================== */

@keyframes lk-subir { from { opacity: 0; transform: translateY(42px); } to { opacity: 1; transform: none; } }
@keyframes lk-aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes lk-zoom { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes lk-izquierda { from { opacity: 0; transform: translateX(-56px); } to { opacity: 1; transform: none; } }
@keyframes lk-derecha { from { opacity: 0; transform: translateX(56px); } to { opacity: 1; transform: none; } }
@keyframes lk-flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes lk-cinta { to { transform: translateX(-50%); } }
@keyframes lk-pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-acento) 70%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }
@keyframes lk-brillo { 0%, 70% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(220%) skewX(-20deg); } }
@keyframes lk-parallax { from { transform: translateY(-6%) scale(1.12); } to { transform: translateY(6%) scale(1.12); } }

@media (prefers-reduced-motion: no-preference) {

	/* Entrada al cargar (para el hero): no depende del scroll */
	.lk-entrada { animation: lk-subir .9s cubic-bezier(.2, .7, .2, 1) both; }
	.lk-entrada-hijos > * { animation: lk-subir .9s cubic-bezier(.2, .7, .2, 1) both; }
	.lk-entrada-hijos > :nth-child(2) { animation-delay: .12s; }
	.lk-entrada-hijos > :nth-child(3) { animation-delay: .24s; }
	.lk-entrada-hijos > :nth-child(4) { animation-delay: .36s; }
	.lk-entrada-hijos > :nth-child(5) { animation-delay: .48s; }
	.lk-entrada-hijos > :nth-child(n+6) { animation-delay: .6s; }
	.lk-retraso-1 { animation-delay: .15s !important; }
	.lk-retraso-2 { animation-delay: .3s !important; }
	.lk-retraso-3 { animation-delay: .45s !important; }
	.lk-retraso-4 { animation-delay: .6s !important; }

	/* Movimiento continuo */
	.lk-flotar { animation: lk-flotar 6s ease-in-out infinite; }
	.lk-cinta > * { animation: lk-cinta 32s linear infinite; }
	.lk-cinta:hover > * { animation-play-state: paused; }
	.lk-pulso:not(.wp-block-buttons) .wp-block-button__link, .lk-pulso.wp-block-buttons > .wp-block-button:first-child .wp-block-button__link, .lk-pulso.lkv-boton, .lk-pulso .lkv-boton:first-child, a.lk-pulso { animation: lk-pulso 2s ease-out infinite; }
	.lk-brillo .wp-block-button:first-child .wp-block-button__link, .lk-brillo .lkv-boton:first-child { position: relative; overflow: hidden; }
	.lk-brillo .wp-block-button:first-child .wp-block-button__link::after, .lk-brillo .lkv-boton:first-child::after {
		content: ""; position: absolute; inset: 0; width: 40%;
		background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
		animation: lk-brillo 3.2s ease-in-out infinite; pointer-events: none;
	}
}

/* Al bajar la página: el bloque entra cuando llega a la pantalla */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.lk-subir, .lk-aparecer, .lk-zoom, .lk-izquierda, .lk-derecha,
		.lk-escalonado > *, .lk-escalonado > .wp-block-column,
		.lkv-contenido .lkv-emp, .lkv-contenido .lkv-tarjeta-vitrina {
			animation-duration: 1ms; /* necesario en Firefox cuando lo active */
			animation-timing-function: cubic-bezier(.2, .7, .2, 1);
			animation-fill-mode: both;
			animation-timeline: view();
			animation-range: entry 0px entry 320px;
		}
		.lk-subir, .lk-escalonado > *, .lkv-contenido .lkv-emp, .lkv-contenido .lkv-tarjeta-vitrina { animation-name: lk-subir; }
		.lk-aparecer { animation-name: lk-aparecer; }
		.lk-zoom { animation-name: lk-zoom; }
		.lk-izquierda { animation-name: lk-izquierda; }
		.lk-derecha { animation-name: lk-derecha; }
		/* Escalonado: cada elemento entra un poco después que el anterior */
		.lk-escalonado > :nth-child(2) { animation-range: entry 60px entry 380px; }
		.lk-escalonado > :nth-child(3) { animation-range: entry 120px entry 440px; }
		.lk-escalonado > :nth-child(n+4) { animation-range: entry 180px entry 500px; }

		/* Parallax: la foto de fondo de una Portada se mueve más lento que la página */
		.lk-parallax .wp-block-cover__image-background, .lk-parallax > img:first-child {
			animation: lk-parallax linear both;
			animation-timeline: view();
			animation-range: cover;
		}
	}
}
