/* ============================================
   The Patio at Horsham — Custom Styles
   ============================================ */

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

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

body {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  background-color: #06101e;
  color: #ffffff;
  overflow-x: hidden;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f2b4c;
}
::-webkit-scrollbar-thumb {
  background: #c9a84c;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f0ce4f;
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(201, 168, 76, 0.3);
  color: #ffffff;
}

/* ---------- Navbar ---------- */
#navbar {
  background: transparent;
  transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
  background: rgba(6, 16, 30, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

/* ---------- Mobile Menu ---------- */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

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

/* ---------- Menu Button ---------- */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.5rem;
}

/* ---------- Reveal Animations (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 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-up {
    transform: translateY(40px);
  }
  .reveal-left {
    transform: translateX(-40px);
  }
  .reveal-right {
    transform: translateX(40px);
  }

  .reveal-up.visible,
  .reveal-left.visible,
  .reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
  }
}

/* ---------- Fallback: always visible if JS disabled or reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Button hover glow ---------- */
.bg-gold-500:hover,
.bg-gold-400 {
  box-shadow: 0 0 30px rgba(201, 168, 76, 0.3);
}

/* ---------- Image lazy loading ---------- */
img {
  max-width: 100%;
  height: auto;
}

/* ---------- Focus styles ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Product card shimmer on hover ---------- */
.group:hover .relative.h-64 img {
  filter: brightness(1.05);
}

/* ---------- Map filter override for light mode ---------- */
@media (prefers-color-scheme: light) {
  iframe[title*="location map"] {
    filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(1.1) !important;
  }
}

/* ---------- Responsive adjustments ---------- */
@media (max-width: 767px) {
  .font-serif {
    line-height: 1.1;
  }

  #hero h1 {
    font-size: 2.5rem;
  }

  #hero h1 span:last-child {
    font-size: 1.75rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #hero h1 {
    font-size: 3.5rem;
  }
}

/* ---------- Print styles ---------- */
@media print {
  #navbar,
  #menuBtn,
  #mobileMenu {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .bg-navy-950,
  .bg-navy-900 {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
