/* ─── Base & Typography ─── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(27, 67, 50, 0.2);
    color: #1B4332;
}

/* ─── Scroll Reveal ─── */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Reduced motion — content stays visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ─── Navigation Links ─── */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: currentColor;
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after {
    width: 100%;
}

/* ─── Mobile Menu ─── */
.mobile-link {
    position: relative;
}

#mobile-menu.menu-open {
    opacity: 1;
    pointer-events: all;
}

/* ─── Custom 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='%23477f52' stroke-width='2' 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;
}

/* ─── Input Focus Transitions ─── */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* ─── Image Hover Container ─── */
.rounded-2xl.overflow-hidden {
    will-change: transform;
}

/* ─── Header Shadow on Scroll ─── */
header.scrolled {
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

/* ─── Button Focus Styles ─── */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #477f52;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ─── Smooth Scroll Offset for Fixed Header ─── */
section[id] {
    scroll-margin-top: 80px;
}

/* ─── Utility ─── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
