/* Brisa Campestre · Patrimonial Coronado
   Portada en tinta y oro (los del logo y el letrero de cada lote); el plano en papel cal con agave.
   Firma visual: cotas y cajetín de plano topográfico. */

/* ============ Tokens ============ */
:root {
  --tinta: oklch(0.2 0.012 75);
  --tinta-2: oklch(0.27 0.014 75);
  --sobre-tinta: oklch(0.95 0.012 85);
  --sobre-tinta-suave: oklch(0.8 0.018 85);
  --cal: oklch(0.968 0.012 85);
  --cal-2: oklch(0.935 0.018 82);
  --linea: oklch(0.8 0.022 80);
  --texto: oklch(0.24 0.015 75);
  --texto-suave: oklch(0.46 0.02 75);
  --oro: oklch(0.79 0.125 82);
  --oro-claro: oklch(0.88 0.09 86);
  --oro-hondo: oklch(0.5 0.1 75);
  --agave: oklch(0.48 0.06 205);
  --agave-fondo: oklch(0.85 0.04 195);
  --agave-hover: oklch(0.76 0.06 198);
  --tierra: oklch(0.55 0.1 45);
  --tierra-fondo: oklch(0.9 0.03 55);

  --fuente-titulo: "Marcellus", "Times New Roman", serif;
  --fuente: "Archivo", system-ui, sans-serif;
  --curva: cubic-bezier(0.22, 1, 0.36, 1);
  --ancho: 1200px;
  --margen: clamp(16px, 4vw, 48px);
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--cal);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--oro-hondo); outline-offset: 3px; }
.saltar {
  position: absolute; left: 16px; top: -48px; z-index: 30;
  padding: 8px 16px; background: var(--oro); color: var(--tinta); border-radius: 4px;
}
.saltar:focus { top: 16px; }

/* ============ Botones ============ */
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font: 600 1rem/1 var(--fuente); font-stretch: 105%;
  text-decoration: none; border-radius: 4px; border: 1px solid transparent;
  cursor: pointer; transition: background-color 0.2s var(--curva), color 0.2s var(--curva), border-color 0.2s var(--curva);
}
.boton--chico { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }
.boton--oro { background: var(--oro); color: var(--tinta); }
.boton--oro:hover { background: var(--oro-claro); }
.boton--claro { border-color: oklch(0.95 0.012 85 / 0.55); color: var(--sobre-tinta); background: oklch(0.2 0.012 75 / 0.25); }
.boton--claro:hover { border-color: var(--sobre-tinta); background: oklch(0.2 0.012 75 / 0.5); }
.boton--linea { border-color: var(--linea); background: transparent; color: var(--texto); }
.boton--linea:hover { border-color: var(--texto); }

/* ============ Cabecera ============ */
.cabecera {
  position: absolute; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--margen);
}
.cabecera__marca img { width: 140px; height: auto; }
.cabecera__nav { display: flex; align-items: center; gap: 8px; }
.cabecera__enlace {
  display: none; padding: 8px 12px; color: var(--sobre-tinta); text-decoration: none;
  font-weight: 500; font-stretch: 105%;
}
.cabecera__enlace:hover { color: var(--oro); }

/* ============ Portada ============ */
.portada {
  position: relative; isolation: isolate;
  min-height: min(100svh, 860px); display: grid; align-items: end;
  padding: 112px var(--margen) 48px;
  background: var(--tinta); color: var(--sobre-tinta);
  overflow: hidden;
}
.portada__fondo, .portada__fondo img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.portada__fondo img { object-fit: cover; object-position: 60% 50%; }
.portada::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, oklch(0.2 0.012 75 / 0.55) 0%, oklch(0.2 0.012 75 / 0) 22%),
    linear-gradient(0deg, oklch(0.2 0.012 75 / 0.94) 8%, oklch(0.2 0.012 75 / 0.55) 48%, oklch(0.2 0.012 75 / 0.1) 75%);
}
.portada__contenido { width: 100%; max-width: var(--ancho); margin: 0 auto; }
.portada__titulo { margin: 0; font-family: var(--fuente-titulo); font-weight: 400; line-height: 0.92; }
.portada__brisa {
  display: block; font-size: clamp(4rem, 17vw, 10.5rem);
  letter-spacing: 0.12em; margin-right: -0.12em; text-transform: uppercase;
}
.portada__campestre {
  display: flex; align-items: center; gap: 16px;
  margin-top: 12px; font-size: clamp(1.25rem, 4.2vw, 2.25rem);
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--oro);
}
.portada__campestre::after { content: ""; flex: 0 1 120px; height: 1px; background: var(--oro); opacity: 0.7; }
.portada__bajada {
  max-width: 40ch; margin: 24px 0 0;
  font-size: clamp(1.0625rem, 2.4vw, 1.3125rem); line-height: 1.55; color: var(--sobre-tinta-suave);
}

