/* ============================================================
   ENDURO EXPERIENCES — Custom Styles
   Layered on top of Tailwind CDN. Touch only what Tailwind can't.
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,900&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ------------------------- Tokens ------------------------- */
:root {
  --sahara-50:  #FFF7ED;
  --sahara-100: #FFEDD5;
  --sahara-200: #FED7AA;
  --sahara-300: #FDBA74;
  --sahara-400: #FB923C;
  --sahara-500: #EA580C;
  --sahara-600: #C2410C;
  --sahara-700: #9A3412;
  --sahara-800: #7C2D12;
  --sahara-900: #431407;

  --sand-50:  #FAF7F2;
  --sand-100: #F5E6CE;
  --sand-200: #EBD7B0;
  --sand-300: #D4A574;
  --sand-400: #C39866;
  --sand-500: #B8895A;
  --sand-700: #8B5E34;
  --sand-900: #3F2B1A;

  --midnight-900: #18181B;
  --midnight-800: #27272A;
  --midnight-700: #3F3F46;

  --gold-500: #D4A646;
  --gold-600: #B98D2C;

  --ink: #1C1917;

  --font-display: 'Fraunces', 'Playfair Display', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Bebas Neue', 'Oswald', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--sand-50);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}

h1, h2, h3, h4, h5, .font-display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.font-mono    { font-family: var(--font-mono); letter-spacing: 0.04em; }
.font-display { font-family: var(--font-display); }

/* ------------------------- Utilities ------------------------- */
.text-sahara-600 { color: var(--sahara-600); }
.bg-sahara-600   { background-color: var(--sahara-600); }
.bg-sahara-700   { background-color: var(--sahara-700); }
.bg-sand-50      { background-color: var(--sand-50); }
.bg-sand-100     { background-color: var(--sand-100); }
.bg-midnight-900 { background-color: var(--midnight-900); }
.bg-gold-500     { background-color: var(--gold-500); }

.eyebrow {
  font-family: var(--font-mono);
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--sahara-600);
}
.eyebrow-light {
  font-family: var(--font-mono);
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--sand-300);
}

/* ------------------------- Backgrounds ------------------------- */

/* Subtle sand grain */
.bg-grain {
  position: relative;
}
.bg-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Dune silhouette (topographic lines at the bottom of hero) */
.bg-dunes-bottom {
  -webkit-mask-image: linear-gradient(to top, black 70%, transparent 100%);
          mask-image: linear-gradient(to top, black 70%, transparent 100%);
}

