/* ========================================
   Scroll Reveal Animations
   ======================================== */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade Up */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade Down */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Left */
@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide Right */
@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   CTA Glow & Shine Effects
   ======================================== */

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.5),
                    0 0 40px rgba(0, 212, 255, 0.3),
                    0 0 60px rgba(0, 212, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.7),
                    0 0 60px rgba(0, 212, 255, 0.5),
                    0 0 90px rgba(0, 212, 255, 0.3);
    }
}

/* Shine Sweep */
@keyframes shineSweep {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        filter: blur(20px);
    }
    50% {
        opacity: 0.8;
        filter: blur(30px);
    }
}

/* ========================================
   Micro-interactions
   ======================================== */

/* Hover Lift */
@keyframes hoverLift {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-4px);
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

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

/* Gradient Shift */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   Animation Classes
   ======================================== */

/* Scroll Reveal Classes */
.animate-on-scroll {
    opacity: 0;
    will-change: opacity, transform;
}

.animate-on-scroll.animated {
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-on-scroll[data-animate="fade-up"] {
    animation-name: fadeUp;
}

.animate-on-scroll[data-animate="fade-down"] {
    animation-name: fadeDown;
}

.animate-on-scroll[data-animate="slide-left"] {
    animation-name: slideLeft;
}

.animate-on-scroll[data-animate="slide-right"] {
    animation-name: slideRight;
}

.animate-on-scroll[data-animate="scale-in"] {
    animation-name: scaleIn;
}

/* Delay Classes */
.animate-on-scroll[data-delay="100"] {
    animation-delay: 0.1s;
}

.animate-on-scroll[data-delay="200"] {
    animation-delay: 0.2s;
}

.animate-on-scroll[data-delay="300"] {
    animation-delay: 0.3s;
}

.animate-on-scroll[data-delay="400"] {
    animation-delay: 0.4s;
}

.animate-on-scroll[data-delay="500"] {
    animation-delay: 0.5s;
}

/* CTA Pulse Effect */
.cta-pulse {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Float Animation */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* ========================================
   Chat Widget Animations
   ======================================== */

/* Chat Widget Entrance */
@keyframes chatWidgetEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Chat Message Slide In */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Typing Indicator */
@keyframes typingDots {
    0%, 20% {
        transform: translateY(0);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-10px);
        opacity: 1;
    }
    80%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* Use transform and opacity for better performance */
.animate-on-scroll,
.cta-magnetic,
.bento-card {
    will-change: transform, opacity;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .cta-pulse,
    .float-animation {
        animation: none !important;
        transition: none !important;
    }
    
    .animate-on-scroll {
        opacity: 1 !important;
    }
}
