/* ═══════════════════════════════════════════════════════════
   Casa Valle del Sol — hoja de estilo
   Paleta cálida residencial: arena, terracota, verde oliva.
   ═══════════════════════════════════════════════════════════ */

:root {
  --sand-50:  #faf6f1;
  --sand-100: #f3ece3;
  --sand-200: #e6dad0;
  --sand-300: #d4c3b4;

  --ink-900: #2a211b;
  --ink-700: #4a3c33;
  --ink-500: #6f5f53;

  --clay-600: #a85b3c;
  --clay-700: #8c4a30;
  --olive-600: #5f6b4a;

  --bg: var(--sand-50);
  --surface: #ffffff;
  --surface-alt: var(--sand-100);
  --text: var(--ink-900);
  --text-soft: var(--ink-500);
  --line: var(--sand-200);
  --accent: var(--clay-600);
  --accent-strong: var(--clay-700);
  --accent-contrast: #ffffff;

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1120px;
  --gutter: 20px;

  --shadow-sm: 0 1px 2px rgba(42,33,27,.06), 0 2px 8px rgba(42,33,27,.05);
  --shadow-md: 0 4px 12px rgba(42,33,27,.08), 0 12px 32px rgba(42,33,27,.08);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17120f;
    --surface: #211a16;
    --surface-alt: #2a211b;
    --text: #f5efe8;
    --text-soft: #c0b1a4;
    --line: #3a2e26;
    --accent: #d98a64;
    --accent-strong: #e5a383;
    --accent-contrast: #1a1310;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.4);
  }
}

:root[data-theme="dark"] {
  --bg: #17120f;
  --surface: #211a16;
  --surface-alt: #2a211b;
  --text: #f5efe8;
  --text-soft: #c0b1a4;
  --line: #3a2e26;
  --accent: #d98a64;
  --accent-strong: #e5a383;
  --accent-contrast: #1a1310;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-strong); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-contrast);
  padding: 12px 18px; z-index: 100; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ───────────────  PORTADA  ─────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
}

.hero__media { position: relative; background: var(--surface-alt); }
.hero__media img {
  width: 100%;
  height: 52vh;
  min-height: 300px;
  object-fit: cover;
}

.hero__panel {
  padding: 36px var(--gutter) 44px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.95rem, 5.8vw, 3rem);
  text-wrap: balance;
}

.hero__lead {
  margin: 0 0 24px;
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 46ch;
}

.price {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 600;
}

.price__note {
  margin: 6px 0 26px;
  font-size: .88rem;
  line-height: 1.5;
  max-width: 48ch;
  color: var(--text-soft);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ───────────────  BOTONES  ─────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 19px; height: 19px; fill: currentColor; flex: none; }

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn--primary:hover { background: var(--accent-strong); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

.btn--big { padding: 17px 30px; font-size: 1.05rem; }

/* ───────────────  DATOS RÁPIDOS  ─────────────── */

.quickfacts {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px var(--gutter);
}

.quickfacts dl {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 20px 16px;
}

.quickfacts div { text-align: center; }

.quickfacts dt {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 3px;
}

.quickfacts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.quickfacts dd span {
  display: block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-soft);
}

/* ───────────────  SECCIONES  ─────────────── */

main > section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-block: clamp(22px, 2.5vw, 32px);
  padding-inline: var(--gutter);
}

.section-head { margin-bottom: 28px; max-width: 58ch; }
.section-head h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.1rem); }
.section-head p { margin: 0; color: var(--text-soft); }

.prose h2 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

/* El texto llena el ancho de la sección igual que las demás. Para que
   las líneas no queden larguísimas, en pantallas anchas va a dos
   columnas: calza a izquierda y derecha, y cada columna conserva una
   medida de lectura cómoda. */
.prose p { margin: 0 0 16px; text-align: justify; hyphens: auto; }
.prose p:last-child { margin-bottom: 0; }

.prose__cols { orphans: 2; widows: 2; }

