/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; }

/* ── Nav ── */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#navbar.scrolled {
  background: rgba(253, 248, 240, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(44, 26, 16, 0.08);
}

.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #C0603A;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Mobile menu ── */
.mobile-link { position: relative; }
#mobile-menu { animation: slideDown 0.3s ease; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reveal animations ── */
.reveal-up {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Progressive enhancement — only animate when JS is available and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up,
  .reveal-left {
    opacity: 0;
    transform: translateY(30px);
  }
  .reveal-left {
    transform: translateX(-30px);
  }
  .reveal-up.visible,
  .reveal-left.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F5E6D3; }
::-webkit-scrollbar-thumb { background: #C0603A; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a34e2e; }

/* ── Selection ── */
::selection { background: #f3bfb5; color: #2C1A10; }

/* ── Image aspect ratios ── */
img { max-width: 100%; height: auto; }

/* ── Focus styles ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid #C0603A;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Smooth image loading ── */
img { display: block; }
