/* Custom styles for J R's Saloon */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDFCF8;
}
::-webkit-scrollbar-thumb {
  background: #1B4332;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #143023;
}

/* Selection color */
::selection {
  background: #1B4332;
  color: #FDFCF8;
}

/* Reveal animations */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.revealed {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Navbar transition */
#navbar.scrolled {
  background: rgba(253, 252, 248, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #1B4332;
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile menu link */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu-open .mobile-link {
  animation: fadeInUp 0.4s ease forwards;
}

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

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image hover effect */
.group:hover img {
  transform: scale(1.05);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #1B4332;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* Input focus styles */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(27, 67, 50, 0.08);
}

/* Subtle pattern overlay for hero */
#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(27, 67, 50, 0.03) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(27, 67, 50, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* Card hover lift */
.rounded-3xl:hover {
  transform: translateY(-4px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Gallery image hover */
.group .transition-transform {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal-up,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}
