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

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

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile menu transitions */
#mobile-menu {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stat card floating animation */
.stat-card {
  animation: float 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
  animation-delay: -1.5s;
}

.stat-card:nth-child(3) {
  animation-delay: -3s;
}

.stat-card:nth-child(4) {
  animation-delay: -4.5s;
}

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

/* Scroll reveal — progressive enhancement, only below fold */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar scroll state */
#site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.06);
}

/* Active nav link */
nav a.active {
  color: #0D9488;
}

/* Selection color */
::selection {
  background: rgba(13, 148, 136, 0.2);
  color: #134e4a;
}

/* Focus styles */
a:focus-visible, button:focus-visible {
  outline: 2px solid #0D9488;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth image loading */
img {
  loading: lazy;
}
