/* Custom overrides and animations */

html {
  scroll-behavior: smooth;
}

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

/* Navbar scroll state */
#nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(45, 55, 72, 0.08);
}

#nav.scrolled a:not(.bg-coral-400) {
  color: #2d3748;
}

/* Fade-in animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.15s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.25s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.35s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu transition */
#mobileMenu {
  animation: slideDown 0.25s ease;
}

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

/* Selection color */
::selection {
  background: #f97583;
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f7f8fa;
}
::-webkit-scrollbar-thumb {
  background: #d2d8e3;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a9b4c8;
}
