/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
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='%2396764a' 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; }

/* ── Nav ── */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Mobile Menu ── */
#mobile-menu.open { opacity: 1; pointer-events: all; }
#mobile-menu.closed { opacity: 0; pointer-events: none; }
.menu-line { transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
body.menu-open .menu-line:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.menu-open .menu-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.menu-open .menu-line:nth-child(3) { transform: translateY(-5px) rotate(-45deg); width: 24px; }
.mobile-link { transition: opacity 0.3s ease; }

/* ── Scroll Reveal ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
/* Reduced motion: skip animation, just show */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1e1810; }
::-webkit-scrollbar-thumb { background: #5e472a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #96764a; }

/* ── Selection ── */
::selection { background: #e05117; color: #faf8f5; }

/* ── Focus Visible ── */
:focus-visible { outline: 2px solid #e8b340; outline-offset: 2px; }

/* ── Utility ── */
.terra-500 { color: #e05117; }
.sand-400 { color: #f0cc73; }
.sand-500 { color: #e8b340; }
.base-50 { color: #faf8f5; }
.base-100 { color: #f0ebe3; }
.base-200 { color: #e0d5c4; }
.base-300 { color: #c9b89a; }
.base-400 { color: #b0956a; }
.base-500 { color: #96764a; }
.base-600 { color: #7d6038; }
.base-700 { color: #5e472a; }
.base-800 { color: #3d2e1c; }
.base-900 { color: #1e1810; }
.base-950 { color: #0e0b07; }

/* ── Nav background on scroll ── */
header.scrolled {
    background: rgba(14, 11, 7, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(150, 118, 74, 0.15);
}

/* ── Form ── */
input:focus, textarea:focus, select:focus {
    border-color: #e8b340 !important;
    box-shadow: 0 0 0 1px #e8b340;
}

/* ── Smooth image loading ── */
img {
    background: #1e1810;
    min-height: 1em;
}
