/* ============================================
   Josh Internet - Premium 404 Page
   Animations & Keyframes
   ============================================ */

/* --- Grid Shift (Background Mesh) --- */
@keyframes gridShift {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(60px, 60px);
    }
}

/* --- 404 Glow Pulse --- */
@keyframes glowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(0, 200, 255, 0.3)) drop-shadow(0 0 60px rgba(0, 200, 255, 0.1));
    }
    25% {
        filter: drop-shadow(0 0 30px rgba(0, 200, 255, 0.5)) drop-shadow(0 0 80px rgba(0, 200, 255, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 213, 74, 0.4)) drop-shadow(0 0 60px rgba(255, 213, 74, 0.15));
    }
    75% {
        filter: drop-shadow(0 0 35px rgba(0, 200, 255, 0.5)) drop-shadow(0 0 90px rgba(0, 200, 255, 0.25));
    }
}

/* --- Ring Pulse Animation --- */
@keyframes ringPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 0.05;
    }
}

/* --- Fade In Up --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Fade In Down --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Fade In --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Router Float --- */
@keyframes floatRouter {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* --- Signal Wave --- */
@keyframes signalWave {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0.5);
    }
    20% {
        opacity: 0.6;
    }
    80% {
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) scale(1.5);
    }
}

/* --- LED Blink --- */
@keyframes ledBlink {
    0%, 80%, 100% {
        opacity: 0.4;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* --- Button Ripple --- */
@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* --- Particle Float (for any particles not on canvas) --- */
@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-10px) translateX(-10px);
        opacity: 0.2;
    }
    75% {
        transform: translateY(-30px) translateX(5px);
        opacity: 0.4;
    }
}

/* --- Glow Border Pulse --- */
@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(0, 200, 255, 0.15);
    }
    50% {
        border-color: rgba(0, 200, 255, 0.35);
    }
}

/* --- Shimmer Effect for Card --- */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* --- Scale In --- */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Spin Slow (for loading/tech feel) --- */
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Glow Piston / Breathing for accent elements --- */
@keyframes breatheGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 200, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 200, 255, 0.3), 0 0 80px rgba(0, 200, 255, 0.1);
    }
}

/* --- Float Random for small particles (CSS-only fallback) --- */
@keyframes floatRandom1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, -20px) scale(1.1); }
    66% { transform: translate(-10px, 10px) scale(0.9); }
}

@keyframes floatRandom2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-15px, -15px) scale(0.9); }
    66% { transform: translate(10px, -20px) scale(1.1); }
}

@keyframes floatRandom3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10px, 15px) scale(1.05); }
    66% { transform: translate(-15px, -10px) scale(0.95); }
}

/* --- Animation Utility Classes --- */
.anim-fade-in {
    animation: fadeIn 1s ease forwards;
}

.anim-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.anim-fade-in-down {
    animation: fadeInDown 0.8s ease forwards;
}

.anim-scale-in {
    animation: scaleIn 0.7s ease forwards;
}

.anim-float {
    animation: floatRouter 4s ease-in-out infinite;
}

.anim-breathe {
    animation: breatheGlow 3s ease-in-out infinite;
}

/* --- Delay Helpers --- */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }
.delay-9 { animation-delay: 0.9s; }
.delay-10 { animation-delay: 1s; }

/* --- Stagger Animation for Features --- */
.features-strip .feature-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.features-strip .feature-item:nth-child(1) { animation-delay: 0.7s; }
.features-strip .feature-item:nth-child(2) { animation-delay: 0.8s; }
.features-strip .feature-item:nth-child(3) { animation-delay: 0.9s; }

