/* ============================================
   Las Bolas del Chino — Custom Styles
   ============================================ */

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

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

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background-color: rgba(74, 222, 128, 0.3);
  color: #052e16;
}

/* ============================================
   Navigation
   ============================================ */
#site-header {
  background: transparent;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#site-header.scrolled {
  background: rgba(254, 252, 243, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(20, 83, 45, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-nav-link {
  position: relative;
}

/* ============================================
   Reveal Animations (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal-up {
    animation: revealUp 0.8s ease forwards;
  }

  .reveal-left {
    animation: revealLeft 0.8s ease forwards;
  }

  .reveal-right {
    animation: revealRight 0.8s ease forwards;
  }

  /* Stagger delays handled by inline style or JS */
  .reveal-up[data-delay="100ms"] { animation-delay: 100ms; }
  .reveal-up[data-delay="200ms"] { animation-delay: 200ms; }
  .reveal-up[data-delay="300ms"] { animation-delay: 300ms; }
  .reveal-left[data-delay="100ms"] { animation-delay: 100ms; }
  .reveal-right[data-delay="100ms"] { animation-delay: 100ms; }
  .reveal-right[data-delay="200ms"] { animation-delay: 200ms; }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes revealRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   Marquee Animation
   ============================================ */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

/* ============================================
   Hero reveal stagger
   ============================================ */
.hero-reveal-1 { animation-delay: 0.1s; }
.hero-reveal-2 { animation-delay: 0.3s; }
.hero-reveal-3 { animation-delay: 0.5s; }
.hero-reveal-4 { animation-delay: 0.7s; }

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus {
  outline: none;
}

/* ============================================
   Smooth scroll offset for fixed header
   ============================================ */
section[id] {
  scroll-margin-top: 80px;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 767px) {
  section[id] {
    scroll-margin-top: 60px;
  }

  /* Scale down large serif headlines on mobile */
  .font-serif.text-5xl { font-size: 2.5rem; }
  .font-serif.text-6xl { font-size: 2.75rem; }
}

/* ============================================
   Print styles
   ============================================ */
@media print {
  #site-header,
  #mobile-menu,
  .animate-marquee {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
  }
}
