/* Landing de propiedad · Sierramar Inmobiliaria
   Colores y tipografía de marca. Para otra propiedad no hace falta tocar este archivo. */

:root {
  --tinta: #18292B;        /* texto: gris petróleo derivado del teal de marca */
  --tinta-suave: #4E5F61;
  --teal: #138C98;         /* teal de títulos (paleta de Lucía) */
  --turquesa: #43D9E7;     /* acento de marca, solo foco y detalles */
  --piedra: #EEF2F1;       /* fondo de la sección de amenidades */
  --linea: #D3DCDB;
  --blanco: #FFFFFF;
  --margen: clamp(18px, 4.5vw, 64px);
  --ancho-texto: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { display: block; max-width: 100%; }
p, h1, h2, dl, dd, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--turquesa); outline-offset: 3px; }

.titulo {
  font-weight: 300;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--teal);
}

/* ---------- Encabezado ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  color: var(--blanco);
  background: var(--tinta);
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__velo {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 22, 24, .45) 0%, rgba(10, 22, 24, 0) 22%),
    linear-gradient(to top, rgba(10, 22, 24, .62) 0%, rgba(10, 22, 24, 0) 48%);
}
.hero__barra {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(16px, 2.6vw, 30px) var(--margen);
}
.marca { color: inherit; text-decoration: none; }
.marca__texto { font-weight: 500; font-size: .95rem; letter-spacing: .02em; }
.marca__logo { height: clamp(68px, 7vw, 104px); width: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .25)); }
.hero__recorrido {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .95rem; font-weight: 500; color: var(--blanco);
  padding: .35rem 0;
}
.hero__recorrido svg { width: 34px; height: 34px; transition: transform .25s ease; }
.hero__recorrido:hover svg { transform: scale(1.08); }

.hero__texto {
  position: absolute; left: var(--margen); right: var(--margen);
  bottom: clamp(88px, 11vh, 120px);
}
.hero h1 {
  font-weight: 200;
  font-size: clamp(3rem, 8.2vw, 8rem);
  line-height: .95;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero__texto p {
  margin-top: 1.1rem;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 400;
  max-width: 30rem;
}
/* El único movimiento automático: el nombre aparece al cargar */
@media (prefers-reduced-motion: no-preference) {
  .hero__texto { animation: aparecer 1.4s cubic-bezier(.2, .7, .2, 1) .2s both; }
  @keyframes aparecer { from { opacity: 0; transform: translateY(18px); } }
}

/* ---------- Tres datos grandes ---------- */
.datos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--linea);
}
.dato {
  padding: clamp(36px, 6vw, 84px) clamp(18px, 2.6vw, 40px) clamp(32px, 5vw, 64px);
}
.dato:first-child { padding-left: var(--margen); }
.dato + .dato { border-left: 1px solid var(--linea); }
.dato__valor {
  font-weight: 200;
  font-size: clamp(2.2rem, 4.4vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.dato__etiqueta {
  margin-top: .9rem;
  font-size: .95rem;
  color: var(--tinta-suave);
}

/* ---------- Introducción, precio y ficha ---------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 8vw, 140px);
  padding: clamp(64px, 10vw, 150px) var(--margen);
}
.intro__texto p {
  max-width: var(--ancho-texto);
  font-weight: 300;
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  line-height: 1.55;
}
.intro__texto p + p { margin-top: 1.2em; }

.precio { padding-bottom: 1.6rem; border-bottom: 1px solid var(--tinta); }
.precio__etiqueta { font-size: .9rem; color: var(--tinta-suave); }
.precio__valor {
  font-weight: 300;
  font-size: clamp(2rem, 3vw, 2.6rem);
  letter-spacing: -0.01em;
  color: var(--teal);
  line-height: 1.2;
}
.precio__nota { margin-top: .3rem; font-size: .9rem; color: var(--tinta-suave); }

.ficha > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--linea);
  font-size: .93rem;
}
.ficha dt { color: var(--tinta-suave); }
.ficha dd { font-weight: 500; }

/* ---------- Fotos ---------- */
.foto__abrir {
  display: block; width: 100%;
  overflow: hidden;
  background: var(--piedra);
  cursor: zoom-in;
}
.foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.foto__abrir:hover img { transform: scale(1.025); }
.foto figcaption {
  margin-top: .7rem;
  font-size: .88rem;
  color: var(--tinta-suave);
}
.foto--ancha .foto__abrir { aspect-ratio: 16 / 9; max-height: 92vh; }
.foto--ancha figcaption { padding: 0 var(--margen); }
.foto--par .foto__abrir { aspect-ratio: 4 / 3; }
.foto--vertical .foto__abrir { aspect-ratio: 3 / 4; }
.foto--tercio .foto__abrir { aspect-ratio: 4 / 3; }

/* ---------- Galería ---------- */
.galeria { padding-bottom: clamp(64px, 9vw, 130px); }
.galeria .titulo { padding: 0 var(--margen) clamp(28px, 4vw, 48px); }
.galeria__fila + .galeria__fila { margin-top: clamp(40px, 6vw, 88px); }
.galeria__fila--par {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 28px);
  padding: 0 var(--margen);
}

/* ---------- Amenidades ---------- */
.amenidades {
  background: var(--piedra);
  padding: clamp(64px, 9vw, 130px) var(--margen);
}
.amenidades__principal {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 7vw, 120px);
  align-items: end;
}
.amenidades__intro {
  margin-top: 1.2rem;
  max-width: 26rem;
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.55;
}
.amenidades__lista {
  margin-top: 2.2rem;
  columns: 2;
  column-gap: 2.5rem;
}
.amenidades__lista li {
  break-inside: avoid;
  padding: .8rem 0;
  border-top: 1px solid var(--linea);
  font-weight: 500;
  font-size: .95rem;
}
.amenidades__fotos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 28px);
  margin-top: clamp(40px, 6vw, 88px);
}

