/* Framer-Style Effects and Animations */

/* Custom cursor effects */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    pointer-events: none;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate(-50%, -50%);
    opacity: 0;
}

.cursor.active {
    opacity: 1;
}

.cursor.hover {
    transform: translate(-50%, -50%) scale(2);
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid var(--primary-color);
}

/* Magnetic effect for interactive elements */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.magnetic:hover {
    transform: scale(1.05);
}

/* Enhanced service cards with 3D effects */
.service-card {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
}

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

.service-card:hover {
    transform: translateY(-20px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.service-card .service-icon {
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(-5deg);
    filter: drop-shadow(0 10px 20px rgba(99, 102, 241, 0.3));
}

/* Parallax scrolling effects */
.parallax-element {
    transform: translateZ(0);
    will-change: transform;
}

/* Staggered animations for elements */
.stagger-animation {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stagger-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

.stagger-animation:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation:nth-child(5) { transition-delay: 0.5s; }
.stagger-animation:nth-child(6) { transition-delay: 0.6s; }

/* Enhanced hero animations */
.hero-title {
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
    animation: underline-expand 2s ease-out 1s forwards;
}

@keyframes underline-expand {
    to {
        width: 200px;
    }
}

/* Floating elements animation */
.floating {
    animation: floating 6s ease-in-out infinite;
}

.floating:nth-child(odd) {
    animation-delay: -2s;
    animation-duration: 8s;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(1deg);
    }
    66% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

/* Morphing button effects */
.morph-button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.morph-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.morph-button:hover::before {
    left: 100%;
}

.morph-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 20px 40px -12px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Enhanced stats counter with glow effect */
.stat-number {
    position: relative;
    display: inline-block;
}

.stat-number::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: -1;
}

.stat-number.glowing::after {
    opacity: 1;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

/* Text reveal animation */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal .text-content {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.text-reveal.animate .text-content {
    transform: translateY(0);
}

/* Liquid background effect */
.liquid-bg {
    position: relative;
    overflow: hidden;
}

.liquid-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: liquid-move 20s linear infinite;
    z-index: -1;
}

@keyframes liquid-move {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Enhanced form interactions */
.enhanced-input {
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.enhanced-input:focus-within {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px -5px rgba(99, 102, 241, 0.3),
        0 0 0 1px rgba(99, 102, 241, 0.2);
}

.enhanced-input::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(-50%);
}

.enhanced-input:focus-within::after {
    width: 100%;
}

/* Scroll-triggered zoom effect */
.zoom-in-scroll {
    transform: scale(0.8);
    opacity: 0;
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.zoom-in-scroll.animate {
    transform: scale(1);
    opacity: 1;
}

/* Particle system background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.4);
    border-radius: 50%;
    animation: particle-float 15s linear infinite;
}

.particle:nth-child(2n) {
    background: rgba(245, 158, 11, 0.4);
    animation-duration: 20s;
    animation-delay: -5s;
}

.particle:nth-child(3n) {
    animation-duration: 25s;
    animation-delay: -10s;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced navigation blur effect */
.navbar.scrolled {
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Micro-interactions for buttons */
.interactive-button {
    position: relative;
    transform: translateZ(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.interactive-button:hover {
    transform: translateY(-2px) translateZ(0);
}

.interactive-button:active {
    transform: translateY(0) scale(0.98) translateZ(0);
    transition-duration: 0.1s;
}

/* Loading shimmer effect */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-card:hover {
        transform: translateY(-10px);
    }
    
    .morph-button:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .cursor {
        display: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating,
    .particle,
    .liquid-bg::before {
        animation: none;
    }
}