/* =========================================================================
   El Camino de Frutillar — Landing Page (LP)
   base.css · reset, design tokens, utilidades
   =========================================================================

   DESIGN SYSTEM — Paleta oficial del brandbook (60/30/10)
   ─────────────────────────────────────────────────────────────────────────
   Paleta 60/30/10 entregada por el cliente + derivados de color grading.

   Colores corporativos:
     --lp-dominante  #646B23   Verde oliva   (60% — fondos de marca)
     --lp-secundario #B4623C   Terracota     (30% — CTAs y acentos)
     --lp-acento     #DBCECC   Piedra rosa   (10% — detalles finos)

   Derivados del color grading corporativo:
     --lp-noche      #1A331A   Sombras (verde profundo)
     --lp-oliva-mid  #6B5E23   Medios tonos
     --lp-luz        #E6E8AA   Luces (amarillo pálido)
     --lp-salvia     #96A387   Neutro de transición
     --lp-crema      #F4EFE3   Fondo cálido

   Tipografía:
     --font-serif    Playfair Display (display editorial italic)
     --font-display  Barlow Condensed (eyebrow, nav, botones)
     --font-body     Century Gothic   (cuerpo)

   Radius:  16px (lg) · 8px (sm) · 999px (pill)
   Ease:    cubic-bezier(0.16, 1, 0.3, 1)
   ========================================================================= */

/* ---- Fuente Barlow Condensed (display) ---- */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../assets/fonts/BarlowCondensed-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../assets/fonts/BarlowCondensed-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---- Fuente Century Gothic (cuerpo) ---- */
@font-face {
  font-family: 'Century Gothic';
  src: url('../assets/fonts/CenturyGothicPaneuropeanLight.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Century Gothic';
  src: url('../assets/fonts/CenturyGothicPaneuropeanRegular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Century Gothic';
  src: url('../assets/fonts/CenturyGothicPaneuropeanBold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens globales ---- */
:root {
  /* Paleta oficial del brandbook (60/30/10) */
  --lp-dominante:    #646B23;   /* 60% · verde oliva */
  --lp-dominante-dark:#4C511A;  /* derivado · hover/tinta */
  --lp-secundario:   #B4623C;   /* 30% · terracota */
  --lp-secundario-dark:#8F4A2A; /* derivado · hover */
  --lp-acento:       #DBCECC;   /* 10% · piedra rosa */

  /* Derivados del color grading corporativo */
  --lp-noche:        #1A331A;
  --lp-noche-soft:   #24402A;
  --lp-oliva-mid:    #6B5E23;
  --lp-salvia:       #96A387;
  --lp-luz:          #E6E8AA;
  --lp-piedra-soft:  #ECE3D9;
  --lp-crema:        #F4EFE3;
  --lp-blanco:       #FFFFFF;

  /* Aliases de compatibilidad (para no romper clases existentes) */
  --lp-oliva:        var(--lp-dominante);
  --lp-oliva-dark:   var(--lp-dominante-dark);
  --lp-oliva-soft:   #7D853A;
  --lp-salvia-soft:  #B4BEA8;
  --lp-piedra:       var(--lp-acento);
  --lp-tierra:       var(--lp-secundario);
  --lp-tierra-dark:  var(--lp-secundario-dark);

  /* Semánticos */
  --color-bg:           var(--lp-crema);
  --color-surface:      var(--lp-piedra-soft);
  --color-surface-alt:  var(--lp-acento);
  --color-primary:      var(--lp-dominante);
  --color-primary-dark: var(--lp-dominante-dark);
  --color-dark:         var(--lp-noche);
  --color-accent:       var(--lp-secundario);
  --color-text:         #26301F;
  --color-text-soft:    #515B4E;
  --color-text-invert:  var(--lp-crema);
  --color-border:       rgba(26, 51, 26, 0.14);
  --color-border-soft:  rgba(26, 51, 26, 0.08);

  /* Tipografía */
  --font-serif:   'Playfair Display', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-display: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Century Gothic', 'Segoe UI', system-ui, sans-serif;

  /* Escala tipográfica (base 16px) */
  --fs-xs:   0.75rem;   /* 12 */
  --fs-sm:   0.875rem;  /* 14 */
  --fs-base: 1rem;      /* 16 */
  --fs-md:   1.125rem;  /* 18 */
  --fs-lg:   1.375rem;  /* 22 */
  --fs-xl:   1.75rem;   /* 28 */
  --fs-2xl:  2.25rem;   /* 36 */
  --fs-3xl:  clamp(2.5rem, 4.5vw, 3.75rem);   /* 40-60 */
  --fs-4xl:  clamp(3rem, 6vw, 5rem);          /* 48-80 */

  /* Espaciado */
  --max-w:      1200px;
  --max-w-narrow: 720px;
  --gap:        clamp(2rem, 5vw, 4rem);
  --section:    clamp(4rem, 10vw, 7rem);

  /* Forma & elevación */
  --radius:      16px;
  --radius-sm:   8px;
  --radius-pill: 999px;
  --shadow-sm:   0 2px 8px rgba(26, 51, 26, 0.06);
  --shadow:      0 8px 28px rgba(26, 51, 26, 0.12);
  --shadow-lg:   0 20px 60px rgba(26, 51, 26, 0.18);

  /* Motion */
  --ease:       cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.4s var(--ease);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
}

@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;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--lp-secundario);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- Contenedores ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Tipografía utilitaria ---- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: var(--fs-sm);
  color: var(--lp-secundario-dark);  /* AA 5.75:1 sobre crema */
  margin-bottom: 1rem;
}
/* Título editorial — Playfair Display italic (identidad imagen 3) */
.h-display {
  font-family: var(--font-serif);
  font-weight: 900;
  font-style: italic;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--lp-noche);
}
.h-display em {
  font-style: italic;
  color: var(--lp-secundario);
  font-weight: 900;
}
.h-display strong {
  font-style: italic;
  font-weight: 900;
  color: var(--lp-secundario);
}
/* Variante condensada para badges, strips y acentos estructurales */
.h-condensed {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--lp-noche);
}
.h-serif {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--lp-noche);
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--lp-dominante);
  color: var(--lp-crema);
  box-shadow: 0 6px 20px rgba(100, 107, 35, 0.28);
}
.btn--primary:hover {
  background: var(--lp-dominante-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(100, 107, 35, 0.38);
}
.btn--accent {
  background: var(--lp-secundario);
  color: var(--lp-crema);
  box-shadow: 0 6px 20px rgba(180, 98, 60, 0.28);
}
.btn--accent:hover {
  background: var(--lp-secundario-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(180, 98, 60, 0.38);
}
/* Botón WhatsApp inline para nav */
.btn--wa {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.36);
}
.btn--wa:hover {
  background: #1DA850;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.48);
}
.btn--ghost {
  background: transparent;
  color: var(--lp-noche);
  border-color: var(--lp-noche);
}
.btn--ghost:hover {
  background: var(--lp-noche);
  color: var(--lp-crema);
  transform: translateY(-2px);
}
.btn--light {
  background: var(--lp-crema);
  color: var(--lp-noche);
}
.btn--light:hover {
  background: var(--lp-blanco);
  transform: translateY(-2px);
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  background: var(--lp-noche);
  color: var(--lp-crema);
  padding: 8px 14px;
  z-index: 1000;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; }

/* ---- WhatsApp flotante ---- */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25D366;
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  z-index: 900;
  transition: var(--transition);
}
.wa-float:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
}
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