/* El letrero: la misma tira negra con oro que Ricardo planta en cada lote. */
.letrero {
  display: flex; flex-wrap: wrap; margin: 32px 0 0; padding: 0;
  border-top: 1px solid oklch(0.79 0.125 82 / 0.5); border-bottom: 1px solid oklch(0.79 0.125 82 / 0.5);
  font-stretch: 92%; font-size: 1rem; color: var(--sobre-tinta-suave);
}
.letrero__dato { padding: 12px 24px 12px 0; }
.letrero__dato + .letrero__dato { padding-left: 24px; border-left: 1px solid oklch(0.79 0.125 82 / 0.35); }
.letrero b { font-weight: 650; color: var(--oro); font-size: 1.1875rem; }
.portada__acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Entrada de la portada, una sola vez. */
@media (prefers-reduced-motion: no-preference) {
  .portada__brisa, .portada__campestre, .portada__bajada, .letrero, .portada__acciones {
    animation: subir 0.9s var(--curva) both;
  }
  .portada__campestre { animation-delay: 0.08s; }
  .portada__bajada { animation-delay: 0.16s; }
  .letrero { animation-delay: 0.24s; }
  .portada__acciones { animation-delay: 0.32s; }
  .portada__fondo img { animation: acercar 2.4s var(--curva) both; }
}
@keyframes subir { from { opacity: 0; transform: translateY(16px); } }
@keyframes acercar { from { transform: scale(1.06); } }

/* ============ Plano ============ */
.plano {
  max-width: calc(var(--ancho) + 2 * var(--margen)); margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) var(--margen) clamp(56px, 8vw, 96px);
  scroll-margin-top: 16px;
}
.plano__encabezado { display: grid; gap: 12px; margin-bottom: 32px; }
.plano__titulo {
  margin: 0; font-family: var(--fuente-titulo); font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 3.75rem); line-height: 1.05; letter-spacing: 0.01em;
}
.plano__bajada { margin: 0; max-width: 52ch; font-size: 1.125rem; color: var(--texto-suave); }

.leyenda { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.leyenda__item { display: inline-flex; align-items: center; gap: 8px; }
.leyenda__item::before { content: ""; width: 20px; height: 14px; border: 1.5px solid; border-radius: 2px; }
.leyenda__item--disponible::before { background: var(--agave-fondo); border-color: var(--agave); }
.leyenda__item--vendido::before {
  border-color: var(--tierra);
  background: repeating-linear-gradient(135deg, var(--tierra-fondo) 0 3px, oklch(0.55 0.1 45 / 0.55) 3px 4.5px);
}
.leyenda__item--por-confirmar::before { border-style: dashed; border-color: var(--texto-suave); }

/* La lámina: el plano dibujado, con su cajetín al pie. */
.lamina { margin: 0; border: 1px solid var(--linea); background: var(--cal-2); border-radius: 4px; overflow: hidden; }
.lamina__dibujo { padding: clamp(8px, 2vw, 24px); }
.lamina__dibujo svg { display: block; width: 100%; height: auto; overflow: visible; }
.lamina__pista { display: none; }
/* Phones: the plan keeps its desktop drawing at a legible scale and scrolls sideways. */
@media (max-width: 767px) {
  .lamina__dibujo {
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  }
  .lamina__dibujo svg { max-width: none; }
  .lamina__pista {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 0 16px 12px;
    font-size: 0.8125rem; color: var(--texto-suave);
  }
  .lamina__pista::before, .lamina__pista::after { content: "‹"; font-weight: 700; color: var(--oro-hondo); }
  .lamina__pista::after { content: "›"; }
}
.cajetin {
  display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--linea);
  font-size: 0.8125rem; color: var(--texto-suave);
}
.cajetin__celda { padding: 8px 16px; }
.cajetin__celda + .cajetin__celda { border-top: 1px solid var(--linea); }
.cajetin b { color: var(--texto); font-weight: 600; }

