/* ==========================================================================
   LA RESERVA · Campestre Residencial — Hoja de estilos
   --------------------------------------------------------------------------
   ✏️ EDITAR AQUÍ PRIMERO: las "variables" de abajo controlan colores,
   tipografías y medidas de TODO el sitio. Cambia un valor y se actualiza
   en todas las secciones. (Ver GUIA_EDICION.md, paso 4.)
   ========================================================================== */

:root {
  /* Colores de marca */
  --verde:        #153c1a;   /* verde del logotipo */
  --verde-medio:  #2a5530;
  --arena:        #f4efe6;   /* fondo cálido de secciones alternas */
  --crema:        #fbf9f5;   /* fondo principal */
  --terracota:    #a8754b;   /* acento: madera / tierra del pórtico */
  --piedra:       #6f6a61;   /* texto secundario */
  --tinta:        #1d211c;   /* texto principal */
  --blanco:       #ffffff;

  /* Tipografías (todas del sistema: rápidas y sin servicios externos) */
  --fuente-titulos: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", Georgia, serif;
  --fuente-texto:   "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Medidas */
  --ancho-maximo: 1200px;
  --espacio-seccion: clamp(5rem, 10vw, 9rem);
  --radio: 4px;
  --transicion: 600ms cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--fuente-texto);
  font-size: 17px;
  line-height: 1.7;
  color: var(--tinta);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--fuente-titulos); font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0 0 1.1em; }

.contenedor { width: min(100% - 3rem, var(--ancho-maximo)); margin-inline: auto; }
.contenedor--estrecho { max-width: 820px; }

.saltar {
  position: absolute; left: -999px; top: 1rem; z-index: 100;
  background: var(--verde); color: var(--blanco); padding: .6rem 1rem;
}
.saltar:focus { left: 1rem; }

:focus-visible { outline: 2px solid var(--terracota); outline-offset: 3px; }

/* ---------- Botones ---------- */
.boton {
  display: inline-block;
  padding: .95rem 2rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radio);
  transition: background var(--transicion), color var(--transicion), border-color var(--transicion);
}
.boton--claro { background: var(--blanco); color: var(--verde); }
.boton--claro:hover { background: var(--arena); }
.boton--contorno { border-color: rgba(255,255,255,.7); color: var(--blanco); }
.boton--contorno:hover { background: rgba(255,255,255,.12); border-color: var(--blanco); }
.boton--menu { background: var(--verde); color: var(--blanco) !important; padding: .7rem 1.3rem; }
.boton--menu:hover { background: var(--verde-medio); }

