/* ============================================
   MODERN 2025/2026 ANIMATIONS - AICleanify
   ============================================ */

/* ============================================
   1. SCROLL REVEAL ANIMATIONS
   ============================================ */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fade"] {
    transform: none;
}

[data-animate="slide-left"] {
    transform: translateX(-50px);
}

[data-animate="slide-right"] {
    transform: translateX(50px);
}

[data-animate="scale"] {
    transform: scale(0.8);
}

[data-animate="rotate"] {
    transform: rotate(-10deg) scale(0.9);
}

/* ============================================
   2. MAGNETIC BUTTON EFFECT
   ============================================ */
[data-magnetic] {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

[data-magnetic]:hover {
    transform: scale(1.05);
}

/* ============================================
   3. PARALLAX ELEMENTS
   ============================================ */
[data-parallax] {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* ============================================
   4. STAGGER ANIMATIONS
   ============================================ */
.stagger-item {
    animation: staggerFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* ============================================
   5. CURSOR GLOW EFFECT
   ============================================ */
[data-glow] {
    position: relative;
    overflow: hidden;
}

[data-glow]::before {
    content: '';
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-glow]:hover::before {
    opacity: 1;
}

/* ============================================
   6. 3D TILT EFFECT
   ============================================ */
[data-tilt] {
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

[data-tilt]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

[data-tilt]:hover::after {
    opacity: 1;
}

/* ============================================
   7. FLOATING ANIMATION
   ============================================ */
@keyframes float {

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

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

[data-float] {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   8. RIPPLE EFFECT
   ============================================ */
[data-ripple] {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   9. GRADIENT ANIMATIONS
   ============================================ */
[data-gradient-animate] {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {

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

    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   10. GLASSMORPHISM EFFECTS
   ============================================ */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* ============================================
   11. SHIMMER EFFECT
   ============================================ */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
    will-change: transform;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ============================================
   12. PULSE GLOW EFFECT - MODERN COLORS
   ============================================ */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), 0 0 40px rgba(168, 85, 247, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6), 0 0 60px rgba(168, 85, 247, 0.4);
    }
}

/* ============================================
   ICON PULSE EFFECT - CLEAN & MODERN
   ============================================ */
.icon-pulse {
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.08);
    }
}

/* ============================================
   CONTINUOUS TEXT ANIMATIONS FOR HERO
   ============================================ */

/* Gradient text flow animation - optimized with transform */
.text-animate-gradient {
    background: linear-gradient(90deg, #111827, #e60023, #111827, #e60023, #111827);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textFlow 8s linear infinite;
    will-change: background-position;
}

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

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

/* Subtle bounce animation */
.text-bounce {
    animation: subtleBounce 3s ease-in-out infinite;
}

@keyframes subtleBounce {

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

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

/* Continuous shimmer effect */
.text-shimmer {
    position: relative;
    overflow: hidden;
}

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

@keyframes shimmerSlide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Pulsing text glow - optimized with opacity (composited) */
.text-glow-pulse {
    animation: textGlowPulse 2s ease-in-out infinite;
    will-change: opacity, filter;
}

@keyframes textGlowPulse {

    0%,
    100% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(230, 0, 35, 0.3));
    }

    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 20px rgba(230, 0, 35, 0.6)) drop-shadow(0 0 30px rgba(230, 0, 35, 0.4));
    }
}

/* ============================================
   13. SMOOTH TRANSITIONS & APPLE-STYLE SCROLL
   ============================================ */

/* Apple-style smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Account for fixed header */
}

/* Enhanced smooth scrolling for modern browsers */
@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

/* Momentum scrolling for iOS/Safari */
body {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

/* Smooth scroll snap for sections */
.scroll-snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

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

/* ============================================
   14. HOVER LIFT EFFECT
   ============================================ */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.hover-lift:hover {
    transform: translateY(-8px);
    /* Removed box-shadow animation for better performance - use filter instead if needed */
}

/* ============================================
   15. SCALE BOUNCE EFFECT
   ============================================ */
.scale-bounce {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.scale-bounce:active {
    transform: scale(0.95);
}

/* ============================================
   16. BORDER GLOW ANIMATION
   ============================================ */
.border-glow {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
        linear-gradient(135deg, #e60023, #ff6b6b, #e60023) border-box;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

/* ============================================
   17. TEXT GRADIENT ANIMATION
   ============================================ */
.text-gradient-animate {
    background: linear-gradient(90deg, #e60023, #ff6b6b, #e60023);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradientShift 3s ease infinite;
}

@keyframes textGradientShift {

    0%,
    100% {
        background-position: 0% center;
    }

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

/* ============================================
   18. ROTATE ON HOVER
   ============================================ */
.rotate-hover {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.rotate-hover:hover {
    transform: rotate(360deg);
}

/* ============================================
   19. FADE SLIDE ANIMATION
   ============================================ */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

.fade-slide-up {
    animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   20. PERFORMANCE OPTIMIZATIONS
   ============================================ */
[data-animate],
[data-magnetic],
[data-tilt],
[data-parallax] {
    will-change: transform, opacity;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

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