/* Lotes dentro del SVG */
.lote { cursor: pointer; outline: none; }
.lote__forma { stroke-width: 0.45; vector-effect: non-scaling-stroke; transition: fill 0.2s var(--curva); }
.lote--disponible .lote__forma { fill: var(--agave-fondo); stroke: var(--agave); stroke-width: 1.5; }
.lote--disponible:hover .lote__forma { fill: var(--agave-hover); }
.lote--vendido .lote__forma { fill: url(#trama-vendido); stroke: var(--tierra); stroke-width: 1.5; }
.lote--por-confirmar .lote__forma { fill: var(--cal); stroke: var(--texto-suave); stroke-width: 1.25; stroke-dasharray: 5 4; }
.lote--apartado .lote__forma { fill: var(--oro-claro); stroke: var(--oro-hondo); stroke-width: 1.5; }
.lote--elegido .lote__forma { fill: var(--oro); stroke: var(--tinta); stroke-width: 2.5; }
/* A sold or unconfirmed lot keeps its look when chosen; only the outline marks it. */
.lote--vendido.lote--elegido .lote__forma { fill: url(#trama-vendido); }
.lote--por-confirmar.lote--elegido .lote__forma { fill: var(--cal); stroke-dasharray: 5 4; }
.lote:focus-visible .lote__forma { stroke: var(--tinta); stroke-width: 3; }
.lote__numero { font-family: var(--fuente-titulo); fill: var(--texto); pointer-events: none; }
.lote__dato { font-family: var(--fuente); font-stretch: 88%; fill: var(--texto); pointer-events: none; font-variant-numeric: tabular-nums; }
.lote--vendido .lote__numero, .lote--vendido .lote__dato { fill: oklch(0.38 0.07 45); }
.lote--por-confirmar .lote__dato { fill: var(--texto-suave); }
.calle { fill: oklch(0.86 0.012 80); }
.calle__texto { font-family: var(--fuente); font-stretch: 110%; letter-spacing: 0.3em; fill: var(--texto-suave); text-transform: uppercase; }
.cota { stroke: var(--tinta); stroke-width: 1.25; vector-effect: non-scaling-stroke; fill: none; }
.cota__texto { font-family: var(--fuente); font-weight: 650; font-stretch: 90%; fill: var(--tinta); paint-order: stroke; stroke: var(--oro); stroke-width: 3px; stroke-linejoin: round; }
.cota__texto--fuera { stroke: var(--cal-2); }

/* ============ Ficha rápida ============ */
.ficha {
  display: grid; gap: 32px; margin-top: 40px; scroll-margin-top: 16px;
}
.ficha__estatus {
  display: inline-block; justify-self: start; margin: 0; padding: 2px 12px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 600; font-stretch: 105%;
  background: var(--agave-fondo); color: oklch(0.32 0.05 205);
}
.ficha--vendido .ficha__estatus { background: var(--tierra-fondo); color: oklch(0.38 0.08 45); }
.ficha--por-confirmar .ficha__estatus { background: var(--cal-2); color: var(--texto-suave); }
.ficha__titulo {
  margin: 8px 0 24px; font-family: var(--fuente-titulo); font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1;
}
.cotas { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 24px; margin: 0; }
.cotas__fila { display: grid; gap: 4px; }
.cotas dt { font-size: 0.8125rem; font-weight: 500; font-stretch: 110%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-suave); }
.cotas dd { margin: 0; font-size: 1.25rem; font-weight: 600; font-stretch: 92%; white-space: nowrap; }
/* Las cotas del letrero: ↔ para el frente, ↕ para el fondo, dibujadas con bordes. */
.cotas__fila--frente dt::before, .cotas__fila--fondo dt::before {
  content: ""; display: inline-block; margin-right: 8px; vertical-align: middle;
  border: 0 solid var(--oro-hondo);
}
.cotas__fila--frente dt::before { width: 18px; height: 7px; border-width: 0 1.5px; background: linear-gradient(var(--oro-hondo), var(--oro-hondo)) center / 100% 1.5px no-repeat; }
.cotas__fila--fondo dt::before { width: 7px; height: 14px; border-width: 1.5px 0; background: linear-gradient(var(--oro-hondo), var(--oro-hondo)) center / 1.5px 100% no-repeat; }

.precio { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--linea); }
.precio__total { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.precio__etiqueta { font-size: 0.8125rem; font-weight: 500; font-stretch: 110%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-suave); }
#ficha-precio { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 650; font-stretch: 90%; letter-spacing: -0.01em; line-height: 1.1; }
.precio__detalle { margin: 8px 0 0; color: var(--texto-suave); }
.precio__detalle span { color: var(--texto); font-weight: 600; }
.ficha--vendido .precio, .ficha--por-confirmar .precio { display: none; }

.ficha__descripcion { max-width: 60ch; margin: 24px 0 0; font-size: 1.0625rem; }
.ficha__descripcion:empty { display: none; }
.servicios { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.servicios li { padding: 4px 12px; border: 1px solid var(--linea); border-radius: 999px; font-size: 0.875rem; }
.servicios .servicios--en-proceso { border-style: dashed; color: var(--texto-suave); }
.ficha__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.ficha__aviso { font-size: 0.9375rem; color: var(--agave); }
.gancho { margin: 12px 0 0; font-size: 0.9375rem; font-weight: 600; color: var(--agave); }

.ficha__datos { min-width: 0; }
/* The lot's picture/video leads the card: as wide as the content, but never taller than the screen
   (it shrinks so the whole 16:9 frame and its caption fit in one view). */
.ficha__foto { width: min(100%, calc((100svh - 128px) * 16 / 9)); margin: 0 auto; }
.ficha__foto img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--cal-2); }
.ficha__foto figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--texto-suave); }
@media (prefers-reduced-motion: no-preference) {
  .ficha--cambio .ficha__datos, .ficha--cambio .ficha__foto { animation: aparecer 0.45s var(--curva) both; }
}
@keyframes aparecer { from { opacity: 0.2; transform: translateY(6px); } }

