/* Marca Raíces · la piel de las páginas interiores (buscador, ficha y proyecto). El inicio tiene la suya (inicio.css).
   Misma idea que el inicio: arriba la marca (noche índigo), abajo las raíces (marfil). Acá eso es la lectura:
   «Vivir» = marfil con tinta índigo · «Invertir» = noche con marfil. Letra del logo (Red Hat Display, negra y fina),
   formas redondeadas, superficies con borde fino y el dorado solo en la tilde y los acentos. */
:root {
  --sans: 'Red Hat Display', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --indigo: #28235b; --noche: #100e2c; --noche-2: #17143a; --oro: #c89e66; --oro-2: #e6cfa9; --marfil: #f6f2ea;
  --pad: clamp(20px, 4.4vw, 64px); --ancho: 1560px; --barra: 78px;
  --borde: max(var(--pad), calc((100vw - var(--ancho)) / 2 + var(--pad)));
  --curva: cubic-bezier(.22, 1, .36, 1);
  --tilde: polygon(0 100%, 54% 0, 100% 0, 46% 100%);
  --costura: var(--oro); --telon-a: #100e2c; --telon-b: #f6f2ea;
  /* lectura «vivir» (y la neutra) */
  --fondo: #f6f2ea; --fondo-2: #ece6da; --carta: #fffdf8; --tinta: #1b1746; --tinta-2: #55526f;
  --linea: rgb(27 23 70 / .14); --acento: #1b1746; --sobre-acento: #f6f2ea; --oro-t: #86652f;
  --luz: rgb(40 35 91 / .07); --ok: #3d8b5a; --off: #9a96b0;
}
html[data-lectura="invertir"] {
  --fondo: #100e2c; --fondo-2: #17143a; --carta: #1b1840; --tinta: #f6f2ea; --tinta-2: #bcb8d2;
  --linea: rgb(246 242 234 / .16); --acento: #f6f2ea; --sobre-acento: #100e2c; --oro-t: #e6cfa9;
  --luz: rgb(66 57 158 / .3); --ok: #6cc08e;
}

html { scroll-padding-top: var(--barra); }
body { font: 400 1rem/1.6 var(--sans); background: var(--fondo); color: var(--tinta); transition: background-color .4s; }
a { color: inherit; }
select, input, button { font-family: inherit; }
em { font-style: normal; font-weight: 300; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.045em; line-height: 1.04; }
b, strong { font-weight: 700; }
.rotulo { display: flex; align-items: center; gap: .75em; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta); }
.rotulo::before { content: ""; flex: none; width: .9em; height: .72em; background: var(--oro); clip-path: var(--tilde); }
.bajada { color: var(--tinta-2); font-size: 1.06rem; max-width: 46ch; }
.nota { color: var(--tinta-2); font-size: .82rem; max-width: 80ch; }
.completar { background: #fff3c4; color: #5a4300; padding: 0 .3em; font-size: .92em; }
html[data-lectura="invertir"] .solo-vivir, html:not([data-lectura="invertir"]) .solo-invertir { display: none !important; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }
::selection { background: var(--oro); color: var(--noche); }

.boton { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; min-height: 52px; padding: 0 1.5rem; border: 1px solid var(--acento); border-radius: 999px;
  background: var(--acento); color: var(--sobre-acento); font-size: .95rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .3s, color .3s, border-color .3s, transform .5s var(--curva); }
.boton:hover { transform: translate3d(0, -2px, 0); }
.boton--oro { border-color: var(--oro-2); background: var(--oro-2); color: var(--noche); }
.boton--claro { border-color: var(--marfil); background: var(--marfil); color: var(--noche); }
.boton--borde { border-color: color-mix(in srgb, var(--tinta) 30%, transparent); background: transparent; color: var(--tinta); font-weight: 600; }
.boton--borde::after { content: '→'; }
.boton--borde:hover { border-color: var(--tinta); }

/* ---------- barra ---------- */
.barra { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--barra); display: flex; align-items: center; gap: clamp(12px, 1.8vw, 26px); padding: 0 var(--borde); color: var(--tinta); }
.barra::before { content: ''; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--fondo) 88%, transparent); border-bottom: 1px solid var(--linea);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background-color .4s; }
.barra__logo { display: block; flex: none; }
.barra__logo img { height: 48px; width: auto; }
.logo-claro { display: none; }
html[data-lectura="invertir"] .logo-claro { display: block; }
html[data-lectura="invertir"] .logo-oscuro { display: none; }
.barra__nav { display: flex; gap: clamp(14px, 1.8vw, 28px); margin-left: auto; font-weight: 500; font-size: .9rem; }
.barra__nav a { position: relative; padding: 6px 0; text-decoration: none; white-space: nowrap; }
.barra__nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .45s var(--curva); }
.barra__nav a:hover::after, .barra__nav a:focus-visible::after, .barra__nav a[aria-current="page"]::after { transform: scaleX(1); }
.barra__nav-wa { display: none; }
.barra__wa { flex: none; padding: .58rem 1.1rem; border: 1px solid color-mix(in srgb, var(--tinta) 36%, transparent); border-radius: 999px; font-size: .86rem; font-weight: 600; text-decoration: none; transition: background-color .3s, color .3s; }
.barra__wa:hover { background: var(--acento); color: var(--sobre-acento); }
.barra__menu { display: none; width: 44px; height: 44px; position: relative; flex: none; }
.barra__menu i, .barra__menu i::before, .barra__menu i::after { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; content: ''; transition: transform .3s var(--curva), opacity .2s; }
.barra__menu i { top: 21px; }
.barra__menu i::before { left: 0; right: 0; top: -7px; }
.barra__menu i::after { left: 0; right: 0; top: 7px; }
.barra.is-abierta .barra__menu i { background: transparent; }
.barra.is-abierta .barra__menu i::before { transform: translateY(7px) rotate(45deg); }
.barra.is-abierta .barra__menu i::after { transform: translateY(-7px) rotate(-45deg); }