@media (max-width: 640px) {
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}

/* ---- Reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* =========================================================================
   SITE NAV — oliva noche, fijo, compartido con el ecosistema de marca
   ========================================================================= */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--lp-noche);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.35s ease, background 0.35s ease;
}
.site-nav.is-scrolled {
  background: #14231A;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.site-nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.site-nav__logo img {
  height: 100px;
  width: auto;
}
.site-nav__menu {
  display: none;
  flex: 1;
  justify-content: center;
}
.site-nav__menu ul {
  display: flex;
  gap: 2.75rem;
  align-items: center;
}
.site-nav__menu a {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 239, 227, 0.75);
  position: relative;
  padding-bottom: 6px;
  transition: color 0.25s ease;
}
.site-nav__menu a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--lp-secundario);
  transition: width 0.3s var(--ease);
}
.site-nav__menu a:hover,
.site-nav__menu a[aria-current="page"] {
  color: var(--lp-crema);
}
.site-nav__menu a:hover::after,
.site-nav__menu a[aria-current="page"]::after {
  width: 100%;
}

.site-nav__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.site-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 18px;
  min-height: 40px;
  background: #25D366;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.32);
}
.site-nav__cta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}
.site-nav__cta:hover {
  background: #1DA850;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.44);
}
.site-nav__burger {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
}
.site-nav__burger span {
  width: 100%;
  height: 1.5px;
  background: var(--lp-crema);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-nav__cta-label {
  display: inline;
}
@media (max-width: 520px) {
  .site-nav__cta { padding: 8px 12px; min-height: 38px; }
  .site-nav__cta-label { display: none; }
}

@media (min-width: 860px) {
  .site-nav { padding: 0 2.5rem; }
  .site-nav__menu { display: flex !important; }
  .site-nav__burger { display: none; }
}
@media (max-width: 859px) {
  .site-nav__menu.is-open {
    display: flex !important;
    position: fixed;
    top: 120px; left: 0; right: 0; bottom: 0;
    background: var(--lp-noche);
    padding: 2.5rem 2rem;
    flex-direction: column;
    overflow-y: auto;
    z-index: 199;
  }
  .site-nav__menu.is-open ul {
    flex-direction: column;
    gap: 1.75rem;
    align-items: flex-start;
    width: 100%;
  }
  .site-nav__menu.is-open a {
    font-size: 1.15rem;
    color: rgba(244, 239, 227, 0.9);
  }
}

/* =========================================================================
   FOOTER — compartido
   ========================================================================= */
.site-footer {
  background: var(--lp-noche);
  color: rgba(244, 239, 227, 0.75);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.site-footer h4 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lp-crema);
  margin-bottom: 1rem;
}
.site-footer a {
  color: rgba(244, 239, 227, 0.75);
  transition: color 0.25s ease;
}
.site-footer a:hover { color: var(--lp-secundario); }
.site-footer__logo img {
  height: 72px;
  width: auto;
  margin-bottom: 1rem;
}
.site-footer__bottom {
  border-top: 1px solid rgba(244, 239, 227, 0.12);
  padding-top: 1.5rem;
  text-align: center;
  font-size: var(--fs-sm);
  color: rgba(244, 239, 227, 0.55);
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
  }
}
