/**
 * 321 ATS Landing - Animations & Micro-interactions
 * Bold animations for 2025 personality-driven design
 */

/* =====================================
   🌊 ANIMATED GRADIENT MESH BACKGROUND
   ===================================== */

.gradient-mesh-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-mesh);
    opacity: 0.6;
    z-index: 0;
    animation: gradientShift 15s ease infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* =====================================
   ✨ GRADIENT TEXT ANIMATED
   ===================================== */

.gradient-text-animated {
    background: var(--gradient-text-animated);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 8s ease infinite;
    display: inline-block;
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* =====================================
   ❌ STRIKETHROUGH WITH STYLE
   ===================================== */

.strikethrough {
    position: relative;
    display: inline-block;
    color: var(--text-tertiary);
}

.strikethrough::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 3px;
    background: var(--accent-coral);
    transform: scaleX(0);
    transform-origin: left;
    animation: strikeThrough 0.8s ease 0.5s forwards;
}

@keyframes strikeThrough {
    to {
        transform: scaleX(1);
    }
}

/* =====================================
   🎯 MAGNETIC BUTTON
   ===================================== */

.magnetic-btn {
    position: relative;
    transition: var(--transition-base);
    overflow: hidden;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.magnetic-btn:active::before {
    width: 300px;
    height: 300px;
}

.magnetic-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.magnetic-btn .btn-arrow {
    transition: transform var(--transition-base);
}

.magnetic-btn:hover .btn-arrow {
    transform: translateX(4px);
    animation: arrowBounce 1s ease infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(4px);
    }
    50% {
        transform: translateX(8px);
    }
}

/* =====================================
   🎈 FLOATING ANIMATION
   ===================================== */

.floating {
    animation: float 3s ease-in-out infinite;
}

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

.floating:hover {
    animation-play-state: paused;
    transform: translateY(-5px) scale(1.05);
    transition: transform var(--transition-base);
}

/* =====================================
   🎨 HOVER GLOW EFFECTS
   ===================================== */

.glow-on-hover {
    position: relative;
    transition: all var(--transition-base);
}

.glow-on-hover::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    opacity: 0;
    filter: blur(10px);
    transition: opacity var(--transition-base);
    z-index: -1;
}

.glow-on-hover:hover::before {
    opacity: 0.7;
}

/* =====================================
   💫 SHIMMER EFFECT
   ===================================== */

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* =====================================
   🎪 FEATURE CARDS ANIMATIONS
   ===================================== */

.feature-card {
    transition: all var(--transition-base);
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--primary), var(--accent-coral)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.feature-card .feature-icon {
    transition: all var(--transition-slow);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-accent);
    color: white;
}

/* =====================================
   🎯 CTA PULSE ANIMATION
   ===================================== */

.cta-pulse {
    animation: ctaPulse 2s ease infinite;
}

@keyframes ctaPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 25, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(0, 25, 255, 0);
    }
}

/* =====================================
   📊 STAT NUMBER COUNTER (JS required)
   ===================================== */

.stat-number {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform var(--transition-base);
}

.stat:hover .stat-number {
    transform: scale(1.1);
}

/* =====================================
   🎬 FADE IN ANIMATIONS (for scroll)
   ===================================== */

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.animate-scale {
    opacity: 0;
    animation: fadeInScale 0.6s var(--ease-out) forwards;
}

/* Stagger delays for sequential animations */
.animate-on-scroll:nth-child(1) { animation-delay: 0s; }
.animate-on-scroll:nth-child(2) { animation-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { animation-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { animation-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { animation-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { animation-delay: 0.5s; }

/* =====================================
   🎨 PRICING CARD HOVER
   ===================================== */

.pricing-card {
    transition: all var(--transition-slow);
    position: relative;
}

.pricing-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: var(--gradient-mesh);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.pricing-card:hover::after {
    opacity: 0.3;
}

.pricing-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: var(--shadow-xl);
}

/* =====================================
   🌐 NAVBAR SCROLL EFFECT
   ===================================== */

.landing-nav.scrolled {
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}

/* =====================================
   ⚡️ REDUCED MOTION SUPPORT
   ===================================== */

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

    .floating,
    .magnetic-btn:hover,
    .shimmer::after {
        animation: none;
    }
}

/* =====================================
   📱 MOBILE OPTIMIZATIONS
   ===================================== */

@media (max-width: 768px) {
    .gradient-mesh-bg {
        opacity: 0.4;
    }

    .floating {
        animation: none;
    }

    .feature-card:hover {
        transform: none;
    }

    .magnetic-btn:hover {
        transform: none;
    }
}