/* el lector: Vivir | Invertir (una píldora que se corre) */
.lector { position: relative; display: inline-flex; flex: none; padding: 3px; border: 1px solid color-mix(in srgb, var(--tinta) 28%, transparent); border-radius: 999px; }
.lector button { position: relative; z-index: 1; min-width: 4.9rem; padding: 7px 14px; border-radius: 999px; font-size: .84rem; font-weight: 600; text-align: center; transition: color .3s; }
.lector button[aria-pressed="true"] { color: var(--sobre-acento); font-weight: 800; }
.lector__marca { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--acento);
  opacity: var(--lector-s, 0); transform: translateX(var(--lector-x, 0)); transition: transform .5s var(--curva), opacity .3s; }
html[data-lectura="vivir"] .lector__marca { --lector-s: 1; }
html[data-lectura="invertir"] .lector__marca { --lector-s: 1; --lector-x: 100%; }
.opciones { display: inline-flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.opciones button { min-height: 42px; padding: 0 1rem; border: 1px solid color-mix(in srgb, var(--tinta) 24%, transparent); border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--tinta-2); transition: border-color .3s; }
.opciones button:hover { border-color: var(--tinta); }
.opciones button[aria-pressed="true"] { background: var(--acento); color: var(--sobre-acento); border-color: var(--acento); font-weight: 700; }

/* el telón del cambio de lectura: un paño liso */
.telon__capa { clip-path: none !important; }
.telon__capa svg { display: none; }