/* ---------- Encabezado ---------- */
.encabezado {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--blanco);
  transition: background var(--transicion), box-shadow var(--transicion), color var(--transicion);
}
.encabezado__fila { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.encabezado.con-fondo {
  background: rgba(251, 249, 245, .96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(21, 60, 26, .08);
  color: var(--verde);
}
.marca { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.marca__emblema { width: 40px; height: 40px; }
.marca__emblema--oscuro { display: none; }
.encabezado.con-fondo .marca__emblema--claro { display: none; }
.encabezado.con-fondo .marca__emblema--oscuro { display: block; }
.marca__texto {
  font-weight: 600; font-size: .95rem; letter-spacing: .32em; text-transform: uppercase; line-height: 1.2;
}
.marca__texto small { display: block; font-weight: 400; font-size: .56rem; letter-spacing: .38em; opacity: .85; }

.menu { display: flex; align-items: center; gap: 1.9rem; }
.menu a {
  text-decoration: none; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  position: relative; padding: .3rem 0;
}
.menu a:not(.boton)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 350ms ease;
}
.menu a:not(.boton):hover::after,
.menu a.activo::after { transform: scaleX(1); }
.encabezado:not(.con-fondo) .boton--menu { background: transparent; border-color: rgba(255,255,255,.7); }

.hamburguesa {
  display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: inherit;
}
.hamburguesa span { display: block; width: 26px; height: 1.5px; background: currentColor; margin: 6px 0; transition: transform 300ms, opacity 300ms; }

/* ---------- Portada ---------- */
.portada {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center; color: var(--blanco);
  background: var(--verde) url("../img/aerea-atardecer.jpg") center / cover no-repeat;
}
.portada__velo {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 25, 12, .55) 0%, rgba(10, 25, 12, .25) 45%, rgba(10, 25, 12, .7) 100%);
}
.portada__contenido { position: relative; padding: 8rem 0 6rem; }
.portada__logo { width: min(360px, 70vw); margin: 0 auto 2.6rem; animation: entrar 1.4s ease both; }
.portada__titulo { font-size: clamp(2.2rem, 5.5vw, 4.2rem); font-style: italic; margin-bottom: 1.2rem; animation: entrar 1.4s .25s ease both; }
.portada__sub { max-width: 560px; margin: 0 auto 2.4rem; font-size: 1.08rem; opacity: .92; animation: entrar 1.4s .45s ease both; }
.portada__acciones { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; animation: entrar 1.4s .65s ease both; }
.portada__bajar {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(255,255,255,.7); border-radius: 14px;
}
.portada__bajar span {
  position: absolute; top: 8px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--blanco); border-radius: 2px; animation: deslizar 2s infinite;
}
@keyframes entrar { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes deslizar { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Secciones ---------- */
.seccion { padding: var(--espacio-seccion) 0; }
.seccion--arena { background: var(--arena); }
.seccion--verde { background: var(--verde); color: var(--blanco); }

.etiqueta {
  font-size: .74rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
  color: var(--terracota); margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: .9rem;
}
.etiqueta::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.etiqueta--clara { color: #d9b48f; }
.titulo { font-size: clamp(2rem, 4vw, 3.1rem); color: var(--verde); margin-bottom: 1.6rem; }
.titulo--claro { color: var(--blanco); }
.texto { color: var(--piedra); max-width: 560px; }
.texto--claro { color: rgba(255,255,255,.85); }

.encabezado-seccion { margin-bottom: 3.5rem; }
.encabezado-seccion--centro { text-align: center; }
.encabezado-seccion--centro .etiqueta { justify-content: center; }
.encabezado-seccion--centro .etiqueta::after { content: ""; width: 36px; height: 1px; background: currentColor; }
.encabezado-seccion--centro .texto { margin-inline: auto; }

.dos-columnas { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.dos-columnas--invertidas { grid-template-columns: 1.1fr 1fr; }

.foto-marco { margin: 0; position: relative; }
.foto-marco img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radio); }
.foto-marco::before {
  content: ""; position: absolute; inset: 1.4rem -1.4rem -1.4rem 1.4rem;
  border: 1px solid var(--terracota); border-radius: var(--radio); z-index: -1; opacity: .5;
}
.seccion--verde .foto-marco::before { border-color: #d9b48f; }
.seccion, .contacto { position: relative; isolation: isolate; }

/* ---------- Cifras ---------- */
.cifras {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid rgba(21, 60, 26, .15);
}
.cifra { padding: 2.2rem 1rem 0; text-align: center; }
.cifra + .cifra { border-left: 1px solid rgba(21, 60, 26, .15); }
.cifra strong { display: block; font-family: var(--fuente-titulos); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.2rem); color: var(--verde); line-height: 1.1; }
.cifra small { font-size: .45em; margin-left: .15em; }
.cifra span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--piedra); }

/* ---------- Amenidades ---------- */
.destacado { position: relative; margin-bottom: 3rem; border-radius: var(--radio); overflow: hidden; }
.destacado img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; transition: transform 1.2s ease; }
.destacado:hover img { transform: scale(1.03); }
.destacado__texto {
  position: absolute; inset: auto 0 0 0; padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(0deg, rgba(10, 25, 12, .85), transparent);
  color: var(--blanco);
}
.destacado__texto h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: .5rem; }
.destacado__texto p { max-width: 620px; margin: 0; opacity: .9; }

.rejilla-amenidades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.amenidad {
  background: var(--crema); padding: 2.2rem 2rem; border-radius: var(--radio);
  border: 1px solid rgba(21, 60, 26, .08);
  transition: transform 400ms ease, box-shadow 400ms ease;
}
.amenidad:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(21, 60, 26, .35); }
.amenidad svg { width: 44px; height: 44px; fill: none; stroke: var(--terracota); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1.2rem; }
.amenidad h3 { font-size: 1.35rem; color: var(--verde); margin-bottom: .5rem; }
.amenidad p { color: var(--piedra); font-size: .95rem; margin: 0; }

