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

body {
  overflow-x: hidden;
}

::selection {
  background: #d4a84b;
  color: #0e2418;
}

/* ── Scroll Reveal ── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ── Hero Animations ── */
.hero-anim {
  opacity: 0;
  transform: translateY(40px);
  animation: heroReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

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

/* ── Navbar ── */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif {
  color: #1a3c2a !important;
}

#navbar.scrolled .text-forest-500,
#navbar.scrolled .text-forest-700,
#navbar.scrolled a:not(.bg-forest-600) {
  color: #1a3c2a !important;
}

/* ── Mobile Menu ── */
#mobile-menu {
  box-shadow: none;
}

#mobile-menu.open {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ── Image Hover ── */
.group img {
  will-change: transform;
}

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

/* ── Input Autofill ── */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #f5f0e8 inset !important;
  box-shadow: 0 0 0 30px #f5f0e8 inset !important;
}

/* ── Smooth Scroll Offset ── */
section[id] {
  scroll-margin-top: 80px;
}

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