/* ==========================================================
   TOKENS
   Paleta "lujo clásico": negro casi puro + beige cálido + blanco,
   con un acento dorado apagado (bronce muy sobrio) para detalles
   pequeños — nada de colores llamativos.
   Tipografía: Fraunces (display, con carácter) + Inter (cuerpo)
   + IBM Plex Mono (datos técnicos, ficha de especificaciones).
   ========================================================== */
:root {
  --ink: #121212;
  --ink-soft: #1c1c1c;
  --stone: #e9e2d3;
  --stone-soft: #f6f2e8;
  --ivory: #faf8f4;
  --gold: #9c8557;
  --gold-light: #c2ab7d;
  --charcoal: #2b2b2b;
  --text-on-ink: #f7f5f0;
  --text-on-stone: #1a1a1a;
  --text-muted-ink: #b3aea3;
  --text-muted-stone: #62594a;
  --line-on-ink: rgba(247, 245, 240, 0.14);
  --line-on-stone: rgba(26, 26, 26, 0.14);

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --container: 1180px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================
   RESET
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--stone-soft);
  color: var(--text-on-stone);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.1; }
p { margin: 0; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--ink { background: var(--ink); color: var(--text-on-ink); }
.section--stone { background: var(--stone); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.section__head { max-width: 640px; margin-bottom: 48px; }
.section__head h2 { font-size: clamp(28px, 3.2vw, 40px); margin-top: 12px; }
.section__head p { margin-top: 14px; color: var(--text-muted-stone); font-size: 17px; }
.section--ink .section__head p { color: var(--text-muted-ink); }

/* ==========================================================
   BOTONES
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--gold); color: var(--ink); }
.btn--primary:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn--ghost-ink { border: 1px solid var(--line-on-ink); color: var(--text-on-ink); }
.btn--ghost-ink:hover { border-color: var(--gold); color: var(--gold-light); }
.btn--ghost-stone { border: 1px solid var(--line-on-stone); color: var(--text-on-stone); }
.btn--ghost-stone:hover { border-color: var(--charcoal); color: var(--charcoal); }
.btn--block { width: 100%; }

/* ==========================================================
   NAV
   ========================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  background: linear-gradient(to bottom, rgba(20, 24, 26, 0.85), transparent);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-on-ink); }
.brand__mark {
  width: 36px; height: 36px;
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--gold-light);
}
.brand__name { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.01em; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a { font-size: 14px; color: var(--text-on-ink); opacity: 0.85; }
.site-nav a:hover { opacity: 1; color: var(--gold-light); }
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-on-ink);
  color: var(--text-on-ink);
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0 0 0 auto;
    width: min(78vw, 320px);
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 32px;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav a { font-size: 18px; padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line-on-ink); }
}

/* ==========================================================
   HERO — la tesis: precisión de plano + fotografía real
   ========================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  color: var(--text-on-ink);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background: url("assets/img/fachada.jpeg") center/cover no-repeat;
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--ink) 8%, rgba(20,24,26,0.55) 45%, rgba(20,24,26,0.35) 100%);
}
.hero__content {
  position: relative;
  width: 100%;
  padding: 160px 0 64px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
}
.hero__title {
  font-size: clamp(38px, 6vw, 68px);
  letter-spacing: -0.01em;
}
.hero__title em { font-style: italic; color: var(--gold-light); }
.hero__sub {
  margin-top: 20px;
  max-width: 480px;
  font-size: 17px;
  color: var(--text-muted-ink);
}
.hero__cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

/* franja de datos estilo "anotación de plano" */
.hero__specstrip {
  border-left: 1px solid var(--line-on-ink);
  padding-left: 28px;
  display: grid;
  gap: 18px;
  font-family: var(--font-mono);
}
.hero__specstrip div { display: flex; justify-content: space-between; font-size: 13px; }
.hero__specstrip dt { color: var(--text-muted-ink); text-transform: uppercase; letter-spacing: 0.08em; }
.hero__specstrip dd { margin: 0; color: var(--gold-light); }

@media (max-width: 860px) {
  .hero__content { grid-template-columns: 1fr; padding-top: 130px; }
  .hero__specstrip { border-left: none; border-top: 1px solid var(--line-on-ink); padding-left: 0; padding-top: 20px; }
}

/* ==========================================================
   TRUST STRIP
   ========================================================== */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-on-stone);
  border-bottom: 1px solid var(--line-on-stone);
}
.trust-strip__item {
  padding: 28px 24px;
  border-right: 1px solid var(--line-on-stone);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted-stone);
}
.trust-strip__item:last-child { border-right: none; }
.trust-strip__item strong { display: block; font-family: var(--font-body); font-size: 15px; color: var(--text-on-stone); margin-bottom: 4px; }
@media (max-width: 760px) {
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-strip__item:nth-child(2) { border-right: none; }
}

