/* ── Base & Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    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);
  }
}

/* Fallback: always visible if JS disabled or prefers-reduced-motion */
:not(.js) .reveal,
.reveal {
  opacity: 1;
  transform: none;
}

/* ── Header Scroll State ── */
#site-header.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* ── Nav Link Underline Hover ── */
.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;
  border-radius: 1px;
}
.nav-link:hover::after {
  width: 100%;
}

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

/* ── Decorative Pattern (hero background) ── */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(192, 96, 58, 0.05) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(223, 184, 100, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
#hero > div {
  position: relative;
  z-index: 1;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf9f0;
}
::-webkit-scrollbar-thumb {
  background: #f5e3be;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #dfb864;
}

/* ── Selection ── */
::selection {
  background: rgba(192, 96, 58, 0.15);
  color: #55271a;
}

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

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
