
:root {
  --crema: #F4EEE1;
  --papel: #FBF8F1;
  --arena: #EAE1CD;
  --linea: #DCCFB5;
  --olivo: #3F4A2C;
  --olivo-2: #56623D;
  --salvia: #8E9A6E;
  --tinta: #2B2A24;
  --tinta-2: #625D50;
  --vino: #6B2D3A;
  --trigo: #B8975A;
  --s-disponible: #C6CCA5;
  --s-apartado: #D8BC82;
  --s-vendido: #6B2D3A;
  --s-no_disponible: #BDB5A3;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Figtree', system-ui, sans-serif;
  --r: 4px;
  --pad: clamp(18px, 4.5vw, 64px);
  --header: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { font-variant-numeric: lining-nums; margin: 0; background: var(--crema); color: var(--tinta); font-family: var(--sans); font-size: 16.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-variant-numeric: lining-nums; margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.08; color: var(--olivo); }
h2 { font-size: clamp(36px, 4.6vw, 58px); letter-spacing: -0.005em; }
h3 { font-size: 26px; }
p { margin: 0; }
a { color: var(--olivo-2); text-underline-offset: 3px; }
a:hover { color: var(--vino); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--vino); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--olivo); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.fine { font-size: 14px; color: var(--tinta-2); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; border: 1px solid rgb(0 0 0 / .15); }

