/* Custom styles for Hookah 32 */

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

/* Navbar scroll state */
.nav-scrolled {
  background: rgba(254, 253, 248, 0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-scrolled .nav-text {
  color: #111827 !important;
}

.nav-scrolled .nav-subtext {
  color: #047857 !important;
}

/* Mobile menu animations */
.menu-line {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Scroll reveal base state */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Only apply animation when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .js-enabled .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  .js-enabled .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
  .js-enabled .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
  .js-enabled .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
}

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

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

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

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

/* Selection color */
::selection {
  background: #065f46;
  color: #fefdf8;
}

/* Image hover effect */
img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.1);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
