/* ==================== CUSTOM ANIMATIONS ==================== */

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

.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

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

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

/* Pulse Slow */
@keyframes pulseSlow {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.animate-pulse-slow {
    animation: pulseSlow 10s ease-in-out infinite;
}

/* Bounce Slow (WhatsApp) */
@keyframes bounceSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-bounce-slow {
    animation: bounceSlow 3s ease-in-out infinite;
}

/* Marquee */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

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

/* ==================== SCROLL REVEAL ==================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== TECH BARS ==================== */
.tech-bar {
    width: 0;
    transition: width 1.5s ease-out;
}

.tech-bar.animated {
    /* width set by JS */
}

/* ==================== HEADER SCROLLED ==================== */
.header-scrolled {
    background-color: rgba(37, 47, 107, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.header-scrolled .nav-link {
    color: #fff;
}

/* ==================== SELECTION ==================== */
::selection {
    background-color: #1a8dcd;
    color: #fff;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #adacac;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #545b6d;
}

/* ==================== SMOOTH SCROLL OFFSET ==================== */
html {
    scroll-padding-top: 80px;
}

/* ==================== SERVICE CARD GRADIENT LINE ==================== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #1a8dcd, #709b3f);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ==================== HERO PARTICLES ==================== */
.hero-particles {
    background-image:
        radial-gradient(3px 3px at 20px 30px, rgba(122, 209, 240, 0.8), transparent),
        radial-gradient(2px 2px at 65px 110px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(3px 3px at 110px 50px, rgba(112, 155, 63, 0.7), transparent),
        radial-gradient(2px 2px at 160px 90px, rgba(122, 209, 240, 0.65), transparent),
        radial-gradient(2px 2px at 220px 40px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(3px 3px at 280px 130px, rgba(122, 209, 240, 0.7), transparent),
        radial-gradient(2px 2px at 330px 70px, rgba(112, 155, 63, 0.55), transparent),
        radial-gradient(2px 2px at 400px 25px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(3px 3px at 450px 100px, rgba(122, 209, 240, 0.75), transparent),
        radial-gradient(2px 2px at 500px 60px, rgba(255, 255, 255, 0.5), transparent);
    background-size: 550px 160px;
    animation: particlesDrift 25s linear infinite, particlesTwinkle 4s ease-in-out infinite alternate;
}

.hero-particles::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 45px 80px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(3px 3px at 140px 35px, rgba(122, 209, 240, 0.7), transparent),
        radial-gradient(2px 2px at 250px 120px, rgba(112, 155, 63, 0.5), transparent),
        radial-gradient(2px 2px at 350px 55px, rgba(255, 255, 255, 0.55), transparent),
        radial-gradient(3px 3px at 470px 85px, rgba(122, 209, 240, 0.65), transparent),
        radial-gradient(2px 2px at 180px 145px, rgba(255, 255, 255, 0.5), transparent);
    background-size: 520px 180px;
    animation: particlesDrift2 30s linear infinite, particlesTwinkle 5s ease-in-out 2s infinite alternate;
}

@keyframes particlesDrift {
    0% { background-position: 0 0; }
    100% { background-position: 550px 160px; }
}

@keyframes particlesDrift2 {
    0% { background-position: 0 0; }
    100% { background-position: -520px 180px; }
}

@keyframes particlesTwinkle {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ==================== UFO EASTER EGG ==================== */
.ufo-container .ufo {
    position: absolute;
    top: 18%;
    opacity: 0;
    animation: ufoFly 35s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
    filter: drop-shadow(0 0 8px rgba(122, 209, 240, 0.4));
}

@keyframes ufoFly {
    0% {
        left: -60px;
        top: 20%;
        opacity: 0;
        transform: rotate(-3deg) scale(0.6);
    }
    3% {
        opacity: 0.7;
    }
    15% {
        top: 12%;
        transform: rotate(2deg) scale(0.85);
    }
    30% {
        top: 22%;
        opacity: 0.9;
        transform: rotate(-2deg) scale(1);
    }
    45% {
        top: 8%;
        transform: rotate(3deg) scale(0.9);
    }
    55% {
        top: 18%;
        opacity: 0.85;
        transform: rotate(-1deg) scale(0.95);
    }
    70% {
        top: 10%;
        transform: rotate(2deg) scale(0.8);
    }
    85% {
        opacity: 0.6;
        transform: rotate(-3deg) scale(0.7);
    }
    92% {
        opacity: 0;
    }
    92.01%, 100% {
        left: calc(100% + 60px);
        top: 15%;
        opacity: 0;
        transform: rotate(0deg) scale(0.6);
    }
}

/* UFO lights blink */
.ufo-light-1 {
    animation: ufoBlink 0.8s ease-in-out infinite alternate;
}
.ufo-light-2 {
    animation: ufoBlink 0.6s ease-in-out 0.2s infinite alternate;
}
.ufo-light-3 {
    animation: ufoBlink 0.5s ease-in-out 0.4s infinite alternate;
}

@keyframes ufoBlink {
    0% { opacity: 0.3; r: 0.8; }
    100% { opacity: 1; r: 1.4; }
}

/* Hover wobble on UFO saucer */
.ufo svg {
    animation: ufoWobble 2s ease-in-out infinite;
}

@keyframes ufoWobble {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(1deg); }
    75% { transform: translateY(3px) rotate(-1deg); }
}

/* ==================== FORM FOCUS STATES ==================== */
input:focus, select:focus, textarea:focus {
    border-color: #1a8dcd;
    box-shadow: 0 0 0 3px rgba(26, 141, 205, 0.15);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .animate-marquee {
        animation-duration: 20s;
    }
}
