/* ===== V2 ANIMATIONS =====
   Keyframes, Scroll Animations, Hover Effects
   ============================================ */

/* ===== KEYFRAMES ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes floatNotification {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

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

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

@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 slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px var(--cyan-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--cyan-glow), 0 0 60px var(--cyan-glow);
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.animate-on-scroll.visible .step-card,
.animate-on-scroll.visible .pricing-card,
.animate-on-scroll.visible .testimonial-card,
.animate-on-scroll.visible .why-card,
.animate-on-scroll.visible .freedom-card {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-on-scroll.visible .step-card:nth-child(1),
.animate-on-scroll.visible .pricing-card:nth-child(1),
.animate-on-scroll.visible .why-card:nth-child(1),
.animate-on-scroll.visible .freedom-card:nth-child(1) { animation-delay: 0s; }

.animate-on-scroll.visible .step-card:nth-child(2),
.animate-on-scroll.visible .pricing-card:nth-child(2),
.animate-on-scroll.visible .why-card:nth-child(2),
.animate-on-scroll.visible .freedom-card:nth-child(2) { animation-delay: 0.1s; }

.animate-on-scroll.visible .step-card:nth-child(3),
.animate-on-scroll.visible .pricing-card:nth-child(3),
.animate-on-scroll.visible .why-card:nth-child(3),
.animate-on-scroll.visible .freedom-card:nth-child(3) { animation-delay: 0.2s; }

.animate-on-scroll.visible .step-card:nth-child(4),
.animate-on-scroll.visible .pricing-card:nth-child(4),
.animate-on-scroll.visible .why-card:nth-child(4),
.animate-on-scroll.visible .freedom-card:nth-child(4) { animation-delay: 0.3s; }

.animate-on-scroll.visible .why-card:nth-child(5) { animation-delay: 0.4s; }
.animate-on-scroll.visible .why-card:nth-child(6) { animation-delay: 0.5s; }

.animate-on-scroll.visible .testimonial-card:nth-child(1) { animation-delay: 0s; }
.animate-on-scroll.visible .testimonial-card:nth-child(2) { animation-delay: 0.15s; }
.animate-on-scroll.visible .testimonial-card:nth-child(3) { animation-delay: 0.3s; }

/* ===== HERO ANIMATIONS ===== */
.hero-badge {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-description {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-metrics {
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-visual {
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* ===== TRANSITION UTILITIES ===== */
.transition-fast {
    transition: all 0.15s ease;
}

.transition-base {
    transition: all 0.3s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

.transition-bounce {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== HOVER EFFECTS ===== */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px var(--cyan-glow);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

.hover-border-accent {
    transition: border-color 0.3s ease;
}

.hover-border-accent:hover {
    border-color: var(--border-accent);
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(6, 7, 13, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--bg-card-hover) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ===== FOCUS STATES ===== */
*:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px var(--cyan-glow);
}

/* ===== 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;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }

    .glow-orb {
        animation: none;
    }

    .td-notification {
        animation: none;
    }
}
