/* Fade In Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up.delay-1 {
    animation-delay: 0.2s;
}

.fade-in-up.delay-2 {
    animation-delay: 0.4s;
}

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

/* Reveal Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.reveal-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-card {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease;
}

.reveal-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-card.delay-1 {
    transition-delay: 0.1s;
}

.reveal-card.delay-2 {
    transition-delay: 0.2s;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Particles Animation */
.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.bg-particles::before,
.bg-particles::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
}

.bg-particles::before {
    top: 20%;
    left: 10%;
    animation: float-particle 15s infinite;
}

.bg-particles::after {
    top: 60%;
    right: 10%;
    animation: float-particle 20s infinite reverse;
}

@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translate(100px, -100px) scale(1.5);
        opacity: 0.5;
    }
    90% {
        opacity: 1;
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
    animation: glitch 5s infinite;
}

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

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--primary);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--secondary);
    z-index: -2;
}

@keyframes glitch {
    0%, 90%, 100% {
        opacity: 1;
    }
    92% {
        opacity: 0.8;
    }
}

@keyframes glitch-1 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(20% 0 60% 0);
        transform: translate(-2px, 2px);
    }
    40% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(2px, -2px);
    }
    60% {
        clip-path: inset(80% 0 10% 0);
        transform: translate(-1px, 1px);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    30% {
        clip-path: inset(10% 0 80% 0);
        transform: translate(2px, -1px);
    }
    50% {
        clip-path: inset(60% 0 30% 0);
        transform: translate(-2px, 2px);
    }
    70% {
        clip-path: inset(90% 0 5% 0);
        transform: translate(1px, -2px);
    }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

/* Gradient Animation */
.gradient-animate {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

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

/* Text Animation */
.text-animate {
    display: inline-block;
    opacity: 0;
    animation: text-reveal 0.8s ease forwards;
}

@keyframes text-reveal {
    0% {
        opacity: 0;
        transform: translateY(20px) rotateX(-90deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Wave Animation */
.wave {
    animation: wave 2.5s ease-in-out infinite;
    transform-origin: 70% 70%;
    display: inline-block;
}

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(14deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    30% {
        transform: rotate(14deg);
    }
    40% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(10deg);
    }
    60% {
        transform: rotate(0deg);
    }
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary);
    }
}

/* Parallax Classes */
.parallax-slow {
    transition: transform 0.6s ease-out;
}

.parallax-medium {
    transition: transform 0.4s ease-out;
}

.parallax-fast {
    transition: transform 0.2s ease-out;
}