/* Ajustes globales Chaucato Adventure: legibilidad, accesibilidad y móvil */

/* Titulares: Archivo en ancho expandido, como el horizonte de las dunas */
.font-headline {
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.015em;
}
.display-wide {
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-wrap: balance;
}
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Foco visible para navegación con teclado */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #1F6F8B;
  outline-offset: 2px;
  border-radius: 6px;
}

@media (max-width: 767px) {
  /* Evita el zoom automático de iOS al enfocar campos (< 16px) */
  input, select, textarea { font-size: 16px !important; }
  /* Texto de 12px es demasiado pequeño para leer en móvil */
  main p.text-xs, main li.text-xs, main ul.text-xs { font-size: 0.875rem; line-height: 1.6; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Formularios en pantallas estrechas: una columna para que fecha y selects no se corten */
@media (max-width: 479px) {
  form .grid.grid-cols-2 { grid-template-columns: minmax(0, 1fr); }
}
/* Precios en tablas: nunca partir "S/ 249 p/p" en dos líneas */
td.font-headline, td .font-headline { white-space: nowrap; }

/* Botón flotante de WhatsApp con menú de números */
.wa-fab-menu {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 45;
}
.wa-fab {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: #25D366;
  color: #fff;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 6px 18px rgba(36, 26, 20, 0.28);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.wa-fab::-webkit-details-marker { display: none; }
.wa-fab:hover { background: #1EBE5A; transform: scale(1.06); }
.wa-fab:active { transform: scale(0.96); }
.wa-fab svg { width: 30px; height: 30px; }
.wa-fab-menu[open] .wa-fab { background: #1EBE5A; }

.wa-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: max-content;
  min-width: 240px;
  padding: 8px;
  border-radius: 14px;
  background: #FFFDF9;
  border: 1px solid #D8C9AA;
  box-shadow: 0 12px 32px rgba(36, 26, 20, 0.22);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform-origin: bottom right;
  animation: wa-menu-in 0.16s ease-out;
}
.wa-menu__title {
  padding: 6px 10px 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #5A493D;
}
.wa-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #2B211A;
  font-variant-numeric: tabular-nums;
}
.wa-menu__item:hover { background: #EFE3CB; }
.wa-menu__text { display: flex; flex-direction: column; line-height: 1.2; }
.wa-menu__label { font-size: 1rem; font-weight: 700; color: #2B211A; }
.wa-menu__number { font-size: 0.875rem; font-weight: 500; color: #5A493D; }
.wa-menu__icon {
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 9999px;
  background: #25D366;
  color: #fff;
  flex-shrink: 0;
}
@keyframes wa-menu-in {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 768px) {
  .wa-fab-menu { right: 1.5rem; bottom: 1.5rem; }
  .wa-fab { width: 60px; height: 60px; }
}

/* Slideshow de galerías (fundido cada 3 s) */
.slideshow { position: relative; }
.slideshow__viewport {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  overflow: hidden;
  background: #2B211A;
}
@media (min-width: 640px) { .slideshow__viewport { aspect-ratio: 4 / 3; } }
.slideshow__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
}
.slideshow__slide.is-active { opacity: 1; }
/* Foto completa encima; la misma foto desenfocada rellena los bordes */
.slideshow__bg {
  position: absolute; inset: -24px;
  width: calc(100% + 48px); height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(22px) brightness(0.55) saturate(1.1);
}
.slideshow__img {
  position: relative;
  width: 100%; height: 100%;
  object-fit: contain;
}
.slideshow__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #FFFDF9;
  background: linear-gradient(to top, rgba(36, 26, 20, 0.8), transparent);
  padding-right: 3.5rem;
}
.slideshow__prev, .slideshow__next, .slideshow__toggle {
  position: absolute;
  z-index: 2;
  display: none;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 9999px;
  background: rgba(255, 253, 249, 0.92);
  color: #2B211A;
  box-shadow: 0 2px 10px rgba(36, 26, 20, 0.25);
  transition: background-color 0.15s ease;
}
.slideshow__prev:hover, .slideshow__next:hover, .slideshow__toggle:hover { background: #FFFDF9; }
.slideshow__prev { left: 0.75rem; top: calc(50% - 18px); transform: translateY(-50%); }
.slideshow__next { right: 0.75rem; top: calc(50% - 18px); transform: translateY(-50%); }
.slideshow__toggle { right: 0.75rem; top: 0.75rem; width: 36px; height: 36px; }
.slideshow__toggle .icon-play { display: none; }
.slideshow__toggle[data-state="paused"] .icon-play { display: block; }
.slideshow__toggle[data-state="paused"] .icon-pause { display: none; }
.slideshow__dots {
  display: none;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}
.slideshow__dot {
  width: 28px; height: 28px;
  display: grid; place-items: center;
}
.slideshow__dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 9999px;
  background: #D8C9AA;
  transition: background-color 0.2s ease, width 0.2s ease;
}
.slideshow__dot[aria-current="true"]::before { background: #A0613A; width: 22px; }
.slideshow.is-ready .slideshow__prev,
.slideshow.is-ready .slideshow__next,
.slideshow.is-ready .slideshow__toggle { display: grid; }
.slideshow.is-ready .slideshow__dots { display: flex; }

/* Encabezado del sitio: logo + ☰ en móvil; nav completa desde 1024px */
.site-header {
  background: rgba(255, 253, 249, 0.95);
  border-bottom: 1px solid rgba(216, 201, 170, 0.35);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
/* Sobre la portada: transparente hasta que se pasa la foto (js/menu.js añade .is-solid) */
.site-header--overlay:not(.is-solid) {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.site-nav a {
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2B211A;
  transition: color 0.15s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: #A0613A;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.site-nav a:hover { color: #8A4F2C; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 44px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #2B211A;
}
.site-lang:hover { color: #8A4F2C; }
.site-lang svg, .menu-toggle svg, .site-menu__close svg { width: 20px; height: 20px; }
.menu-toggle, .site-menu__close {
  width: 44px;
  height: 44px;
  margin-right: -6px;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  color: #2B211A;
}
.menu-toggle svg, .site-menu__close svg { width: 26px; height: 26px; }
.site-header--overlay:not(.is-solid) .menu-toggle { background: rgba(255, 253, 249, 0.55); }

/* Menú móvil a pantalla completa */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #FFFDF9;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: site-menu-in 0.2s ease-out;
}
.site-menu[hidden] { display: none; }
.site-menu__nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
}
.site-menu__nav > a {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(216, 201, 170, 0.5);
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  font-variation-settings: "wdth" 112;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2B211A;
}
.site-menu__nav > a[aria-current="page"] { color: #A0613A; }
.site-menu__sub {
  display: flex;
  flex-direction: column;
  padding: 0.25rem 0 0.75rem 1rem;
  border-bottom: 1px solid rgba(216, 201, 170, 0.5);
}
.site-menu__sub a {
  padding: 0.6rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #5A493D;
}
.site-menu__sub a[aria-current="page"] { color: #A0613A; }
.site-menu__actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 2rem;
}
.site-menu__link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 600;
  color: #2B211A;
}
.site-menu__link svg { width: 20px; height: 20px; color: #A0613A; flex-shrink: 0; }
html.menu-open { overflow: hidden; }
@keyframes site-menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* Botón tierra (Descubrir / Reservar): tono de arena tostada, no naranja intenso */
.btn-clay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0 1.75rem;
  border-radius: 9999px;
  background: #A0613A;
  color: #FFFDF9;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.btn-clay:hover { background: #8A4F2C; }
.btn-clay:active { transform: scale(0.98); }
.btn-clay svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.btn-clay:hover svg { transform: translateX(3px); }

/* Portadas: la foto ocupa toda la primera pantalla, con el encabezado transparente encima */
.hero-discover {
  height: 100svh;
  min-height: 560px;
  max-height: 1100px;
}
.hero-title {
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-variation-settings: "wdth" 112;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.hero-title__lead { display: block; font-size: clamp(2.4rem, 11vw, 4.4rem); }
.hero-title__sub {
  display: block;
  margin-top: 0.35em;
  font-size: clamp(1.2rem, 5vw, 2rem);
  letter-spacing: 0.2em;
}
/* Tours: texto claro abajo, con un degradado suave solo en el tercio inferior */
.hero-title--light {
  color: #FFFDF9;
  font-size: clamp(2.1rem, 8.5vw, 3.9rem);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 14px rgba(20, 14, 10, 0.18);
}
.hero-rule { display: block; width: 3.5rem; height: 2px; background: #A0613A; }
.hero-place {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}
@media (min-width: 640px) { .hero-place { font-size: 1.125rem; } }
.hero-cta { min-height: 52px; padding: 0 2.25rem; font-size: 0.9375rem; }
html { scroll-behavior: smooth; }

/* Acento sobre fondos oscuros (sombra de duna): la arena tostada no contrasta ahí,
   así que se aclara a arena dorada (6.8:1) */
:is(.bg-deep-navy, .bg-night-surface, .bg-rock-brown) :is(.text-sunset-orange, .hover\:text-sunset-orange:hover) { color: #D9A877; }
:is(.bg-deep-navy, .bg-night-surface, .bg-rock-brown) .border-sunset-orange\/30 { border-color: rgba(217, 168, 119, 0.3); }
