/* Base & Utilities */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

/* Scroll reveal — progressive enhancement, hidden by default for JS-free readability */
.scroll-reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f0fdf8;
}
::-webkit-scrollbar-thumb {
  background: #99f6e0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5eead4;
}

/* Selection */
::selection {
  background: #ccfbf1;
  color: #0a2540;
}

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(240, 253, 248, 0.95) !important;
  box-shadow: 0 1px 20px rgba(10, 37, 64, 0.06);
}

/* Mobile menu animation */
#mobile-menu {
  animation: slideDown 0.25s ease;
}

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

/* Button focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