/* ---------- Galería ---------- */
.galeria { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px; gap: 1rem; }
.galeria__item { padding: 0; border: 0; cursor: zoom-in; overflow: hidden; border-radius: var(--radio); background: var(--arena); }
.galeria__item--grande { grid-column: span 2; grid-row: span 2; }
.galeria__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease, filter 600ms ease; }
.galeria__item:hover img { transform: scale(1.05); filter: brightness(1.05); }

.visor {
  position: fixed; inset: 0; z-index: 200; background: rgba(8, 16, 9, .94);
  display: grid; place-items: center; padding: 4rem 1.5rem;
}
.visor[hidden] { display: none; }
.visor img { max-height: 85vh; width: auto; border-radius: var(--radio); }
.visor__cerrar {
  position: absolute; top: 1.2rem; right: 1.5rem; background: none; border: 0;
  color: var(--blanco); font-size: 2.6rem; line-height: 1; cursor: pointer;
}

/* ---------- Seguridad ---------- */
.lista-check { list-style: none; padding: 0; margin: 0; }
.lista-check li {
  position: relative; padding: .75rem 0 .75rem 2.2rem;
  border-bottom: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.82);
}
.lista-check li::before {
  content: ""; position: absolute; left: 0; top: 1.25rem; width: 14px; height: 7px;
  border-left: 1.5px solid #d9b48f; border-bottom: 1.5px solid #d9b48f; transform: rotate(-45deg);
}
.lista-check strong { color: var(--blanco); font-weight: 600; }

/* ---------- Código de Vida ---------- */
.principios {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(21, 60, 26, .15); border-left: 1px solid rgba(21, 60, 26, .15);
}
.principios li {
  padding: 2.4rem 1.6rem; font-family: var(--fuente-titulos); font-size: 1.45rem; color: var(--verde);
  border-right: 1px solid rgba(21, 60, 26, .15); border-bottom: 1px solid rgba(21, 60, 26, .15);
  transition: background 400ms ease;
}
.principios li:hover { background: var(--arena); }
.principios span { display: block; font-family: var(--fuente-texto); font-size: .72rem; letter-spacing: .25em; color: var(--terracota); margin-bottom: .6rem; }

.lista-simple { padding-left: 1.1rem; color: var(--piedra); margin: 0; }
.lista-simple li { margin-bottom: .55rem; }
.lista-simple li::marker { color: var(--terracota); }

/* ---------- Proceso ---------- */
.pasos {
  list-style: none; padding: 0; margin: 0; counter-reset: paso;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1rem; position: relative;
}
.pasos::before {
  content: ""; position: absolute; top: 22px; left: 7%; right: 7%; height: 1px; background: rgba(21, 60, 26, .2);
}
.pasos li { counter-increment: paso; text-align: center; position: relative; }
.pasos li::before {
  content: counter(paso); display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 1.2rem;
  border-radius: 50%; background: var(--crema); border: 1px solid var(--verde); color: var(--verde);
  font-family: var(--fuente-titulos); font-size: 1.1rem; position: relative;
}
.pasos h3 { font-size: 1.1rem; color: var(--verde); margin-bottom: .4rem; }
.pasos p { font-size: .86rem; color: var(--piedra); margin: 0; line-height: 1.55; }

/* ---------- Preguntas ---------- */
.acordeon details { border-bottom: 1px solid rgba(21, 60, 26, .15); }
.acordeon summary {
  list-style: none; cursor: pointer; padding: 1.4rem 2.5rem 1.4rem 0; position: relative;
  font-family: var(--fuente-titulos); font-size: 1.25rem; color: var(--verde);
}
.acordeon summary::-webkit-details-marker { display: none; }
.acordeon summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--fuente-texto); font-weight: 300; font-size: 1.6rem; color: var(--terracota); transition: transform 300ms;
}
.acordeon details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.acordeon details p { color: var(--piedra); padding-bottom: 1.2rem; margin: 0; }

