/* ============================================
   ANIMATIONS.CSS — Semillas de Creatividad
   Keyframes & Animation Utility Classes
   ============================================ */

/* ---- Keyframes ---- */

@keyframes lineReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(-10px);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(241, 90, 35, 0.3); }
    50%       { box-shadow: 0 0 50px rgba(241, 90, 35, 0.7); }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Utility Animation Classes ---- */

.animate-fade-in {
    animation: fadeIn 0.6s var(--ease-out) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1.5s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

.animate-scale-in {
    animation: scaleIn 0.5s var(--ease-spring) forwards;
}

/* ---- Initial States for JS-driven Animations ---- */
/* These elements start invisible and are animated by GSAP */

.js-reveal {
    opacity: 0;
    transform: translateY(40px);
}

.js-reveal-left {
    opacity: 0;
    transform: translateX(-40px);
}

.js-reveal-right {
    opacity: 0;
    transform: translateX(40px);
}

.js-stagger-item {
    opacity: 0;
    transform: translateY(30px);
}

/* ---- Transition Utilities ---- */

.transition-fast    { transition: all var(--transition-fast); }
.transition-normal  { transition: all var(--transition-normal); }
.transition-slow    { transition: all var(--transition-slow); }
.transition-color   { transition: color var(--transition-fast), background-color var(--transition-fast); }
.transition-opacity { transition: opacity var(--transition-normal); }
.transition-transform { transition: transform var(--transition-normal); }

/* ---- Accessibility: Respect user motion preference ---- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
