/* ── Base & Utilities ── */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    /* Stagger children */
    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Ensure content is visible even without JS */
@supports not (animation: none) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ── Navbar ── */
#navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(22, 46, 71, 0.06);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(9, 16, 24, 0.08);
}

/* ── Mobile Menu ── */
#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);
    }
}

/* ── Hover ripple on service cards ── */
.group:hover .rounded-2xl {
    transform: scale(1.05);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7694b0;
}

/* ── Focus visible ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2bb87c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Print ── */
@media print {
    #navbar, #mobile-toggle, .scroll-reveal { display: none; }
    body { color: #0f1d2c; background: white; }
}
