/* ============================================================
   Movimiento e interacción para todo el sitio
   (animaciones de entrada, hover, ondas en botones y aparición al hacer scroll)
   ============================================================ */
@keyframes entrar { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes entrarDer { from { opacity: 0; transform: translateX(28px) rotate(1deg); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; } }
@keyframes deriva { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, 20px) scale(1.08); } 66% { transform: translate(-20px, 30px) scale(.95); } }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes onda { to { transform: scale(4); opacity: 0; } }
@keyframes marcar { 0% { transform: translateY(-50%) scale(.3); opacity: 0; } 70% { transform: translateY(-50%) scale(1.25); } 100% { transform: translateY(-50%) scale(1); } }
@keyframes brillo { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgba(49, 123, 169, .45); } 50% { box-shadow: 0 0 0 10px rgba(49, 123, 169, 0); } }

body { animation: aparecer .45s ease backwards; }
.flotar { animation: flotar 6s ease-in-out infinite; }

/* Cabecera: sombra al bajar y barra de progreso de lectura */
header.nav { transition: box-shadow .3s ease, background-color .3s ease; }
header.nav.scrolled { box-shadow: 0 10px 30px -18px rgba(8, 53, 101, .35); }
.progreso-scroll { position: fixed; top: 0; left: 0; z-index: 100; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #317ba9, #5a9fcb, #ffd36e); pointer-events: none; }

/* Botones: elevación, presión y onda */
.btn { position: relative; overflow: hidden; transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.97); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 14px 26px -12px rgba(49, 123, 169, .75); }
.onda { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); animation: onda .6s ease-out forwards; pointer-events: none; }
.btn:not(.btn-primary) .onda { background: rgba(49, 123, 169, .18); }

/* Tarjetas que se elevan */
.card, .svc, .season, .type, a.panel.option, .tipo-card, .kpi { transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease, border-color .28s ease; }
.card:hover, .svc:hover, .season:hover, .type:hover, a.panel.option:hover { transform: translateY(-5px); box-shadow: 0 4px 8px rgba(8, 53, 101, .04), 0 22px 40px -14px rgba(49, 123, 169, .3); }
.option { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
button.option:hover { transform: translateY(-2px); }
.choice span { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease; }
.choice:active span { transform: scale(.96); }
.choice input:checked + span { animation: brilloSel .35s ease; }
@keyframes brilloSel { 50% { transform: scale(1.03); } }
input, select, textarea { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }

/* Aparición al hacer scroll (la clase .rv la pone movimiento.js) */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--rv-d, 0s); }
.rv.rv-in { opacity: 1; transform: none; }

/* Portada */
.hero .badges, .hero h1, .hero .lede, .hero .cta-row, .hero .trust { animation: entrar .8s cubic-bezier(.2, .8, .2, 1) backwards; }
.hero h1 { animation-delay: .08s; } .hero .lede { animation-delay: .16s; } .hero .cta-row { animation-delay: .24s; } .hero .trust { animation-delay: .32s; }
.hero .sheet { animation: entrarDer .9s .2s cubic-bezier(.2, .8, .2, 1) backwards; transition: transform .3s ease; will-change: transform; }
.hero .scale i.goal { animation: brillo 2.4s ease-in-out infinite; }
.hero::after { content: ""; position: absolute; width: 460px; height: 460px; right: -140px; top: -160px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(90, 159, 203, .28), transparent 70%); animation: deriva 16s ease-in-out infinite; }
.hero .cta-row .btn-primary { animation: latido 2.8s ease-in-out 1.4s 3; }

/* Plataforma: vistas, listas y pasos */
.vista:not([hidden]) { animation: entrar .35s cubic-bezier(.2, .8, .2, 1) backwards; }
.list > .item, .options > .option, .kpis > .kpi, .grid > .card { animation: entrar .45s cubic-bezier(.2, .8, .2, 1) backwards; }
.list > :nth-child(2), .options > :nth-child(2), .kpis > :nth-child(2), .grid > :nth-child(2) { animation-delay: .04s; }
.list > :nth-child(3), .options > :nth-child(3), .kpis > :nth-child(3), .grid > :nth-child(3) { animation-delay: .08s; }
.list > :nth-child(4), .options > :nth-child(4), .kpis > :nth-child(4), .grid > :nth-child(4) { animation-delay: .12s; }
.list > :nth-child(5), .options > :nth-child(5), .grid > :nth-child(5) { animation-delay: .16s; }
.list > :nth-child(n+6), .options > :nth-child(n+6), .grid > :nth-child(n+6) { animation-delay: .2s; }
fieldset[data-paso]:not([hidden]), .anim-form:not([hidden]), .reg-paso:not([hidden]) { animation: entrar .4s cubic-bezier(.2, .8, .2, 1) backwards; }
.notice, .err:not([hidden]), .muted-box { animation: entrar .3s ease backwards; }
.dd-panel:not([hidden]) { animation: aparecer .18s ease backwards; }
.wiz button[aria-current] span { animation: brilloSel .4s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
}
