/* ═══════════════════════════════════════════════════════════════
   NetMirror Hub — Animation Keyframes & Scroll Animations
   ═══════════════════════════════════════════════════════════════ */

/* ─── Keyframes ──────────────────────────────────────────────── */

@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 fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(var(--rotate, 0deg));
    }

    50% {
        transform: translateY(-20px) rotate(var(--rotate, 0deg));
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(229, 9, 20, 0.8);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blinkCursor {

    0%,
    100% {
        border-right-color: var(--netflix-red);
    }

    50% {
        border-right-color: transparent;
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Scroll-Triggered Classes ───────────────────────────────── */

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="fade-up"] {
    transform: translateY(30px);
}

[data-animate="fade-down"] {
    transform: translateY(-30px);
}

[data-animate="fade-left"] {
    transform: translateX(-30px);
}

[data-animate="fade-right"] {
    transform: translateX(30px);
}

[data-animate="scale"] {
    transform: scale(0.9);
}

[data-animate="fade"] {
    transform: none;
}

/* Animated state */
[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* ─── Animation Utility Classes ──────────────────────────────── */

.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-right {
    animation: fadeInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ─── Stagger Delays ─────────────────────────────────────────── */

.stagger-1 {
    animation-delay: 0.1s;
    transition-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
    transition-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
    transition-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
    transition-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
    transition-delay: 0.6s;
}

.stagger-7 {
    animation-delay: 0.7s;
    transition-delay: 0.7s;
}

.stagger-8 {
    animation-delay: 0.8s;
    transition-delay: 0.8s;
}

/* ─── Floating Animation ─────────────────────────────────────── */

.floating {
    animation: float 3s ease-in-out infinite;
}

.floating-slow {
    animation: float 5s ease-in-out infinite;
}

.floating-delayed {
    animation: float 4s ease-in-out infinite 1s;
}

/* ─── Pulse Glow for CTAs ────────────────────────────────────── */

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ─── Shimmer / Skeleton ─────────────────────────────────────── */

.skeleton {
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ─── Gradient Animated Background ───────────────────────────── */

.animated-gradient {
    background: linear-gradient(-45deg, #141414, #1a0a0a, #141414, #0f0f0f);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* ─── Typing Effect ──────────────────────────────────────────── */

.typewriter-container {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--netflix-red);
    animation: blinkCursor 1s step-end infinite;
}

/* ─── Hover Effects ──────────────────────────────────────────── */

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.3);
}

/* ─── Image Reveal ───────────────────────────────────────────── */

.img-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-reveal.animate-in {
    clip-path: inset(0 0 0 0);
}

/* ─── Reduced Motion ─────────────────────────────────────────── */

@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;
    }
}