/* ========================================
   ANIMATIONS — Keyframes, reveals, hovers
   ======================================== */

/* ---- KEYFRAMES ---- */
@keyframes heroGradient {
    0% {
        opacity: 0.8;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1.1) rotate(1deg);
    }
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateX(-50%) translateY(10px);
        opacity: 1;
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(0, 212, 170, 0);
    }
}

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

/* ---- SCROLL REVEAL ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger delays for children */
.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 100ms; }
.reveal:nth-child(3) { transition-delay: 200ms; }
.reveal:nth-child(4) { transition-delay: 300ms; }
.reveal:nth-child(5) { transition-delay: 400ms; }
.reveal:nth-child(6) { transition-delay: 500ms; }

/* ---- COUNTER ANIMATION ---- */
.counter-animated {
    transition: none;
}

/* ---- HOVER EFFECTS ---- */
.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-fast);
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.btn--primary {
    position: relative;
    overflow: hidden;
}

.btn--primary:hover::before {
    opacity: 1;
}

/* Glow effect on accent icons */
.card__icon:hover {
    box-shadow: var(--shadow-glow);
}

/* ---- NAVBAR ANIMATION ---- */
.navbar {
    animation: fadeInDown 0.5s ease;
}

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

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }

    .hero__bg-gradient {
        animation: none;
    }

    .hero__scroll-indicator {
        animation: none;
    }
}
