/* ─── CUSTOM BASE ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

/* ─── SCROLL REVEAL (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        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.delay-1 { transition-delay: 0.1s; }
    .reveal.delay-2 { transition-delay: 0.2s; }
    .reveal.delay-3 { transition-delay: 0.3s; }
    .reveal.delay-4 { transition-delay: 0.4s; }
    .reveal.delay-5 { transition-delay: 0.5s; }
}

/* ─── MARQUEE ─── */
.marquee-track {
    animation: marquee 30s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── NAV SCROLLED STATE ─── */
#nav.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

/* ─── MOBILE MENU ─── */
#mobileMenu.open { transform: translateX(0); }
#mobileMenu.closed { transform: translateX(100%); }

.menu-line:nth-child(1) { transform-origin: center; }
.menu-line:nth-child(2) { opacity: 1; }
.menu-line:nth-child(3) { transform-origin: center; }

#menuBtn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
#menuBtn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.25rem;
}

/* ─── SELECTION ─── */
::selection { background: #D4A843; color: #1B4332; }

/* ─── CUSTOM SCROLLBAR ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fdf9ee; }
::-webkit-scrollbar-thumb { background: #1B4332; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2f612e; }

/* ─── FORM STYLES ─── */
input:focus, select:focus, textarea:focus {
    outline: none;
}

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='%231B4332' 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;
}

/* ─── PAGE LOAD ─── */
html:not(.loaded) body * {
    transition: none !important;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    .marquee-track { animation: none; }
    html { scroll-behavior: auto; }
    * { transition-duration: 0.01ms !important; }
}