/* Marquee gradient mask on either side */
.marquee-mask {
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
          mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

/* ------------------------- Buttons ------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2,.7,.2,1);
  white-space: nowrap;
  user-select: none;
  letter-spacing: -0.005em;
}
.btn-primary {
  background: var(--sahara-600);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 8px 24px -8px rgba(194,65,12,.55);
}
.btn-primary:hover {
  background: var(--sahara-700);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -10px rgba(194,65,12,.7);
}
.btn-secondary {
  background: rgba(255,255,255,.94);
  color: var(--ink);
  border: 1px solid rgba(0,0,0,.06);
}
.btn-secondary:hover { background: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.7); }

.btn-sm { padding: 0.55rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 1.15rem 2rem; font-size: 1.02rem; }

/* ------------------------- Cards ------------------------- */
.card {
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 250ms ease, box-shadow 250ms ease;
  border: 1px solid rgba(28,25,23,.05);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -28px rgba(28,25,23,.28);
}
.card-image {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  display: block;
}

/* Pill / Badge */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill-sahara { background: var(--sahara-100); color: var(--sahara-700); }
.pill-gold { background: #FAEBC6; color: #6B4B0E; }
.pill-ink  { background: var(--midnight-900); color: var(--sand-100); }
.pill-sand { background: var(--sand-100); color: var(--sand-700); }

/* ------------------------- Header (always dark, matches scrolled state) ------------------------- */
/* Apply the same dark background the header gets on scroll, but always.
   This fixes the cream/sand-50 body color showing through the transparent
   header at the top of the page, which made white nav text unreadable. */
[data-header] {
  background: rgba(24, 24, 27, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 28px -12px rgba(0, 0, 0, 0.35);
}

/* Shift the header wordmark (logo + Enduro Experiences text) a bit to the
   left to balance against the right-side book/menu cluster. Scoped to the
   header-only wordmark anchor (it carries the .group + .notranslate
   classes; the footer version does not). */
header[data-header] a.flex.items-center.gap-3.group.notranslate {
  margin-left: -10px;
}
@media (max-width: 640px) {
  header[data-header] a.flex.items-center.gap-3.group.notranslate {
    /* Slightly less on mobile so the wordmark doesn't kiss the screen edge. */
    margin-left: -6px;
  }
}

/* Keep the header wordmark text on a single line each. The wordmark is
   notranslate, so the English text stays constant — but when the user
   switches to Spanish/French, the nav grows and squeezes the wordmark
   block, which would otherwise wrap "Enduro Experiences" onto two lines.
   Force both lines (title + subtitle) to stay one-liners. */
header[data-header] a.flex.items-center.gap-3.group.notranslate .leading-tight > div {
  white-space: nowrap;
}

/* Keep header nav labels on a single line. Spanish/French translations
   of nav items ("Rutas en moto KTM", "Excursiones en quad") are 30-40%
   longer than the English originals; without this they'd wrap mid-phrase.
   Combined with the lg->xl breakpoint shift for nav visibility, the
   header stays clean across all three languages. */
header[data-header] nav a,
header[data-header] nav button {
  white-space: nowrap;
}

/* ------------------------- Hero photo carousel ------------------------- */
/* Four stacked <img> elements, all absolutely positioned in the same slot.
   Only the .is-active one is visible (opacity 1); the rest fade at 0.
   Each active slide gets a Ken Burns keyframe so the camera "moves" slowly. */
.hero-slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
  will-change: opacity, transform;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 0.85;
}

/* Ken Burns keyframes — different motion per slide so it doesn't feel mechanical.
   Duration ~9s so motion is slow and continuous during the slide's display time. */
@keyframes kb-zoom-in {
  from { transform: scale(1)    translate(0, 0); }
  to   { transform: scale(1.12) translate(-1.5%, -1%); }
}
@keyframes kb-zoom-out {
  from { transform: scale(1.12) translate(0, 0); }
  to   { transform: scale(1)    translate(1.5%, 1%); }
}
@keyframes kb-pan-left {
  from { transform: scale(1.08) translate(2%, 0); }
  to   { transform: scale(1.08) translate(-2%, 0); }
}
@keyframes kb-pan-right {
  from { transform: scale(1.08) translate(-2%, 0); }
  to   { transform: scale(1.08) translate(2%, 0); }
}
.hero-slide.is-active.kb-zoom-in   { animation: kb-zoom-in   9s ease-out both; }
.hero-slide.is-active.kb-zoom-out  { animation: kb-zoom-out  9s ease-out both; }
.hero-slide.is-active.kb-pan-left  { animation: kb-pan-left  9s ease-out both; }
.hero-slide.is-active.kb-pan-right { animation: kb-pan-right 9s ease-out both; }

/* Slide indicator dots (right edge of hero) */
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 250ms ease, transform 250ms ease;
}
.hero-dot:hover { background: rgba(255, 255, 255, 0.6); }
.hero-dot.is-active {
  background: var(--sahara-400, #FB923C);
  transform: scale(1.4);
}

/* ------------------------- Floating WhatsApp ------------------------- */
.fab-whats {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  background: #25D366;
  color: #fff;
  box-shadow: 0 12px 30px -6px rgba(37,211,102,.55);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}
.fab-whats:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -8px rgba(37,211,102,.65);
}
.fab-whats:active { transform: translateY(0); }

/* ------------------------- Animations ------------------------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up   { animation: fade-up 700ms ease-out both; }
.delay-1   { animation-delay: 100ms; }
.delay-2   { animation-delay: 200ms; }
.delay-3   { animation-delay: 300ms; }
.delay-4   { animation-delay: 400ms; }

@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  animation: scroll-x 36s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

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

/* ------------------------- Sections ------------------------- */

/* Topographic dotted overlay used on hero */
.topo-pattern {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.04) 1px, transparent 1.5px),
    radial-gradient(circle at 80% 60%, rgba(255,255,255,.03) 1px, transparent 1.5px);
  background-size: 22px 22px, 30px 30px;
}

