/* ============================================
   Matt's Tavern — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ============================================
   Hero Animations (above-the-fold — always visible)
   ============================================ */
.hero-anim {
  opacity: 1;
  transform: translateY(0);
  animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-anim:nth-child(2) { animation-delay: 0.12s; }
.hero-anim:nth-child(3) { animation-delay: 0.24s; }
.hero-anim:nth-child(4) { animation-delay: 0.36s; }

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

/* ============================================
   Scroll Reveal (below-the-fold only)
   Progressive enhancement: content is visible
   by default; JS adds the animated state.
   ============================================ */
.reveal {
  /* Default: fully visible, no animation */
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When JS adds .is-visible, trigger the animation */
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* If JS is unavailable, content remains visible (no opacity:0 default) */

/* Reduced motion: disable animations entirely */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-anim {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .gallery-img:hover {
    transform: none;
  }
}

/* ============================================
   Navigation
   ============================================ */
#site-header {
  background: transparent;
}

#site-header.scrolled {
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
  animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Gallery Images
   ============================================ */
.gallery-img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-img:hover {
  transform: scale(1.03);
}

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

::-webkit-scrollbar-track {
  background: #1A2028;
}

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

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

/* ============================================
   Selection Color
   ============================================ */
::selection {
  background: rgba(232, 98, 75, 0.3);
  color: inherit;
}

/* ============================================
   Form Focus States
   ============================================ */
input:focus,
textarea:focus {
  outline: none;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  #site-header,
  .hero-anim,
  .reveal {
    animation: none;
    transition: none;
  }
}
