/* Umbral (demo): moderno y luminoso, atardecer sobre la ciudad */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('../fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-display: swap; font-weight: 300 900; src: url('../fonts/figtree-latin-wght-normal.woff2') format('woff2'); }

:root { --sand: #f6f3ec; --card: #fff; --ink: #13211d; --muted: #5d6b66; --emerald: #0f7b63; --emerald-2: #0b5e4c; --coral: #e76f51; --navy: #1d3557; --line: rgba(19, 33, 29, 0.12); --pill: #e76f51; --scroll-bar: #e76f51; }
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { background: var(--sand); color: var(--ink); font-family: 'Figtree', system-ui, sans-serif; line-height: 1.55; overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
h1, h2, h3 { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; }
h2 { font-size: clamp(2.2rem, 5vw, 3.9rem); margin-top: 0.45rem; }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 clamp(1.1rem, 3vw, 2rem); }
.kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--emerald); }
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.9rem 1.5rem; border-radius: 99px; background: var(--emerald); color: #fff; font-weight: 700; font-size: 0.95rem; text-decoration: none; transition: background 0.25s ease; }
.btn:hover { background: var(--emerald-2); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }

/* Encabezado */
.head { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem clamp(1.1rem, 3vw, 2rem); background: rgba(246, 243, 236, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 0.45rem; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.4rem; letter-spacing: -0.04em; text-decoration: none; color: var(--emerald-2); }
.head-nav { display: flex; gap: 1.5rem; font-size: 0.92rem; font-weight: 500; }
.head-nav a { text-decoration: none; opacity: 0.8; transition: opacity 0.2s ease; }
.head-nav a:hover { opacity: 1; }
.fav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.9rem; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.85rem; font-weight: 600; transition: background 0.2s ease, color 0.2s ease; }
.fav-toggle[aria-pressed='true'] { background: var(--coral); color: #fff; }
@media (max-width: 760px) { .head-nav { display: none; } }

/* Héroe */
.hero { position: relative; padding-bottom: 5rem; overflow: hidden; background: #1d3557; color: #fff; min-height: calc(100svh - 3.6rem); display: flex; flex-direction: column; }
.hero-bg { position: absolute; inset: -7% 0; pointer-events: none; }
.hero-zoom { position: absolute; inset: 0; overflow: hidden; }
.hero-zoom picture { display: contents; }
.hero-zoom img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; animation: heroZoom 24s var(--ease-soft) both; }
@keyframes heroZoom { from { transform: scale(1.09); } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 22, 42, 0.8) 0%, rgba(13, 22, 42, 0.5) 44%, rgba(13, 22, 42, 0.12) 72%, rgba(13, 22, 42, 0.45) 100%), linear-gradient(90deg, rgba(13, 22, 42, 0.5), rgba(13, 22, 42, 0) 60%); }
.hero-copy { position: relative; z-index: 2; width: 100%; max-width: 76rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.1rem, 3vw, 2rem) 2rem; flex: 1; }
.hero .kicker { color: #ffe0b3; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.9rem, 8.2vw, 6.6rem); }
.hero h1 em { font-style: normal; color: #ffcf7f; }
.lead { max-width: 33rem; margin-top: 1.2rem; font-size: 1.12rem; color: rgba(255, 255, 255, 0.88); }

/* Buscador */
.search { position: relative; z-index: 3; width: calc(100% - 2.2rem); max-width: 72rem; margin: 0 auto; }
.search-tabs { display: inline-flex; gap: 0.2rem; padding: 0.3rem 0.3rem 0; background: var(--card); border-radius: 0.9rem 0.9rem 0 0; }
.op { padding: 0.55rem 1.2rem; border-radius: 0.65rem 0.65rem 0 0; color: var(--ink); font-size: 0.9rem; font-weight: 700; transition: background 0.2s ease, color 0.2s ease; }
.op[aria-pressed='true'] { background: var(--emerald); color: #fff; }
.search-fields { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: end; gap: 0.8rem; padding: 1.1rem; background: var(--card); color: var(--ink); border-radius: 0 1rem 1rem 1rem; box-shadow: 0 30px 60px -25px rgba(19, 33, 29, 0.55); }
.sf label { display: block; font-size: 0.74rem; font-weight: 700; color: var(--muted); margin-bottom: 0.25rem; }
.sf select { width: 100%; padding: 0.65rem 0.7rem; background: var(--sand); border: 1px solid transparent; border-radius: 0.6rem; font-size: 0.92rem; cursor: pointer; }
.sf select:focus { outline: none; border-color: var(--emerald); }
.search-go { display: inline-flex; align-items: center; justify-content: center; gap: 0.3em; padding: 0.75rem 1.3rem; border-radius: 0.7rem; background: #c04a2e; color: #fff; font-weight: 700; font-size: 0.92rem; white-space: nowrap; text-decoration: none; }
@media (max-width: 860px) { .search-fields { grid-template-columns: 1fr 1fr; } .search-go { grid-column: 1 / -1; } }

/* Cifras */
.numbers { background: var(--emerald-2); color: #fff; }
.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-top: 1.7rem; padding-bottom: 1.7rem; font-size: 0.88rem; }
.numbers b { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; }
@media (max-width: 680px) { .numbers-grid { grid-template-columns: repeat(2, 1fr); } }

/* Listado */
.list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; font-size: 0.88rem; }
.result { color: var(--muted); font-weight: 600; }
.sort { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.sort select { padding: 0.45rem 0.6rem; border-radius: 0.5rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.3rem; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: 1.1rem; overflow: hidden; box-shadow: 0 1px 2px rgba(19, 33, 29, 0.06); transition: box-shadow 0.35s ease, translate 0.45s var(--ease-out); }
.card:hover { box-shadow: 0 24px 44px -24px rgba(19, 33, 29, 0.4); translate: 0 -5px; }
.card-open { display: block; width: 100%; text-align: left; flex: 1; }
.scene { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #cfd8dc; }
.scene img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out), opacity 0.5s ease; }
.card:hover .scene img { transform: scale(1.05); }
.scene-alt { position: absolute; inset: 0; opacity: 0; }
.card:hover .scene-alt { opacity: 1; }
.photo-count { position: absolute; right: 0.7rem; bottom: 0.7rem; padding: 0.15rem 0.55rem; border-radius: 99px; background: rgba(19, 33, 29, 0.78); color: #fff; font-size: 0.7rem; font-weight: 600; }
.tag { position: absolute; left: 0.7rem; top: 0.7rem; padding: 0.2rem 0.6rem; border-radius: 99px; background: rgba(255, 255, 255, 0.94); color: var(--ink); font-size: 0.72rem; font-weight: 700; }
.tag-renta { background: var(--navy); color: #fff; }
.heart { position: absolute; right: 0.6rem; top: 0.6rem; z-index: 2; width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: var(--ink); transition: transform 0.3s var(--ease-out); }
.heart:hover { transform: scale(1.1); }
.heart svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; }
.heart[aria-pressed='true'] { color: var(--coral); }
.heart[aria-pressed='true'] svg { fill: currentColor; animation: heartPop 0.45s var(--ease-out); }
@keyframes heartPop { 40% { transform: scale(1.4); } }
.card-body { padding: 1rem 1.1rem 1.15rem; }
.card-price { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.45rem; font-weight: 700; }
.card-price small { font-family: 'Figtree', sans-serif; font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.card-title { font-weight: 600; margin-top: 0.15rem; }
.card-zone { color: var(--muted); font-size: 0.86rem; }
.specs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin-top: 0.65rem; font-size: 0.82rem; color: var(--muted); }
.specs b { color: var(--ink); }
.no-results { padding: 2rem 0; color: var(--muted); }
.art-note { margin-top: 1.4rem; font-size: 0.78rem; color: var(--muted); }

/* Mapa */
.map-section { background: #eee9de; }
.map-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.map-grid > div > p:not(.kicker) { margin-top: 0.8rem; color: var(--muted); }
.zone-list { list-style: none; padding: 0; margin-top: 1.3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; }
.zone-btn { display: flex; justify-content: space-between; gap: 0.5rem; width: 100%; padding: 0.45rem 0.6rem; border-radius: 0.5rem; font-size: 0.92rem; font-weight: 500; transition: background 0.2s ease, color 0.2s ease; }
.zone-btn:hover { background: rgba(15, 123, 99, 0.12); }
.zone-btn[aria-pressed='true'] { background: var(--emerald); color: #fff; }
.map-wrap { background: #dfe8e1; border-radius: 1.2rem; overflow: hidden; }
#zoneMap { display: block; width: 100%; height: auto; }
.m-road { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; opacity: 0.8; }
.m-road-2 { fill: none; stroke: #fff; stroke-width: 3; opacity: 0.6; }
.m-park { fill: #b9d5b2; }
.m-water { fill: #a9cfe2; }
.m-zone { cursor: pointer; }
.m-zone circle { fill: var(--emerald); transition: fill 0.25s ease; transform-box: fill-box; transform-origin: center; }
.m-zone .pulse { fill: var(--emerald); opacity: 0.25; animation: mapPulse 2.6s ease-out infinite; }
@keyframes mapPulse { 0% { transform: scale(0.6); opacity: 0.45; } 100% { transform: scale(1.7); opacity: 0; } }
.m-zone text { font-size: 15px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: rgba(255, 255, 255, 0.85); stroke-width: 4px; }
.m-zone .n { font-size: 13px; fill: #fff; stroke: none; }
.m-zone:hover circle.dot, .m-zone.is-on circle.dot, .m-zone:focus-visible circle.dot { fill: var(--coral); }
.m-zone.is-on .pulse { fill: var(--coral); }
@media (max-width: 820px) { .map-grid { grid-template-columns: 1fr; } }

/* Calculadora */
.calc-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.calc { display: grid; gap: 1.3rem; margin-top: 2rem; }
.range label { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; font-weight: 600; margin-bottom: 0.45rem; }
.range output { font-family: 'Bricolage Grotesque', sans-serif; color: var(--emerald-2); }
.range input { width: 100%; accent-color: var(--emerald); }
.calc-result { position: relative; padding: clamp(1.6rem, 3vw, 2.4rem); background: var(--navy); color: #fff; border-radius: 1.4rem; }
.calc-label { font-size: 0.85rem; opacity: 0.8; }
.monthly { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(2.6rem, 6vw, 3.9rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
.donut { position: absolute; right: clamp(1.2rem, 3vw, 2.2rem); top: clamp(1.2rem, 3vw, 2.2rem); width: clamp(4.5rem, 9vw, 6.5rem); transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 16; }
.donut-bg { stroke: var(--coral); }
.donut-cap { stroke: #7fd8be; stroke-dasharray: 60 100; transition: stroke-dasharray 0.7s var(--ease-out); }
.calc-dl { margin: 1.3rem 0 0; display: grid; gap: 0.5rem; }
.calc-dl > div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.16); font-size: 0.92rem; }
.calc-dl dd { margin: 0; font-weight: 600; }
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.4rem; }
.dot-cap { background: #7fd8be; }
.dot-int { background: var(--coral); }
.calc-note { margin-top: 0.9rem; font-size: 0.74rem; opacity: 0.75; }
@media (max-width: 820px) { .calc-grid { grid-template-columns: 1fr; } }

/* Vender */
.sell { background: var(--emerald-2); color: #fff; }
.sell .kicker { color: #bff0dd; }
.sell-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem clamp(2rem, 4vw, 4rem); align-items: start; }
.sell-steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 1rem; }
.sell-steps li { counter-increment: s; position: relative; padding: 1.1rem 1.2rem 1.1rem 3.6rem; background: rgba(255, 255, 255, 0.08); border-radius: 0.9rem; }
.sell-steps li::before { content: counter(s); position: absolute; left: 1.1rem; top: 1.05rem; width: 1.8rem; height: 1.8rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--emerald-2); font-weight: 800; font-size: 0.85rem; }
.sell-steps h3 { font-size: 1.25rem; }
.sell-steps p { font-size: 0.92rem; opacity: 0.85; }
.sell .btn { grid-column: 1; justify-self: start; background: #fff; color: var(--emerald-2); }
.sell .btn:hover { background: #dff6ec; }
@media (max-width: 820px) { .sell-grid { grid-template-columns: 1fr; } }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.8rem clamp(1.1rem, 3vw, 2rem) 5rem; font-size: 0.82rem; color: var(--muted); }

/* Detalle */
dialog { border: 0; padding: 0; background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(19, 33, 29, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.detail { width: min(48rem, 94vw); max-height: 92svh; overflow: auto; margin: auto; border-radius: 1.3rem; }
.detail[open] { animation: dIn 0.55s var(--ease-out); }
@keyframes dIn { from { opacity: 0; transform: translateY(26px) scale(0.98); } }
.d-close { position: absolute; right: 0.8rem; top: 0.8rem; z-index: 3; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(255, 255, 255, 0.94); transition: transform 0.4s var(--ease-out); }
.d-close:hover { transform: rotate(90deg); }
.d-gallery { position: relative; }
.d-scene { aspect-ratio: 16 / 9; overflow: hidden; background: #cfd8dc; }
.d-scene img { display: block; width: 100%; height: 100%; object-fit: cover; }
.d-nav { position: absolute; top: 50%; width: 2.6rem; height: 2.6rem; margin-top: -1.3rem; border-radius: 50%; background: rgba(255, 255, 255, 0.94); font-size: 1.5rem; line-height: 1; transition: transform 0.3s var(--ease-out); }
.d-nav:hover { transform: scale(1.08); }
.d-prev { left: 0.8rem; }
.d-next { right: 0.8rem; }
.d-count { position: absolute; left: 0.8rem; bottom: 0.8rem; padding: 0.15rem 0.6rem; border-radius: 99px; background: rgba(19, 33, 29, 0.78); color: #fff; font-size: 0.75rem; font-weight: 600; }
.d-thumbs { display: flex; gap: 0.5rem; padding: 0.7rem clamp(1.3rem, 3vw, 2rem) 0; }
.d-thumbs[hidden] { display: none; }
.d-thumb { width: 5.6rem; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 0.5rem; opacity: 0.6; transition: opacity 0.25s ease, box-shadow 0.25s ease; }
.d-thumb:hover { opacity: 1; }
.d-thumb[aria-pressed='true'] { opacity: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--emerald); }
.d-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.d-nav[hidden], .d-count[hidden] { display: none; }
.d-body { padding: clamp(1.3rem, 3vw, 2rem); }
.d-tag { font-size: 0.78rem; font-weight: 700; color: var(--emerald); text-transform: uppercase; letter-spacing: 0.05em; }
.d-body h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-top: 0.2rem; }
.d-zone { color: var(--muted); }
.d-price { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.8rem; font-weight: 700; margin-top: 0.4rem; }
.d-specs { list-style: none; padding: 0.8rem 0; margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.d-text { margin-top: 0.9rem; color: var(--muted); }
.d-amen { list-style: none; padding: 0; margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.d-amen li { padding: 0.25rem 0.7rem; border-radius: 99px; background: var(--sand); font-size: 0.82rem; }
.d-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.3rem; }
.d-note { margin-top: 0.8rem; font-size: 0.74rem; color: var(--muted); }
.modal-open { overflow: hidden; }
