/* ============================================
   Harris Farm and Home — Custom Styles
   ============================================ */

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

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

body {
  margin: 0;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf9f3;
}
::-webkit-scrollbar-thumb {
  background: #a11736;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #841634;
}

/* Selection */
::selection {
  background: #a11736;
  color: #fefdfb;
}

/* Hero parallax-like subtle effect */
#hero {
  background-attachment: fixed;
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img[data-src] {
  opacity: 0;
}

/* Navbar transition states */
#navbar.scrolled {
  background: rgba(254, 253, 251, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(61, 23, 20, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span {
  color: #2a2119 !important;
}

#navbar.scrolled a:not(.bg-burgundy-700) {
  color: #3d3229 !important;
}

#navbar.scrolled .bg-burgundy-700 {
  background: #a11736;
}

/* Scroll reveal animations — progressive enhancement */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

/* Mobile menu animation */
#mobileMenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobileMenu.open {
  max-height: 400px;
  padding: 1rem 0;
}

/* Product card hover shine */
.group::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.group:hover::after {
  left: 100%;
}

/* Accent line animation */
.accent-line {
  display: inline-block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #a11736, #ff6a4a);
  margin: 1rem 0;
  transition: width 0.6s ease;
}

/* Button focus states */
a:focus-visible, button:focus-visible {
  outline: 2px solid #a11736;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Map styling */
iframe[src*="google.com/maps"] {
  filter: saturate(0.8) contrast(1.05);
  transition: filter 0.3s ease;
}

iframe[src*="google.com/maps"]:hover {
  filter: saturate(1) contrast(1);
}
