/* ============================================
   Finca Pinar Food Truck — Custom Styles
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Selection color */
::selection {
  background: rgba(194, 45, 74, 0.2);
  color: #3d0a14;
}

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

/* Smooth image rendering */
img {
  -webkit-font-smoothing: antialiased;
  image-rendering: -webkit-optimize-contrast;
}

/* Nav scroll state */
nav.scrolled {
  background: rgba(61, 10, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

nav.scrolled .nav-text-color {
  color: #fff;
}

/* Mobile menu open state */
body.menu-open {
  overflow: hidden;
}

/* Prevent layout shift on images */
img {
  display: block;
  max-width: 100%;
}

/* Subtle image hover zoom container */
.menu-card img,
#gallery img {
  will-change: transform;
}

/* Loading state for lazy images */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}
img[loading="lazy"].loaded {
  opacity: 1;
}

/* Print styles */
@media print {
  nav, .mobile-menu, #gallery, iframe { display: none; }
  body { background: white; color: black; }
  .hero-bg { background: none !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;
    scroll-behavior: auto !important;
  }
  .hero-bg { background-attachment: scroll; }
  .fade-up { opacity: 1; transform: none; }
  .line-reveal { width: 100%; }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .thin-underline::after {
    background: #000;
    height: 2px;
  }
  .menu-card {
    border: 2px solid #a12038;
  }
}

/* Tablet and up adjustments */
@media (min-width: 768px) {
  .hero-bg {
    background-attachment: fixed;
  }
}

/* Large screens */
@media (min-width: 1280px) {
  html {
    font-size: 17px;
  }
}

/* Very large screens */
@media (min-width: 1920px) {
  html {
    font-size: 18px;
  }
  .max-w-7xl {
    max-width: 80rem;
  }
}

/* Touch device adjustments */
@media (hover: none) {
  .menu-card:hover {
    transform: none;
    box-shadow: none;
  }
  .thin-underline::after {
    display: none;
  }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: 100vh;
  }
  nav {
    height: 56px;
  }
  nav .flex.items-center {
    height: 56px;
  }
}