/* ============ Tabla de lotes ============ */
.tabla { margin-top: 56px; border-top: 1px solid var(--linea); }
.tabla__resumen {
  min-height: 56px; display: flex; align-items: center; cursor: pointer;
  font-weight: 600; font-stretch: 105%;
}
.tabla__marco { overflow-x: auto; }
.tabla table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.tabla caption { text-align: left; padding: 0 0 12px; color: var(--texto-suave); font-size: 0.875rem; }
.tabla th, .tabla td { padding: 10px 12px 10px 0; text-align: left; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.tabla thead th { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texto-suave); }
.tabla tbody th { font-weight: 600; }
.tabla__fila--vendido, .tabla__fila--por-confirmar { color: var(--texto-suave); }

/* ============ Barra del lote (celular) ============ */
.barra-lote {
  position: fixed; inset: auto 0 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--tinta); color: var(--sobre-tinta);
  transform: translateY(100%); transition: transform 0.35s var(--curva);
}
.barra-lote[hidden], .boton[hidden] { display: none; }
.barra-lote--visible { transform: none; visibility: visible; }
.barra-lote__info { text-decoration: none; display: grid; line-height: 1.3; }
.barra-lote__info b { font-family: var(--fuente-titulo); font-weight: 400; font-size: 1.125rem; }
.barra-lote__info span { color: var(--oro); font-weight: 600; font-stretch: 92%; }

/* ============ Pie ============ */
.pie {
  display: grid; gap: 16px; padding: 48px var(--margen) calc(96px + env(safe-area-inset-bottom));
  background: var(--tinta); color: var(--sobre-tinta-suave); font-size: 0.875rem;
}
.pie img { width: 128px; }
.pie p { max-width: 70ch; margin: 0; }

/* ============ Tableta y escritorio ============ */
@media (min-width: 768px) {
  .cabecera__enlace { display: inline-block; }
  .cabecera__marca img { width: 171px; }
  .portada { padding-bottom: 72px; }
  .cajetin { grid-template-columns: auto auto 1fr; }
  .cajetin__celda + .cajetin__celda { border-top: 0; border-left: 1px solid var(--linea); }
  .cajetin__celda:last-child { text-align: right; }
  .barra-lote { display: none; }
  .pie { grid-template-columns: auto 1fr; align-items: center; padding-bottom: 48px; }
}
@media (min-width: 1024px) {
  .plano__encabezado { grid-template-columns: 1fr auto; align-items: end; column-gap: 48px; }
  .plano__titulo, .plano__bajada { grid-column: 1; }
  .leyenda { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin-bottom: 4px; }
  /* Data in two columns under the picture: facts on the left, the calculator on the right. */
  .ficha__datos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 72px; align-items: start; }
  .ficha__datos > * { grid-column: 1; }
  .ficha__datos > .calculadora { grid-column: 2; grid-row: 1 / span 9; margin-top: 0; padding: 32px; border: 1px solid var(--linea); border-radius: 4px; }
}

/* ============ Calculadora ============ */
.calculadora { margin-top: 32px; padding: 24px 0 0; border-top: 1px solid var(--linea); }
.ficha--vendido .calculadora, .ficha--por-confirmar .calculadora { display: none; }
.calculadora__cabeza { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.calculadora__titulo { margin: 0; font-family: var(--fuente-titulo); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.calculadora__ejemplo {
  padding: 2px 10px; border: 1px dashed var(--oro-hondo); border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; color: var(--oro-hondo);
}
.calculadora__etiqueta { display: block; padding: 0; margin-bottom: 8px; font-size: 0.8125rem; font-weight: 500; font-stretch: 110%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-suave); }
.calculadora__plazos { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
.plazos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
/* Plazos en años (7 opciones): rejilla de 4 en celular y escritorio, sin un botón huérfano a lo ancho. */
.plazos__opcion { position: relative; }
.plazos__opcion input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.plazos__opcion span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; white-space: nowrap;
  border: 1px solid var(--linea); border-radius: 4px; font-weight: 600; font-stretch: 100%;
  transition: background-color 0.2s var(--curva), border-color 0.2s var(--curva);
}
.plazos__opcion input:hover + span { border-color: var(--texto); }
.plazos__opcion input:checked + span { background: var(--tinta); border-color: var(--tinta); color: var(--sobre-tinta); }
.plazos__opcion input:focus-visible + span { outline: 2px solid var(--oro-hondo); outline-offset: 3px; }
.calculadora__enganche { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; margin-top: 20px; }
.calculadora__enganche .calculadora__etiqueta { grid-column: 1 / -1; }
.calculadora__enganche[hidden] { display: none; }
.calculadora__rango { width: 100%; min-height: 44px; margin: 0; accent-color: var(--tinta); cursor: pointer; }
.calculadora__valor { font-weight: 600; font-stretch: 92%; white-space: nowrap; }
.resultado { display: grid; gap: 8px; margin: 20px 0 0; padding: 16px 20px; background: var(--cal-2); border-radius: 4px; font-size: 1rem; line-height: 1.45; }
.resultado p { margin: 0; }
.resultado b { font-weight: 650; font-stretch: 92%; white-space: nowrap; }
.resultado__titulo { font-family: var(--fuente-titulo); font-size: 1.25rem; line-height: 1.2; }
.resultado__lista { display: grid; gap: 6px; margin: 0; padding-left: 1.1em; }
.resultado__total small { font-size: 0.9375rem; color: var(--texto-suave); }
.resultado__gancho { font-weight: 600; }

/* ============ Antes y después (render ilustrativo) ============ */
.comparar { position: relative; --corte: 50%; overflow: hidden; border-radius: 6px; --orilla: clamp(12px, 2vw, 20px); }
.comparar__despues, .comparar__marca, .comparar__linea, .comparar__control { display: none; }
.comparar--activo .comparar__despues {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  clip-path: inset(0 0 0 var(--corte));
}
.comparar--activo .comparar__marca {
  display: block; position: absolute; top: var(--orilla); padding: 4px 10px; border-radius: 999px;
  background: oklch(0.2 0.012 75 / 0.72); color: var(--sobre-tinta); font-size: 0.8125rem; font-weight: 600;
  pointer-events: none; transition: opacity 0.2s var(--curva);
}
.comparar__marca--hoy { left: var(--orilla); }
.comparar__marca--despues { right: var(--orilla); }
.comparar--activo .comparar__linea {
  display: block; position: absolute; top: 0; bottom: 0; left: var(--corte); width: 2px;
  margin-left: -1px; background: var(--cal); pointer-events: none;
}
.comparar__linea::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--cal); color: var(--tinta); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.1em;
  box-shadow: 0 2px 10px oklch(0.2 0.012 75 / 0.35);
}
.comparar--activo .comparar__control {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; touch-action: pan-y;
}
.comparar:has(.comparar__control:focus-visible) { outline: 2px solid var(--oro-hondo); outline-offset: 3px; }

