/* ========================================
   Buckaroos Hitching Post & Coffeehouse
   Custom Styles
   ======================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: #7B2D3B;
  color: #FDF8F5;
}

/* ---------- Hero ---------- */
.hero-gradient {
  background: linear-gradient(
    135deg,
    #3a0f17 0%,
    #7B2D3B 30%,
    #b92646 55%,
    #d95a2e 80%,
    #e8774d 100%
  );
}

.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FDF8F5' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hero entrance animations (below-fold safe — hero is above fold) */
.hero-eyebrow {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards 0.2s;
}

.hero-headline {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.8s ease forwards 0.4s;
}

.hero-subheadline {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards 0.6s;
}

.hero-cta {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards 0.8s;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-deco {
  animation: heroFloat 8s ease-in-out infinite;
}

.hero-deco-2 { animation-delay: -2s; animation-duration: 10s; }
.hero-deco-3 { animation-delay: -4s; animation-duration: 12s; }
.hero-deco-4 { animation-delay: -6s; animation-duration: 9s; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* Scroll indicator */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background-color: #FDF8F5;
  color: #7B2D3B;
  font-family: 'Lato', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background-color: transparent;
  color: #FDF8F5;
  border-color: #FDF8F5;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background-color: transparent;
  color: #FDF8F5;
  font-family: 'Lato', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  border: 2px solid rgba(253, 248, 245, 0.4);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: rgba(253, 248, 245, 0.1);
  border-color: rgba(253, 248, 245, 0.7);
  transform: translateY(-2px);
}

/* ---------- Navigation ---------- */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all 0.4s ease;
  padding: 0;
}

.nav-fixed.scrolled {
  background-color: rgba(253, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

.nav-link {
  font-family: 'Lato', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #7B2D3B;
  padding: 8px 16px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(123, 45, 59, 0.08);
  color: #5c1f2b;
}

.nav-fixed:not(.scrolled) .nav-link {
  color: rgba(253, 248, 245, 0.85);
}

.nav-fixed:not(.scrolled) .nav-link:hover {
  color: #FDF8F5;
  background-color: rgba(253, 248, 245, 0.12);
}

.nav-fixed:not(.scrolled) .font-serif,
.nav-fixed:not(.scrolled) .font-sans {
  color: #FDF8F5 !important;
}

.nav-fixed:not(.scrolled) .w-10 {
  background-color: rgba(253, 248, 245, 0.2) !important;
}

.nav-fixed:not(.scrolled) .w-10 svg {
  color: #FDF8F5 !important;
}

/* ---------- Section Eyebrow ---------- */
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ---------- Heritage ---------- */
.heritage-img-main {
  transition: transform 0.6s ease;
}

.heritage-img-main:hover {
  transform: scale(1.02);
}

.heritage-img-accent {
  transition: transform 0.6s ease;
}

.heritage-img-accent:hover {
  transform: scale(1.05) rotate(2deg);
}

/* ---------- Menu ---------- */
.menu-card {
  transition: all 0.4s ease;
}

.menu-card:hover {
  transform: translateY(-4px);
}

.menu-item {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(253, 248, 245, 0.08);
}

.menu-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

/* ---------- Gallery ---------- */
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(58, 15, 23, 0.3) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item img {
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ---------- Visit ---------- */
.visit-card {
  padding: 1.25rem;
  border-radius: 1rem;
  background-color: rgba(123, 45, 59, 0.03);
  border: 1px solid rgba(123, 45, 59, 0.08);
  transition: all 0.3s ease;
}

.visit-card:hover {
  background-color: rgba(123, 45, 59, 0.06);
  transform: translateX(4px);
}

/* ---------- Contact Form ---------- */
.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #EDD4BA;
  border-radius: 10px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9375rem;
  color: #3a0f17;
  background-color: #FAF7F4;
  transition: all 0.3s ease;
  outline: none;
  -webkit-appearance: none;
}

.input-field::placeholder {
  color: #DFD0BC;
}

.input-field:focus {
  border-color: #7B2D3B;
  background-color: #FDF8F5;
  box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.08);
}

.input-field:hover:not(:focus) {
  border-color: #b92646;
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 90;
  animation: mobileMenuIn 0.3s ease;
}

@keyframes mobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-link {
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-link:hover {
  color: #b92646;
}

/* Mobile menu open state */
#menuBtn.open .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#menuBtn.open .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.open .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 5rem;
}

/* ---------- Scroll Reveal (below fold only) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
.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; }

/* Respect 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;
  }
  .hero-eyebrow,
  .hero-headline,
  .hero-subheadline,
  .hero-cta {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero-headline {
    font-size: 2.75rem;
  }

  .heritage-img-accent {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .hero-headline {
    font-size: 3.5rem;
  }
}
