/* === CUSTOM STYLES === */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fff8f0;
}
::-webkit-scrollbar-thumb {
  background: #a3222b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8b1d25;
}

/* Header scroll state */
#site-header.scrolled {
  background: rgba(255, 252, 248, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(163, 34, 43, 0.08);
}

#site-header.scrolled .font-serif {
  color: #5c1318;
}

/* Mobile menu active state */
body.menu-open {
  overflow: hidden;
}

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

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

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

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

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.menu-open .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-open .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 1.25rem;
}

/* Flavor card hover effects */
.flavor-card {
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.flavor-card:hover {
  transform: translateY(-6px);
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .reveal[data-delay="1"] { transition-delay: 0.1s; }
  .reveal[data-delay="2"] { transition-delay: 0.2s; }
  .reveal[data-delay="3"] { transition-delay: 0.3s; }
  .reveal[data-delay="4"] { transition-delay: 0.4s; }
}

/* Subtle grain texture overlay on hero */
.hero-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  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");
  pointer-events: none;
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #a3222b;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection color */
::selection {
  background: #f9d4d4;
  color: #5c1318;
}
