/*
  ZUNO · animaciones.
  Todo se apaga si la persona pidió "reducir movimiento" en su sistema (al final del archivo).
*/
:root { --ease-rebote: cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ───── Barra de progreso de lectura ───── */
.progreso {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none;
  background: linear-gradient(90deg, #5b1a33, #c2577a, #d98aa2);
  transform: scaleX(0); transform-origin: left;
}

/* Línea del menú en movimiento */
.barra::after { background-size: 200% 100%; animation: fluir 8s linear infinite; }
@keyframes fluir { to { background-position: 200% 0; } }

/* ───── Aparición: más profunda y con desenfoque ───── */
.js .aparece { transform: translateY(44px) scale(.98); }
.js .aparece:not(.pantalla):not(.portada-pantallas):not(figure) { filter: blur(8px); transition-property: opacity, transform, filter; }
.js .aparece.visible:not(.pantalla):not(.portada-pantallas):not(figure) { filter: none; }

/* Columnas que entran desde los lados */
.js .nosotros-texto.aparece, .js .medida-texto.aparece { transform: translateX(-60px); }
.js .paso.aparece { transform: translateX(60px); }
.js .nosotros-lema.aparece { transform: translateX(60px) rotate(3deg) scale(.94); }
.js .portada .etiqueta.aparece { transform: translateY(20px) scale(.8); }
.js .nosotros-texto.aparece.visible, .js .medida-texto.aparece.visible, .js .paso.aparece.visible,
.js .nosotros-lema.aparece.visible, .js .portada .etiqueta.aparece.visible { transform: none; }

/* Lo que entra desde los lados no debe crear barra de desplazamiento horizontal */
section { overflow-x: clip; }

/* Capturas: entrada en 3D */
.producto .pantalla.aparece, .ia-dos figure.aparece { transform-origin: 50% 100%; }
.js .producto .pantalla.aparece { transform: perspective(1400px) rotateX(22deg) translateY(80px) scale(.92); transition-duration: 1.3s; }
.js .ia-dos figure.aparece { transform: perspective(1200px) rotateX(16deg) translateY(60px); transition-duration: 1.2s; }
.js .producto .pantalla.aparece.visible, .js .ia-dos figure.aparece.visible { transform: none; }

/* Tarjetas de precio: suben con rebote */
.js .plan.aparece { transform: translateY(70px) scale(.94); transition: opacity .9s var(--ease), transform 1.1s var(--ease-rebote), filter .9s var(--ease); }
.js .plan.aparece.visible { transform: none; }

/* ───── Portada ───── */
.portada { position: relative; }
.portada > .contenedor, .portada-pantallas { position: relative; z-index: 1; }

/* Título: la segunda línea entra después */
.js h1.aparece .degradado { display: inline-block; opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease) .35s, transform 1s var(--ease) .35s; }
.js h1.aparece.visible .degradado { opacity: 1; transform: none; }
.js .portada .bajada.aparece { transition-delay: .5s; }
.js .portada .botones.aparece { transition-delay: .7s; }

/* Brillo que cruza la etiqueta */
.etiqueta { position: relative; overflow: hidden; }
.etiqueta::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: brillo 4.5s ease-in-out 1.5s infinite;
}
@keyframes brillo { 0%, 60% { left: -60%; } 100% { left: 130%; } }

/* Texto en degradado que se mueve */
h1 .degradado, h2 .degradado {
  background-image: linear-gradient(100deg, #5b1a33 0%, #86213f 25%, #c2577a 50%, #86213f 75%, #5b1a33 100%);
  background-size: 200% 100%;
  animation: fluir-texto 6s ease-in-out infinite alternate;
}
@keyframes fluir-texto { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* Capturas de la portada: entrada 3D y desplazamiento al bajar (paralaje) */
.portada-pantallas { perspective: 1600px; }
.js .portada-pantallas.aparece { transform: none; opacity: 1; }
.js .portada-pantallas .pantalla { opacity: 0; transition: opacity 1.2s var(--ease), transform 1.4s var(--ease); }
.js .portada-pantallas .p1 { transform: rotateX(25deg) translateY(120px) scale(.9); transition-delay: .6s; }
.js .portada-pantallas .p2 { transform: rotateX(25deg) translate(80px, 140px) scale(.88); transition-delay: .85s; }
.js .portada-pantallas.visible .pantalla { opacity: 1; transform: none; }
.portada-pantallas .p1 { translate: 0 calc(var(--paralaje, 0) * -0.10px); }
.portada-pantallas .p2 { translate: 0 calc(var(--paralaje, 0) * -0.22px); }

/* ───── Botones ───── */
.boton-lleno { position: relative; overflow: hidden; isolation: isolate; }
.boton-lleno::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -75%; width: 50%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease);
}
.boton-lleno:hover::after { left: 130%; }
.boton-lleno:active, .boton-chico:active { transform: scale(.96); }

