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

body {
  overflow-x: hidden;
}

::selection {
  background: color-mix(in srgb, #52774f 80%, white);
  color: white;
}

/* ── Navigation ───────────────────────────────────── */
#nav {
  transition: background 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#nav.scrolled {
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(49, 74, 49, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #52774f;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

#nav.scrolled .nav-link {
  color: #3d5c3d;
}

#nav.scrolled .nav-link::after {
  background: #3d5c3d;
}

/* ── Mobile Menu ──────────────────────────────────── */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.open .mobile-link {
  animation: fadeUp 0.4s ease forwards;
  opacity: 0;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }

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

/* ── Hero Animations ──────────────────────────────── */
.hero-subtitle {
  animation: fadeUp 0.8s ease 0.2s both;
}

.hero-title {
  animation: fadeUp 0.8s ease 0.4s both;
}

.hero-desc {
  animation: fadeUp 0.8s ease 0.6s both;
}

.hero-cta {
  animation: fadeUp 0.8s ease 0.8s both;
}

/* ── Reveal on Scroll ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

/* ── Menu Item Hover ──────────────────────────────── */
.group:hover .font-serif {
  transform: translateX(4px);
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}

/* ── Scroll Indicator ─────────────────────────────── */
.scroll-indicator {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.2; }
}

/* ── Focus Styles ─────────────────────────────────── */
input:focus,
textarea:focus {
  outline: none;
}

/* ── Subtle image parallax feel ───────────────────── */
.aspect-\[4\/5\] img,
.aspect-\[4\/3\] img,
.aspect-\[16\/9\] img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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