/* Quote marks */
.quote-mark {
  font-family: 'Fraunces', serif;
  font-size: 6rem;
  line-height: 0.6;
  color: var(--sahara-300);
  font-weight: 700;
  font-style: italic;
}

/* Berber divider SVG container */
.berber-divider {
  display: block;
  margin: 0 auto;
  height: 32px;
}

/* Sticky mobile CTA bar (removed — markup gone, keep selector harmless) */
@media (max-width: 768px) {
  body { padding-bottom: 0; }
  .fab-whats { bottom: 1.5rem; }
}

/* ------------------------- Forms ------------------------- */
.field {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(28,25,23,.12);
  border-radius: 0.65rem;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 150ms, box-shadow 150ms;
}
.field:focus {
  outline: none;
  border-color: var(--sahara-500);
  box-shadow: 0 0 0 3px rgba(234,88,12,.18);
}
.label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--midnight-700);
  margin-bottom: 0.4rem;
}

/* ------------------------- Accordion ------------------------- */
details.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--sahara-600);
  transition: transform 200ms;
}
details.faq[open] summary::after {
  content: '–';
  color: var(--sahara-700);
}
details.faq .faq-body { padding: 0 1.5rem 1.5rem; color: var(--midnight-700); font-size: 0.95rem; line-height: 1.65; }

/* ------------------------- Image masks ------------------------- */
.mask-arch {
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at center, black 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 90% 90% at center, black 60%, transparent 100%);
}

/* ------------------------- Skip link ------------------------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--midnight-900);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 0 0 0.4rem 0;
}
.skip-link:focus { top: 0; }

/* ------------------------- Map / no-image fallback gradient ------------------------- */
.no-img {
  background:
    radial-gradient(at 30% 30%, rgba(194,65,12,.25), transparent 50%),
    radial-gradient(at 70% 70%, rgba(212,166,70,.2), transparent 50%),
    linear-gradient(135deg, #3F2B1A 0%, #7C2D12 60%, #C2410C 100%);
}

/* ------------------------- GTranslate language switcher ------------------------- */
/* Sized + aligned to sit natively inside the dark utility bar next to
   the phone/WhatsApp row, and tucked just under the sticky header on mobile. */
.gtranslate_wrapper {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  line-height: 1;
}
.gtranslate_wrapper .gt_wrapper,
.gtranslate_wrapper .gt_languages,
.gtranslate_wrapper select {
  display: inline-flex;
  align-items: center;
}
.gtranslate_wrapper select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  padding: 4px 28px 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 9px;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.gtranslate_wrapper select:hover,
.gtranslate_wrapper select:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  outline: none;
}
/* The arrow polygon from the option elements (GTranslate with flag_style:"3d"
   prepends a flag image) — keep line-height tight so the dropdown matches
   the utility bar's vertical rhythm. */
.gtranslate_wrapper select option {
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: normal;
  text-transform: none;
}
/* Hide GTranslate's native flag images inside the SELECT trigger (3d flags
   only show in the open dropdown menu); keeps the trigger compact. */
.gtranslate_wrapper .gt_languages img { display: none; }
/* On small screens tuck the switcher under the header so it doesn't crowd
   out the phone number. */
@media (max-width: 640px) {
  .gtranslate_wrapper select {
    padding: 3px 24px 3px 10px;
    font-size: 0.65rem;
  }
}
