/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

/* Navbar Scroll State */
.nav-scrolled {
  background: rgba(250, 250, 245, 0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-scrolled .nav-text {
  color: #1B4332 !important;
}

.nav-scrolled .nav-subtext {
  color: #447d58 !important;
}

.nav-scrolled .nav-link {
  color: #1B4332 !important;
}

/* Mobile Menu */
#mobileMenu {
  animation: slideDown 0.3s ease-out;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #98c3a8;
}

/* Selection */
::selection {
  background: #1B4332;
  color: #FAFAF5;
}

/* Image Loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Focus Styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1B4332;
  outline-offset: 2px;
}

/* Form Input Autofill */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #FAFAF5 inset !important;
}

/* Print Styles */
@media print {
  nav, #contactForm, .scroll-reveal {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
}
