/* ==========================================================================
   styles.css — composición de BAMA Asesoría Inmobiliaria
   Requiere tokens.css → base.css. Sin colores literales: todo sale de tokens.
   Breakpoints: 1120 (nav → menú) · 960 (1 columna) · 767 (móvil) · 400 (compacto)
   ========================================================================== */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
body { overflow-x: clip; }
.display { font-optical-sizing: auto; }
.i { stroke-width: 1.75; }
.i--sm { width: 16px; height: 16px; stroke-width: 2; }
.eyebrow { font-weight: 650; letter-spacing: .1em; color: var(--ink-3); }
.eyebrow::before { width: 14px; height: 2px; border-radius: 2px; }
.section__lead { font-size: var(--fs-small); max-width: 400px; }
@media (min-width: 768px) { .section__lead { font-size: 16px; } }
strong { font-weight: 650; }
.inline-link { color: var(--brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Botones: jerarquía ---------- */
/* primario (rojo) = 1 acción por pantalla · ink = conversión dentro de tarjeta · outline = secundario */
.btn { transition: background-color var(--dur-1) var(--ease), color var(--dur-1), box-shadow var(--dur-1), transform var(--dur-press) var(--ease); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn--wa { background: var(--wa); color: var(--on-wa); box-shadow: var(--sh-btn); }
.btn--wa:hover { background: var(--wa-hover); }
.btn--outline:hover { box-shadow: inset 0 0 0 1px var(--ink-3), var(--sh-xs); background: var(--surface); }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.btn--on-inverse { color: var(--inverse); }
.text-link { color: var(--ink); font-size: 15px; }
.text-link .i { transition: transform var(--dur-2) var(--ease); }
.text-link:hover .i { transform: translateX(3px); }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand__mark { width: 46px; height: auto; flex: none; }
.roof-red { fill: var(--brand); }
.roof-ink { fill: var(--ink); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: .02em; color: var(--ink); }
.brand__tag { margin-top: 4px; font-size: var(--fs-meta); font-weight: 600; letter-spacing: .04em; color: var(--ink-3); }
.brand--inverse .roof-ink { fill: var(--on-inverse); }
.brand--inverse .roof-red { fill: var(--brand-on-inverse); }
.brand--inverse .brand__name { color: var(--on-inverse); }
.brand--inverse .brand__tag { color: var(--on-inverse-2); }

/* ---------- Header ---------- */
.header__row { gap: 20px; }
.nav a { font-size: 14.5px; }
.nav a[aria-current="true"] { color: var(--ink); }
.header__actions { margin-left: auto; }
@media (min-width: 1121px) { .header__actions { margin-left: 0; } }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(64px, 8vw, 104px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero__title { font-size: var(--fs-hero); margin-bottom: 22px; max-width: 15ch; }
.hero__lead { margin-bottom: 30px; max-width: 54ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.intents { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); }
.intents__label { font-size: var(--fs-meta); font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.intents__row { display: flex; flex-wrap: wrap; gap: 8px; }
.intent { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--sh-xs); font-weight: 600; font-size: 15px; color: var(--ink); transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), color var(--dur-1); }
.intent .i { color: var(--brand); }
@media (hover: hover) { .intent:hover { box-shadow: inset 0 0 0 1px var(--border-strong), var(--sh-md); transform: translateY(var(--lift)); } }
.intent:active { transform: translateY(0) scale(.98); }

/* Visual: foto con silueta de casa bajo los dos techos del logotipo */
.hero__visual { position: relative; margin: 0; padding-top: 8%; }
.hero__frame { position: relative; aspect-ratio: 10 / 11; overflow: hidden; background: var(--muted-2);
  clip-path: polygon(50% 0%, 100% 24%, 100% 100%, 0% 100%, 0% 24%); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.hero__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero__roofline { position: absolute; left: -6.667%; width: 113.333%; max-width: none; height: auto; aspect-ratio: 680 / 200; top: 0; margin-top: 1.333%; overflow: visible; pointer-events: none; }
.rl { fill: none; stroke-width: 12; stroke-linecap: square; stroke-linejoin: miter; }
.rl--red { stroke: var(--brand); }
.rl--ink { stroke: var(--ink); }
.hero__caption { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: var(--fs-meta); font-weight: 600; letter-spacing: .02em; color: var(--ink-3); }
.hero__caption-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.hero__note { position: absolute; left: -28px; bottom: 64px; display: grid; gap: 4px; max-width: 250px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--sh-lg); }
.hero__note-k { font-size: var(--fs-meta); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text); }
.hero__note-v { font-size: var(--fs-small); font-weight: 600; line-height: 1.4; color: var(--ink); }

/* Entrada del hero: 100 % CSS. Arranca con la primera pintura, sin esperar a JavaScript,
   así el titular nunca queda oculto aunque los scripts tarden o fallen. */
@media (prefers-reduced-motion: no-preference) {
  .intro { animation: intro-up .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .hero__frame { animation: house-rise 1.3s var(--ease-out) .15s both; }
  .hero__frame img { animation: img-settle 1.8s var(--ease-out) .15s both; }
  .rl { stroke-dasharray: 1; animation: roof-draw 1.1s var(--ease-out) both; }
  .rl--ink { animation-delay: .55s; }
  .rl--red { animation-delay: .7s; }
  .hero__note { animation: note-in .8s var(--ease-out) 1s both; }
}
@keyframes intro-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes house-rise { from { clip-path: polygon(50% 100%, 100% 100%, 100% 100%, 0% 100%, 0% 100%); } to { clip-path: polygon(50% 0%, 100% 24%, 100% 100%, 0% 100%, 0% 24%); } }
@keyframes img-settle { from { transform: scale(1.14); } to { transform: none; } }
@keyframes roof-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes note-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.services__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
.service { display: flex; flex-direction: column; padding: clamp(22px, 2.4vw, 32px); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--sh-xs); scroll-margin-top: calc(var(--header-h) + 24px); }
.service:target { box-shadow: inset 0 0 0 2px var(--brand), var(--sh-md); }
.service__top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.service__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-soft-border); color: var(--brand-text); }
.service__icon .i { width: 22px; height: 22px; }
.service__kicker { font-size: var(--fs-meta); font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.service__title { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-h3); letter-spacing: -.02em; line-height: 1.15; margin-bottom: 10px; text-wrap: balance; }
.service__text { color: var(--ink-3); font-size: 15px; line-height: 1.6; margin-bottom: 22px; text-wrap: pretty; }
.steps { display: grid; gap: 12px; margin-bottom: 26px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.steps__n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--muted); box-shadow: inset 0 0 0 1px var(--border); font-size: 12.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.service__actions { margin-top: auto; display: grid; gap: 14px; justify-items: center; }

