/* ── Base & Utilities ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }

/* ── Navigation ───────────────────────────────────────────────────── */
#site-header {
  background: rgba(253, 248, 240, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 180, 130, 0.2);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
#site-header.scrolled {
  box-shadow: 0 4px 30px rgba(140, 80, 40, 0.08);
  background: rgba(253, 248, 240, 0.95);
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #C0603A;
  border-radius: 2px;
  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;
}
#mobile-menu.open .mobile-link {
  animation: fadeUp 0.4s ease forwards;
  opacity: 0;
}
#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hamburger animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.25rem;
}

/* ── Hero Image Animations ────────────────────────────────────────── */
.hero-img-wrap {
  opacity: 0;
  transform: translateY(32px);
  animation: heroIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-img-wrap:nth-child(1) { animation-delay: 0.1s; }
.hero-img-wrap:nth-child(2) { animation-delay: 0.25s; }
.hero-img-wrap:nth-child(3) { animation-delay: 0.4s; }
.hero-img-wrap:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Scroll Reveal (below fold only) ──────────────────────────────── */
.reveal {
  /* Default: visible — progressive enhancement via JS */
}
.reveal.is-visible {
  animation: revealUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Menu List Styling ────────────────────────────────────────────── */
#menu ul li {
  border-bottom: 1px solid rgba(217, 180, 130, 0.2);
  padding-bottom: 1rem;
}
#menu ul li:last-child {
  border-bottom: none;
}
#menu ul li:hover .font-bold {
  color: #C0603A;
  transition: color 0.2s ease;
}
#menu ul li:hover .text-warm-400 {
  color: #B07D3E;
  transition: color 0.2s ease;
}

/* Dark menu hover overrides */
.bg-warm-900 #menu ul li:hover .font-bold {
  color: #F4A28A;
}
.bg-warm-900 #menu ul li:hover .text-warm-400 {
  color: #E5CCAA;
}

/* ── Gallery Hover ────────────────────────────────────────────────── */
#gallery .rounded-2xl {
  overflow: hidden;
  position: relative;
}
#gallery .rounded-2xl::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(87, 60, 32, 0.15), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}
#gallery .rounded-2xl:hover::after {
  opacity: 1;
}

/* ── Form Focus States ────────────────────────────────────────────── */
input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(192, 96, 58, 0.15);
}

/* ── Reduced Motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-img-wrap { opacity: 1 !important; transform: none !important; }
}

/* ── Scrollbar ────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #FDF8F0; }
::-webkit-scrollbar-thumb { background: #D9B482; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #C0603A; }