/* ---------- Contacto ---------- */
.contacto {
  color: var(--blanco); text-align: center; padding: clamp(7rem, 14vw, 11rem) 0;
  background: var(--verde) url("../img/terraza-vista.jpg") center 35% / cover no-repeat;
}
.contacto__velo { position: absolute; inset: 0; background: rgba(12, 30, 14, .62); z-index: -1; }
.contacto .etiqueta { justify-content: center; }
.contacto .etiqueta::after { content: ""; width: 36px; height: 1px; background: currentColor; }
.contacto .texto { margin-inline: auto; }
.contacto__acciones { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 2.4rem 0 2rem; }
.contacto__ubicacion { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; opacity: .8; margin: 0; }

/* ---------- Pie ---------- */
.pie { background: #0f2b13; color: rgba(255,255,255,.75); padding: 4rem 0 2rem; font-size: .88rem; }
.pie__fila { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.pie__logo { width: 170px; }
.pie__enlaces { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.pie__enlaces a { text-decoration: none; letter-spacing: .1em; text-transform: uppercase; font-size: .74rem; }
.pie__enlaces a:hover { color: var(--blanco); }
.pie__legal { padding-top: 1.8rem; font-size: .78rem; opacity: .7; }
.pie__legal p { margin-bottom: .4rem; }

/* ---------- Animación al hacer scroll ---------- */
.js .aparece { opacity: 0; transform: translateY(28px); transition: opacity 900ms ease, transform 900ms ease; }
.js .aparece.visible { opacity: 1; transform: none; }

/* ---------- Página interior (aviso de privacidad) ---------- */
.interior { padding: 9rem 0 6rem; }
.interior h1 { font-size: clamp(2rem, 4vw, 3rem); color: var(--verde); margin-bottom: 2rem; }
.interior h2 { font-size: 1.4rem; color: var(--verde); margin: 2.2rem 0 .8rem; }
.interior p, .interior li { color: var(--piedra); }
.aviso-pendiente { background: var(--arena); border-left: 3px solid var(--terracota); padding: 1rem 1.3rem; }

/* ==========================================================================
   Celular y tableta
   ========================================================================== */
@media (max-width: 1080px) {
  .pasos { grid-template-columns: repeat(4, 1fr); row-gap: 2.5rem; }
  .pasos::before { display: none; }
  .principios { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .hamburguesa { display: block; }
  .menu {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 1.6rem;
    background: var(--verde); color: var(--blanco);
    opacity: 0; visibility: hidden; transition: opacity 400ms ease, visibility 400ms;
  }
  .menu a { font-size: .95rem; }
  .menu.abierto { opacity: 1; visibility: visible; }
  .menu .boton--menu { background: var(--blanco); color: var(--verde) !important; border: 0; margin-top: 1rem; }
  body.menu-abierto { overflow: hidden; }
  body.menu-abierto .encabezado { color: var(--blanco); background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.menu-abierto .marca__emblema--claro { display: block !important; }
  body.menu-abierto .marca__emblema--oscuro { display: none !important; }
  .hamburguesa[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .hamburguesa[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .hamburguesa[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .dos-columnas, .dos-columnas--invertidas { grid-template-columns: 1fr; }
  .dos-columnas--invertidas .foto-marco { order: 2; }
  .foto-marco::before { inset: 1rem -.8rem -1rem .8rem; }
  .rejilla-amenidades { grid-template-columns: repeat(2, 1fr); }
  .cifras { grid-template-columns: repeat(2, 1fr); }
  .cifra:nth-child(3) { border-left: 0; }
  .galeria { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .destacado img { aspect-ratio: 4 / 3; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .marca__texto { font-size: .82rem; letter-spacing: .26em; }
  .rejilla-amenidades { grid-template-columns: 1fr; }
  .pasos { grid-template-columns: repeat(2, 1fr); }
  .principios li { font-size: 1.15rem; padding: 1.6rem 1.1rem; }
  .galeria { grid-template-columns: 1fr; grid-auto-rows: 230px; }
  .galeria__item--grande { grid-column: auto; grid-row: auto; }
  .boton { width: 100%; text-align: center; }
  .portada__acciones, .contacto__acciones { flex-direction: column; }
  .pie__fila { flex-direction: column; align-items: flex-start; }
}

/* Accesibilidad: respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .aparece { opacity: 1; transform: none; }
}