/* ==========================================================================
   CATÁLOGO
   ========================================================================== */
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin-bottom: 24px; border-radius: var(--r); background: var(--warn-50); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 22%, transparent); font-size: var(--fs-small); line-height: 1.5; color: var(--ink-2); }
.notice .i { color: var(--warn); margin-top: 1px; }
.catalog__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background-color var(--dur-1), color var(--dur-1), box-shadow var(--dur-1), transform var(--dur-press); }
.filter:hover { box-shadow: inset 0 0 0 1px var(--ink-3); color: var(--ink); }
.filter:active { transform: scale(.97); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.catalog__count { font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.catalog__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
.catalog__noscript { grid-column: 1 / -1; display: grid; gap: 14px; justify-items: start; padding: 24px; border-radius: var(--r-xl); background: var(--muted); }
.js .catalog__noscript { display: none; }
.hcard { position: relative; display: flex; flex-direction: column; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--sh-xs); overflow: hidden; cursor: pointer; transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
@media (hover: hover) {
  .hcard:not(.hcard--ask):hover { box-shadow: inset 0 0 0 1px var(--border-strong), var(--sh-lg); transform: translateY(var(--lift)); }
  .hcard:hover .hcard__media img { transform: scale(1.04); }
  .hcard:hover .hcard__cta .i { transform: translateX(3px); }
}
.hcard:has(.hcard__link:focus-visible) { box-shadow: inset 0 0 0 2px var(--brand), var(--sh-lg); }
.hcard__media { position: relative; aspect-ratio: 4 / 3; background: var(--muted-2); overflow: hidden; }
.hcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-4) var(--ease-out); }
.hcard__status { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: var(--r-pill); background: var(--ink); color: var(--surface); font-size: var(--fs-meta); font-weight: 650; letter-spacing: .02em; }
.hcard__photos { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: var(--fs-meta); font-weight: 650; box-shadow: var(--sh-sm); font-variant-numeric: tabular-nums; }
.hcard__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.hcard__price { font-family: var(--font-display); font-weight: 650; font-size: 23px; letter-spacing: -.02em; color: var(--ink); }
.hcard__title { font-size: 16px; font-weight: 650; line-height: 1.3; }
.hcard__link { text-align: left; color: inherit; font-weight: inherit; }
.hcard__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.hcard__link:focus-visible { outline: none; }
.hcard__loc { font-size: var(--fs-small); color: var(--ink-3); line-height: 1.45; }
.hcard__specs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.hcard__specs li { display: inline-flex; align-items: center; gap: 6px; }
.hcard__specs .i { color: var(--ink-4); }
.hcard__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; font-size: var(--fs-small); font-weight: 650; color: var(--brand-text); }
.hcard__cta .i { transition: transform var(--dur-2) var(--ease); }
.hcard--ask { cursor: default; background: var(--inverse); box-shadow: none; color: var(--on-inverse); }
.hcard__ask { display: flex; flex-direction: column; gap: 14px; justify-content: flex-end; height: 100%; min-height: 300px; padding: 28px 24px 24px; }
.hcard__ask-k { font-family: var(--font-display); font-weight: 650; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.hcard__ask-t { color: var(--on-inverse-2); line-height: 1.55; margin-bottom: 6px; }
.hcard__ask-t strong { color: var(--on-inverse); }
.catalog__more { display: flex; justify-content: center; margin-top: 28px; }
.catalog__more .btn[hidden] { display: none; }

/* ==========================================================================
   CRÉDITOS (banda inversa: Mar de Cortés)
   ========================================================================== */
.credits { position: relative; overflow: hidden; }
.credits::before { content: ""; position: absolute; inset: auto -10% -40% auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 60%, transparent), transparent); opacity: .55; pointer-events: none; }
.credits__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: clamp(36px, 5vw, 80px); align-items: start; }
.credits .section__title { color: var(--on-inverse); max-width: 16ch; margin-bottom: 14px; }
.credits__lead { color: var(--on-inverse-2); font-size: var(--fs-lead); line-height: 1.6; margin-bottom: 28px; }
.credit-list { display: grid; margin-bottom: 18px; border-top: 1px solid var(--inverse-border); }
.credit { display: grid; grid-template-columns: minmax(130px, .38fr) 1fr; gap: 6px 20px; padding: 16px 0; border-bottom: 1px solid var(--inverse-border); }
.credit strong { font-family: var(--font-display); font-weight: 650; font-size: 19px; letter-spacing: -.01em; }
.credit span { color: var(--on-inverse-2); font-size: 15px; line-height: 1.55; }
.credits__fine { font-size: 13.5px; color: var(--on-inverse-2); margin-bottom: 26px; max-width: 52ch; }

