/* ============================================
   ADS Premium Animations
   Inspired by scriptrunner.ai & jeskojets.com
   ============================================ */

/* ===== SCROLL PROGRESS INDICATOR ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #60c300, #80ff00);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ===== TEXT GRADIENT ANIMATION ===== */
.gradient-text-animated {
    background: linear-gradient(90deg, #60c300, #80ff00, #60c300);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }

    100% {
        background-position: 0% center;
    }
}

/* ===== BASE ANIMATION CLASSES ===== */

/* Blur Entrance Animation - For Hero Text */
.blur-in {
    opacity: 0;
    filter: blur(20px);
    transform: translateY(30px);
}

.blur-in.animate {
    animation: blurIn 1s ease-out forwards;
}

@keyframes blurIn {
    0% {
        opacity: 0;
        filter: blur(20px);
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

/* Stagger Delay Classes */
.stagger-1 {
    animation-delay: 0s;
}

.stagger-2 {
    animation-delay: 0.15s;
}

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

.stagger-4 {
    animation-delay: 0.45s;
}

.stagger-5 {
    animation-delay: 0.6s;
}

/* ===== SCROLL REVEAL ===== */

/* Base state for elements before reveal */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    /* transition: handled by GSAP */
}

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

/* Reveal from Left */
.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    /* transition: handled by GSAP */
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Reveal from Right */
.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    /* transition: handled by GSAP */
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Scale Reveal */
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out,
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

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

/* Card Lift Effect - For Service Cards */
.card-lift {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s ease;
}

.card-lift:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Glow Effect on Hover */
.glow-hover {
    transition: box-shadow 0.3s ease;
}

.glow-hover:hover {
    box-shadow: 0 0 30px rgba(96, 195, 0, 0.4);
}

/* ===== PARALLAX LAYERS ===== */

.parallax-bg {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ===== COUNTER ANIMATION ===== */

.counter {
    display: inline-block;
}

/* ===== TEXT SPLIT REVEAL ===== */

.split-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
}

.split-text.animate .char {
    animation: charReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes charReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SMOOTH SCROLL OVERRIDES ===== */

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* ===== FLOATING ANIMATION ENHANCEMENT ===== */

@keyframes floatEnhanced {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(1deg);
    }

    50% {
        transform: translateY(-20px) rotate(0deg);
    }

    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

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

/* ===== SECTION TRANSITIONS ===== */

.section-fade {
    position: relative;
}

.section-fade::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, var(--bg-body), transparent);
    pointer-events: none;
    z-index: 5;
}

/* ===== MAGNETIC BUTTON EFFECT ===== */

.magnetic-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.magnetic-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ===== LOADING ANIMATION ===== */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(96, 195, 0, 0.2);
    border-top-color: #60c300;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== DRONE LOADER ===== */
.drone-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.drone-svg {
    width: 100px;
    height: 100px;
    animation: droneFloat 3s ease-in-out infinite;
}

.drone-body {
    stroke: #60c300;
    stroke-width: 2;
    fill: #1a1a1a;
}

/* Arms specific override */
path.drone-body[stroke] {
    stroke: #1a1a1a;
    fill: none;
}

.drone-propeller {
    fill: #60c300;
    transform-box: fill-box;
    transform-origin: center;
    animation: propSpin 0.1s linear infinite;
}

.loader-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: #1a1a1a;
    letter-spacing: 0.1em;
    animation: textPulse 2s ease-in-out infinite;
}

.loader-progress-bar {
    width: 180px;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.loader-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #60c300;
    animation: loadProgress 2s ease-in-out forwards;
}

@keyframes droneFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes propSpin {
    0% {
        opacity: 0.4;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

@keyframes textPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes loadProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}