/* ===== Base & Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Navbar ===== */
#navbar {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
#navbar.scrolled {
  background: rgba(253, 249, 243, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(5, 150, 105, 0.1);
  padding-top: 0;
  padding-bottom: 0;
}
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #059669;
  border-radius: 1px;
  transition: width 0.2s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* ===== Mobile Menu ===== */
#mobileMenu.show {
  display: block;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-link {
  display: block;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.mobile-link:hover {
  color: #059669;
  padding-left: 8px;
}

/* ===== Menu Button Animation ===== */
#menuBtn.active .menu-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-bar:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .menu-bar:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Smooth section transitions ===== */
section {
  position: relative;
}

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

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF9F3;
}
::-webkit-scrollbar-thumb {
  background: #059669;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* ===== Selection ===== */
::selection {
  background: #059669;
  color: #FDF9F3;
}
