/* Todo se apaga con "reducir movimiento". */
@keyframes sube { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
/* Todo lo que se repite se anima con transform/opacity: corre en el compositor y no repinta aunque no haya GPU */
@keyframes latido { from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }
@keyframes cruza { 0%, 55% { transform: translateX(-150%) skewX(-20deg); } 100% { transform: translateX(325%) skewX(-20deg); } }

.hero > .wrap > * { animation: sube .7s cubic-bezier(.22, 1, .36, 1) both; }
.hero > .wrap > :nth-child(2) { animation-delay: .08s; }
.hero > .wrap > :nth-child(3) { animation-delay: .16s; }
.hero > .wrap > :nth-child(4) { animation-delay: .24s; }
.hero > .wrap > :nth-child(5) { animation-delay: .32s; }
.hero > .wrap > .hero-ic { animation: sube .7s cubic-bezier(.22, 1, .36, 1) both, flota 5s ease-in-out .8s infinite; }
.punto { position: relative; }
.punto::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--op); opacity: 0; animation: latido 2s ease-out infinite; }
.top { animation: sube .5s ease both; }
.top.bajo { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6); }

/* Aparecer al bajar (la clase la ponen js/motion.js; sin JS todo se ve normal) */
.js-anim .rev { opacity: 0; transform: translateY(22px); }
.js-anim .rev.ver { opacity: 1; transform: none; transition: opacity .55s ease, transform .6s cubic-bezier(.22, 1, .36, 1); transition-delay: var(--d, 0s); }

/* La sombra aparece de una (sin transición): animarla repinta la tarjeta en cada cuadro */
.feat, .step, .leg, .cfg, .proj { transition: transform .25s cubic-bezier(.22, 1, .36, 1), border-color .2s; }
.feat:hover, .step:hover, .leg:hover, .cfg:hover, a.proj:hover { transform: translateY(-4px); border-color: var(--op); box-shadow: 0 16px 32px -20px var(--op); }
.leg:hover { border-color: var(--c); box-shadow: 0 16px 32px -20px var(--c); }
.feat .ic { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.feat:hover .ic { transform: rotate(-8deg) scale(1.12); }
.proj-ic { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
a.proj:hover .proj-ic { transform: scale(1.08) rotate(-4deg); }
.brand img, .brand svg { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.brand:hover img, .brand:hover svg { transform: rotate(-8deg) scale(1.1); }

.btn, .icon-btn, .copy, .gh-btn { position: relative; overflow: hidden; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .15s, border-color .15s; }
.btn:hover, .icon-btn:hover, .gh-btn:hover { transform: translateY(-2px); }
.btn:active, .icon-btn:active, .copy:active { transform: scale(.96); }
.btn.main::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: 0; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-150%) skewX(-20deg); animation: cruza 4s ease-in-out infinite; }
.onda { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .4); transform: scale(0); animation: onda .6s ease-out forwards; pointer-events: none; }
@keyframes onda { to { transform: scale(1); opacity: 0; } }
.icon-btn svg { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
#btn-tema:hover svg { transform: rotate(40deg); }

.links a { position: relative; }
.links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--op); transform: scaleX(0); transform-origin: right; transition: transform .3s cubic-bezier(.65, 0, .35, 1); }
.links a:hover::after { transform: scaleX(1); transform-origin: left; }

.progreso { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 6; background: var(--op); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-anim .rev { opacity: 1; transform: none; }
}

@media (hover: none) { .punto::after { animation: none; } }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; } /* cambio de tema: la onda la dibuja ui.js, sin el fundido por defecto */
