/* Base styles and custom utilities */
html {
  scroll-behavior: smooth;
}

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

/* Scroll animation base — content is visible by default, JS adds animation */
.scroll-animate {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-animate {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar scroll state */
.nav-scrolled {
  background: rgba(26, 13, 32, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(91, 44, 111, 0.3);
}

/* Mobile menu transitions */
#mobileMenu {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: auto;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1A0D20;
}
::-webkit-scrollbar-thumb {
  background: #5B2C6F;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7D3C98;
}

/* Selection color */
::selection {
  background: rgba(245, 158, 11, 0.3);
  color: #F5F0F7;
}

/* Select dropdown styling */
select option {
  background: #2D1636;
  color: #E8DDE8;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #F59E0B;
  outline-offset: 2px;
}

/* Remove default focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}
