/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; }

/* ===== FLOAT ANIMATIONS ===== */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes float-medium {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}
@keyframes float-fast {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
.animate-float-slow { animation: float-slow 5s ease-in-out infinite; }
.animate-float-medium { animation: float-medium 4s ease-in-out infinite 0.5s; }
.animate-float-fast { animation: float-fast 3.5s ease-in-out infinite 1s; }

/* ===== REVEAL ANIMATIONS (progressive enhancement) ===== */
/* Default: all content visible */
.reveal { opacity: 1; transform: none; transition: none; }

/* When JS is active and user prefers motion: set hidden state */
.js-active .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 on scroll */
.js-active .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.js-active .reveal.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js-active .reveal.stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.js-active .reveal.stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.js-active .reveal.stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.js-active .reveal.stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.js-active .reveal.stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.js-active .reveal.stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
.js-active .reveal.stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .animate-float-slow, .animate-float-medium, .animate-float-fast { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== NAV SCROLLED STATE ===== */
#nav.scrolled {
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(45, 90, 61, 0.08);
}

/* ===== MOBILE LINKS ===== */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(45, 90, 61, 0.08);
}
.mobile-link:last-child { border-bottom: none; }

/* ===== MOBILE MENU TRANSITIONS ===== */
#mobileMenu {
  animation: slideDown 0.25s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== BUTTON FOCUS ===== */
a:focus-visible, button:focus-visible {
  outline: 2px solid #2D5A3D;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F5F0E8; }
::-webkit-scrollbar-thumb { background: #aed0b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #7fb88f; }
