/* Animations for website elements */

/* Floating animation for hero cubes */
@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.cube:nth-child(1) {
    animation-duration: 4s;
}

.cube:nth-child(2) {
    animation-duration: 6s;
}

.cube:nth-child(3) {
    animation-duration: 5s;
}

.cube:nth-child(4) {
    animation-duration: 7s;
}

.cube:nth-child(5) {
    animation-duration: 4.5s;
}

.cube:nth-child(6) {
    animation-duration: 5.5s;
}

/* Bounce animation for scroll down indicator */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 2s infinite;
}

/* Fade in animations for content */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Staggered animation delays for sections */
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }
.fade-in:nth-child(6) { animation-delay: 0.6s; }

/* Pulse animation for important elements */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Slide in animations */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

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

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

/* Rotate animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotate {
    animation: rotate 10s linear infinite;
}

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

.scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

/* Background gradient animation */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-bg {
    background: linear-gradient(-45deg, var(--primary-dark), var(--primary-color), var(--primary-light), var(--primary-color));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}