/* Smooth scroll */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in {
  animation: fadeIn 0.8s ease-out both;
}

.animate-fade-in-delay {
  animation: fadeInDelay 0.8s ease-out 0.3s both;
}

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Header shadow on scroll */
.header-scrolled {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

/* KPI counter animation */
.counter {
  display: inline-block;
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
  border-color: #005A3B !important;
  box-shadow: 0 0 0 3px rgba(0, 90, 59, 0.1) !important;
}

/* Selection color */
::selection {
  background-color: rgba(0, 90, 59, 0.2);
  color: #004028;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-fade-in-delay {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Balanced headings */
h1, h2 {
  text-wrap: balance;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #005A3B;
}
