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

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        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);
    }
}

/* Fallback: ensure content is always visible */
@supports not (opacity: 0) {
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Nav Link Hover Effect ── */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #2DD4BF;
    transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover::after {
    width: calc(100% - 16px);
    left: 8px;
}

/* ── Mobile Menu Transitions ── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* ── Focus Styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2DD4BF;
    outline-offset: 2px;
}

/* ── Selection ── */
::selection {
    background: #2DD4BF;
    color: #0A2342;
}

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

::-webkit-scrollbar-track {
    background: #0A2342;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2DD4BF;
}

/* ── Header Shadow on Scroll ── */
#site-header.scrolled {
    box-shadow: 0 4px 20px rgba(10, 35, 66, 0.12);
}

/* ── Hero Parallax Subtle ── */
#hero {
    will-change: transform;
}

/* ── Image Loading Placeholder ── */
img {
    background-color: #0F3460;
}

/* ── Print Styles ── */
@media print {
    #site-header,
    #mobile-menu,
    .scroll-reveal {
        display: block !important;
        opacity: 1 !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