@media (min-width: 880px) {
  .prose__cols { columns: 2; column-gap: 46px; }
}

/* .prose p gana por especificidad, así que la nota se desmarca aquí */
.prose p.prose__aside {
  text-align: left;
  margin-top: 34px;
  padding: 18px 20px;
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .95rem;
  color: var(--text-soft);
}

/* ───────────────  CARRUSEL  ─────────────── */

.carousel__stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-alt);
  box-shadow: var(--shadow-md);
  aspect-ratio: 3 / 2;
  /* tope para que en pantallas grandes no se coma la vista entera */
  max-height: 68vh;
}

.carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* El plano se muestra entero, no recortado, y sobre fondo claro. */
.carousel.is-contain .carousel__stage { background: var(--surface); }
.carousel.is-contain .carousel__img { padding: 14px; box-sizing: border-box; }

.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding-bottom: 4px;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
  background: rgba(26, 19, 16, .42);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background-color .15s ease;
}
.carousel__nav:hover { background: rgba(26, 19, 16, .66); }
.carousel__nav--prev { left: 14px; }
.carousel__nav--next { right: 14px; }

.carousel__count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  margin: 0;
  padding: 5px 11px;
  font-size: .8rem;
  font-weight: 500;
  color: #fff;
  background: rgba(26, 19, 16, .52);
  border-radius: 999px;
  backdrop-filter: blur(3px);
}

.carousel__caption {
  margin: 12px 2px 0;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-soft);
  min-height: 1.4em;
}

/* Miniaturas */
.carousel__thumbs {
  display: flex;
  max-width: 100%;
  min-width: 0;
  gap: 9px;
  margin-top: 12px;
  padding-bottom: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}
.carousel__thumbs::-webkit-scrollbar { height: 6px; }
.carousel__thumbs::-webkit-scrollbar-thumb {
  background: var(--sand-300);
  border-radius: 99px;
}

.thumb {
  flex: none;
  width: 104px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-alt);
  cursor: pointer;
  opacity: .58;
  transition: opacity .15s ease, border-color .15s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: .85; }
.thumb.is-active { opacity: 1; border-color: var(--accent); }

@media (max-width: 620px) {
  .carousel__stage { aspect-ratio: 4 / 3; }
  .carousel__nav { width: 40px; height: 40px; font-size: 1.6rem; }
  .carousel__nav--prev { left: 8px; }
  .carousel__nav--next { right: 8px; }
  .thumb { width: 78px; height: 56px; }
}

/* ───────────────  VIDEO  ─────────────── */

.video-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 9;
}
.video-wrap video,
.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* ───────────────  RECORRIDO 3D  ─────────────── */

.tour-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-alt);
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 10;
}
.tour-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 620px) { .tour-wrap { aspect-ratio: 4 / 3; } }

.tour-link { margin: 16px 0 0; text-align: center; }

/* ───────────────  DISTRIBUCIÓN  ─────────────── */

.levels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.level {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.level__tag {
  margin: 0 0 12px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.level ul { margin: 0; padding-left: 18px; }
.level li { margin-bottom: 5px; }

/* ───────────────  ICONOS  ─────────────── */

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 2px;
}

/* En las listas de distribución van dentro de un disco de color suave:
   se leen mejor a tamaño chico y ordenan la columna visualmente. */
.feat .ico {
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 50%;
  background: var(--surface-alt);
  stroke-width: 1.75;
  margin-top: -3px;
}

/* Lista con icono en lugar de viñeta */
.feat {
  list-style: none;
  padding-left: 0 !important;
  margin: 0;
}

.feat li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 11px;
  line-height: 1.5;
}
.feat li:last-child { margin-bottom: 0; }

.feat strong { font-weight: 600; }

.level__note {
  margin: 14px 0 0;
  font-size: .88rem;
  color: var(--text-soft);
  font-style: italic;
}

.level__body { margin: 0; color: var(--text-soft); }

