/**
 * Elevate Metrics Digital — Animation & Keyframes
 */

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.08); }
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Helper Animation Classes */
.animate-float {
    animation: floatSlow 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 4s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spinSlow 20s linear infinite;
}

/* Scroll Reveal States */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* 3D Hero Canvas Container */
.hero-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ========================================================
   Typewriter Text & Cursor Animation
   ======================================================== */
.typing-text-wrapper {
    display: inline-block;
    position: relative;
    white-space: nowrap;
    vertical-align: baseline;
}

.typewriter-cursor {
    display: inline-block;
    color: #00E5FF;
    font-weight: 300;
    margin-left: 3px;
    vertical-align: baseline;
    animation: blinkTypewriter 0.8s infinite;
}

@keyframes blinkTypewriter {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0; transform: scaleY(0.85); }
}


.hero-canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ========================================================
   Modern Text Marquee & Infinite Scroll Animation
   ======================================================== */
@keyframes marqueeScroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

@keyframes marqueeScrollReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1.25rem 0;
    white-space: nowrap;
    user-select: none;
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, transparent 100%);
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    animation: marqueeScroll 28s linear infinite;
    will-change: transform;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-track-reverse {
    animation: marqueeScrollReverse 32s linear infinite;
}

.marquee-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.marquee-pill:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 25px rgba(0, 142, 254, 0.2);
    border-color: var(--primary);
}

/* ========================================================
   Kinetic Hover Text Line Animations
   ======================================================== */
.hover-line-anim {
    position: relative;
    display: inline-block;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hover-line-anim::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #197838, #008EFE);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
}

.hover-line-anim:hover::after,
.card:hover .hover-line-anim::after {
    width: 100%;
}

.hover-arrow-move {
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .hover-arrow-move,
a:hover .hover-arrow-move {
    transform: translateX(5px);
}

/* ========================================================
   Card Micro-Interactions & Ambient Glow Keyframes
   ======================================================== */
@keyframes ambientGlowPulse {
    0%, 100% {
        box-shadow: 0 10px 30px -10px rgba(0, 142, 254, 0.15);
    }
    50% {
        box-shadow: 0 15px 40px -8px rgba(25, 120, 56, 0.25);
    }
}

.card-glow-pulse {
    animation: ambientGlowPulse 5s ease-in-out infinite;
}

/* 4-Step Process Animated Connector Line */
.process-timeline-track {
    position: relative;
}

@media (min-width: 992px) {
    .process-timeline-track::before {
        content: '';
        position: absolute;
        top: 48px;
        left: 5%;
        width: 90%;
        height: 3px;
        background: linear-gradient(90deg, #F2201F 0%, #FEAD01 33%, #008EFE 66%, #197838 100%);
        border-radius: 3px;
        z-index: 1;
        opacity: 0.35;
    }
}

/* Reduced Motion Override */
@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;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .hero-canvas-container {
        display: none !important;
    }
}
