/* ============================================
   ANIMATIONS - LIQUID GLASS / AEROSPACE AESTHETIC
   ============================================ */

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Pulse Glow */
@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(56, 189, 248, 0.6);
    }
}

/* Smooth Scale */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   ANIMATION UTILITIES
   ============================================ */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation Delays */
.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}

.animate-delay-5 {
    animation-delay: 0.5s;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-glow {
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.3);
}

/* Magnetic Button Effect (Optional) */
.magnetic {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   LOADING STATES
   ============================================ */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    animation: shimmer 2s infinite;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 1000px 100%;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

/* Fade in on scroll */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide up on scroll */
.slide-up {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Scale in on scroll */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ============================================
   INTERACTIVE ELEMENTS
   ============================================ */

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Glass Effect Hover */
.glass-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-hover:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 8px 32px rgba(56, 189, 248, 0.15);
}

/* ============================================
   REDUCE MOTION SUPPORT (Accessibility)
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-glow {
        animation: none;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Use will-change only when animating (performance optimization) */
.animate-on-scroll {
    will-change: transform, opacity;
}

/* Remove will-change after animation completes */
.animate-on-scroll.animated {
    will-change: auto;
}

/* Only apply will-change on hover for interactive elements */
.feature-card:hover,
.service-card:hover,
.tech-service-category:hover,
.tech-service-card:hover {
    will-change: transform;
}

.feature-card:not(:hover),
.service-card:not(:hover),
.tech-service-category:not(:hover),
.tech-service-card:not(:hover) {
    will-change: auto;
}

/* GPU acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    /* cSpell:ignore backface */
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ============================================
   ENHANCED HOVER EFFECTS
   ============================================ */

.tech-service-category,
.tech-service-card {
    transition: all var(--transition-normal) var(--transition-ease);
}

.tech-service-category:hover,
.tech-service-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.15);
}

.service-detail-card {
    transition: all var(--transition-normal) var(--transition-ease);
}

.service-detail-card:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.15);
}