/* Tarjetas de "Recién renovado" */
.level--highlight {
  background: var(--surface-alt);
  border-color: var(--accent);
  border-left-width: 3px;
}
.level--highlight .level__tag { color: var(--accent-strong); }

/* ───────────────  FICHA TÉCNICA  ─────────────── */

.spec {
  max-width: 820px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.spec table { width: 100%; border-collapse: collapse; font-size: .96rem; }

.spec th, .spec td {
  text-align: left;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }

.spec th {
  font-weight: 500;
  color: var(--text-soft);
  width: 30%;
  white-space: nowrap;
}
.spec td { font-weight: 500; }

@media (max-width: 560px) {
  .spec th, .spec td { display: block; width: auto; }
  .spec th { padding-bottom: 2px; border-bottom: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
  .spec td { padding-top: 0; }
}

.amenities {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 20px 0 0;
}
.amenities li {
  padding: 7px 15px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .87rem;
  font-weight: 500;
}

/* ───────────────  UBICACIÓN  ─────────────── */

.place {
  display: grid;
  /* minmax(0,...) y min-width:0: sin eso la columna de texto no puede
     encoger por debajo de su max-width y empuja la página a lo ancho */
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (min-width: 900px) {
  .place { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
}

.place > * { min-width: 0; }
.place__text { max-width: 62ch; }

.place__map { display: grid; gap: 14px; justify-items: start; }
.place__map iframe {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: block;
}
@media (min-width: 900px) { .place__map { position: sticky; top: 24px; } }
.place__text p { margin: 0 0 16px; }

.nearby {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nearby li {
  padding: 7px 15px;
  background: var(--surface-alt);
  border-radius: 999px;
  font-size: .87rem;
}

.place__sub {
  margin: 22px 0 10px;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.place__privacy {
  font-size: .9rem;
  color: var(--text-soft);
  font-style: italic;
}

/* ───────────────  PRECIO  ─────────────── */

.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  max-width: 64ch;
}

.price-card__label {
  margin: 0 0 4px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.price-card__amount {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 600;
  line-height: 1.1;
}

.price-card__terms {
  margin: 0 0 18px;
  font-weight: 500;
}

.price-card__pay {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--surface-alt);
  border-radius: 10px;
  font-size: .96rem;
}

.price-card__fx,
.price-card__credit {
  margin: 0 0 12px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
  font-size: .93rem;
  color: var(--text-soft);
}
.price-card__credit { margin-bottom: 0; }

/* ───────────────  CONTACTO  ─────────────── */

.contact {
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  max-width: var(--maxw);
  margin: 0 auto 46px !important;
}

.contact__direct { padding-top: 6px; }

/* Sin formulario: el bloque de WhatsApp va solo y centrado. */
.contact__direct--solo { text-align: center; padding-top: 10px; }
.contact__direct--solo .btn { min-width: 270px; }
.contact .section-head { margin-left: auto; margin-right: auto; text-align: center; }

.contact__phone { margin: 18px 0 4px; font-size: .97rem; }
.contact__owner { margin: 0; color: var(--text-soft); font-size: .92rem; }

/* ───────────────  PIE  ─────────────── */

footer {
  border-top: 1px solid var(--line);
  padding: 30px var(--gutter);
  text-align: center;
  color: var(--text-soft);
  font-size: .87rem;
}
footer p { margin: 0 0 5px; }

/* ───────────────  LIGHTBOX  ─────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 11, 9, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }

.lightbox__stage {
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox__stage figcaption {
  text-align: center;
  color: #f0e6dd;
  font-size: .92rem;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color .15s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,.22); }

.lightbox__close {
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  font-size: 1.7rem;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 2rem;
  line-height: 1;
  padding-bottom: 5px;
}
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

@media (max-width: 560px) {
  .lightbox__nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }
}

/* ───────────────  ESCRITORIO  ─────────────── */

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.15fr .85fr;
    align-items: stretch;
    min-height: 82vh;
  }
  .hero__media img { height: 100%; min-height: 82vh; }
  .hero__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 54px;
    margin: 0;
  }
}
