/* 
 * Premium Landing Page Animations
 * Adds subtle, modern motion without changing colors or layout
 */

/* ==================== BACKGROUND DOTS LAYER ==================== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1 !important;
    pointer-events: none;
    opacity: 1 !important;
}

/* Ensure content stays above particles */
.landing-nav,
.hero-section,
.features-section,
.how-section,
.benefits-section,
.faq-section,
.cta-section,
.footer {
    position: relative;
    z-index: 1;
}

/* ==================== ENHANCED MICRO-INTERACTIONS ==================== */

/* Smooth hover elevations with glow */
.feature-card {
    will-change: transform;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(0, 242, 255, 0.15),
        0 0 0 1px rgba(0, 242, 255, 0.2);
}

/* Button glow animation */
.btn-hero-primary,
.btn-cta,
.btn-nav-signup {
    position: relative;
    overflow: hidden;
}

.btn-hero-primary::before,
.btn-cta::before,
.btn-nav-signup::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-hero-primary:hover::before,
.btn-cta:hover::before,
.btn-nav-signup:hover::before {
    width: 300px;
    height: 300px;
}

/* Glass card subtle pulse on hover */
.glass-card {
    transition: all 0.4s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 242, 255, 0.3);
}

/* Nav link underline animation */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ==================== SCROLL-BASED ANIMATIONS ==================== */

/* Fade up animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in from left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade in from right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale fade in */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Classes for scroll reveal (applied via JS) */
.scroll-reveal {
    opacity: 0;
}

.scroll-reveal.revealed {
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.scroll-reveal-left.revealed {
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.scroll-reveal-right.revealed {
    animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.scroll-reveal-scale.revealed {
    animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==================== GRADIENT TEXT SHIMMER ==================== */

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

    100% {
        background-position: 200% center;
    }
}

.gradient-text,
.logo-text,
.section-title,
.cta-title {
    background-size: 200% auto;
    animation: shimmer 8s linear infinite;
}

/* ==================== HERO STAT NUMBERS GLOW ==================== */

.stat-number {
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
    transition: text-shadow 0.3s ease;
}

.stat-item:hover .stat-number {
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.6);
}

/* ==================== FAQ SMOOTH EXPAND ==================== */

.faq-answer {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    opacity: 1;
}

/* ==================== STEP CONNECTOR ANIMATION ==================== */

@keyframes flowRight {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.step-connector {
    background-size: 200% auto;
    animation: flowRight 3s linear infinite;
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */

/* Hardware acceleration for animations */
.feature-card,
.glass-card,
.btn-hero-primary,
.btn-hero-secondary,
.btn-cta,
.nav-links a {
    transform: translateZ(0);
    will-change: transform;
}

/* ==================== ACCESSIBILITY: Reduced Motion ==================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #particles-canvas {
        display: none;
    }

    .gradient-text,
    .logo-text,
    .section-title,
    .cta-title {
        animation: none;
    }
}

/* ==================== FLOATING EFFECT FOR HERO ==================== */

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-stats {
    animation: float 6s ease-in-out infinite;
}

/* ==================== SUBTLE PULSE FOR STATS ==================== */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.stat-item {
    animation: pulse 4s ease-in-out infinite;
}

.stat-item:nth-child(1) {
    animation-delay: 0s;
}

.stat-item:nth-child(2) {
    animation-delay: 1.3s;
}

.stat-item:nth-child(3) {
    animation-delay: 2.6s;
}