/* Base & Utilities */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(104, 211, 145, 0.3);
    color: #fff;
}

/* Scroll Reveal — progressive enhancement, respects reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .testimonial-card,
    .gallery-item {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .service-card.visible,
    .testimonial-card.visible,
    .gallery-item.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .service-card:nth-child(2) { transition-delay: 0.08s; }
    .service-card:nth-child(3) { transition-delay: 0.16s; }
    .service-card:nth-child(4) { transition-delay: 0.24s; }
    .service-card:nth-child(5) { transition-delay: 0.32s; }
    .service-card:nth-child(6) { transition-delay: 0.40s; }

    .testimonial-card:nth-child(2) { transition-delay: 0.1s; }
    .testimonial-card:nth-child(3) { transition-delay: 0.2s; }
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(5, 10, 24, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(6deg); }
    50% { transform: translateY(-10px) rotate(6deg); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050A18;
}
::-webkit-scrollbar-thumb {
    background: #1B3A6E;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #224785;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for status dot */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
