/* === Base & Typography === */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(110, 231, 183, 0.3);
    color: #fff;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #030B1A;
}
::-webkit-scrollbar-thumb {
    background: rgba(110, 231, 183, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 231, 183, 0.5);
}

/* === Reveal Animations (Progressive Enhancement) === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
}

/* === Staggered card reveals === */
@media (prefers-reduced-motion: no-preference) {
    #services .reveal:nth-child(1) { transition-delay: 0.05s; }
    #services .reveal:nth-child(2) { transition-delay: 0.1s; }
    #services .reveal:nth-child(3) { transition-delay: 0.15s; }
    #services .reveal:nth-child(4) { transition-delay: 0.2s; }
    #services .reveal:nth-child(5) { transition-delay: 0.25s; }
    #services .reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* === Navbar Scrolled State === */
.navbar-scrolled {
    background: rgba(3, 11, 26, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-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);
}

/* === Mobile Menu === */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* === Select Dropdown === */
select option {
    background: #0A1D3F;
    color: #fff;
}

/* === Focus Styles === */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* === Smooth image loading === */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* === Print === */
@media print {
    nav, #mobileMenu, button { display: none; }
    body { background: white; color: black; }
}
