/* Punto Repara · movimiento.css
   Capa de animaciones. Solo se activa con html.mov (lo pone movimiento.js
   cuando el usuario NO pidió reducir movimiento). Sin .mov, el sitio se ve
   completo y estático. */

/* ---------- Barra de progreso de lectura ---------- */
.progreso { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none;
  background: linear-gradient(90deg, var(--amarillo), #FFE07A); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Cabecera de vidrio al bajar ---------- */
.mov .cabecera { transition: background-color .35s ease, box-shadow .35s ease, border-color .35s ease; }
.mov .cabecera.desplazada { background: rgba(255,255,255,.88); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  box-shadow: 0 10px 30px -18px rgba(30,79,216,.45); }
@media (min-width: 1000px) { .mov .cabecera.desplazada .navegacion { background: transparent; } }
.mov .cabecera .marca img { transition: transform .35s cubic-bezier(.2,.8,.2,1); transform-origin: 0 50%; }
.mov .cabecera.desplazada .marca img { transform: scale(.9); }

/* ---------- Fondo vivo del hero (canvas de puntos y trazos) ---------- */
.hero { position: relative; isolation: isolate; }
.fondo-vivo { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: 0;
  transition: opacity 1.2s ease; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.fondo-vivo.listo { opacity: 1; }

/* ---------- Título que sube palabra por palabra ---------- */
.mov .palabra { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.mov .palabra > span { display: inline-block; transform: translateY(105%); transition: transform .9s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--i) * 55ms + 120ms); }
.mov .titulo-vivo.visto .palabra > span { transform: none; }
/* El subrayado amarillo se dibuja después */
.mov .titulo-vivo .resalte, .mov [data-rev] .resalte, .mov h2.titulo-seccion .resalte { box-shadow: none; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(var(--amarillo), var(--amarillo)) 0 100% / 0% .38em no-repeat; transition: background-size .9s cubic-bezier(.65,0,.35,1) .75s; }
.mov .titulo-vivo.visto .resalte, .mov .visto .resalte, .mov .visto.resalte { background-size: 100% .38em; }

/* ---------- Aparición al hacer scroll ---------- */
.mov [data-rev] { opacity: 0; transform: translateY(28px); filter: blur(6px);
  transition: opacity .8s ease, transform .9s cubic-bezier(.16,1,.3,1), filter .8s ease; transition-delay: calc(var(--d, 0) * 1ms); }
.mov [data-rev="izq"] { transform: translateX(-36px); }
.mov [data-rev="der"] { transform: translateX(36px); }
.mov [data-rev="zoom"] { transform: scale(.94); }
.mov [data-rev].visto { opacity: 1; transform: none; filter: none; }

/* ---------- Fotos: se destapan y pasa una línea de escaneo ---------- */
.mov .marco.revela { clip-path: inset(0 100% 0 0); transition: clip-path 1.2s cubic-bezier(.77,0,.18,1); }
.mov .marco.revela.visto { clip-path: inset(-40px -40px -40px -40px); }
.mov .marco img { transition: transform 1.6s cubic-bezier(.16,1,.3,1); }
.mov .marco.revela:not(.visto) img { transform: scale(1.12); }
.marco { position: relative; }
.mov .marco .escaneo { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.mov .marco .escaneo::before { content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 30%;
  background: linear-gradient(180deg, transparent, rgba(255,198,41,.0) 40%, rgba(255,198,41,.35) 92%, rgba(255,255,255,.9) 100%);
  mix-blend-mode: screen; opacity: 0; }
.mov .marco.visto .escaneo::before { animation: escanear 1.6s cubic-bezier(.45,0,.2,1) 1s 1 both; }
@keyframes escanear { 0% { top: -30%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
/* Esquinas tipo visor */
.mov .marco .visor { position: absolute; inset: 10px; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .6s ease 1.4s; }
.mov .marco.visto .visor { opacity: 1; }
.marco .visor i { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.9); }
.marco .visor i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.marco .visor i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.marco .visor i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.marco .visor i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.marco .visor b { position: absolute; left: 12px; bottom: 10px; font: 600 10px/1 var(--mono); letter-spacing: .14em; color: #fff;
  background: rgba(43,47,54,.55); padding: 5px 8px; border-radius: 2px; text-transform: uppercase; }
.marco .visor b::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3BE37A; margin-right: 6px; vertical-align: 1px;
  animation: latido 1.8s ease-in-out infinite; }
@keyframes latido { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* Inclinación 3D sutil de la foto del hero */
.mov .inclina { transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.8,.2,1); will-change: transform; }

/* ---------- Tarjetas con luz que sigue al cursor ---------- */
.mov .luz { position: relative; overflow: hidden; }
.mov .luz::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(30,79,216,.14), transparent 45%); }
.mov .oscuro .luz::after, .mov .plano .luz::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,198,41,.18), transparent 45%); }
.mov .luz:hover::after { opacity: 1; }
.mov .paquete { transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease; }
.mov .paquete:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -24px rgba(30,79,216,.55); }
.mov .paquete .barras i.on { transform-origin: 50% 100%; }
.mov .paquete.visto .barras i.on { animation: crecer .6s cubic-bezier(.16,1,.3,1) both; }
.mov .paquete.visto .barras i.on:nth-child(2) { animation-delay: .12s; }
.mov .paquete.visto .barras i.on:nth-child(3) { animation-delay: .24s; }
.mov .paquete.visto .barras i.on:nth-child(4) { animation-delay: .36s; }
@keyframes crecer { from { transform: scaleY(0); } to { transform: none; } }