.calc { position: relative; display: grid; gap: 18px; padding: clamp(22px, 2.6vw, 32px); border-radius: var(--r-2xl); background: var(--surface); color: var(--ink); box-shadow: var(--sh-xl); }
.calc :focus-visible { outline-color: var(--brand); }
.calc__head { display: flex; gap: 14px; align-items: flex-start; }
.calc__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--muted); color: var(--ink-2); flex: none; }
.calc__title { font-family: var(--font-display); font-weight: 650; font-size: 21px; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 4px; }
.calc__sub { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.calc__field { display: grid; gap: 8px; min-width: 0; }
.calc__label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc__label-row label, .calc__label { font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); }
.calc__label-row output { font-weight: 700; font-size: 15px; }
.calc__row { display: grid; grid-template-columns: 1fr 120px; gap: 14px; align-items: end; }
.calc .segmented button { height: 40px; padding: 0 8px; }
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(var(--shadow-rgb),.1), 0 0 0 1px rgba(var(--shadow-rgb),.06); }
.calc__rate { position: relative; }
.calc__rate input { width: 100%; height: 48px; padding: 0 30px 0 12px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-input); font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; }
.calc__rate input::-webkit-inner-spin-button { -webkit-appearance: none; }
.calc__rate input:focus { box-shadow: inset 0 0 0 1px var(--brand), var(--ring); }
.calc__rate input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--danger); }
.calc__rate span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; }
.calc__help { margin-top: -8px; font-size: 13px; color: var(--ink-3); }
.calc__help.is-error { color: var(--danger-700); font-weight: 600; }
.calc__result { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--muted); }
.calc__result-k { font-size: var(--fs-meta); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.calc__result-v { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4vw, 44px); letter-spacing: -.03em; line-height: 1.1; }
.calc__result-v::after { content: " /mes"; font-family: var(--font-sans); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink-3); }
.calc__result-meta { font-size: 13px; color: var(--ink-3); }
.calc__fine { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); text-align: center; }