/* ==========================================================
   PROPIEDADES — "ficha técnica" como elemento firma
   ========================================================== */
.properties-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .properties-grid { grid-template-columns: 1fr; } }

.property-card {
  background: var(--stone-soft);
  border: 1px solid var(--line-on-stone);
}
.property-card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.property-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.property-card:hover .property-card__media img { transform: scale(1.04); }
.property-card__code {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  background: var(--ink); color: var(--gold-light);
  padding: 6px 10px;
}
.property-card__body { padding: 28px; }
.property-card__zona { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--charcoal); }
.property-card__nombre { font-size: 24px; margin-top: 8px; }
.property-card__resumen { margin-top: 12px; color: var(--text-muted-stone); font-size: 15px; }

.spec-plate {
  margin: 22px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line-on-stone);
  border-bottom: 1px solid var(--line-on-stone);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px;
}
.spec-plate div { display: flex; flex-direction: column; }
.spec-plate dt { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted-stone); }
.spec-plate dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 15px; color: var(--text-on-stone); }

.property-card__diff { display: grid; gap: 8px; margin-bottom: 22px; }
.property-card__diff li {
  font-size: 14px;
  padding-left: 16px;
  position: relative;
  color: var(--text-muted-stone);
}
.property-card__diff li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 6px; height: 1px; background: var(--gold);
}

.property-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.property-card__price { font-family: var(--font-mono); font-size: 15px; color: var(--charcoal); }

/* ==========================================================
   GALERÍA (con modo Día / Noche)
   ========================================================== */
.gallery-section { transition: background 0.5s var(--ease), color 0.5s var(--ease); }
.gallery-section.is-night-mode { background: var(--ink); color: var(--text-on-ink); }
.gallery-section.is-night-mode .eyebrow { color: var(--gold-light); }
.gallery-section.is-night-mode .section__head p { color: var(--text-muted-ink); }
.gallery-section.is-night-mode .gallery-toggle { border-color: var(--line-on-ink); }
.gallery-section.is-night-mode .gallery-toggle__btn { color: var(--text-muted-ink); }
.gallery-section.is-night-mode .gallery-toggle__btn.is-active { background: var(--gold); color: var(--ink); }

.gallery-toggle {
  display: inline-flex;
  gap: 4px;
  margin-top: 22px;
  padding: 4px;
  border: 1px solid var(--line-on-stone);
  border-radius: var(--radius);
}
.gallery-toggle__btn {
  padding: 9px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted-stone);
  border-radius: var(--radius);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.gallery-toggle__btn.is-active { background: var(--ink); color: var(--gold-light); }

.gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(560px, 88vw);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.gallery-item { scroll-snap-align: start; position: relative; }
.gallery-item img { aspect-ratio: 4/3; object-fit: cover; cursor: zoom-in; }
.gallery-item figcaption {
  position: absolute; bottom: 10px; left: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  background: rgba(20,24,26,0.72); color: var(--ivory); padding: 4px 8px;
}

/* por defecto se muestran las fotos de día; el toggle alterna la clase is-night en el track */
.gallery-item--night { display: none; }
.gallery-track.is-night .gallery-item--day { display: none; }
.gallery-track.is-night .gallery-item--night { display: block; }
.gallery-item--night figcaption { background: rgba(156, 133, 87, 0.9); color: var(--ink); }

/* flechas de navegación (efecto carrusel) */
.gallery-wrap { position: relative; }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--ivory);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.gallery-nav:hover { background: var(--gold); color: var(--ink); }
.gallery-nav:active { transform: translateY(-50%) scale(0.94); }
.gallery-nav--prev { left: 8px; }
.gallery-nav--next { right: 8px; }
@media (max-width: 640px) {
  .gallery-nav { width: 38px; height: 38px; font-size: 18px; }
}

/* lightbox: foto ampliada al hacer click */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.lightbox__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(247, 245, 240, 0.12);
  color: var(--ivory);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s var(--ease);
}
.lightbox__close:hover { background: var(--gold); color: var(--ink); }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(247, 245, 240, 0.12);
  color: var(--ivory);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s var(--ease);
}
.lightbox__nav:hover { background: var(--gold); color: var(--ink); }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }
@media (max-width: 640px) {
  .lightbox { padding: 12px; }
  .lightbox__nav { width: 40px; height: 40px; font-size: 19px; }
  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }
  .lightbox__close { top: 10px; right: 10px; width: 38px; height: 38px; }
}

/* ==========================================================
   RECORRE LA CASA (VIDEOS)
   ========================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
  justify-content: center;
  gap: 24px;
}
@media (max-width: 640px) {
  .video-grid { grid-template-columns: min(720px, 90vw); }
}
.video-item { background: var(--stone-soft); border: 1px solid var(--line-on-stone); }
.video-item video {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--ink);
  display: block;
}
.video-item figcaption {
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted-stone);
}

/* ==========================================================
   PROCESO (numeración real: son pasos en orden)
   ========================================================== */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 900px) { .process-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process-steps { grid-template-columns: 1fr; } }
