/* Custom styles for Raphael Melendez Hair Designs */

html {
  scroll-behavior: smooth;
}

/* Scroll reveal base - content is always visible by default */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply animation when JS adds the class (progressive enhancement) */
.js-active .scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
}

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

/* Respect reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
  .js-active .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* Navbar scroll state */
nav.scrolled {
  background: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(6, 78, 59, 0.1);
}

nav.scrolled .font-display,
nav.scrolled a:not(.bg-emerald-700):not(.bg-white\/10) {
  color: #065f46 !important;
}

/* Mobile menu animation */
#mobileMenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mobileMenu.open {
  max-height: 400px;
}

/* Decorative pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(circle at 25% 25%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
                    radial-gradient(circle at 75% 75%, rgba(6, 95, 70, 0.03) 0%, transparent 50%);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #047857;
}