/* ---------- tarjetas ---------- */
.grilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(2rem, 3vw, 2.8rem) clamp(1rem, 1.6vw, 1.5rem); }
.grilla--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tarjeta { display: flex; flex-direction: column; min-width: 0; color: var(--tinta); text-decoration: none; }
.tarjeta__foto { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px; background: var(--fondo-2); }
.tarjeta__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--curva); }
.tarjeta:hover .tarjeta__foto img { transform: scale(1.05); }
.etiqueta { position: absolute; left: .6rem; top: .6rem; padding: .3rem .7rem; border: 1px solid rgb(246 242 234 / .26); border-radius: 999px; background: rgb(16 14 44 / .58);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #f6f2ea; font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.etiqueta--proy { top: auto; bottom: .6rem; color: var(--oro-2); letter-spacing: .02em; text-transform: none; font-size: .72rem; }
.tarjeta__cuerpo { display: grid; gap: .2rem; padding-top: 1rem; }
.tarjeta__tipo { font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--oro-t); }
.tarjeta__barrio { font-size: 1.28rem; letter-spacing: -.04em; line-height: 1.1; }
.tarjeta__vivir, .tarjeta__invertir { font-size: .9rem; color: var(--tinta-2); }
.tarjeta__invertir { display: none; }
html[data-lectura="invertir"] .tarjeta__vivir { display: none; }
html[data-lectura="invertir"] .tarjeta__invertir { display: block; }
.tarjeta__pie { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: .5rem; padding-top: .7rem; border-top: 1px solid var(--linea); }
.tarjeta__precio { font-size: 1.14rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tarjeta__ref { font-size: .76rem; color: var(--tinta-2); }

/* un proyecto en sus dos caras, sobre una superficie */
.proy { position: relative; display: grid; min-width: 0; padding: .7rem .7rem 1.1rem; border: 1px solid var(--linea); border-radius: 24px; color: var(--tinta);
  background: linear-gradient(170deg, color-mix(in srgb, var(--carta) 100%, transparent), color-mix(in srgb, var(--carta) 55%, transparent)); transition: transform .6s var(--curva), border-color .35s; }
.proy:hover { transform: translate3d(0, -6px, 0); border-color: color-mix(in srgb, var(--oro) 70%, transparent); }
.proy__enlace { position: absolute; inset: 0; z-index: 2; border-radius: 24px; }
.proy__cara { grid-area: 1 / 1; display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.proy__cara > *:not(.proy__foto) { padding: 0 .4rem; }
.proy__cara--invertir { display: none; }
html[data-lectura="invertir"] .proy__cara--vivir { display: none; }
html[data-lectura="invertir"] .proy__cara--invertir { display: flex; }
.proy__foto { position: relative; aspect-ratio: 4 / 3; margin-bottom: .45rem; overflow: hidden; border-radius: 16px; background: var(--fondo-2); }
.proy__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--curva); }
.proy:hover .proy__foto img { transform: scale(1.05); }
.proy__barrio { font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--oro-t); }
.proy h3 { font-size: clamp(1.25rem, 1.7vw, 1.6rem); }
.proy__frase { font-size: .95rem; line-height: 1.45; color: var(--tinta-2); }
.proy__tipos { font-size: .9rem; color: var(--tinta-2); }
.cifras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--linea); }
.cifras div { padding: .7rem 0 .6rem; border-bottom: 1px solid var(--linea); min-width: 0; }
.cifras div:nth-child(odd) { padding-right: .8rem; border-right: 1px solid var(--linea); }
.cifras div:nth-child(even) { padding-left: .9rem; }
.cifras dt { font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-2); }
.cifras dd { margin: .2rem 0 0; font-size: clamp(1.02rem, 1.4vw, 1.32rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.proy .cifras dd { font-size: clamp(.94rem, 1.08vw, 1.14rem); }
.proy__anv { font-size: .84rem; color: var(--tinta-2); }
.proy__anv strong { color: var(--oro-t); font-weight: 700; }
.riel-cabeza { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: clamp(3.4rem, 7vw, 6rem) 0 1.4rem; }
.riel-cabeza__titulo { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
.riel-cabeza__flechas { display: flex; gap: 8px; }
.riel-cabeza__flechas button { width: 48px; height: 48px; border: 1px solid color-mix(in srgb, var(--tinta) 28%, transparent); border-radius: 50%; font-size: 1.05rem; transition: background-color .3s, color .3s; }
.riel-cabeza__flechas button:hover { background: var(--acento); color: var(--sobre-acento); }
.riel { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 340px); gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--borde) 18px;
  margin: 0 calc(var(--borde) * -1); scroll-padding-inline: var(--borde); scrollbar-width: thin; scrollbar-color: var(--oro) transparent; }
.riel > * { scroll-snap-align: start; }
.riel.is-arrastrando { cursor: grabbing; scroll-snap-type: none; }
.riel.is-arrastrando a { pointer-events: none; }

/* =================== Propiedades (buscador) =================== */
.busca { padding: calc(var(--barra) + clamp(2rem, 5vw, 3.6rem)) var(--borde) 5rem; }
.busca__cabeza { display: grid; gap: .6rem; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.busca__titulo { font-size: clamp(2.2rem, 4.8vw, 4.4rem); line-height: 1; }
.busca__total { color: var(--tinta-2); font-size: 1.05rem; }
.busca__total b { color: var(--tinta); font-weight: 800; }
.busca__cuerpo { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: clamp(1.4rem, 3vw, 3rem); align-items: start; }
.filtros { position: sticky; top: calc(var(--barra) + 18px); display: grid; gap: 2px; max-height: calc(100svh - var(--barra) - 36px); overflow: auto; padding: 1.1rem 1.2rem 1.2rem;
  border: 1px solid var(--linea); border-radius: 24px; background: var(--carta); scrollbar-width: thin; }
.filtros__cabeza { display: flex; align-items: center; justify-content: space-between; padding-bottom: .6rem; border-bottom: 1px solid var(--linea); }
.filtros__titulo { font-size: 1.1rem; font-weight: 800; letter-spacing: -.03em; }
.filtros__limpiar { font-size: .84rem; color: var(--tinta-2); text-decoration: underline; text-underline-offset: 3px; }
.filtros__cerrar, .filtros__ver { display: none; }
.filtro { display: grid; gap: .35rem; margin: 0; padding: .75rem 0; border: 0; border-bottom: 1px solid var(--linea); min-width: 0; }
.filtro:last-of-type { border-bottom: 0; }
.filtro > span, .filtro legend { padding: 0; font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-2); }
.filtro small { letter-spacing: .04em; text-transform: none; font-weight: 500; }
.filtro select, .filtro input:not([type]), .filtro input[inputmode] { width: 100%; min-width: 0; min-height: 44px; padding: 0 .8rem; border: 1px solid var(--linea); border-radius: 12px; background: var(--fondo);
  color: var(--tinta); font-size: .96rem; font-weight: 500; }
.filtro--par { grid-template-columns: 1fr 1fr; }
.filtro--par > span { grid-column: 1 / -1; }
.filtro--op { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: .7rem 0 .2rem; border: 1px solid var(--linea); border-radius: 999px; }
.filtro--op legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.filtro--op label { position: relative; }
.filtro--op input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.filtro--op span { display: block; padding: .55rem .4rem; border-radius: 999px; text-align: center; font-size: .9rem; font-weight: 600; }
.filtro--op span::after { content: ' (' attr(data-n) ')'; font-weight: 400; color: var(--tinta-2); font-size: .85em; }
.filtro--op input:checked + span { background: var(--acento); color: var(--sobre-acento); font-weight: 800; }
.filtro--op input:checked + span::after { color: inherit; }
.filtro--op input:focus-visible + span { outline: 2px solid var(--oro); outline-offset: 2px; }
.filtro--check { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.filtro--check span { font-size: .94rem; letter-spacing: 0; text-transform: none; color: var(--tinta); font-weight: 500; }
.filtro--check input { width: 18px; height: 18px; accent-color: var(--oro); }
html[data-lectura="invertir"] .solo-vivir-f, html:not([data-lectura="invertir"]) .solo-invertir-f { display: none; }
.resultados { min-width: 0; display: flex; flex-direction: column; }
.resultados__barra { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; padding-bottom: .9rem; border-bottom: 1px solid var(--linea); }
.resultados__filtros { display: none; }
.resultados__orden { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--tinta-2); }
.resultados__orden select { min-height: 42px; padding: 0 .9rem; border: 1px solid var(--linea); border-radius: 999px; background: transparent; color: var(--tinta); font-size: .92rem; font-weight: 500; }
.resultados__orden option, .filtro option { color: #1b1746; background: #fff; }
.vistas { display: inline-flex; margin-left: auto; padding: 3px; border: 1px solid var(--linea); border-radius: 999px; }
.vistas button { min-width: 4.6rem; padding: 7px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--tinta-2); }
.vistas button[aria-pressed="true"] { background: var(--acento); color: var(--sobre-acento); font-weight: 800; }
.etiquetas-activas { display: flex; flex-wrap: wrap; gap: 8px; margin: .9rem 0 .3rem; }
.etiquetas-activas:empty { display: none; }
.etiquetas-activas button { padding: .38rem .8rem; border: 1px solid color-mix(in srgb, var(--oro) 80%, transparent); border-radius: 999px; font-size: .84rem; font-weight: 600; transition: background-color .3s, color .3s; }
.etiquetas-activas button:hover { background: var(--oro-2); color: var(--noche); }
[data-lista] { display: flex; flex-direction: column; }
[data-lista][hidden], .bloque-proy[hidden], .bloque-props[hidden], .vacio[hidden] { display: none; }
.bloque-proy { order: 2; margin-top: 3rem; }
.bloque-props { order: 1; margin-top: 1.8rem; }
.es-invertir .bloque-proy { order: 1; margin-top: 1.8rem; }
.es-invertir .bloque-props { order: 2; margin-top: 3rem; }
.bloque__titulo { margin-bottom: 1.3rem; font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.bloque__titulo:empty { display: none; }
.bloque__mas { display: flex; margin: 2.2rem auto 0; }
.mapa { height: min(72svh, 720px); margin-top: 1.3rem; overflow: hidden; border: 1px solid var(--linea); border-radius: 24px; background: var(--fondo-2); z-index: 0; }
.pin { display: inline-block; transform: translate(-50%, -100%); white-space: nowrap; padding: .28rem .7rem; border: 1px solid rgb(246 242 234 / .5); border-radius: 999px; background: #1b1746; color: #fff;
  font: 700 .76rem var(--sans); box-shadow: 0 6px 16px -8px rgb(0 0 0 / .6); }
.pin--proy { background: #e6cfa9; border-color: #1b1746; color: #100e2c; }
.pop { display: grid; gap: 4px; width: 200px; color: #1b1746 !important; text-decoration: none; font-family: var(--sans); }
.pop img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.pop b { font-size: 1rem; font-weight: 800; letter-spacing: -.03em; }
.leaflet-popup-content { margin: 10px; }
.leaflet-popup-content-wrapper { border-radius: 16px; }
.vacio { padding: 2.6rem 0; display: grid; gap: .8rem; justify-items: start; }
.vacio__titulo { font-size: 1.6rem; font-weight: 300; letter-spacing: -.03em; }
.resultados > .nota { margin-top: 2.6rem; }

/* =================== Ficha de propiedad =================== */
.ficha { padding: calc(var(--barra) + 1.6rem) var(--borde) 5rem; }
.migas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.3rem; font-size: .84rem; color: var(--tinta-2); }
.migas a { text-decoration-color: var(--oro); text-underline-offset: 3px; }
.ficha__cabeza { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2.6rem; margin-bottom: 1.6rem; }
.ficha__cabeza .rotulo { margin-bottom: .5rem; }
.ficha__barrio { margin: 0 0 .5rem; font-size: clamp(2.4rem, 5.6vw, 5.2rem); line-height: .98; }
.ficha__dir { color: var(--tinta-2); }
.ficha__precio { text-align: right; }
.ficha__precio p:first-child { font-size: clamp(1.8rem, 3.2vw, 2.7rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; }
.ficha__ref { color: var(--tinta-2); font-size: .9rem; }
.galeria { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; height: min(66svh, 660px); overflow: hidden; border-radius: 24px; }
.galeria[hidden] { display: none; }
.galeria button { padding: 0; overflow: hidden; background: var(--fondo-2); }
.galeria button:first-child { grid-row: 1 / 3; }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--curva); }
.galeria button:hover img { transform: scale(1.04); }
.galeria--pocas { grid-template-columns: 2fr 1fr; }
.galeria .galeria__todas { position: absolute; right: 14px; bottom: 14px; padding: .6rem 1.1rem; overflow: visible; border: 1px solid rgb(246 242 234 / .3); border-radius: 999px; background: rgb(16 14 44 / .62);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #f6f2ea; font-size: .88rem; font-weight: 700; }
.dos-lecturas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 1.6vw, 1.5rem); margin: clamp(1.6rem, 3vw, 2.4rem) 0 clamp(2.4rem, 5vw, 4rem); }
.dl__costura { display: none; }
.dl { display: grid; gap: .9rem; align-content: start; padding: clamp(1.3rem, 2.4vw, 2.2rem); border: 1px solid var(--linea); border-radius: 24px; background: var(--carta); transition: opacity .4s var(--curva), border-color .4s; }
.dl h2 { font-size: clamp(1.7rem, 2.8vw, 2.5rem); }
html[data-lectura="invertir"] .dl--vivir, html[data-lectura="vivir"] .dl--invertir { opacity: .62; }
html[data-lectura="invertir"] .dl--invertir, html[data-lectura="vivir"] .dl--vivir { border-color: color-mix(in srgb, var(--oro) 70%, transparent); }
.dl__lista { display: flex; flex-wrap: wrap; gap: 8px; margin: .2rem 0 0; padding: 0; list-style: none; }
.dl__lista li { padding: .35rem .8rem; border: 1px solid var(--linea); border-radius: 999px; font-size: .86rem; }
.dl__nota { font-size: .9rem; color: var(--tinta-2); }
.dl__nota a { color: var(--tinta); font-weight: 700; }
.ficha__cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(1.8rem, 5vw, 5rem); align-items: start; }
.ficha__bloque { display: grid; gap: 1rem; padding: 1.8rem 0; border-top: 1px solid var(--linea); }
.ficha__bloque h2 { font-size: 1.6rem; }
.ficha__bloque h2 span { color: var(--tinta-2); font-weight: 300; }
.ficha__bloque .boton { justify-self: start; }
.desc { display: grid; gap: .8rem; color: var(--tinta-2); line-height: 1.7; }
.desc.is-corto { max-height: 18em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.video { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 20px; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }
.video__boton { position: relative; width: 100%; height: 100%; padding: 0; }
.video__boton img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.video__boton span { position: absolute; inset: auto auto 18px 18px; padding: .7rem 1.2rem; border-radius: 999px; background: #f6f2ea; color: #100e2c; font-weight: 700; }
.mapa--chico { height: 340px; margin: 0; }
.visita { position: sticky; top: calc(var(--barra) + 18px); display: grid; gap: 1rem; padding: 1.5rem; border: 1px solid var(--linea); border-radius: 24px; background: var(--carta); }
.visita h2 { font-size: 1.8rem; }
.visita form { display: grid; gap: 1rem; }
.visita fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.visita legend { margin-bottom: 8px; padding: 0; font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-2); }
.visita__dias { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.visita__franjas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.visita label { position: relative; }
.visita input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.visita label span { display: grid; place-items: center; padding: 8px 4px; border: 1px solid var(--linea); border-radius: 14px; font-size: .76rem; text-transform: capitalize; line-height: 1.2; }
.visita label b { font-size: 1.1rem; font-weight: 800; }
.visita input:checked + span { background: var(--acento); color: var(--sobre-acento); border-color: var(--acento); }
.visita input:focus-visible + span { outline: 2px solid var(--oro); outline-offset: 2px; }
.visita__pedir { width: 100%; }
.visita__otros { font-size: .9rem; }
.visita__otros a { font-weight: 700; text-decoration-color: var(--oro); text-underline-offset: 3px; }
.ficha__parecidas { margin-top: 3rem; }
.ficha__parecidas .riel-cabeza { margin-top: 0; }
.visor { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(10 8 30 / .96); color: #f6f2ea; }
.visor::backdrop { background: rgb(10 8 30 / .8); }
.visor[open] { display: grid; grid-template-rows: auto 1fr auto; }
.visor__barra { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; }
.visor__cerrar { font-size: 1.4rem; padding: 6px 12px; }
.visor__escena { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 70px; }
.visor__escena img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.visor__flecha { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 1px solid rgb(246 242 234 / .4); border-radius: 50%; font-size: 1.2rem; }
.visor__flecha[data-ant] { left: 12px; }
.visor__flecha[data-sig] { right: 12px; }
.visor__pie { padding: 12px 20px 18px; font-size: .9rem; color: #bcb8d2; }

/* =================== Proyecto =================== */
.proy-portada { position: relative; isolation: isolate; padding: calc(var(--barra) + 1.6rem) var(--borde) 0; }
.proy-portada::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60rem 40rem at 92% 0%, var(--luz), transparent 70%); }
.proy-portada__texto { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.2rem clamp(1.6rem, 3vw, 3rem); margin: .4rem 0 clamp(1.6rem, 3vw, 2.4rem); }
.proy-portada__texto .rotulo { grid-column: 1 / -1; }
.proy-portada__nombre { font-size: clamp(2.6rem, min(7vw, 13svh), 6.6rem); line-height: .96; letter-spacing: -.05em; }
.proy-portada__cifras { display: flex; flex-wrap: wrap; gap: .8rem 0; margin: 0 0 .5rem; }
.proy-portada__cifras > div { padding: 0 clamp(.9rem, 1.4vw, 1.4rem); border-left: 1px solid var(--linea); }
.proy-portada__cifras dt { font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-2); }
.proy-portada__cifras dd { margin: .25rem 0 0; font-size: clamp(1.05rem, 1.5vw, 1.4rem); font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.proy-portada__marco { position: relative; height: min(70svh, 760px); min-height: 320px; margin: 0; overflow: hidden; border-radius: 24px; background: var(--fondo-2); }
.proy-portada__marco img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s var(--curva); }
html[data-lectura="invertir"] .proy-portada__marco [data-foto-a], html:not([data-lectura="invertir"]) .proy-portada__marco [data-foto-b] { opacity: 1; }
.proy-portada__marco figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 3.4rem 1.4rem 1.1rem; background: linear-gradient(0deg, rgb(16 14 44 / .7), rgb(16 14 44 / 0));
  color: rgb(246 242 234 / .9); font-size: .64rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
@keyframes i-sube { from { opacity: 0; transform: translate3d(0, 24px, 0); } }
@keyframes i-abre { from { clip-path: inset(12% 4% 0 4% round 24px); opacity: 0; } to { clip-path: inset(0 0 0 0 round 24px); opacity: 1; } }
.mov .proy-portada__texto > * { animation: i-sube .9s var(--curva) backwards; }
.mov .proy-portada__nombre { animation-delay: .1s; }
.mov .proy-portada__cifras { animation-delay: .3s; }
.mov .proy-portada__marco { animation: i-abre 1.4s var(--curva) .25s backwards; }
.proy-cuerpo { padding: 1.6rem var(--borde) 5rem; }
.dl__frase { font-size: 1.04rem; line-height: 1.5; color: var(--tinta-2); }
.dl__tipos { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--linea); }
.dl__tipos li { display: flex; justify-content: space-between; gap: 10px; padding: .65rem 0; border-bottom: 1px solid var(--linea); }
.dl__tipos b { font-weight: 800; }
.lista-techo { display: grid; gap: .6rem; margin: .8rem 0 0; padding: 0; list-style: none; font-size: .95rem; }
.lista-techo li { position: relative; padding-left: 1.5rem; }
.lista-techo li::before { content: ''; position: absolute; left: 0; top: .5em; width: .7em; height: .56em; background: var(--oro); clip-path: var(--tilde); }
.dl__pagos .rotulo { margin-top: .4rem; }
.unidades-tabla { padding: 1.8rem 0; border-top: 1px solid var(--linea); }
.unidades-tabla__cabeza { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .9rem 1.5rem; margin-bottom: 1.2rem; }
.unidades-tabla h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.unidades-tabla h2 span { color: var(--tinta-2); font-weight: 300; }
.tabla-envoltura { max-height: 580px; overflow: auto; border: 1px solid var(--linea); border-radius: 20px; background: var(--carta); }
.unidades-tabla table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.unidades-tabla th, .unidades-tabla td { padding: .72rem 1rem; border-bottom: 1px solid var(--linea); text-align: left; white-space: nowrap; }
.unidades-tabla thead th { position: sticky; top: 0; z-index: 1; background: var(--fondo-2); font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-2); }
.unidades-tabla thead button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.unidades-tabla thead button::after { content: ' ↕'; opacity: .5; }
.unidades-tabla th[aria-sort="ascending"] button::after { content: ' ↑'; opacity: 1; color: var(--oro-t); }
.unidades-tabla th[aria-sort="descending"] button::after { content: ' ↓'; opacity: 1; color: var(--oro-t); }
.unidades-tabla tbody th { font-weight: 800; }
.unidades-tabla tbody tr:last-child > * { border-bottom: 0; }
.unidades-tabla tbody tr:hover { background: color-mix(in srgb, var(--oro) 12%, transparent); }
.unidades-tabla b { font-weight: 800; }
.tabla__acciones { display: flex; gap: 14px; }
.tabla__acciones a { font-weight: 700; text-decoration-color: var(--oro); text-underline-offset: 3px; }
.mosaico { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 170px; gap: 8px; overflow: hidden; border-radius: 24px; }
.mosaico button { position: relative; padding: 0; overflow: hidden; background: var(--fondo-2); }
.mosaico button:first-child { grid-column: span 2; grid-row: span 2; }
.mosaico img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--curva); }
.mosaico button:hover img { transform: scale(1.05); }
.mosaico__mas { display: grid; place-items: center; font-weight: 800; color: var(--tinta); border: 1px solid var(--linea); }
.pagina-proyecto .ficha__cuerpo { margin-top: .6rem; }
.pagina-proyecto .ficha__parecidas { padding-bottom: 1rem; }

