/* ===================================
   Keyframe Animations
   =================================== */

/* Floating animation for 3D shapes */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-30px) rotate(3deg);
    }
}

/* Gradient shift animation for hero title */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Pulse glow animation */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 102, 255, 0.6);
    }
}

/* Fade in from bottom */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in from top */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Scale in animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate animation for shapes */
@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Glow pulse animation */
@keyframes glowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 102, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(0, 102, 255, 0.9));
    }
}

/* ===================================
   Initial State (Hidden for scroll animations)
   =================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(50px);
}

[data-animate].animated {
    animation: fadeInUp 0.8s ease forwards;
}

/* ===================================
   Hero Section Animations
   =================================== */
.hero-content {
    animation: fadeIn 1.2s ease-in-out;
}

.company-name {
    animation: fadeInDown 1s ease 0.3s forwards, gradientShift 8s ease infinite;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-tagline {
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-subtitle {
    animation: fadeInUp 1s ease 0.9s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* ===================================
   Card Hover Animations
   =================================== */
.glass-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 102, 255, 0.5);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.3);
}

/* ===================================
   3D Tilt Effect
   =================================== */
.approach-card[data-tilt] {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.approach-card[data-tilt]:hover {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-10px);
}

/* ===================================
   Icon Animations
   =================================== */
.card-icon {
    transition: all var(--transition-medium);
}

.approach-card:hover .card-icon {
    transform: scale(1.1) rotateZ(5deg);
    animation: glowPulse 2s ease-in-out infinite;
}

/* ===================================
   Text Reveal Animation
   =================================== */
.section-title {
    position: relative;
    overflow: hidden;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 102, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* ===================================
   Staggered Animation Delays
   =================================== */
.approach-card:nth-child(1)[data-animate].animated {
    animation-delay: 0.1s;
}

.approach-card:nth-child(2)[data-animate].animated {
    animation-delay: 0.2s;
}

.approach-card:nth-child(3)[data-animate].animated {
    animation-delay: 0.3s;
}

.approach-card:nth-child(4)[data-animate].animated {
    animation-delay: 0.4s;
}

/* ===================================
   Grid Background Animation
   =================================== */
.grid-overlay {
    animation: gridMove 20s linear infinite;
}

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

/* ===================================
   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;
    }

    .floating-shapes {
        display: none;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
    }
}

/* ===================================
   Loading Animation
   =================================== */
@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: pageLoad 0.5s ease-in;
}

/* ===================================
   Button/Link Hover Effects (if needed)
   =================================== */
a,
button {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-medium);
}

a::before,
button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 102, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

a:hover::before,
button:hover::before {
    width: 300px;
    height: 300px;
}

/* ===================================
   Scroll Progress Indicator (Optional)
   =================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--color-blue-electric),
        var(--color-blue-accent)
    );
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ===================================
   Particle Trail Effect
   =================================== */
@keyframes particleFade {
    to {
        opacity: 0;
        transform: translateY(-50px) scale(0);
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-blue-accent);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFade 1s ease-out forwards;
    box-shadow: 0 0 10px var(--color-blue-accent);
}
