/* ── Base & Utilities ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Reveal animations (progressive enhancement) ── */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    /* Stagger children when needed */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ── Navbar scroll state ── */
#site-header.scrolled {
    background: rgba(4, 11, 24, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 1px 40px rgba(0,0,0,0.4);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #040B18; }
::-webkit-scrollbar-thumb { background: #1B3A70; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #267A5E; }

/* ── Selection ── */
::selection { background: rgba(91, 184, 150, 0.3); color: #E0F5EC; }

/* ── Link underline on hover ── */
a:not([class]) { text-decoration: none; }

/* ── Image optimization ── */
img { display: block; max-width: 100%; }

/* ── Focus visible ── */
:focus-visible { outline: 2px solid #5BB896; outline-offset: 2px; border-radius: 4px; }

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

/* ── Menu item hover ── */
#menu ul li {
    transition: background 0.15s ease;
}

/* ── Button press effect ── */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ── Map contrast fix for dark mode ── */
iframe[title="Map"] {
    border-radius: 16px;
}