/* ==========================================================================
   CONSTRUCCIÓN: casa 3D por etapas
   ========================================================================== */
.build__layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.build__stage { position: sticky; top: calc(var(--header-h) + 24px); margin: 0; }
.build__canvas { position: relative; aspect-ratio: 600 / 400; border-radius: var(--r-2xl); background:
    radial-gradient(120% 90% at 30% 10%, var(--surface) 0%, transparent 60%),
    linear-gradient(180deg, var(--muted) 0%, var(--bg) 100%);
  box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; }
.build__canvas.is-dragging { cursor: grabbing; }
.build__canvas:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.build__canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.build__hud { position: absolute; left: 16px; right: 16px; top: 16px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.build__hud-step, .build__hud-hint { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--sh-sm); font-size: var(--fs-meta); font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.build__hud-step { color: var(--ink); }
.build__caption { margin-top: 12px; font-size: var(--fs-meta); color: var(--ink-3); }
.build__steps { display: grid; padding-block: 6vh 4vh; }
.bstep { display: grid; grid-template-columns: 44px 1fr; gap: 16px; min-height: 46vh; align-content: center; padding: 8px 0; opacity: .38; transition: opacity var(--dur-3) var(--ease); }
.bstep.is-active, .bstep.is-done { opacity: 1; }
.bstep.is-done { opacity: .62; }
.bstep__n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--border-strong); font-weight: 700; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; transition: background-color var(--dur-3), color var(--dur-3), box-shadow var(--dur-3); }
.bstep.is-active .bstep__n { background: var(--brand); color: var(--on-brand); box-shadow: none; }
.bstep.is-done .bstep__n { background: var(--ink); color: var(--surface); box-shadow: none; }
.bstep__title { font-family: var(--font-display); font-weight: 650; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; line-height: 1.12; margin-bottom: 8px; padding-top: 6px; }
.bstep p { color: var(--ink-3); line-height: 1.6; max-width: 40ch; }
.build__cta { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-top: 24px; padding: 22px 24px; border-radius: var(--r-xl); background: var(--muted); }
.build__cta p { color: var(--ink-2); font-weight: 500; }

/* ==========================================================================
   NOSOTROS
   ========================================================================== */
