/* ==========================================================================
   Lavender Houses — hoja de estilo única
   Diseño: villa de lujo. Mucho aire, tipografía grande, la foto manda.
   ========================================================================== */

:root {
  /* Paleta: arena cálida, tinta profunda, y un lavanda muy contenido
     como guiño al apellido. La foto aporta el color, no la interfaz. */
  --ivory:        #FBF9F5;
  --sand:         #F2EDE4;
  --sand-deep:    #E4DCCE;
  --ink:          #1F1D1B;
  --ink-soft:     #55504A;
  --ink-faint:    #8A8378;
  --lavender:     #6B6382;
  --lavender-pale:#EDEAF2;
  --line:         #DED7C9;
  --white:        #FFFFFF;

  --serif: "Cormorant Garamond", "Hoefler Text", Garamond, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wide: 1240px;
  --text: 680px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* --- Tipografía ---------------------------------------------------------- */

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

h1 { font-size: clamp(2.9rem, 7vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.4rem;
}

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: var(--text);
}

p { margin: 0 0 1.3rem; max-width: var(--text); }

/* --- Estructura --------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 clamp(1.4rem, 5vw, 3.5rem);
}

section { padding: clamp(4.5rem, 11vh, 9rem) 0; }

.section-sand { background: var(--sand); }
.section-ink  { background: var(--ink); color: var(--ivory); }
.section-ink .lede,
.section-ink .eyebrow { color: rgba(251,249,245,0.66); }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* --- Barra superior ----------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,249,245,0.86);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.32rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--lavender); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.2rem);
  font-size: 0.83rem;
  letter-spacing: 0.06em;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}
.nav a:hover { color: var(--ink); }

/* Selector de idioma */
.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  padding: 0.4rem 0.72rem;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: inherit;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--ivory);
}

@media (max-width: 720px) {
  .nav .nav-link { display: none; }
}

/* --- Botones ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: var(--lavender); border-color: var(--lavender); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

.section-ink .btn-ghost { color: var(--ivory); border-color: rgba(251,249,245,0.4); }
.section-ink .btn-ghost:hover { background: var(--ivory); color: var(--ink); }

/* --- Marcos de foto ----------------------------------------------------- */
/* Los placeholders se ven intencionales, no roto. Al meter la foto real
   basta con poner el archivo en assets/img/ con el nombre documentado. */

