﻿/* ==========================================================================
   VEOSOFT CORE ANIMATIONS SYSTEM
   ========================================================================== */

/* Fade In Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(2deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 7s ease-in-out infinite;
    animation-delay: 2s;
}

/* Neon Glow & Pulsing Shadows */
@keyframes neonGlowPrimary {
    0%, 100% {
        box-shadow: 0 0 15px rgba(37, 99, 235, 0.2), 0 0 30px rgba(37, 99, 235, 0.1);
    }
    50% {
        box-shadow: 0 0 25px rgba(37, 99, 235, 0.4), 0 0 50px rgba(37, 99, 235, 0.2);
    }
}

@keyframes neonGlowSecondary {
    0%, 100% {
        box-shadow: 0 0 15px rgba(124, 58, 237, 0.2), 0 0 30px rgba(124, 58, 237, 0.1);
    }
    50% {
        box-shadow: 0 0 25px rgba(124, 58, 237, 0.4), 0 0 50px rgba(124, 58, 237, 0.2);
    }
}

.glow-primary {
    animation: neonGlowPrimary 4s ease-in-out infinite;
}

.glow-secondary {
    animation: neonGlowSecondary 4s ease-in-out infinite;
    animation-delay: 2s;
}

/* Background Gradients Pulse */
@keyframes gradientBg {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient-text {
    background: linear-gradient(90deg, var(--accent), var(--primary), var(--secondary), var(--accent));
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientBg 6s linear infinite;
}

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

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

/* ambient blur glows */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.04;
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: multiply;
}

.ambient-glow-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: 10%;
    left: -10%;
}

.ambient-glow-2 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    bottom: 20%;
    right: -10%;
}

.ambient-glow-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Grid Overlay System */
.grid-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(9, 9, 11, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(9, 9, 11, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 70%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 70%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   GSAP SAFETY NET — Ensure content is always visible
   If GSAP/ScrollTrigger fails to fire, these fallback animations
   guarantee elements become visible after a short delay.
   ========================================================================== */

/* Reveal-up elements: fade in after 0.8s delay if GSAP hasn't already run */
.reveal-up {
    animation: revealFallback 0.6s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

/* Once GSAP has touched the element it will inline-style opacity, overriding this */
@keyframes revealFallback {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal grid cards */
.reveal-card {
    animation: revealFallback 0.6s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

/* Portfolio grid gets faster fallback (no scroll trigger needed) */
.portfolio-grid .reveal-card {
    animation-delay: 0.3s;
}