.about__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__mark { position: relative; display: grid; place-items: center; align-content: center; gap: 28px; aspect-ratio: 1; border-radius: var(--r-2xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--sh-md); padding: 12%; overflow: hidden; }
.about__mark::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 28px); opacity: .7; -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000); }
.about__logo { width: min(320px, 78%); height: auto; }
.about__motto { font-size: clamp(26px, 3vw, 38px); text-align: center; line-height: 1.05; color: var(--ink); }
.about__copy .section__title { margin-bottom: 22px; }
.about__text { color: var(--ink-2); font-size: 17px; line-height: 1.65; margin-bottom: 14px; max-width: 58ch; text-wrap: pretty; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 28px 0 24px; border-radius: var(--r-lg); overflow: hidden; background: var(--border); box-shadow: inset 0 0 0 1px var(--border); }
.fact { display: grid; gap: 4px; padding: 16px 18px; background: var(--surface); }
.fact dt { font-size: var(--fs-meta); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.fact dd { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.4; }

/* ==========================================================================
   PREGUNTAS
   ========================================================================== */
.faq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq__head { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 16px; justify-items: start; }
.faq__head .eyebrow { margin-bottom: 0; }
.acc summary { font-size: 16.5px; line-height: 1.4; }
.acc summary .i { flex: none; }
.acc__body { padding-bottom: 22px; }
.acc__body a { color: var(--brand-text); font-weight: 600; }

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--grid-gap); align-items: start; }
.form { display: grid; gap: 20px; padding: clamp(22px, 3vw, 36px); border-radius: var(--r-2xl); }
.form__group { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.form__group legend { padding: 0; margin-bottom: 10px; }
.field__label, .field label { color: var(--ink); }
.opt { font-weight: 500; color: var(--ink-3); }
.input { font-size: 16px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A5147' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
textarea.input { resize: vertical; min-height: 92px; }
.field[hidden] { display: none; }
.choice--chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice--chips button { flex-direction: row; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); font-size: 14.5px; font-weight: 600; }
.choice--chips button[aria-checked="true"] { color: var(--brand-text); }
.choice--chips button:active { transform: scale(.97); }
.preview { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--ok-50); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 20%, transparent); }
.preview__k { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ok-700); }
.preview__v { font-size: 15px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.form__fine { font-size: 13px; line-height: 1.5; color: var(--ink-3); text-align: center; }

.channels { display: grid; gap: 10px; }
.channel { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 16px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--sh-xs); transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
@media (hover: hover) { .channel:hover { box-shadow: inset 0 0 0 1px var(--border-strong), var(--sh-md); transform: translateY(var(--lift)); } .channel:hover .channel__go { transform: translateX(3px); color: var(--ink); } }
.channel:active { transform: scale(.99); }
.channel__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--muted); color: var(--ink-2); flex: none; }
.channel--wa .channel__icon { background: var(--wa); color: var(--on-wa); }
.channel__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.channel__body strong { font-size: 15px; }
.channel__body span { font-size: var(--fs-small); color: var(--ink-3); }
.channel__wrap { overflow-wrap: anywhere; }
.channel__go { color: var(--ink-4); transition: transform var(--dur-2) var(--ease), color var(--dur-1); }
.address { display: flex; gap: 14px; padding: 16px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.address strong { display: block; font-size: 15px; margin-bottom: 4px; }
address { font-style: normal; color: var(--ink-2); line-height: 1.5; margin-bottom: 10px; }
.address .text-link { font-size: 14px; }
.address__note { margin-top: 10px; font-size: 13px; color: var(--ink-3); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--inverse); color: var(--on-inverse); padding: clamp(48px, 6vw, 80px) 0 calc(28px + env(safe-area-inset-bottom)); }
.footer :focus-visible { outline-color: var(--on-inverse); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px 48px; padding-bottom: 36px; border-bottom: 1px solid var(--inverse-border); }
.footer__brand p { margin-top: 16px; max-width: 36ch; color: var(--on-inverse-2); line-height: 1.6; }
.footer__title { font-size: var(--fs-meta); font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--on-inverse-2); margin-bottom: 10px; }
.footer__col { display: grid; align-content: start; }
.footer__col a, .footer__col span { display: flex; align-items: center; min-height: 40px; color: var(--on-inverse); font-size: 15px; }
.footer__col span { color: var(--on-inverse-2); }
.footer__col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__mail { overflow-wrap: anywhere; }
.footer__bottom { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 22px; font-size: 13px; color: var(--on-inverse-2); }

