/* ============================================================
   El Camino de Frutillar — base.css
   Design System · Reset · Variables · Utilidades compartidas
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--negro, #1A1D1A);
  background: var(--crema, #F5F2ED);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol { padding: 0; margin: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

/* ---------- Focus visible ---------- */
/* Note: We do NOT suppress :focus globally — only style :focus-visible.
   This ensures keyboard navigation remains accessible in all browsers. */
:focus-visible {
  outline: 2px solid var(--verde, #3E4A36);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Design Tokens ---------- */
:root {
  /* ── Palette ── */
  --crema:        #F5F2ED;
  --crema-soft:   #EAE6DD;
  --crema-warm:   #F0EBE1;
  --verde:        #3E4A36;
  --verde-claro:  #8FA386;
  --verde-suave:  #A8B89F;
  --verde-tinta:  #2A3324;
  --verde-hover:  #4A5C40;
  --ocre:         #C89B3A;
  --oro:          #BFA14A;
  --oro-soft:     rgba(191, 161, 74, 0.12);
  --tierra:       #8B6F47;
  --gris:         #999999;
  --negro:        #1A1D1A;
  --borde:        rgba(62, 74, 54, 0.12);
  --borde-hover:  rgba(62, 74, 54, 0.30);

  /* ── Typography ── */
  --font-mono:            'IBM Plex Mono', ui-monospace, monospace;
  --font-serif:           'Spectral', Georgia, serif;
  --font-display:         'Spectral', Georgia, serif;
  --font-display-italic:  'Spectral', Georgia, serif;
  --font-body:            'Jost', system-ui, sans-serif;

  /* ── Spacing Scale ── */
  --space-2xs:  4px;
  --space-xs:   8px;
  --space-sm:   12px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   32px;
  --space-2xl:  48px;
  --space-3xl:  64px;
  --space-4xl:  96px;
  --space-5xl:  128px;

  /* ── Shadows ── */
  --shadow-xs:    0 1px 2px rgba(26, 29, 26, 0.05);
  --shadow-sm:    0 2px 8px rgba(26, 29, 26, 0.06), 0 1px 2px rgba(26, 29, 26, 0.04);
  --shadow-md:    0 4px 16px rgba(26, 29, 26, 0.08), 0 2px 4px rgba(26, 29, 26, 0.04);
  --shadow-lg:    0 8px 32px rgba(26, 29, 26, 0.10), 0 4px 8px rgba(26, 29, 26, 0.04);
  --shadow-xl:    0 16px 48px rgba(26, 29, 26, 0.14), 0 6px 12px rgba(26, 29, 26, 0.05);
  --shadow-float: 0 20px 60px rgba(26, 29, 26, 0.16), 0 8px 16px rgba(26, 29, 26, 0.06);
  --shadow-glow:  0 0 30px rgba(143, 163, 134, 0.15);

  /* ── Border Radius ── */
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    16px;
  --radius-full:  999px;

  /* ── Easing ── */
  --ease-out:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo:  cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-back:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring:    cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth:    cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Glass ── */
  --glass-bg:     rgba(245, 242, 237, 0.85);
  --glass-bg-strong: rgba(245, 242, 237, 0.95);
  --glass-blur:   12px;

  /* ── Layout ── */
  --topbar-h: 56px;
  --max-w:    1400px;

  /* ── Transitions ── */
  --transition-fast:   150ms var(--ease-out);
  --transition-base:   250ms var(--ease-out);
  --transition-slow:   400ms var(--ease-out-expo);
  --transition-reveal: 700ms var(--ease-out-expo);
}

/* ---------- Utilidades ---------- */
.container {
  width: min(100% - 2rem, var(--max-w));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--verde-claro);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--verde-claro);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- WhatsApp floating ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35), var(--shadow-lg);
  z-index: 900;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.wa-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45), var(--shadow-xl);
}
.wa-float:active { transform: translateY(-1px) scale(0.98); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ---------- Botones compartidos ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 14px 28px;
  min-height: 48px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-base),
              box-shadow var(--transition-base);
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--verde);
  color: var(--crema);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--verde-tinta);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-xs); }

.btn-outline {
  background: transparent;
  color: var(--verde);
  border-color: var(--borde-hover);
}
.btn-outline:hover {
  background: var(--verde);
  color: var(--crema);
  border-color: var(--verde);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.btn-outline:active { transform: translateY(0); }

.btn-gold {
  background: linear-gradient(135deg, var(--oro) 0%, #D4AF5E 100%);
  color: var(--verde-tinta);
  border: none;
  box-shadow: 0 4px 16px rgba(191, 161, 74, 0.3);
}
.btn-gold:hover {
  box-shadow: 0 8px 24px rgba(191, 161, 74, 0.4);
  transform: translateY(-2px);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 400ms; }

/* ---------- Number counter animation ---------- */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ---------- Divider line ---------- */
.divider {
  width: 60px;
  height: 1px;
  background: var(--borde-hover);
  margin: var(--space-2xl) auto;
  border: none;
}

/* ---------- Image shine effect on hover ---------- */
.img-shine {
  position: relative;
  overflow: hidden;
}
.img-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s var(--ease-out-expo);
  pointer-events: none;
}
.img-shine:hover::after {
  left: 100%;
}

/* ---------- Pill badge ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill--disponible { background: rgba(143, 163, 134, 0.18); color: #4a5f44; }
.pill--ultimas    { background: rgba(200, 155, 58, 0.18); color: #8a6a1f; }
.pill--reservada  { background: rgba(153, 153, 153, 0.18); color: #666; }
.pill--disponible::before,
.pill--ultimas::before,
.pill--reservada::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.pill--disponible::before { background: #6B8F5E; }
.pill--ultimas::before    { background: #C89B3A; }
.pill--reservada::before  { background: #999; }
