/* ── 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%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── Hero Gradient ── */
.hero-gradient {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(181, 82, 58, 0.85) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(148, 68, 48, 0.6) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(228, 174, 85, 0.25) 0%, transparent 50%),
    linear-gradient(160deg, #5e2a1c 0%, #B5523A 40%, #9a4430 70%, #7d3828 100%);
}

/* ── Header Scroll State ── */
#site-header.scrolled {
  background: rgba(94, 42, 28, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}
#site-header.scrolled .nav-link { color: rgba(255, 255, 255, 0.85); }
#site-header.scrolled .nav-link:hover { color: #fff; }

/* ── Nav Link Underline ── */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Scroll Reveal ── */
.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; }

/* ── Mobile Menu Transitions ── */
#mobile-menu {
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* ── Custom Selection ── */
::selection {
  background: rgba(181, 82, 58, 0.2);
  color: #5e2a1c;
}

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

/* ── Smooth Image Loading ── */
img {
  background-color: #f9edcf;
  transition: opacity 0.4s ease;
}
img.loaded { opacity: 1; }
img[loading="lazy"] { opacity: 0; transition: opacity 0.5s ease; }
img[loading="lazy"].loaded { opacity: 1; }

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

/* ── Tablet ── */
@media (max-width: 768px) {
  .hero-gradient {
    background:
      radial-gradient(ellipse 100% 70% at 50% 50%, rgba(181, 82, 58, 0.9) 0%, transparent 75%),
      linear-gradient(160deg, #5e2a1c 0%, #B5523A 50%, #7d3828 100%);
  }
}
