/* Custom styles for North Star Acres */

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

/* Navbar transition */
#navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background-color: rgba(59, 15, 69, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Nav links color management */
.nav-link {
  transition: color 0.3s ease;
}

/* Mobile menu */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.open .mobile-link {
  animation: fadeUp 0.4s ease forwards;
  opacity: 1;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hamburger animation */
#mobile-menu-btn.active #bar1 {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active #bar2 {
  opacity: 0;
}

#mobile-menu-btn.active #bar3 {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
}

/* Scroll reveal animations — progressive enhancement, only below fold */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Ensure content is visible without JS */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

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

::-webkit-scrollbar-track {
  background: #1C1917;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #9D174D;
}

/* Selection color */
::selection {
  background: rgba(123, 45, 139, 0.3);
  color: inherit;
}

/* Focus visible styles */
:focus-visible {
  outline: 2px solid #FBBF24;
  outline-offset: 2px;
}

/* Image loading placeholder */
img {
  background-color: #E7E5E4;
}

/* Print styles */
@media print {
  #navbar, #mobile-menu, .reveal {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}