.process-step { border-top: 1px solid var(--line-on-ink); padding-top: 18px; }
.process-step__num { font-family: var(--font-mono); color: var(--gold); font-size: 13px; }
.process-step h3 { font-size: 18px; margin-top: 10px; }
.process-step p { margin-top: 8px; font-size: 14px; color: var(--text-muted-ink); }

/* ==========================================================
   UBICACIÓN
   ========================================================== */
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .location-grid { grid-template-columns: 1fr; } }
.location-map { aspect-ratio: 4/3; border: 1px solid var(--line-on-stone); overflow: hidden; }
.location-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.3) contrast(1.05); }
.location-list { display: grid; gap: 14px; }
.location-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line-on-stone); font-size: 15px; }
.location-list span:last-child { font-family: var(--font-mono); color: var(--text-muted-stone); font-size: 13px; }

/* ==========================================================
   FORMULARIO DE CALIFICACIÓN
   ========================================================== */
.qualify {
  background: var(--ink);
  color: var(--text-on-ink);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .qualify { grid-template-columns: 1fr; } }
.qualify__form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted-ink); }
.field select, .field input {
  background: var(--ink-soft);
  border: 1px solid var(--line-on-ink);
  color: var(--text-on-ink);
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  border-radius: var(--radius);
}
.field select:focus, .field input:focus { border-color: var(--gold); }

.qualify__note { margin-top: 14px; font-size: 13px; color: var(--text-muted-ink); }

/* ==========================================================
   FAQ
   ========================================================== */
.faq-list { display: grid; gap: 0; border-top: 1px solid var(--line-on-stone); }
.faq-item { border-bottom: 1px solid var(--line-on-stone); }
.faq-item__question {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 4px;
  font-size: 16px; font-weight: 600;
  text-align: left;
}
.faq-item__icon { font-family: var(--font-mono); color: var(--gold); transition: transform 0.25s var(--ease); }
.faq-item.is-open .faq-item__icon { transform: rotate(45deg); }
.faq-item__answer {
  max-height: 0; overflow: hidden;
  color: var(--text-muted-stone); font-size: 15px;
  transition: max-height 0.35s var(--ease), padding 0.35s var(--ease);
  padding: 0 4px;
}
.faq-item.is-open .faq-item__answer { max-height: 200px; padding: 0 4px 22px; }

/* ==========================================================
   CTA FINAL
   ========================================================== */
.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(30px, 4vw, 46px); max-width: 720px; margin: 14px auto 0; }
.final-cta__actions { margin-top: 32px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer { background: var(--ink); color: var(--text-muted-ink); padding: 56px 0 28px; }
.site-footer__top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; border-bottom: 1px solid var(--line-on-ink); padding-bottom: 32px; }
.site-footer__brand { color: var(--text-on-ink); max-width: 320px; }
.site-footer__brand p { margin-top: 10px; font-size: 14px; }
.site-footer__cols { display: flex; gap: 64px; flex-wrap: wrap; }
.site-footer__col h4 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 14px; }
.site-footer__col a, .site-footer__col span { display: block; font-size: 14px; margin-bottom: 10px; color: var(--text-muted-ink); }
.site-footer__col a:hover { color: var(--gold-light); }
.site-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 24px; font-size: 12px; }

/* ==========================================================
   REVEAL ON SCROLL
   ========================================================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================
   NÚMERO DE TELÉFONO VISIBLE (además del botón de WhatsApp)
   ========================================================== */
.phone-display {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold);
}
.phone-display:hover { color: var(--gold-light); }
.qualify .phone-display { color: var(--gold-light); font-weight: 600; }

/* ==========================================================
   AJUSTES MOBILE — menos apretado, galería más cómoda de ver
   ========================================================== */
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .section--tight { padding: 44px 0; }
  .container { padding: 0 18px; }
  .section__head { margin-bottom: 32px; }

  .property-card__body { padding: 20px; }
  .property-card__nombre { font-size: 21px; }
  .spec-plate { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }

  /* la galería muestra un "peek" de la siguiente foto, para que se note que hay más */
  .gallery-track { grid-auto-columns: 84vw; gap: 14px; }

  /* el toggle Día/Noche ocupa todo el ancho y se ve más claro para tocar */
  .gallery-toggle { display: flex; width: 100%; margin-top: 18px; }
  .gallery-toggle__btn { flex: 1; text-align: center; padding: 13px 10px; font-size: 12.5px; }

  .video-grid { gap: 16px; }
  .video-item figcaption { font-size: 11px; padding: 12px 14px; }

  .location-list li { font-size: 14px; padding: 10px 0; }
}

/* ==========================================================
   UTILIDADES
   ========================================================== */
.text-center { text-align: center; margin-left: auto; margin-right: auto; }
