/* ============================================
   BESSEY'S CAFE — Custom Styles
   Bold Editorial | Charcoal + Coral
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  overflow-x: hidden;
}

/* --- Selection --- */
::selection {
  background: #C75B39;
  color: #fff;
}

/* --- Navbar Transitions --- */
#navbar {
  transition: background-color 0.4s ease, padding 0.3s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* --- Hero Animations --- */
.hero-anim {
  opacity: 1;
  transform: translateY(0);
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }
.hero-anim:nth-child(5) { animation-delay: 0.9s; }

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

/* --- Scroll Reveal (Below the Fold Only) --- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion: disable scroll reveals */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-anim {
    opacity: 1;
    transform: none;
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* --- Mobile Menu --- */
#mobile-menu {
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-link {
  opacity: 1;
  transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
  transform: scale(1.05);
}

/* --- Card Hover Effects --- */
.group:hover .group-hover\:\:bg-coral-600\/20 {
  background-color: rgba(199, 91, 57, 0.2);
}

/* --- Image Hover Zoom --- */
.rounded-3xl.overflow-hidden img,
.rounded-2xl.overflow-hidden img {
  will-change: transform;
}

/* --- Focus Styles --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #C75B39;
  outline-offset: 2px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f0f0f;
}
::-webkit-scrollbar-thumb {
  background: #424242;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #C75B39;
}

/* --- Utility --- */
.font-serif {
  font-feature-settings: 'cv01', 'cv02', 'cv03';
}

/* --- Subtle Grain Texture Overlay (optional enhancement) --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  z-index: 9999;
}
