/* ===== Custom Styles for Hayward Family Restaurant ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
  background: #E54D2B;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #cc3a1a;
}

/* Selection color */
::selection {
  background: #F8C5B3;
  color: #2A1810;
}

/* Hero image animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Navbar transition states */
#navbar.scrolled {
  background: rgba(253, 248, 240, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(42, 24, 16, 0.08);
}

#navbar.scrolled .font-display {
  color: #2A1810 !important;
}

#navbar.scrolled a:not(.bg-terra-500) {
  color: #2A1810 !important;
}

/* Mobile menu active state */
#mobile-menu.active {
  opacity: 1 !important;
  pointer-events: all !important;
}

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

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

/* Hamburger animation */
.menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}
.menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 20px;
  margin-left: 0;
}

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

/* Scroll reveal animations (progressive enhancement) */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden {
  opacity: 0;
  transform: translateY(30px);
}

/* 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.hidden {
    opacity: 1;
    transform: none;
  }
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid #E54D2B;
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* Geometric decorative elements */
.geo-diamond {
  width: 12px;
  height: 12px;
  background: #E54D2B;
  transform: rotate(45deg);
  opacity: 0.6;
}

/* Card hover effects */
.card-hover {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(42, 24, 16, 0.12);
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(135deg, #E54D2B 0%, #F39B82 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Pattern overlay for sections */
.pattern-overlay {
  background-image: radial-gradient(circle, #E54D2B 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.05;
}
</style>