.ph {
  position: relative;
  /* La foto entra por la variable --foto (la pone el JS cuando el archivo
     existe). Así el degradado de respaldo y cualquier velo encima conviven
     con la imagen, en vez de ser reemplazados. */
  background-image: var(--foto,
    linear-gradient(135deg, var(--sand-deep) 0%, var(--sand) 46%, var(--lavender-pale) 100%));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.ph::after {
  content: attr(data-ph);
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: rgba(251,249,245,0.82);
  border-top: 1px solid var(--line);
}

/* Cuando ya hay imagen real, escondemos la etiqueta */
.ph.has-img::after { display: none; }

.ph-hero    { aspect-ratio: 16 / 9;  min-height: 62vh; }
.ph-tall    { aspect-ratio: 3 / 4; }
.ph-wide    { aspect-ratio: 3 / 2; }
.ph-square  { aspect-ratio: 1 / 1; }

/* --- Portada ------------------------------------------------------------ */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(88vh, 820px);
  padding-bottom: clamp(2.5rem, 7vh, 5rem);
  color: var(--white);
  /* Velo pensado para fotos LUMINOSAS (alberca, arena, cielo): casi transparente
     arriba para no apagar la imagen, y bien oscuro abajo, que es donde va el
     texto. Sin esto el titular se pierde sobre una foto clara. */
  background-image:
    linear-gradient(180deg,
      rgba(20,18,16,0.28) 0%,
      rgba(20,18,16,0.16) 32%,
      rgba(20,18,16,0.68) 74%,
      rgba(20,18,16,0.90) 100%),
    var(--foto, linear-gradient(135deg, #7E8A93 0%, #A9A192 55%, #6B6382 100%));
  background-size: cover;
  background-position: center;
}

.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero h1 { color: var(--white); max-width: 16em; text-shadow: 0 2px 24px rgba(0,0,0,0.4); }
.hero .eyebrow { color: rgba(255,255,255,0.88); text-shadow: 0 1px 12px rgba(0,0,0,0.5); }
.hero .lede { color: rgba(255,255,255,0.94); margin-top: 1.6rem; text-shadow: 0 1px 16px rgba(0,0,0,0.45); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }
.hero .btn { background: var(--white); color: var(--ink); border-color: var(--white); }
.hero .btn:hover { background: var(--lavender); color: var(--white); border-color: var(--lavender); }
.hero .btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.hero .btn-ghost:hover { background: var(--white); color: var(--ink); }

/* --- Cintillo de credibilidad ------------------------------------------ */

.creds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.cred {
  background: var(--ivory);
  padding: 1.9rem 1.3rem;
  text-align: center;
}
.cred-n {
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1;
  display: block;
}
.cred-l {
  font-size: 0.64rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.6rem;
  display: block;
}

/* --- Rejillas ----------------------------------------------------------- */

.grid { display: grid; gap: clamp(1.4rem, 3vw, 2.6rem); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.stack-head { margin-bottom: clamp(2.2rem, 5vh, 3.6rem); }

/* --- Tarjeta de propiedad ---------------------------------------------- */

.prop {
  text-decoration: none;
  display: block;
  transition: transform 0.4s var(--ease);
}
.prop:hover { transform: translateY(-5px); }
.prop .ph { margin-bottom: 1.5rem; }
.prop h3 { margin-bottom: 0.4rem; }
.prop-meta {
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.prop p { color: var(--ink-soft); margin-top: 0.9rem; font-size: 0.97rem; }
.prop-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

/* --- Listas de servicio ------------------------------------------------- */

.feature { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.section-ink .feature { border-color: rgba(251,249,245,0.2); }
.feature h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.feature p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.section-ink .feature p { color: rgba(251,249,245,0.7); }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.66em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lavender);
}
.section-ink .ticks li { color: rgba(251,249,245,0.78); }

/* --- Recámaras ---------------------------------------------------------- */

.rooms { display: grid; gap: 1px; background: var(--line); }
.room {
  background: var(--ivory);
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.7rem 0.2rem;
}
.room-n {
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--ink-faint);
  line-height: 1;
}
.room-beds { font-size: 0.97rem; color: var(--ink-soft); }
.room-cap {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
.room-tag {
  display: inline-block;
  margin-left: 0.6rem;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
  border: 1px solid var(--lavender);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  vertical-align: 2px;
}
@media (max-width: 620px) {
  .room { grid-template-columns: 3rem 1fr; }
  .room-cap { grid-column: 2; }
}

/* --- Calculadora -------------------------------------------------------- */

.calc {
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(1.8rem, 4vw, 3rem);
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.2rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.calc-row:last-of-type { border-bottom: 0; }

.calc-label { font-size: 0.95rem; }
.calc-label small {
  display: block;
  color: var(--ink-faint);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.stepper { display: inline-flex; align-items: center; gap: 0.35rem; }
.stepper button {
  width: 2.3rem; height: 2.3rem;
  border: 1px solid var(--line);
  background: var(--ivory);
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.stepper button:hover:not(:disabled) { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.stepper button:disabled { opacity: 0.3; cursor: default; }
.stepper output {
  min-width: 3.2rem;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.7rem;
}

.calc-out {
  margin-top: 1.8rem;
  padding-top: 1.8rem;
  border-top: 2px solid var(--ink);
}
.calc-big {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.7rem);
  line-height: 1;
}
.calc-big small {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.7rem;
  font-weight: 500;
}
.calc-usd { color: var(--ink-faint); font-size: 0.95rem; margin-top: 0.5rem; }

.calc-lines {
  margin-top: 1.7rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.calc-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--line);
}
.calc-line:last-child { border-bottom: 0; }
.calc-line b { font-weight: 500; color: var(--ink); }

.calc-note {
  margin-top: 1.6rem;
  padding: 1.1rem 1.3rem;
  background: var(--lavender-pale);
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.calc-note strong { color: var(--ink); font-weight: 500; }

/* --- Reseñas ------------------------------------------------------------ */

.quote {
  border-left: 2px solid var(--lavender);
  padding-left: 1.6rem;
}
.quote blockquote {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.7vw, 1.42rem);
  line-height: 1.55;
  font-weight: 300;
}
.quote cite {
  font-style: normal;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.stars { color: var(--lavender); letter-spacing: 0.15em; font-size: 0.8rem; margin-bottom: 0.9rem; }

/* --- Galería ------------------------------------------------------------ */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}
.gallery .ph:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery .ph:nth-child(6) { grid-column: span 2; }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .ph:nth-child(1) { grid-column: span 2; grid-row: auto; }
}

/* --- Pie --------------------------------------------------------------- */

.footer { background: var(--ink); color: rgba(251,249,245,0.66); padding: clamp(3.5rem, 8vh, 6rem) 0 2.5rem; }
.footer a { color: var(--ivory); text-decoration: none; border-bottom: 1px solid rgba(251,249,245,0.3); }
.footer h3 { color: var(--ivory); margin-bottom: 1rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; }
.footer-base {
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(251,249,245,0.16);
  font-size: 0.76rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

/* --- Aparición al hacer scroll ----------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .prop:hover, .btn:hover { transform: none; }
}

/* --- Utilidades -------------------------------------------------------- */

.center { text-align: center; }
.center p, .center .lede { margin-inline: auto; }
.mt-l { margin-top: clamp(2rem, 4vh, 3rem); }
.small { font-size: 0.85rem; color: var(--ink-faint); }
[hidden] { display: none !important; }
