/* ── Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

    .service-card.revealed,
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .service-card:nth-child(2).revealed,
    .reveal:nth-child(2).revealed { transition-delay: 0.1s; }
    .service-card:nth-child(3).revealed,
    .reveal:nth-child(3).revealed { transition-delay: 0.2s; }
    .service-card:nth-child(4).revealed,
    .reveal:nth-child(4).revealed { transition-delay: 0.3s; }
    .service-card:nth-child(5).revealed,
    .reveal:nth-child(5).revealed { transition-delay: 0.4s; }
    .service-card:nth-child(6).revealed,
    .reveal:nth-child(6).revealed { transition-delay: 0.5s; }
}

/* ── Navbar scroll state ── */
#navbar.scrolled {
    background: rgba(59, 7, 100, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(251, 191, 36, 0.1);
}

#navbar.scrolled .nav-line {
    background: #fbbf24;
}

#navbar.scrolled .nav-line:last-child {
    background: #fbbf24;
    width: 1.5rem;
}

/* ── Mobile menu ── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Hamburger animation ── */
#menu-btn.active .nav-line:first-child {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-btn.active .nav-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .nav-line:last-child {
    width: 1.5rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ── Selection ── */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

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

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

::-webkit-scrollbar-track {
    background: #3b0764;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #9333ea;
}

/* ── Map filter override for light mode ── */
.map-light iframe {
    filter: none !important;
}
