/* 
  Mad-Dam Landing Page - Animations
  Updated: Complete animation system with fade-in, bounce, and loading states
  Changes: 
  - Added page load animations and intersection observer animations
  - Added subtle checkerboard drift animation (3s loop) for hero background
*/

/* Fade-in animation for sections */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn--loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: var(--space-sm);
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Page load animation */
body {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.loaded {
    opacity: 1;
}

/* Hero checkerboard subtle drift animation */
@keyframes checkerboardDrift {
    0% {
        background-position: 0 0, 0 80px, 80px -80px, -80px 0px;
    }
    100% {
        background-position: 160px 160px, 160px 240px, 240px 80px, 80px 160px;
    }
}

/* Mobile checkerboard drift animation */
@keyframes checkerboardDriftMobile {
    0% {
        background-position: 0 0, 0 40px, 40px -40px, -40px 0px;
    }
    100% {
        background-position: 80px 80px, 80px 120px, 120px 40px, 40px 80px;
    }
}

.hero__checkerboard {
    animation: checkerboardDrift 3s linear infinite;
}