/* ==========================================================================
   WHATSAPP FLOTANTE · BARRA MÓVIL · MENÚ
   ========================================================================== */
.wa-float { position: fixed; right: 24px; bottom: 24px; z-index: var(--z-float); display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border-radius: var(--r-pill); background: var(--wa); color: var(--on-wa); font-weight: 650; font-size: 15px; box-shadow: var(--sh-btn), var(--sh-lg);
  opacity: 0; transform: translateY(16px) scale(.96); pointer-events: none; transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out), background-color var(--dur-1); }
.wa-float.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.wa-float:hover { background: var(--wa-hover); }
.wa-float .i { width: 22px; height: 22px; }

.action-bar > a { color: var(--ink); }
.action-bar > .is-wa { background: var(--wa); color: var(--on-wa); box-shadow: var(--sh-btn); }
.drawer__head .brand__name { font-size: 20px; }
.drawer__nav a { font-size: 22px; }
.drawer__nav a:hover { color: var(--brand-text); }

/* ==========================================================================
   FICHA DE CASA
   ========================================================================== */
.dialog--house { width: min(1040px, calc(100vw - 48px)); padding: 0; overscroll-behavior: contain; }
.dialog__close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; background: var(--surface); box-shadow: var(--sh-md); }
.house { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "gal info" "thumbs info"; }
.gallery { grid-area: gal; position: relative; background: var(--ink); }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; outline: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { box-shadow: inset 0 0 0 3px var(--brand); }
.gallery__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: grid; place-items: center; }
.gallery__slide img { width: 100%; height: 100%; object-fit: contain; }
.gallery__nav { position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--sh-md); transition: transform var(--dur-press), background-color var(--dur-1); }
.gallery__nav:hover { background: var(--muted); }
.gallery__nav:active { transform: scale(.94); }
.gallery__nav--prev { left: 12px; } .gallery__nav--next { right: 12px; }
.gallery__nav[hidden] { display: none; }
.gallery__count { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface); font-size: var(--fs-meta); font-weight: 650; }
.gallery__note { position: absolute; right: 12px; bottom: 12px; max-width: 60%; padding: 4px 10px; border-radius: var(--r-pill); background: var(--warn-50); color: var(--ink); font-size: var(--fs-meta); font-weight: 600; }
.gallery__thumbs { grid-area: thumbs; display: flex; gap: 6px; padding: 10px; overflow-x: auto; scrollbar-width: thin; background: var(--muted); }
.gallery__thumbs button { flex: 0 0 64px; height: 48px; border-radius: var(--r-sm); overflow: hidden; opacity: .6; box-shadow: inset 0 0 0 0 transparent; transition: opacity var(--dur-1); }
.gallery__thumbs button:hover { opacity: .9; }
.gallery__thumbs button[aria-current="true"] { opacity: 1; outline: 2px solid var(--brand); outline-offset: -2px; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.house__info { grid-area: info; display: flex; flex-direction: column; gap: 10px; padding: 32px 28px 28px; }
.house__status { align-self: flex-start; padding: 4px 10px; border-radius: var(--r-pill); background: var(--ink); color: var(--surface); font-size: var(--fs-meta); font-weight: 650; }
.house__title { font-family: var(--font-display); font-weight: 650; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.02em; line-height: 1.12; padding-right: 40px; }
.house__loc { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-small); color: var(--ink-3); line-height: 1.45; }
.house__loc .i { margin-top: 2px; color: var(--ink-4); }
.house__price { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -.02em; margin-top: 4px; }
.house__price small { display: block; font-family: var(--font-sans); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); margin-top: 2px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.specs li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r); background: var(--muted); font-size: 14px; font-weight: 600; }
.specs .i { color: var(--ink-3); }
.specs[hidden] { display: none; }
.house__credit { align-self: flex-start; padding: 6px 12px; border-radius: var(--r-pill); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-soft-border); color: var(--brand-text); font-size: 13.5px; font-weight: 650; }
.house__sub { margin-top: 8px; font-size: var(--fs-meta); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.features { display: grid; gap: 8px; }
.features li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.features .i { margin-top: 3px; color: var(--ok); }
.house__fine { display: flex; gap: 8px; margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.house__fine .i { flex: none; margin-top: 2px; }
.house__actions { display: grid; gap: 8px; margin-top: auto; padding-top: 12px; }

@media (min-width: 961px) {
  .house { grid-template-rows: 1fr auto; }
  .gallery { min-height: 440px; }
  .gallery__track { position: absolute; inset: 0; aspect-ratio: auto; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1120px) {
  .hero__note { left: 12px; }
  .services__grid { gap: 14px; }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__title { max-width: 16ch; }
  .hero__visual { max-width: 560px; width: 100%; margin-inline: auto; }
  .services__grid { grid-template-columns: 1fr; }
  .service { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .service > :not(.steps):not(.service__actions) { grid-column: 1; }
  .service .steps { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; }
  .service__actions { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 20px; margin-top: 22px; }
  .service__actions .btn--block { width: auto; }
  .catalog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credits__grid { grid-template-columns: 1fr; }
  .build__layout { grid-template-columns: 1fr; }
  .build__stage { top: calc(var(--header-h) + 8px); z-index: 2; }
  .build__canvas { aspect-ratio: 600 / 360; }
  .build__steps { padding-block: 4vh 6vh; }
  .bstep { min-height: 42vh; }
  .about__grid { grid-template-columns: 1fr; }
  .about__mark { aspect-ratio: 16 / 9; max-width: 640px; }
  .faq__grid { grid-template-columns: 1fr; }
  .faq__head { position: static; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .house { grid-template-columns: 1fr; grid-template-areas: "gal" "thumbs" "info"; }
}

@media (max-width: 767px) {
  .header__wa { display: none; }
  .brand__mark { width: 40px; }
  .hero { padding-top: 20px; }
  .hero__title { font-size: clamp(34px, 9.4vw, 46px); margin-bottom: 16px; }
  .hero__lead { font-size: 16.5px; margin-bottom: 24px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .intents { margin-top: 26px; padding-top: 18px; }
  .intents__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .intent { justify-content: center; padding: 0 8px; font-size: 14px; flex-direction: column; gap: 4px; min-height: 64px; border-radius: var(--r-lg); }
  .hero__visual { margin-top: 8px; width: 90%; }
  .hero__note { left: 12px; bottom: 54px; max-width: 220px; padding: 10px 12px; }
  .hero__note-v { font-size: 13px; }

  .service { display: flex; }
  .service__actions { display: grid; grid-template-columns: 1fr; justify-items: center; }
  .service__actions .btn--block { width: 100%; }

  .catalog__bar { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
  .filters { min-width: 0; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .filters::-webkit-scrollbar { display: none; }
  .filter { min-height: 44px; }
  .catalog__grid { grid-template-columns: 1fr; }
  .hcard__ask { min-height: 0; }

  .credit { grid-template-columns: 1fr; }
  .credits .btn--lg { width: 100%; }
  .calc__row { grid-template-columns: 1fr; }
  .calc__field--rate { max-width: 160px; }

  .build__canvas { aspect-ratio: 600 / 380; border-radius: var(--r-xl); }
  .build__hud-hint { display: none; }
  .bstep { min-height: 40vh; grid-template-columns: 38px 1fr; gap: 12px; }
  .bstep__n { width: 38px; height: 38px; }
  .build__cta .btn { width: 100%; }

  .facts { grid-template-columns: 1fr; }
  .about__mark { aspect-ratio: 4 / 3; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .wa-float { display: none; }
  .dialog--house { width: 100%; }
  .house__info { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .gallery__track { aspect-ratio: 4 / 3.2; }
  .toast-region { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

@media (max-width: 400px) {
  .brand__tag { display: none; }
  .intent { font-size: 13.5px; }
  .specs li { padding: 9px 10px; font-size: 13.5px; }
}
@media (max-width: 340px) { .specs { grid-template-columns: 1fr; } }

@media (min-width: 1600px) {
  :root { --container: 1320px; }
}
