/* ===== ADVANCED ANIMATIONS & MICRO-INTERACTIONS ===== */

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
    }
}

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

@keyframes neuralPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes dataFlow {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

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

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

@keyframes morphingGradient {
    0%, 100% {
        background: var(--gradient-primary);
    }
    33% {
        background: var(--gradient-secondary);
    }
    66% {
        background: var(--gradient-success);
    }
}

@keyframes liquidBorder {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

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

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.animate-on-scroll.slide-left {
    transform: translateX(-60px);
}

.animate-on-scroll.slide-left.animate {
    transform: translateX(0);
}

.animate-on-scroll.slide-right {
    transform: translateX(60px);
}

.animate-on-scroll.slide-right.animate {
    transform: translateX(0);
}

.animate-on-scroll.scale-in {
    transform: scale(0.8);
}

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

/* ===== BUTTON MICRO-INTERACTIONS ===== */
.glow-btn {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-medium);
}

.glow-btn::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;
}

.glow-btn:hover::before {
    left: 100%;
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(0, 212, 255, 0.4),
        0 0 0 1px rgba(0, 212, 255, 0.3);
}

.glow-btn:active {
    transform: translateY(0);
}

/* Energy Fill Effect */
.energy-fill {
    position: relative;
    overflow: hidden;
}

.energy-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.4s ease;
    z-index: -1;
}

.energy-fill:hover::after {
    width: 100%;
}

/* ===== GLASS MORPHISM EFFECTS ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all var(--transition-medium);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Holographic Effect */
.holographic {
    position: relative;
    background: linear-gradient(45deg, #00d4ff, #ff6b9d, #4ade80, #c084fc);
    background-size: 400% 400%;
    animation: morphingGradient 8s ease infinite;
}

.holographic::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: var(--surface-bg);
    border-radius: inherit;
    z-index: -1;
}

/* Liquid Border Effect */
.liquid-border {
    position: relative;
    background: var(--gradient-primary);
    animation: liquidBorder 6s ease-in-out infinite;
}

.liquid-border::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--surface-bg);
    border-radius: inherit;
    animation: liquidBorder 6s ease-in-out infinite reverse;
}

/* ===== NEURAL NETWORK ANIMATIONS ===== */
.neural-network .node {
    animation: neuralPulse 3s ease-in-out infinite;
    transform-origin: center;
}

.neural-network .node:nth-child(1) { animation-delay: 0s; }
.neural-network .node:nth-child(2) { animation-delay: 0.6s; }
.neural-network .node:nth-child(3) { animation-delay: 1.2s; }
.neural-network .node:nth-child(4) { animation-delay: 1.8s; }
.neural-network .node:nth-child(5) { animation-delay: 2.4s; }

.data-flow .pulse-ring {
    animation: dataFlow 4s linear infinite;
}

.data-flow .pulse-ring.delay-1 {
    animation-delay: 1.3s;
}

.data-flow .pulse-ring.delay-2 {
    animation-delay: 2.6s;
}

/* ===== MARQUEE ANIMATION ===== */
.logo-marquee {
    overflow: hidden;
    white-space: nowrap;
}

.logo-track {
    display: inline-block;
    animation: marqueeScroll 30s linear infinite;
}

.logo-track:hover {
    animation-play-state: paused;
}

/* ===== STEP CONNECTOR ANIMATIONS ===== */
.step-connector .connector-line {
    position: relative;
    overflow: hidden;
}

.step-connector .connector-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    animation: energyFlow 2s ease-in-out infinite;
}

.flow-particle {
    animation: dataFlow 3s linear infinite;
}

/* ===== PRICING CARD ENHANCEMENTS ===== */
.pricing-card {
    transition: all var(--transition-medium);
}

.pricing-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.pricing-card.featured {
    position: relative;
    overflow: hidden;
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(0, 212, 255, 0.3),
        transparent,
        rgba(255, 107, 157, 0.3),
        transparent
    );
    animation: spin 4s linear infinite;
    z-index: -1;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ===== NUMBER COUNTER ANIMATIONS ===== */
.counter-number {
    font-variant-numeric: tabular-nums;
    transition: all var(--transition-fast);
}

.counter-animated {
    animation: countUp 0.6s ease-out;
}

/* ===== TESTIMONIAL CAROUSEL ===== */
.testimonial-slide {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.testimonial-slide.prev {
    transform: translateX(-100px);
}

/* ===== INTERACTIVE HOVER STATES ===== */
.interactive-card {
    transition: all var(--transition-medium);
    cursor: pointer;
}

.interactive-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 212, 255, 0.3);
}

.interactive-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--primary-accent);
}

/* ===== LOADING ANIMATIONS ===== */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* ===== PARALLAX EFFECTS ===== */
.parallax-element {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary-bg);
    z-index: 9999;
}

.scroll-progress {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.1s ease;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .animate-on-scroll {
        transform: translateY(30px);
    }
    
    .glow-btn:hover {
        transform: none;
    }
    
    .glass-card:hover {
        transform: translateY(-2px);
    }
    
    .interactive-card:hover {
        transform: translateY(-4px);
    }
}

/* ===== 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;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}