/* Smooth scrolling for the whole document */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar for a polished feel */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* Fade-in animation for sections */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar transition when scrolled */
#navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(253, 251, 247, 0.95);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border-color: #ece1d0;
}

/* Adjust top offset for fixed nav + notice strip */
body {
  padding-top: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
}

/* Form input focus states enhancement */
input:focus,
textarea:focus,
select:focus {
  background-color: #ffffff;
}

/* Ensure mobile menu animation is clean */
#mobile-menu {
  transition: all 0.2s ease-in-out;
}

/* Prevent layout shift when scrollbar appears */
html {
  overflow-y: scroll;
}

/* Custom selection color */
::selection {
  background-color: #c5d8c5;
  color: #243324;
}