/* =========================================================
   CERNUNNOS BASE · animations.css
   Keyframes, clases utilitarias y revelado al hacer scroll.
   ========================================================= */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes glowNeon {
    0%, 100% { text-shadow: 0 0 10px rgba(57,255,20,0.5); box-shadow: 0 0 20px rgba(57,255,20,0.3); }
    50%      { text-shadow: 0 0 20px rgba(57,255,20,0.8); box-shadow: 0 0 30px rgba(57,255,20,0.6); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* CLASES DE ANIMACIÓN */
.animate-fade-in    { animation: fadeIn 0.6s ease both; }
.animate-slide-up   { animation: slideInUp 0.8s ease both; }
.animate-slide-right{ animation: slideInRight 0.8s ease both; }
.animate-glow       { animation: glowNeon 2s ease infinite; }
.animate-float      { animation: float 3s ease-in-out infinite; }

/* REVELADO AL HACER SCROLL (toggleado por main.js)
   Estado inicial oculto; .visible lo muestra. */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}
.fade-in-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* Retardos escalonados para rejillas */
.stagger > *:nth-child(1) { transition-delay: .05s; }
.stagger > *:nth-child(2) { transition-delay: .15s; }
.stagger > *:nth-child(3) { transition-delay: .25s; }
.stagger > *:nth-child(4) { transition-delay: .35s; }
.stagger > *:nth-child(5) { transition-delay: .45s; }
.stagger > *:nth-child(6) { transition-delay: .55s; }

/* EFECTOS NEON */
.neon-text { color: var(--color-secondary); text-shadow: 0 0 10px var(--color-secondary); }
.neon-border { border-color: var(--color-secondary) !important; box-shadow: 0 0 15px rgba(57,255,20,0.3) !important; }

/* GLOW LENTO · logo hero
   Pulsa el brillo del SVG neon interno con un drop-shadow externo.
   Sin transform para no interferir con la posición del layout.
   4 s = lento pero vivo; ease-in-out para que la transición sea suave. */
@keyframes heroBrandGlow {
    0%, 100% {
        filter: brightness(0.88) drop-shadow(0 0  8px rgba(57,255,20,0.18))
                                 drop-shadow(0 0 20px rgba(57,255,20,0.08));
        opacity: 0.92;
    }
    50% {
        filter: brightness(1.08) drop-shadow(0 0 18px rgba(57,255,20,0.55))
                                 drop-shadow(0 0 40px rgba(57,255,20,0.22));
        opacity: 1;
    }
}

.hero-brand-glow {
    animation: heroBrandGlow 4s ease-in-out infinite;
    will-change: filter, opacity;
}

/* Respetar usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .fade-in-on-scroll { opacity: 1; transform: none; }
}
