/* Custom styles for Bay Area Integrative Medicine */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Base typography */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation transitions */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #e89a2a;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-text {
  transition: color 0.3s ease;
}

/* Mobile menu */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Menu button animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
  opacity: 0;
}

/* Scroll reveal animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

/* Selection color */
::selection {
  background-color: #e89a2a;
  color: #101823;
}
