/* Keyframe Animations */

/* Loading Animations */
@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-10px) scale(1.05);
    }
    50% {
        transform: translateY(0) scale(1.1);
    }
    75% {
        transform: translateY(10px) scale(1.05);
    }
}

@keyframes loadingProgress {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

/* Particle Animations */
@keyframes particleFloat {
    0% {
        transform: translate(0, 100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translate(100vw, -100vh) scale(1);
        opacity: 0;
    }
}

/* Logo Animation */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Hero Animations */
@keyframes airFlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translate(-30%, -40%) scale(1.2) rotate(90deg);
        opacity: 0.15;
    }
    50% {
        transform: translate(-70%, -60%) scale(0.9) rotate(180deg);
        opacity: 0.1;
    }
    75% {
        transform: translate(-40%, -55%) scale(1.1) rotate(270deg);
        opacity: 0.15;
    }
}

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

@keyframes typewriter {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: var(--color-primary);
    }
    51%, 100% {
        border-color: transparent;
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(-50%) translateX(0) rotate(-5deg);
    }
    33% {
        transform: translateY(-45%) translateX(10px) rotate(0deg);
    }
    66% {
        transform: translateY(-55%) translateX(-10px) rotate(5deg);
    }
}

/* Icon Animations */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes iconFade {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Feature Animations */
@keyframes airStream {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes fillPocket {
    0%, 100% {
        height: 0;
    }
    50% {
        height: 70%;
    }
}

@keyframes rotate3d {
    0% {
        transform: rotateY(0deg) rotateX(15deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(15deg);
    }
}

/* Scroll Triggered Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Hover Effects */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in {
        opacity: 1;
        transform: none;
    }
}

/* Custom Cursor Animation */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    opacity: 0.5;
}

.cursor.active {
    transform: scale(1.5);
    opacity: 0.8;
}

/* Air Particle System */
.air-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, var(--color-primary), transparent);
    border-radius: 50%;
    pointer-events: none;
    animation: airParticle 2s ease-out forwards;
}

@keyframes airParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

/* Glitch Effect */
@keyframes glitch {
    0%, 100% {
        transform: translate(0);
        opacity: 1;
    }
    20% {
        transform: translate(-2px, 2px);
        opacity: 0.8;
    }
    40% {
        transform: translate(-2px, -2px);
        opacity: 0.6;
    }
    60% {
        transform: translate(2px, 2px);
        opacity: 0.8;
    }
    80% {
        transform: translate(2px, -2px);
        opacity: 0.6;
    }
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: var(--color-primary);
    z-index: -1;
}

.glitch::after {
    animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
    color: var(--color-secondary);
    z-index: -2;
}

/* Breathing Effect */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.breathe {
    animation: breathe 4s ease-in-out infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

/* Wave Effect */
@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.wave {
    animation: wave 2s ease-in-out infinite;
    transform-origin: center bottom;
}

/* Bounce Effect */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* Spin Effect */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 2s linear infinite;
}

/* Fade Loop */
@keyframes fadeLoop {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

.fade-loop {
    animation: fadeLoop 3s ease-in-out infinite;
}