/* Construction clip over the comparator */
.comparar__control { z-index: 2; }
.comparar__video {
  display: none; position: absolute; inset: 0; z-index: 3;
  width: 100%; height: 100%; object-fit: cover;
}
.comparar--obra .comparar__video { display: block; }
.comparar--obra .comparar__marca, .comparar--obra .comparar__linea, .comparar--obra .comparar__play { visibility: hidden; }
.comparar__play {
  position: absolute; left: var(--orilla); bottom: var(--orilla); z-index: 4;
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 16px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--tinta); color: var(--sobre-tinta); box-shadow: 0 2px 10px oklch(0.2 0.012 75 / 0.35);
  font: 600 0.9375rem/1 var(--fuente); font-stretch: 100%;
  transition: background-color 0.2s var(--curva);
}
.comparar__play::before {
  content: ""; width: 0; height: 0;
  border-left: 11px solid var(--oro); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.comparar__play:hover { background: var(--tinta-2); }
.comparar__play[hidden] { display: none; }

/* Phone turned sideways: the lot's picture/video takes the whole screen height. */
@media (orientation: landscape) and (max-height: 540px) {
  .ficha__foto { width: min(100%, calc(100svh * 16 / 9)); }
  .barra-lote { display: none; }
}

/* ============ Cómo llegar ============ */
.llegar { background: var(--tinta); color: var(--sobre-tinta); scroll-margin-top: 0; }
.llegar__dentro {
  display: grid; gap: 40px; max-width: calc(var(--ancho) + 2 * var(--margen)); margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) var(--margen);
}
.llegar__titulo { margin: 0; font-family: var(--fuente-titulo); font-weight: 400; font-size: clamp(2.25rem, 5.5vw, 3.5rem); line-height: 1.05; }
.llegar__bajada { max-width: 44ch; margin: 20px 0 0; font-size: 1.125rem; color: var(--sobre-tinta-suave); }
.llegar__datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px 24px; margin: 32px 0 0; padding: 24px 0 0; border-top: 1px solid oklch(0.79 0.125 82 / 0.35); }
.llegar__datos dt { font-size: 0.8125rem; font-weight: 500; font-stretch: 110%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sobre-tinta-suave); }
.llegar__datos dd { display: grid; margin: 4px 0 0; font-size: 1.5rem; font-weight: 600; font-stretch: 92%; color: var(--oro); }
.llegar__datos dd small { font-size: 0.8125rem; font-weight: 400; font-stretch: 100%; color: var(--sobre-tinta-suave); }
.llegar__datos .llegar__coord { font-size: 1rem; color: var(--sobre-tinta); }
.llegar__acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.mapa { margin: 0; min-width: 0; }
.mapa__vistas { display: inline-flex; gap: 4px; margin-bottom: 12px; padding: 4px; border: 1px solid oklch(0.79 0.125 82 / 0.35); border-radius: 999px; }
.mapa__vista {
  min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--sobre-tinta-suave); font: 600 0.9375rem/1 var(--fuente);
}
.mapa__vista[aria-selected="true"] { background: var(--oro); color: var(--tinta); }
.mapa__panel { border-radius: 6px; overflow: hidden; background: oklch(0.24 0.014 75); }
.mapa__panel--satelite { aspect-ratio: 4 / 3; }
.mapa__panel--satelite iframe { display: block; width: 100%; height: 100%; border: 0; }
.mapa__pie { margin-top: 10px; font-size: 0.8125rem; color: var(--sobre-tinta-suave); }

