/* ===== Joseph's Bagel & Grill — Custom Styles ===== */

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

/* Selection color */
::selection {
  background-color: rgba(201, 168, 76, 0.3);
  color: #FDF8F5;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0D0D0D;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #C9A84C;
}

/* ===== Hero Animations ===== */
.hero-anim {
  opacity: 1;
  transform: translateY(0);
}

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

.hero-anim:nth-child(1) { animation: fadeInUp 0.8s ease-out 0.2s both; }
.hero-anim:nth-child(2) { animation: fadeInUp 0.8s ease-out 0.4s both; }
.hero-anim:nth-child(3) { animation: fadeInUp 0.8s ease-out 0.6s both; }
.hero-anim:nth-child(4) { animation: fadeInUp 0.8s ease-out 0.8s both; }
.hero-anim:nth-child(5) { animation: fadeInUp 0.8s ease-out 1s both; }

.hero-img-group {
  animation: fadeInUp 1s ease-out 0.5s both;
}

/* ===== Scroll Animations (progressive enhancement) ===== */
.scroll-anim {
  /* Default: visible — works without JS */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* When JS is enabled and element is out of view, hide it */
@media (prefers-reduced-motion: no-preference) {
  .scroll-anim.is-hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }
}

/* ===== Navbar transition ===== */
.nav-scrolled {
  background: rgba(13, 13, 13, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile menu ===== */
.mobile-link {
  opacity: 1;
}

/* ===== Image hover effect ===== */
.group img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Gold shimmer on hover ===== */
a[href^="tel"] {
  position: relative;
}

/* ===== Focus styles for accessibility ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 2px;
}

/* ===== 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;
  }
}

/* ===== Mobile responsive ===== */
@media (max-width: 768px) {
  .hero-img-group {
    margin-top: 2rem;
  }
}

/* ===== Loading state for images ===== */
img {
  background-color: #1A1A1A;
}
