/* ── Base & Utilities ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ── 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);
  }

  /* Stagger children when they have a data-delay attribute */
  .reveal.staggered > *:nth-child(1) { transition-delay: 0.05s; }
  .reveal.staggered > *:nth-child(2) { transition-delay: 0.15s; }
  .reveal.staggered > *:nth-child(3) { transition-delay: 0.25s; }
  .reveal.staggered > *:nth-child(4) { transition-delay: 0.35s; }
}

/* When JS is disabled, everything is visible by default */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ── Hero entrance animations (above fold — always run) ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#heroEyebrow {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

#heroHeadline {
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

#heroSub {
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

#heroCTAs {
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
}

/* ── Navbar ── */
#nav {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#nav.scrolled {
  background: rgba(10, 31, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

/* ── Gold accent line on scrollable sections ── */
section::before {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #C9A84C, transparent);
  margin: 0 auto 3rem;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0A1F14;
}
::-webkit-scrollbar-thumb {
  background: #1A3A2A;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2D6147;
}

/* ── Selection color ── */
::selection {
  background: rgba(201, 168, 76, 0.3);
  color: #FDFBF7;
}

/* ── Mobile menu transition ── */
#mobileMenu {
  animation: slideDown 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Smooth image loading ── */
img {
  background-color: #0F2B1C;
}

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

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