/* Animations - WebGL-inspired effects with CSS */

/* Keyframes */
@keyframes float {
    0%, 100% {
        transform: rotateX(15deg) rotateY(-15deg) translateY(0);
    }
    50% {
        transform: rotateX(15deg) rotateY(-15deg) translateY(-20px);
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--color-cyan-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--color-cyan-glow), 0 0 60px var(--color-cyan-glow);
    }
}

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

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

@keyframes borderGlow {
    0%, 100% {
        border-color: var(--color-cyan);
        box-shadow: 0 0 10px var(--color-cyan-glow);
    }
    50% {
        border-color: var(--color-magenta);
        box-shadow: 0 0 20px var(--color-magenta-glow);
    }
}

/* Scroll animations - apply via JS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effects with 3D transforms */
.solution-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.solution-card:hover {
    transform: translateY(-4px) rotateX(2deg);
}

/* Parallax effect classes */
.parallax-element {
    transition: transform 0.3s ease-out;
}

/* Neon text effect */
.neon-text {
    text-shadow: 
        0 0 10px var(--color-cyan),
        0 0 20px var(--color-cyan),
        0 0 30px var(--color-cyan);
    animation: glowPulse 3s ease-in-out infinite;
}

/* Loading state */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* Button press effect */
.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Smooth transitions for interactive elements */
.interactive-element {
    transition: all var(--transition-base);
    will-change: transform;
}

/* Glitch effect (subtle, cyberpunk aesthetic) */
@keyframes glitch {
    0%, 100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-2px);
    }
    40% {
        transform: translateX(2px);
    }
    60% {
        transform: translateX(-2px);
    }
    80% {
        transform: translateX(2px);
    }
}

.glitch-hover:hover {
    animation: glitch 0.3s ease-in-out;
}

/* Stagger animation delays for lists */
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cube-3d {
        animation: none;
    }
    
    .scroll-line {
        animation: none;
    }
}