/* ---------- Ubicación ---------- */
.ubicacion { padding: clamp(64px, 9vw, 130px) 0; }
.ubicacion__cuerpo {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 7vw, 120px);
  padding: clamp(48px, 7vw, 100px) var(--margen) 0;
}
.ubicacion__direccion { margin-top: 1.2rem; font-weight: 300; font-size: 1.2rem; }
.ubicacion__puntos { margin: 1.6rem 0 2rem; }
.ubicacion__puntos li { padding: .8rem 0; border-top: 1px solid var(--linea); font-weight: 500; font-size: .95rem; }
.ubicacion__puntos li:last-child { border-bottom: 1px solid var(--linea); }
.enlace { color: var(--teal); font-weight: 500; text-underline-offset: .25em; }
.ubicacion__mapa { aspect-ratio: 4 / 3; background: var(--piedra); }
.ubicacion__mapa iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.35); }

/* ---------- Pie ---------- */
.pie {
  border-top: 1px solid var(--linea);
  padding: 48px var(--margen) 120px;
  font-size: .88rem;
  color: var(--tinta-suave);
}
.pie__marca { color: var(--tinta); margin-bottom: .8rem; }
.pie__marca .marca__logo { height: 96px; filter: none; }
.pie p + p { margin-top: .4rem; }
.pie__aviso { max-width: 40rem; }

/* ---------- Botón fijo de WhatsApp ---------- */
.whatsapp {
  position: fixed; z-index: 20;
  right: clamp(16px, 2.5vw, 32px);
  bottom: calc(clamp(16px, 2.5vw, 32px) + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .95rem 1.5rem .95rem 1.2rem;
  border-radius: 999px;
  background: var(--teal);
  color: var(--blanco);
  font-weight: 600; font-size: .98rem;
  text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(19, 140, 152, .65);
  transition: background .2s ease, transform .2s ease;
}
.whatsapp:hover { background: #0F7A85; transform: translateY(-1px); }
.whatsapp svg { width: 24px; height: 24px; flex: none; }
.whatsapp__corto { display: none; }

/* ---------- Visor de fotos y recorrido ---------- */
dialog { padding: 0; border: 0; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(8, 16, 17, .94); }
.visor, .recorrido {
  width: 100vw; height: 100vh; height: 100dvh;
  background: transparent; color: var(--blanco);
}
.visor[open], .recorrido[open] { display: grid; place-items: center; }
.visor figure { width: 100%; height: 100vh; height: 100dvh; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 56px 72px 24px; }
.visor img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.visor figcaption { display: flex; justify-content: space-between; gap: 1rem; padding-top: 14px; font-size: .9rem; opacity: .85; }
.visor__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; font-size: 2.6rem; line-height: 1; font-weight: 200; color: var(--blanco);
}
.visor__nav--ant { left: 8px; }
.visor__nav--sig { right: 8px; }
.cerrar {
  position: absolute; top: 10px; right: 14px; z-index: 2;
  width: 48px; height: 48px; font-size: 2.2rem; font-weight: 200; line-height: 1; color: var(--blanco);
}
.recorrido video { width: min(100vw - 32px, 1600px); max-height: calc(100dvh - 96px); background: #000; }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .intro, .amenidades__principal, .ubicacion__cuerpo { grid-template-columns: 1fr; }
  .intro__ficha { max-width: 32rem; }
  .amenidades__principal .foto--vertical { max-width: 30rem; }
}

/* ---------- Celular ---------- */
@media (max-width: 700px) {
  .datos { grid-template-columns: 1fr; }
  .dato, .dato:first-child { padding: 24px var(--margen); }
  .dato + .dato { border-left: 0; border-top: 1px solid var(--linea); }
  .dato__valor { font-size: clamp(2rem, 9vw, 2.6rem); }
  .dato__etiqueta { margin-top: .4rem; font-size: .9rem; }
  .galeria__fila--par, .amenidades__fotos { grid-template-columns: 1fr; }
  .foto--ancha .foto__abrir { aspect-ratio: 4 / 3; }
  .amenidades__lista { columns: 1; }
  .ficha > div { grid-template-columns: 8.2rem 1fr; gap: .75rem; font-size: .9rem; }
  .whatsapp {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    justify-content: center; padding: 1rem;
  }
  .whatsapp__largo { display: none; }
  .whatsapp__corto { display: inline; }
  .hero__recorrido span { display: none; }
  .visor figure { padding: 56px 12px 20px; }
  .visor__nav { top: auto; bottom: 6px; transform: none; }
  .visor figcaption { padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .foto img, .hero__recorrido svg, .whatsapp { transition: none; }
}
