/* ============================================
   El Rancho Stiletto — Custom Styles
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
  background: #D6D1C8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B8B1A6;
}

/* Selection color */
::selection {
  background: #F9CDB8;
  color: #612E20;
}

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(253, 248, 240, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(192, 96, 58, 0.08), 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Nav link hover underline animation */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #C0603A;
  border-radius: 1px;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.nav-link:hover::after {
  width: 60%;
}

/* Mobile menu transitions */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

/* Fade-in animation for scroll reveals */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #FDF8F0 inset !important;
  box-shadow: 0 0 0 30px #FDF8F0 inset !important;
  -webkit-text-fill-color: #3D3934 !important;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #C0603A;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Form input focus ring override for Tailwind */
input:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(244, 169, 138, 0.4);
}

/* Print styles */
@media print {
  #navbar,
  #mobile-menu,
  .fade-up {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
}

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

/* Tablet and up adjustments */
@media (min-width: 768px) {
  .lg\:col-span-2 {
    /* handled by Tailwind */
  }
}

/* Ensure images don't overflow rounded containers */
img {
  max-width: 100%;
  height: auto;
}

/* Subtle pattern overlay for hero */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(192, 96, 58, 0.04) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}