/* ---------- Botones: brillo que cruza y efecto imán ---------- */
.mov .btn { position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background-color .25s ease; }
.mov .btn::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); }
.mov .btn:hover::before { animation: brillo .8s ease; }
@keyframes brillo { to { left: 130%; } }

/* ---------- Cinta de servicios que corre ---------- */
.corrida { background: var(--azul); color: var(--blanco); overflow: hidden; border-block: 2px solid var(--carbon); padding-block: .85rem; }
.corrida ul { display: flex; gap: 2.75rem; width: max-content; font-weight: 700; font-size: clamp(.95rem, 2vw, 1.15rem); letter-spacing: -.01em; white-space: nowrap; }
.corrida li { display: flex; align-items: center; gap: 2.75rem; }
.corrida li::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--amarillo); box-shadow: 0 0 12px rgba(255,198,41,.9); }
.mov .corrida ul { animation: correr 38s linear infinite; }
.mov .corrida:hover ul { animation-play-state: paused; }
@keyframes correr { to { transform: translateX(-50%); } }

/* ---------- Detalles vivos ---------- */
.mov .plano { animation: rejilla 26s linear infinite; }
@keyframes rejilla { to { background-position: 32px 32px, 32px 32px; } }
.mov .sello { animation: girar 40s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.mov .folio::after { transform-origin: 0 50%; transform: scaleX(0); transition: transform 1s cubic-bezier(.65,0,.35,1) .35s; }
.mov .folio.visto::after { transform: scaleX(1); }
.mov .folio b::after { content: "_"; margin-left: .15em; animation: latido 1s steps(1) infinite; }
.mov .cifra, .mov .gigante { font-variant-numeric: tabular-nums; }
.mov .wa-flotante { animation: flotar 4s ease-in-out infinite; }
@keyframes flotar { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.mov .liga-flecha::after { transition: transform .3s cubic-bezier(.2,.8,.2,1); display: inline-block; }
.mov .liga-flecha:hover::after { transform: translateX(5px); }
.mov .pasos li { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.mov .pasos li:hover { transform: translateY(-4px); }

/* Cursor-luz que acompaña al puntero en el hero (solo escritorio) */
.hero .faro { position: absolute; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; z-index: -1; left: 0; top: 0;
  background: radial-gradient(circle, rgba(30,79,216,.10), transparent 62%); transform: translate(-50%, -50%); opacity: 0; transition: opacity .6s ease; }
.mov .hero:hover .faro { opacity: 1; }

@media (hover: none) { .hero .faro { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .progreso, .fondo-vivo, .hero .faro { display: none !important; }
  .corrida ul { animation: none !important; flex-wrap: wrap; width: auto; justify-content: center; gap: 1rem 2rem; }
}