/* ---------- encabezado */
.top { position: sticky; top: 0; z-index: 30; height: var(--header); display: flex; align-items: center; gap: 28px; padding: 0 var(--pad); background: color-mix(in srgb, var(--crema) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 46px; width: auto; display: block; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--tinta); text-decoration: none; font-size: 15px; letter-spacing: .02em; }
.nav a:hover { color: var(--olivo-2); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.lang { background: none; border: 1px solid var(--linea); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13px; letter-spacing: .06em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 13px 26px; font-weight: 500; font-size: 15.5px; letter-spacing: .02em; text-decoration: none; cursor: pointer; line-height: 1.1; transition: background .2s, color .2s; }
.btn-sm { padding: 9px 18px; font-size: 14.5px; }
.btn-main { background: var(--olivo); color: var(--crema); }
.btn-main:hover { background: #2E3720; color: #fff; }
.btn-line { background: transparent; color: var(--olivo); border-color: var(--olivo); }
.btn-line:hover { background: var(--olivo); color: var(--crema); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 980px) { .nav { display: none; } .top-actions { margin-left: auto; } .brand img { height: 38px; } }
@media (max-width: 420px) { .top-actions .btn { display: none; } }

/* ---------- portada */
.portada { position: relative; display: flex; flex-direction: column; background: #F5EFE3; overflow: hidden; }
.portada > img { order: 2; display: block; width: 100%; height: clamp(240px, 38vw, 460px); object-fit: cover; object-position: center bottom; margin-top: clamp(-120px, -6vw, -40px); position: relative; z-index: 0; }
.portada-txt { order: 1; position: relative; z-index: 1; padding: clamp(40px, 7vh, 88px) var(--pad) 0; max-width: 860px; display: flex; flex-direction: column; gap: 20px; }
.portada h1 { font-size: clamp(40px, 5vw, 74px); line-height: 1.04; max-width: 16ch; }
.portada p { font-size: 18.5px; color: var(--tinta-2); max-width: 46ch; }
.portada .acts { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 700px) { .portada > img { height: 260px; margin-top: 0; } }

/* ---------- secciones */
section { padding: clamp(64px, 8vw, 120px) var(--pad); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 56px; align-items: end; margin-bottom: 40px; }
.section-head p { max-width: 58ch; font-size: 17.5px; color: var(--tinta-2); }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }
.rama { width: 120px; height: auto; display: block; margin-bottom: 14px; }

/* ---------- lotes */
.lotes { display: grid; grid-template-columns: minmax(260px, 330px) 1fr; gap: clamp(24px, 3.5vw, 56px); align-items: start; }
.lotes-txt { position: sticky; top: calc(var(--header) + 24px); display: flex; flex-direction: column; gap: 22px; }
.lotes-txt p.lead { color: var(--tinta-2); }
.counts { display: grid; grid-template-columns: 1fr auto; margin: 0; border-top: 1px solid var(--olivo); }
.counts div { display: contents; }
.counts dt, .counts dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--linea); }
.counts dt { display: flex; align-items: center; gap: 10px; }
.counts dd { text-align: right; font-family: var(--serif); font-size: 22px; line-height: 1; font-weight: 600; color: var(--olivo); }
.filter { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--olivo); background: transparent; border-radius: 999px; padding: 7px 16px; cursor: pointer; font-size: 14px; }
.chip.is-on { background: var(--olivo); color: var(--crema); }
.plan-wrap { position: relative; min-height: 50vh; }
.masterplan { width: 100%; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r); padding: 10px; }
.masterplan svg { display: block; width: 100%; height: auto; }
.mp-lot { cursor: pointer; }
.mp-lot polygon { transition: filter .15s; }
.mp-lot:hover polygon, .mp-lot:focus-visible polygon { filter: brightness(.94); }
.mp-lot:focus { outline: none; }
.mp-lot:focus-visible polygon { stroke: var(--vino); stroke-width: 1.2; }
.mp-lot.is-sel polygon { stroke: var(--vino); stroke-width: 1.4; }
.mp-lot.is-dim { opacity: .3; }
.mp-num { font-family: var(--sans); font-weight: 600; pointer-events: none; }
.mp-street { font-family: var(--serif); font-style: italic; fill: #6F6754; }
.mp-mz { font-family: var(--serif); font-weight: 600; fill: var(--olivo); paint-order: stroke; stroke: var(--papel); stroke-width: 1.6px; pointer-events: none; }
@media (max-width: 960px) { .lotes { grid-template-columns: 1fr; } .lotes-txt { position: static; } }

/* ficha del lote */
.sheet { position: absolute; top: 0; right: 0; width: min(410px, 100%); max-height: calc(100vh - var(--header) - 40px); overflow: auto; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 24px 48px -24px rgb(63 74 44 / .45); }
.sheet[hidden] { display: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet h3 { font-size: 32px; }
.close { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; color: var(--tinta-2); }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; padding: 3px 12px; border-radius: 999px; background: var(--crema); margin-top: 6px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 0; }
.facts dt { font-size: 13px; color: var(--tinta-2); letter-spacing: .02em; }
.facts dd { margin: 0 0 12px; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--olivo); line-height: 1.2; }
.fits { display: flex; flex-direction: column; gap: 8px; }
.fits > strong { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--olivo); }
.fit { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; text-align: left; border: 1px solid var(--linea); border-radius: var(--r); padding: 11px 14px; background: #fff; cursor: pointer; }
.fit.is-on { border-color: var(--olivo); box-shadow: inset 0 0 0 1px var(--olivo); }
.fit strong { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--olivo); }
.fit .price { font-weight: 600; font-variant-numeric: tabular-nums; }
.fit small { grid-column: 1 / -1; color: var(--tinta-2); font-size: 13px; }
.fit.no { cursor: default; opacity: .6; }
.sheet .site-svg { width: 100%; height: auto; flex: none; background: #fff; border-radius: var(--r); border: 1px solid var(--linea); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-actions .btn { flex: 1 1 auto; }

/* ---------- casas */
.casas { background: var(--papel); border-top: 1px solid var(--linea); }
.tabs { display: flex; border-bottom: 1px solid var(--linea); margin-bottom: 32px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 12px 26px 16px 0; margin-right: 22px; cursor: pointer; text-align: left; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab strong { display: block; font-family: var(--serif); font-size: 26px; font-weight: 500; color: var(--olivo); }
.tab span { font-size: 13.5px; color: var(--tinta-2); }
.tab[aria-selected="true"] { border-bottom-color: var(--olivo); }
.tab[aria-selected="true"] strong { font-weight: 600; }
.model { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 36px; align-items: start; }
.model-info { display: flex; flex-direction: column; gap: 18px; }
.model-info h3 { font-size: 34px; }
.price-big { font-family: var(--serif); font-size: 40px; font-weight: 600; color: var(--olivo); line-height: 1.05; font-variant-numeric: lining-nums; }
.model-info ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--tinta-2); }
.spec { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--olivo); }
.spec span { padding: 7px 0; border-bottom: 1px solid var(--linea); }
.spec span:nth-child(even) { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.model-plan { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.plan-svg { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--linea); border-radius: var(--r); }
.plan-svg .room { cursor: pointer; }
.plan-svg .room:hover { filter: brightness(.97); }
.plan-svg .room.is-sel { fill: #EDEFDD; }
.plan-label { font-family: var(--sans); font-weight: 600; fill: var(--tinta); pointer-events: none; }
.plan-dim { font-family: var(--sans); fill: #6F6754; pointer-events: none; }
.plan-street { font-family: var(--serif); fill: #6F6754; font-style: italic; }
.cota line { stroke: #6F6754; stroke-width: 0.03; }
.cota text { font-family: var(--sans); fill: #4b473d; }
.site-svg .cota line { stroke-width: 0.08; }
.model-plan figcaption { font-size: 14.5px; color: var(--tinta-2); min-height: 2.4em; }
.viewer { position: relative; aspect-ratio: 4 / 3; background: #E9E6DA; border-radius: var(--r); overflow: hidden; border: 1px solid var(--linea); }
.viewer canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.viewer-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tinta-2); padding: 20px; text-align: center; }
.viewer-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.seg { display: inline-flex; border: 1px solid var(--olivo); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 7px 15px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--linea); }
.seg .is-on { background: var(--olivo); color: var(--crema); }
.toggle { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 14.5px; }
.toggle input, .check input, .radio input { accent-color: var(--olivo); }
.toggle input { width: 17px; height: 17px; }
@media (max-width: 1180px) { .model { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } .model-info { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
@media (max-width: 760px) { .model { grid-template-columns: 1fr; } .viewer-bar .seg { overflow-x: auto; max-width: 100%; } }

/* ---------- acabados */
.acabados { border-top: 1px solid var(--linea); }
.acab-model { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; align-items: center; }
.acab-model > span { color: var(--tinta-2); margin-right: 6px; }
.acab-grid { display: flex; flex-direction: column; gap: 34px; }
.acab-cat h3 { font-size: 28px; margin-bottom: 12px; }
.acab-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.acab-opt { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r); cursor: pointer; }
.acab-opt input { position: absolute; opacity: 0; pointer-events: none; }
.acab-opt:has(input:checked) { border-color: var(--olivo); box-shadow: inset 0 0 0 1px var(--olivo); background: #fff; }
.acab-opt:has(input:focus-visible) { outline: 2px solid var(--vino); outline-offset: 3px; }
.acab-opt .lvl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.acab-opt .lvl b { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--olivo); }
.acab-opt .lvl span { font-weight: 600; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acab-opt p { font-size: 14.5px; color: var(--tinta-2); }
.acab-opt small { color: var(--tinta-2); font-size: 12.5px; }
.acab-img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; display: block; }
.acab-total { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: end; justify-content: space-between; padding: 24px 28px; background: var(--olivo); color: var(--crema); border-radius: var(--r); }
.acab-total dl { display: flex; gap: 18px 40px; flex-wrap: wrap; margin: 0; }
.acab-total dt { font-size: 13.5px; color: #D7D9C3; }
.acab-total dd { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; }
.acab-total .btn-main { background: var(--crema); color: var(--olivo); }
@media (max-width: 860px) { .acab-opts { grid-template-columns: 1fr; } }

/* ---------- cotizador */
.cotizar { background: var(--arena); }
.cot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 44px; align-items: start; }
.cot-form { display: flex; flex-direction: column; gap: 24px; }
label > span:first-child, legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; letter-spacing: .01em; }
select, input:not([type=radio]):not([type=checkbox]):not([type=range]), textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--linea); border-radius: var(--r); background: #fff; }
select:focus, input:focus, textarea:focus { border-color: var(--olivo); outline: none; box-shadow: 0 0 0 3px rgb(63 74 44 / .15); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.radios { display: flex; flex-direction: column; gap: 6px; }
.radio { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 11px 14px; border: 1px solid var(--linea); border-radius: var(--r); background: #fff; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--olivo); box-shadow: inset 0 0 0 1px var(--olivo); }
.radio input { width: 17px; height: 17px; }
.radio small { color: var(--tinta-2); font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; }
.radio.is-off { opacity: .45; cursor: not-allowed; }
.fin-sum { background: #fff; border: 1px solid var(--linea); border-radius: var(--r); padding: 12px 14px; font-size: 14.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.range { display: flex; gap: 14px; align-items: center; }
.range input { flex: 1; accent-color: var(--olivo); }
.range output { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--olivo); min-width: 64px; text-align: right; }
.cot-out { background: var(--olivo); color: var(--crema); border-radius: var(--r); padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--header) + 16px); }
.cot-out h3 { font-size: 24px; color: #E4E3CD; font-style: italic; }
.cot-big { font-family: var(--serif); font-size: clamp(44px, 5.4vw, 66px); font-weight: 600; line-height: 1; color: #fff; }
.cot-big small { font-family: var(--sans); font-size: 16px; font-weight: 400; color: #D7D9C3; }
.cot-rows { display: grid; grid-template-columns: 1fr auto; }
.cot-rows span { padding: 8px 0; border-bottom: 1px solid rgb(244 238 225 / .16); }
.cot-rows span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.cot-rows .tot { font-weight: 700; border-bottom: 0; }
.cot-out .fine { color: #C9CCB6; }
.cot-out .btn-main { background: var(--crema); color: var(--olivo); align-self: flex-start; }
.warn { background: #F3E3BF; color: #4a3a12; padding: 10px 13px; border-radius: var(--r); font-size: 14.5px; }
.amort { margin-top: 44px; }
.amort-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.amort-head h3 { font-size: 30px; }
.tbl-wrap { max-height: 480px; overflow: auto; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 8px 14px; text-align: right; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { position: sticky; top: 0; background: var(--olivo); color: var(--crema); font-weight: 500; }
.tbl tfoot td { font-weight: 700; background: var(--arena); position: sticky; bottom: 0; }
@media (max-width: 860px) { .cot-grid { grid-template-columns: 1fr; } .cot-out { position: static; } }

/* ---------- el lugar */
.lugar { border-top: 1px solid var(--linea); }
.lugar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 32px; border-top: 1px solid var(--olivo); }
.lugar-grid > div { padding: 22px 0 26px; border-bottom: 1px solid var(--linea); display: flex; flex-direction: column; gap: 8px; }
.lugar-grid h3 { font-size: 25px; }
.lugar-grid p { color: var(--tinta-2); }

/* ---------- informes */
.informes { background: var(--papel); border-top: 1px solid var(--linea); }
.ap-form { display: flex; flex-direction: column; gap: 22px; max-width: 1040px; }
.ap-block { border-top: 1px solid var(--olivo); padding-top: 18px; }
.ap-block > legend { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--olivo); padding: 0 12px 0 0; margin-bottom: 10px; }
.ap-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
@media (max-width: 860px) { .ap-cols { grid-template-columns: 1fr; } }
.phone-row { display: flex; gap: 6px; }
.phone-row select { width: 110px; flex: none; }
.is-err { border-color: #A3352B !important; box-shadow: 0 0 0 3px rgb(163 53 43 / .12) !important; }
.err-msg { display: block; color: #A3352B; font-size: 13px; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 18px; height: 18px; margin-top: 3px; }
.hp { position: absolute; left: -9999px; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.ap-summary { background: var(--crema); border-radius: var(--r); padding: 10px 13px; margin-top: 14px; }
.form-msg { max-width: 64ch; }
.form-msg.err { color: #A3352B; }
.form-msg.ok { color: var(--olivo); font-weight: 600; }

/* ---------- pie */
.foot { display: grid; grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(180px, 1fr)); gap: 28px; padding: 48px var(--pad) 96px; font-size: 14.5px; color: var(--tinta-2); background: var(--olivo); color: #D9DAC6; }
.foot img { width: 240px; height: auto; }
.foot a { color: var(--crema); }
.foot strong { color: var(--crema); font-family: var(--serif); font-size: 20px; font-weight: 600; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }
.wa { position: fixed; right: 18px; bottom: 18px; width: 54px; height: 54px; border-radius: 50%; background: var(--olivo); color: var(--crema); display: grid; place-items: center; box-shadow: 0 10px 24px -10px rgb(0 0 0 / .5); z-index: 25; border: 1px solid rgb(244 238 225 / .4); }
.wa svg { width: 28px; height: 28px; }

/* ---------- móvil: ficha como hoja inferior */
@media (max-width: 960px) {
  .sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-height: 80vh; border-radius: 16px 16px 0 0; border-width: 1px 0 0; z-index: 40; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .sheet::before { content: ''; align-self: center; width: 44px; height: 4px; border-radius: 2px; background: var(--linea); margin: -10px 0 -6px; }
}
