/* ─── Custom Overrides & Additions ─── */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
}

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

/* If JS is disabled, all scroll-anim elements remain visible (no opacity:0 set via JS) */
.no-js .scroll-anim,
.js-enabled .scroll-anim {
    /* JS will add .is-visible */
}

/* ─── Navbar scroll state ─── */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

/* ─── Nav links underlining on scroll ─── */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    margin-top: 2px;
    transition: width 0.2s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ─── Mobile link hover ─── */
.mobile-link {
    display: block;
}

/* ─── Form select arrow ─── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #b2d4b2;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7fb87f;
}

/* ─── Focus visible for accessibility ─── */
:focus-visible {
    outline: 2px solid #2d7a2d;
    outline-offset: 2px;
}

/* ─── Print styles ─── */
@media print {
    #navbar, #menu-btn, .scroll-anim { display: none; }
    body { background: white; color: black; }
    a { color: black; text-decoration: underline; }
}