.mapa__svg { display: block; width: 100%; height: auto; font-family: var(--fuente); }
.mapa__anillos circle { fill: none; stroke: oklch(0.79 0.125 82 / 0.12); stroke-width: 1; }
.mapa__ruta-fondo { fill: none; stroke: oklch(0.95 0.012 85 / 0.12); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.mapa__ruta { fill: none; stroke: var(--oro); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.mapa__lugar circle { fill: var(--sobre-tinta-suave); }
.mapa__lugar text { fill: var(--sobre-tinta-suave); font-size: 19px; font-weight: 500; }
.mapa__lugar--ciudad circle { fill: var(--sobre-tinta); }
.mapa__lugar--ciudad text { fill: var(--sobre-tinta); font-family: var(--fuente-titulo); font-size: 26px; }
.mapa__destino circle { fill: var(--oro); }
.mapa__destino text { fill: var(--oro); font-family: var(--fuente-titulo); font-size: 28px; }
.mapa__pulso { transform-box: fill-box; transform-origin: center; opacity: 0; }
.mapa__liga { stroke: oklch(0.79 0.125 82 / 0.5); stroke-width: 1.5; stroke-dasharray: 4 5; }
.mapa__cerca-fondo { fill: oklch(0.29 0.016 75); }
.mapa__cerca-borde { fill: none; stroke: var(--oro); stroke-width: 2; }
.mapa__cerca-camino { fill: none; stroke: oklch(0.95 0.012 85 / 0.55); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.mapa__lote { fill: var(--oro); stroke: var(--tinta); stroke-width: 1.5; }
.mapa__lote-num { fill: var(--sobre-tinta); font-size: 15px; font-weight: 600; }
.mapa__cerca-texto { fill: var(--sobre-tinta-suave); font-size: 17px; }
.mapa__norte path { fill: var(--sobre-tinta-suave); }
.mapa__norte text { fill: var(--sobre-tinta-suave); font-size: 16px; font-weight: 600; }
.mapa__escala path { fill: none; stroke: var(--sobre-tinta-suave); stroke-width: 2; }
.mapa__escala text { fill: var(--sobre-tinta-suave); font-size: 15px; }
.mapa__cerca, .mapa__liga, .mapa__destino text { opacity: 0; }

/* Drawn when the map scrolls into view: route, then the pin and the close-up. */
.mapa--visible .mapa__ruta { transition: stroke-dashoffset 2.2s cubic-bezier(0.45, 0, 0.2, 1); stroke-dashoffset: 0; }
.mapa--visible .mapa__cerca, .mapa--visible .mapa__liga, .mapa--visible .mapa__destino text { transition: opacity 0.7s ease 2s; opacity: 1; }
.mapa--visible .mapa__pulso { animation: pulso 2.4s ease-out 2.2s infinite; }
@keyframes pulso { from { opacity: 0.7; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
@media (prefers-reduced-motion: reduce) {
  .mapa__ruta { stroke-dashoffset: 0; }
  .mapa__cerca, .mapa__liga, .mapa__destino text { opacity: 1; }
  .mapa--visible .mapa__pulso { animation: none; }
}
@media (min-width: 1024px) {
  .llegar__dentro { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); align-items: center; gap: 64px; }
}
.plano__norte path { fill: var(--texto-suave); }
.plano__norte text { fill: var(--texto-suave); font-family: var(--fuente); font-weight: 600; }
/* Phones: the map is drawn at ~1/3 scale, so its labels need larger user-unit sizes to stay legible. */
@media (max-width: 767px) {
  .mapa__lugar text { font-size: 38px; }
  .mapa__lugar--ciudad text { font-size: 46px; }
  .mapa__destino text { font-size: 48px; }
  .mapa__cerca-texto { font-size: 34px; }
  .mapa__lote-num { font-size: 30px; }
  .mapa__norte text, .mapa__escala text { font-size: 30px; }
  .mapa__destino circle:not(.mapa__pulso) { r: 14px; }
}
/* Map background (OpenStreetMap): built-up areas, water and the road network, quiet under the route. */
.mapa__base { opacity: 0; transition: opacity 0.8s ease; }
.mapa__base--lista { opacity: 1; }
.mapa__base path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.mapa__base .mapa__base-urbana { fill: oklch(0.3 0.016 75); stroke: none; }
.mapa__base .mapa__base-agua { fill: oklch(0.34 0.04 230); stroke: none; }
.mapa__base .mapa__base-rio { stroke: oklch(0.42 0.05 230); stroke-width: 1; }
.mapa__base .mapa__base-terciaria { stroke: oklch(0.42 0.012 80); stroke-width: 0.6; }
.mapa__base .mapa__base-secundaria { stroke: oklch(0.48 0.014 80); stroke-width: 0.8; }
.mapa__base .mapa__base-principal { stroke: oklch(0.56 0.016 80); stroke-width: 1.1; }
.mapa__base .mapa__base-autopista { stroke: oklch(0.66 0.03 80); stroke-width: 1.6; }
.mapa__tramo {
  fill: var(--sobre-tinta-suave); font-size: 15px; font-style: italic; letter-spacing: 0.02em;
  paint-order: stroke; stroke: var(--tinta); stroke-width: 5px; stroke-linejoin: round;
}
.mapa__lugar text, .mapa__destino text { paint-order: stroke; stroke: oklch(0.22 0.013 75); stroke-width: 6px; stroke-linejoin: round; }
@media (max-width: 767px) { .mapa__tramo { font-size: 28px; stroke-width: 9px; } }

/* ============ Estatus «no disponible» (no aparece en el panfleto vigente) ============ */
.leyenda__item--no-disponible::before { background: var(--cal-2); border-color: var(--texto-suave); }
.lote--no-disponible .lote__forma { fill: var(--cal-2); stroke: var(--texto-suave); stroke-width: 1.25; }
.lote--no-disponible.lote--elegido .lote__forma { fill: var(--cal-2); stroke: var(--tinta); stroke-width: 2.5; }
.lote--no-disponible .lote__numero, .lote--no-disponible .lote__dato { fill: var(--texto-suave); }
.ficha--no-disponible .ficha__estatus { background: var(--cal-2); color: var(--texto-suave); }
.ficha--no-disponible .precio, .ficha--no-disponible .ficha__lado, .ficha--no-disponible .ficha__zona,
.ficha--vendido .ficha__lado, .ficha--por-confirmar .ficha__lado { display: none; }
.tabla__fila--no-disponible { color: var(--texto-suave); }
/* Apartado sin precio (no está en el panfleto): se ve en el plano y la ficha, sin precio ni calculadora. */
.leyenda__item--apartado::before { background: var(--oro-claro); border-color: var(--oro-hondo); }
.ficha--apartado .ficha__estatus { background: var(--oro-claro); color: oklch(0.36 0.08 75); }
.ficha--sin-precio .precio, .ficha--sin-precio .ficha__lado, .ficha--sin-precio .ficha__zona { display: none; }
.tabla__fila--apartado { color: var(--texto-suave); }
.calculadora { scroll-margin-top: 16px; }

/* ============ Páginas sin portada (cotizador, ficha de lote) ============ */
.cabecera--solida { position: relative; background: var(--tinta); }
.migas { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 0.9375rem; color: var(--texto-suave); }
.migas li + li::before { content: "›"; margin-right: 8px; color: var(--oro-hondo); }
.migas a { color: var(--texto); }
.migas [aria-current] { color: var(--texto-suave); }

/* Zona del lote (parte baja, media, alta o especial), como en el panfleto */
.ficha__zona { margin: -12px 0 24px; font-size: 1rem; font-weight: 600; font-stretch: 105%; color: var(--oro-hondo); letter-spacing: 0.02em; }
.ficha__zona:empty { display: none; }

/* Columna de apoyo de la ficha: video del lote, cómo apartar y (si se prende) la calculadora */
.ficha__lado { display: grid; gap: 24px; margin-top: 32px; align-content: start; }
.ficha__lado > .calculadora { margin-top: 0; }
.apartar { padding: 24px; border: 1px solid var(--linea); border-radius: 4px; background: var(--cal); }
.apartar__titulo { margin: 0; font-family: var(--fuente-titulo); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.apartar__lista { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.apartar__lista li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: baseline; }
.apartar__lista li::before { content: ""; width: 14px; height: 8px; border-left: 2px solid var(--agave); border-bottom: 2px solid var(--agave); transform: translateY(-3px) rotate(-45deg); }
.apartar__lista b { font-weight: 650; }
.apartar__nota { margin: 12px 0 0; font-size: 0.875rem; color: var(--texto-suave); }
.apartar .boton { width: 100%; margin-top: 20px; }

/* Video de YouTube: miniatura con botón; el reproductor (youtube-nocookie) carga solo al tocarla */
.video { position: relative; display: block; overflow: hidden; border-radius: 6px; background: var(--tinta); aspect-ratio: 16 / 9; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; transition: opacity 0.2s var(--curva); }
.video:hover img { opacity: 1; }
.video__boton {
  position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--tinta); box-shadow: 0 2px 14px oklch(0.2 0.012 75 / 0.45);
}
.video__boton::before {
  content: ""; position: absolute; left: 27px; top: 22px;
  border-left: 20px solid var(--oro); border-top: 12px solid transparent; border-bottom: 12px solid transparent;
}
.video:hover .video__boton { background: var(--tinta-2); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__pie { margin: 8px 0 0; font-size: 0.875rem; color: var(--texto-suave); }
.video-bloque[hidden] { display: none; }

/* ============ Papeles en regla ============ */
.papeles { background: var(--cal-2); border-top: 1px solid var(--linea); scroll-margin-top: 0; }
.papeles__dentro { max-width: calc(var(--ancho) + 2 * var(--margen)); margin: 0 auto; padding: clamp(56px, 9vw, 112px) var(--margen); }
.papeles__titulo { margin: 0; font-family: var(--fuente-titulo); font-weight: 400; font-size: clamp(2.25rem, 5.5vw, 3.5rem); line-height: 1.05; }
.papeles__bajada { max-width: 52ch; margin: 16px 0 0; font-size: 1.125rem; color: var(--texto-suave); }
.papeles__lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 32px; margin: 40px 0 0; }
.papeles__lista > div { padding: 20px 0; border-top: 1px solid var(--linea); }
.papeles__lista dt { font-size: 0.8125rem; font-weight: 500; font-stretch: 110%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-suave); }
.papeles__lista dd { display: grid; gap: 4px; margin: 6px 0 0; font-size: 1.375rem; font-weight: 600; font-stretch: 92%; line-height: 1.25; }
.papeles__lista dd small { font-size: 0.9375rem; font-weight: 400; font-stretch: 100%; color: var(--texto-suave); line-height: 1.5; }
.papeles__videos { margin-top: 56px; }
.papeles__subtitulo { margin: 0 0 20px; font-family: var(--fuente-titulo); font-weight: 400; font-size: 1.75rem; line-height: 1.2; }
.papeles__rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }

/* ============ Cotizador: lista por zona ============ */
.eleccion { margin-top: 40px; }
.eleccion__titulo { margin: 0 0 8px; font-family: var(--fuente-titulo); font-weight: 400; font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.1; }
.zona { margin-top: 24px; }
.zona__titulo { margin: 0 0 12px; font-size: 0.8125rem; font-weight: 500; font-stretch: 110%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-suave); }
.zona__lotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.opcion {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 12px; min-height: 64px; padding: 10px 16px;
  border: 1px solid var(--linea); border-radius: 4px; background: var(--cal); text-decoration: none;
  transition: border-color 0.2s var(--curva), background-color 0.2s var(--curva);
}
.opcion:hover { border-color: var(--texto); }
.opcion b { font-family: var(--fuente-titulo); font-weight: 400; font-size: 1.25rem; }
.opcion__m2 { justify-self: end; font-size: 0.9375rem; color: var(--texto-suave); }
.opcion__precio { grid-column: 1 / -1; font-weight: 650; font-stretch: 92%; }
.opcion[aria-current="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--sobre-tinta); }
.opcion[aria-current="true"] .opcion__m2 { color: var(--sobre-tinta-suave); }
.opcion[aria-current="true"] .opcion__precio { color: var(--oro); }

/* ============ Ficha de un lote (página propia) ============ */
.pagina-lote { max-width: calc(var(--ancho) + 2 * var(--margen)); margin: 0 auto; padding: 32px var(--margen) clamp(56px, 8vw, 96px); }
.pagina-lote .ficha { margin-top: 0; }
.pagina-lote .ficha__titulo { margin-top: 8px; }
.pagina-lote__llegar { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--linea); }
.pagina-lote__llegar p { margin: 0; max-width: 60ch; }
.pagina-lote__llegar .ficha__acciones { margin-top: 16px; }

@media (min-width: 1024px) {
  .ficha__datos > .ficha__lado { grid-column: 2; grid-row: 1 / span 12; margin-top: 0; }
  .ficha__datos > .ficha__lado > .calculadora { padding: 32px; border: 1px solid var(--linea); border-radius: 4px; }
}

/* «Nosotros» (prendido desde panfleto-2026.json → nosotros.mostrar) */
.nosotros { border-top: 1px solid var(--linea); }
.nosotros__dentro { display: grid; gap: 32px; align-items: center; max-width: calc(var(--ancho) + 2 * var(--margen)); margin: 0 auto; padding: clamp(56px, 9vw, 112px) var(--margen); }
.nosotros__foto { margin: 0; }
.nosotros__foto img { display: block; width: 100%; height: auto; border-radius: 4px; }
.nosotros__titulo { margin: 0; font-family: var(--fuente-titulo); font-weight: 400; font-size: clamp(2.25rem, 5.5vw, 3.5rem); line-height: 1.05; }
.nosotros__texto { max-width: 60ch; margin: 16px 0 0; font-size: 1.125rem; }
.nosotros__firma { margin: 16px 0 0; color: var(--texto-suave); }
@media (min-width: 768px) { .nosotros__dentro--foto { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }

/* Página 404 */
.no-encontrada { min-height: 50svh; }
.no-encontrada__titulo { margin: 8px 0 0; font-family: var(--fuente-titulo); font-weight: 400; font-size: clamp(2.25rem, 5.5vw, 3.5rem); line-height: 1.05; }
.no-encontrada__texto { max-width: 60ch; margin: 16px 0 0; font-size: 1.125rem; }
.no-encontrada .ficha__acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Video de obra de ejemplo (videos.json → obraEjemplo) */
.obra-ejemplo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; background: var(--cal-2); }
