/* Hatchland Farm's Dairy — Custom Styles */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f1520; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #fb6f92; }

/* Selection */
::selection { background: #fb6f92; color: #0f1520; }

/* Nav transition */
#nav { transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease; }
#nav.scrolled {
  background-color: rgba(15, 21, 32, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(251, 111, 146, 0.1);
}

/* Mobile menu */
#mobile-menu.open { opacity: 1; pointer-events: all; }
#mobile-menu.closed { opacity: 0; pointer-events: none; }
.mobile-link { transition: opacity 0.3s ease; }

/* Stat cards */
.stat-card {
  animation: float 6s ease-in-out infinite;
}
.stat-card:nth-child(2) { animation-delay: -1.5s; }
.stat-card:nth-child(3) { animation-delay: -3s; }
.stat-card:nth-child(4) { animation-delay: -4.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Menu cards */
.menu-card {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.5s ease, box-shadow 0.5s ease;
}
.menu-card:hover {
  box-shadow: 0 20px 60px -20px rgba(251, 111, 146, 0.15);
}

/* Testimonial cards */
.testimonial-card {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.5s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 111, 146, 0.3);
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Reduced motion - ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .stat-card { animation: none; }
  html { scroll-behavior: auto; }
}

/* Image hover effects */
.rounded-2xl.overflow-hidden {
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Form focus states */
input:focus, select:focus, textarea:focus {
  background-color: rgba(15, 21, 32, 0.8);
}

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
