*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: rgba(6, 95, 70, 0.12);
  color: #064E3B;
}

/* Scroll reveal — progressive enhancement, only applies when JS enables it */
@media (prefers-reduced-motion: no-preference) {
  html.animate-scroll .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  html.animate-scroll .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  html.animate-scroll .reveal-delay-1 { transition-delay: 0.1s; }
  html.animate-scroll .reveal-delay-2 { transition-delay: 0.2s; }
  html.animate-scroll .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Mobile menu animations */
#mobile-menu.open .line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
#mobile-menu.open .line:nth-child(2) {
  opacity: 0;
}
#mobile-menu.open .line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 5;
}

/* Subtle floating animation for hero cards */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: no-preference) {
  .floating-slow {
    animation: float 6s ease-in-out infinite;
  }
  .floating-fast {
    animation: float 4.5s ease-in-out infinite;
    animation-delay: -1.5s;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #FAF9F6;
}
::-webkit-scrollbar-thumb {
  background: rgba(6, 78, 59, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 78, 59, 0.3);
}

/* Focus styles */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(6, 78, 59, 0.4);
  outline-offset: 2px;
  border-radius: 4px;
}