/* Pulso del botón del menú */
.boton-chico { animation: pulso 2.8s ease-out 2s infinite; }
@keyframes pulso {
  0% { box-shadow: 0 0 0 0 rgba(134, 33, 63, .45); }
  70%, 100% { box-shadow: 0 0 0 14px rgba(134, 33, 63, 0); }
}

/* ───── Tarjetas: inclinación 3D y luz que sigue al cursor ───── */
.tarjeta::after, .plan::after, .paso::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(217, 138, 162, .28), transparent 45%);
  transition: opacity .4s var(--ease);
}
.paso { position: relative; }
.tarjeta:hover::after, .plan:hover::after, .paso:hover::after { opacity: 1; }
.js .aparece.visible.inclinando {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px);
  transition: transform .15s ease-out, box-shadow .4s var(--ease);
  box-shadow: 0 2px 4px rgba(91, 26, 51, .05), 0 30px 60px rgba(91, 26, 51, .2);
}

/* Íconos y números que "saltan" al aparecer */
/* ("listo" lo pone el código cuando terminó la entrada, para que la animación no se repita) */
.js .aparece .icono, .js .aparece .paso-numero { transform: scale(0) rotate(-25deg); }
.js .aparece.visible .icono, .js .aparece.visible .paso-numero { transform: none; }
.js .aparece.visible:not(.listo) .icono, .js .aparece.visible:not(.listo) .paso-numero { animation: saltar .8s var(--ease-rebote) .3s backwards; }
@keyframes saltar { from { transform: scale(0) rotate(-25deg); } to { transform: scale(1) rotate(0); } }
.js .tarjeta.listo:hover .icono { animation: menear .6s var(--ease-rebote); }
@keyframes menear { 30% { transform: scale(1.15) rotate(-8deg); } 60% { transform: scale(1.05) rotate(6deg); } }

/* Viñetas de verificación que aparecen una tras otra */
.js .aparece .incluye li::before { transform: scale(0); }
.js .aparece.visible .incluye li::before { transform: none; animation: saltar-chico .5s var(--ease-rebote) backwards; }
.js .aparece.visible .incluye li:nth-child(1)::before { animation-delay: .35s; }
.js .aparece.visible .incluye li:nth-child(2)::before { animation-delay: .45s; }
.js .aparece.visible .incluye li:nth-child(3)::before { animation-delay: .55s; }
.js .aparece.visible .incluye li:nth-child(4)::before { animation-delay: .65s; }
.js .aparece.visible .incluye li:nth-child(5)::before { animation-delay: .75s; }
.js .aparece.visible .incluye li:nth-child(6)::before { animation-delay: .85s; }
@keyframes saltar-chico { from { transform: scale(0); } to { transform: scale(1); } }

/* ───── Bandas de color con luces en movimiento ───── */
.oscuro, .color { position: relative; overflow: hidden; }
.oscuro > .contenedor, .color > .contenedor { position: relative; z-index: 1; }
.oscuro::before, .color::before {
  content: ""; position: absolute; width: 600px; height: 600px; border-radius: 50%; pointer-events: none;
  left: -200px; top: -200px; filter: blur(40px);
  background: radial-gradient(circle, rgba(217, 138, 162, .35), transparent 65%);
  animation: recorrer 22s ease-in-out infinite alternate;
}
@keyframes recorrer {
  50% { transform: translate(60vw, 30%) scale(1.3); }
  100% { transform: translate(20vw, 60%) scale(.9); }
}
.color .icono { transition: transform .4s var(--ease-rebote), background .3s; }
.js .color .ambos > div.listo:hover .icono { transform: translateY(-6px) scale(1.1); background: rgba(255, 255, 255, .26); }

/* Tarjeta del lema: flota suavemente */
.nosotros-lema.visible { animation: levitar 6s ease-in-out 1.5s infinite; }
@keyframes levitar { 50% { translate: 0 -10px; } }

/* Preguntas: el contenido se despliega con suavidad */
details[open] p { animation: desplegar .5s var(--ease); }
@keyframes desplegar { from { opacity: 0; transform: translateY(-8px); } }

/* ───── Al imprimir o guardar como PDF: todo visible, sin efectos ───── */
@media print {
  .js .aparece, .js .aparece .icono, .js .aparece .paso-numero, .js .aparece .incluye li::before,
  .js .portada-pantallas .pantalla, .js h1.aparece .degradado {
    opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important;
  }
  .progreso, .barra { display: none; }
}

/* ───── Reducir movimiento ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .aparece, .js .aparece .icono, .js .aparece .paso-numero, .js .aparece .incluye li::before,
  .js .portada-pantallas .pantalla, .js h1.aparece .degradado {
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
  .portada-pantallas .pantalla { translate: none !important; }
  .progreso { display: none; }
}
