/* ==========================================================================
   Animations — DoNastępnego Blog System
   Keyframes, scroll-triggered, transitions, reduced-motion
   ========================================================================== */

/* --- Shimmer (Skeleton Loading) --- */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* --- Fade In Up (Scroll Reveal) --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Count Up (Counter Animation) --- */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Scroll-Triggered Elements --- */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--dn-transition), transform var(--dn-transition);
}

/* Staggered delays for grid children */
[data-animate].is-visible:nth-child(1) { transition-delay: 0ms; }
[data-animate].is-visible:nth-child(2) { transition-delay: 75ms; }
[data-animate].is-visible:nth-child(3) { transition-delay: 150ms; }
[data-animate].is-visible:nth-child(4) { transition-delay: 225ms; }
[data-animate].is-visible:nth-child(5) { transition-delay: 300ms; }
[data-animate].is-visible:nth-child(6) { transition-delay: 375ms; }

/* ==========================================================================
   Reduced Motion — Respect user accessibility preference
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
    }

    .blog-card:hover {
        transform: none;
    }

    .blog-share__btn:hover {
        transform: none;
    }
}