/* ---------- pie ---------- */
.pie { --pie-fondo: #0a0920; --pie-texto: #f6f2ea; --pie-tenue: rgb(246 242 234 / .6); --pie-acento: #e6cfa9; --pie-linea: rgb(246 242 234 / .14); --pie-logo: 150px; --pie-ancho: var(--ancho); --pie-pad: var(--pad); }
.pie__titulo { font-family: var(--sans); }
.pie__aviso { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--pad) 1.4rem; font-size: .78rem; color: rgb(246 242 234 / .6); }

/* ---------- tablet y celular ---------- */
@media (max-width: 1180px) {
  .grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grilla--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .barra__nav { display: none; }
  .barra__menu { display: block; }
  .barra .lector { margin-left: auto; }
  .barra.is-abierta .barra__nav { display: flex; position: fixed; inset: var(--barra) 0 0 0; flex-direction: column; gap: 0; padding: 1.2rem var(--pad); overflow: auto; background: var(--fondo); color: var(--tinta);
    font-size: clamp(1.7rem, 7vw, 2.3rem); font-weight: 800; letter-spacing: -.045em; }
  .barra.is-abierta .barra__nav a { padding: .7rem 0; border-bottom: 1px solid var(--linea); }
  .barra.is-abierta .barra__nav a::after { display: none; }
  .barra.is-abierta .barra__nav-wa { display: block; color: var(--oro-t); }
}
@media (max-width: 899px) {
  :root { --barra: 64px; }
  .barra__wa { display: none; }
  .barra__logo img { height: 40px; }
  .lector button { min-width: 0; padding: 7px 11px; font-size: .8rem; }
  .busca__cuerpo { grid-template-columns: minmax(0, 1fr); }
  .resultados__filtros { display: inline-flex; min-height: 42px; padding: 0 1rem; }
  .filtros { position: fixed; inset: 0; z-index: 70; max-height: none; padding: 1.1rem var(--pad) 0; border: 0; border-radius: 0; background: var(--fondo); transform: translateY(102%); transition: transform .4s var(--curva); visibility: hidden; }
  .filtros-abiertos .filtros { transform: none; visibility: visible; }
  .filtros__cerrar { display: block; font-size: 1.2rem; padding: 6px 10px; }
  .filtros__ver { display: flex; position: sticky; bottom: 0; width: 100%; margin: 1.1rem 0 0; box-shadow: 0 -18px 18px var(--fondo), 0 18px 0 var(--fondo); }
  .vistas { margin-left: 0; }
  .ficha__precio { text-align: left; }
  .galeria { grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; height: 60svh; border-radius: 18px; }
  .galeria button:first-child { grid-column: 1 / -1; grid-row: 1; }
  .galeria button:nth-child(n+4):not(.galeria__todas) { display: none; }
  .dos-lecturas { grid-template-columns: minmax(0, 1fr); }
  html[data-lectura="invertir"] .dl--invertir { order: -1; }
  .ficha__cuerpo { grid-template-columns: minmax(0, 1fr); }
  .visita { position: static; }
  .visor__escena { padding: 0 8px; }
  .visor__flecha { top: auto; bottom: -60px; }
  .proy-portada__texto { grid-template-columns: minmax(0, 1fr); }
  .proy-portada__cifras > div:first-child { padding-left: 0; border-left: 0; }
  .proy-portada__marco { height: 56svh; border-radius: 18px; }
  .mosaico { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; border-radius: 18px; }
  .mosaico button:nth-child(n+6):not(.mosaico__mas) { display: none; }
  .unidades-tabla th, .unidades-tabla td { padding: .6rem .7rem; }
}
@media (max-width: 599px) {
  .resultados__orden { flex: 1 1 100%; min-width: 0; }
  .resultados__orden select { flex: 1; min-width: 0; }
  .grilla, .grilla--3 { grid-template-columns: minmax(0, 1fr); }
  .visita__dias { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 380px) { .barra__logo img { height: 34px; } .lector button { padding: 6px 8px; font-size: .74rem; } }
