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

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(22, 101, 52, 0.2);
  color: #14532d;
}

/* Header */
#site-header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250, 249, 246, 0.85);
  border-bottom: 1px solid rgba(217, 212, 200, 0.5);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#site-header.scrolled {
  background: rgba(250, 249, 246, 0.95);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Nav Links */
.nav-link {
  position: relative;
}

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

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

/* Mobile Menu */
.mobile-nav-link {
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-link:hover {
  color: #166534;
  padding-left: 8px;
}

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

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

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

/* Floating Cards */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes float-medium {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.stat-card {
  animation: float-slow 4s ease-in-out infinite;
}

.animate-float-medium {
  animation: float-medium 3.5s ease-in-out infinite;
  animation-delay: 0.5s;
}

.animate-float-slow {
  animation: float-slow 4.5s ease-in-out infinite;
  animation-delay: 1s;
}

/* Scroll Line */
@keyframes scroll-line {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-scroll-line {
  animation: scroll-line 2s ease-in-out infinite;
}

/* Image Hover */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

/* Focus Styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #166534;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f3ee;
}

::-webkit-scrollbar-thumb {
  background: #d9d4c8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b9b0a0;
}

/* 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;
  }
  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Print */
@media print {
  #site-header, .stat-card, .animate-scroll-line { display: none; }
  body { background: white; color: black; }
}
