/* Sepcas Gestión Inmobiliaria — estilos.
   Dirección: moderna y enfocada en conversión. Plus Jakarta Sans, morado primario,
   verde WhatsApp para cotizar, magenta como acento, naranja solo sobre morado. */
:root {
  --p: #4B1A9E;          /* morado del logo */
  --p-d: #341172;
  --p-ink: #1B0B3F;      /* footer */
  --mag: #D4136F;        /* magenta del logo, oscurecido para AA con texto blanco */
  --mag-d: #B30F5C;
  --naranja: #F7941D;    /* solo sobre morado y en la franja */
  --wa: #25D366;         /* WhatsApp: texto oscuro encima */
  --wa-h: #3BE07A;
  --wa-ink: #04210F;
  --bg: #fff;
  --gray: #F5F4F9;
  --ink: #17142B;
  --muted: #5A5670;
  --line: #E4E1EE;
  --field: #8E89A3;      /* borde de campos: >= 3:1 */
  --on-p: #E6DEF7;       /* texto secundario sobre morado */
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
  --r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
body { margin: 0; padding-top: var(--header-h); font: 400 1rem/1.6 var(--sans); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.12; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.022em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 800; letter-spacing: -.028em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.02rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--p); outline-offset: 3px; }

.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }
.sec { padding: clamp(56px, 8vw, 104px) 0; }
.sec--gray { background: var(--gray); }
.sec--tight { padding: clamp(32px, 5vw, 56px) 0; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 34em; }
.label { font: 600 .75rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--naranja); margin-bottom: 1rem; }
.strong { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; margin-top: 40px; color: var(--p); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.link { color: var(--p); font: 600 .9rem/1.4 var(--sans); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { color: var(--mag-d); }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic--fill { fill: currentColor; stroke: none; width: 20px; height: 20px; }
.ic--lg { width: 24px; height: 24px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 24px; border: 1.5px solid transparent; border-radius: 999px; cursor: pointer;
  font: 700 .95rem/1.1 var(--sans); letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .25s var(--ease);
}
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .9rem; }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 1.05rem; }
.btn--wa { background: var(--wa); color: var(--wa-ink); }
.btn--wa:hover { background: var(--wa-h); }
.btn--primary { background: var(--p); color: #fff; }
.btn--primary:hover { background: var(--p-d); }
.btn--white { background: #fff; color: var(--p); }
.btn--white:hover { background: var(--gray); }
.btn--line { background: transparent; color: var(--p); border-color: var(--p); }
.btn--line:hover { background: var(--p); color: #fff; }
.btn:disabled { opacity: .6; cursor: default; }

/* Header: fijo, translúcido; se compacta al bajar */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(255, 255, 255, .86); transition: box-shadow .3s; }
@supports (backdrop-filter: blur(1px)) {
  .header { background: rgba(255, 255, 255, .88); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); }
}
.header.is-compact { box-shadow: 0 1px 0 var(--line), 0 8px 24px -12px rgba(27, 11, 63, .25); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: calc(var(--header-h) - 3px); transition: height .3s var(--ease); }
.header.is-compact .header__in { height: 60px; }
.brand img { height: 48px; width: auto; transition: height .3s var(--ease); }
.header.is-compact .brand img { height: 40px; }
@media (min-width: 900px) { .header.is-compact .brand img { height: 52px; } .header.is-compact .header__in { height: 66px; } }
.franja { display: flex; height: 3px; }
.franja i { flex: 1; }
.franja i:nth-child(1) { background: #E6157A; }
.franja i:nth-child(2) { background: var(--p); }
.franja i:nth-child(3) { background: var(--naranja); }
.header__act { display: flex; align-items: center; gap: 4px; }
.solo-md { display: none; }
.burger { display: grid; gap: 6px; place-content: center; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
.nav { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; padding: 8px 16px 20px; background: #fff; border-bottom: 1px solid var(--line); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s; }
.nav.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nav a { font: 600 1.15rem/1.2 var(--sans); text-decoration: none; padding: 16px 0; border-bottom: 1px solid var(--line); }
.nav a:last-child { border-bottom: 0; }
.nav a[aria-current="true"] { color: var(--p); font-weight: 700; }
.nav a[href="#propiedades"] { color: var(--p); font-weight: 800; }

/* Hero compacto */
.hero { background: var(--p); color: #fff; padding: 28px 0 32px; }
.hero__in { display: grid; gap: 14px 32px; }
.hero h1 { color: #fff; margin: 0 0 .25em; }
.hero__lead { font-size: 1.05rem; color: var(--on-p); margin: 0; }
.hero__count { margin: 0; display: flex; align-items: baseline; gap: 8px; color: var(--on-p); font-weight: 600; opacity: 0; }
.hero__count.ok { opacity: 1; }
.hero__count strong { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; color: var(--naranja); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.buscador { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; background: #fff; border-radius: 18px; box-shadow: 0 18px 40px -18px rgba(10, 2, 36, .55); }
.buscador__f { display: block; min-height: 56px; padding: 8px 14px 6px; border: 1.5px solid transparent; border-radius: 12px; font: 600 .72rem/1.2 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--gray); transition: background-color .2s, border-color .2s; }
.buscador__f:hover { background: #ECE8F6; border-color: #CFC4EA; }
.buscador__f:focus-within { background: #fff; border-color: var(--p); outline: 2px solid var(--p); outline-offset: 1px; }
.buscador__f:has(select:disabled) { opacity: .6; }
.buscador__f--wide, .buscador__go { grid-column: 1 / -1; }
.buscador select { display: block; width: 100%; margin-top: 2px; padding: 4px 24px 4px 0; border: 0; border-radius: 0; background-color: transparent; font: 600 1rem/1.4 var(--sans); color: var(--ink); text-transform: none; letter-spacing: 0; }
.buscador select:focus-visible { outline: none; }
.buscador__go { min-height: 52px; }

/* Campos */
select { appearance: none; -webkit-appearance: none; color-scheme: light; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234B1A9E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 2px center; cursor: pointer; }
select:disabled { cursor: not-allowed; }
select option { font: 500 1rem var(--sans); color: var(--ink); background: #fff; }

/* Listado */
.sec--list { padding-top: 32px; }
.list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 20px; }
.list-head h2 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.list-head__meta { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; color: var(--muted); font-size: .9rem; font-weight: 500; }
.props { display: grid; gap: 20px; grid-template-columns: 1fr; }
.props:empty { display: none; }
.skel { position: relative; overflow: hidden; aspect-ratio: 4/4.4; border-radius: var(--r); background: #E9E6F2; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent); transform: translateX(-100%); }
.pcard { position: relative; isolation: isolate; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.pcard::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; box-shadow: 0 2px 4px rgba(27, 11, 63, .06), 0 12px 28px -8px rgba(27, 11, 63, .22), 0 28px 48px -20px rgba(27, 11, 63, .2); opacity: 0; transition: opacity .35s var(--ease); pointer-events: none; }
.pcard__a { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; border-radius: var(--r) var(--r) 0 0; }
.pcard__img { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; background: var(--gray); color: var(--muted); text-align: center; line-height: 10; font-size: .9rem; }
.pcard__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .5s var(--ease); }
.pcard__img img + img { opacity: 0; }
.pcard__body { display: grid; gap: 4px; padding: 14px 16px 12px; align-content: start; }
.pcard__tipo { display: flex; align-items: center; gap: 6px; font: 600 .8rem/1.3 var(--sans); color: var(--muted); }
.pcard__tit { font-size: 1rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__precio, .precio { font-size: 1.4rem; font-weight: 800; line-height: 1.2; letter-spacing: -.03em; color: var(--p); margin: 6px 0 4px; }
.aprox { font-size: .78rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.aprox::before { content: "· "; }
.pcard__precio .aprox { white-space: nowrap; margin-left: 4px; }
.precio .aprox { font-size: 1rem; margin-left: 6px; }
.pcard__attrs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88rem; font-weight: 500; color: var(--muted); }
.pcard__attrs span { display: inline-flex; align-items: center; gap: 5px; }
.pcard__attrs .ic { width: 16px; height: 16px; }
.pcard__foot { padding: 0 16px 16px; }
.pcard__foot .btn { width: 100%; }
.badge-op { display: inline-block; padding: 5px 10px; border-radius: 6px; background: #fff; color: var(--ink); font: 700 .7rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.pcard .badge-op { position: absolute; top: 10px; left: 10px; z-index: 1; }
.badge-op--venta { background: var(--mag); color: #fff; }
.badge-op--arriendo { background: var(--p); color: #fff; }
.aviso { padding: 48px 24px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.aviso__t { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 1.2rem; }
.aviso__acc { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Filtros potenciados: barra (escritorio), fila + hoja (móvil), chips */
.fbar { position: relative; margin-bottom: 22px; }
.fbar__d { display: none; }
.fbar__m { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.fbar__m .btn { flex: none; min-height: 44px; }
.fbar__m .ord { flex: 1; min-width: 0; }
.fbar__m .ord > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fbar__m .ord select { width: 100%; }
.chips-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.chips-row__n { margin: 0; font-weight: 700; letter-spacing: -.01em; min-width: 7.5em; }
.chips { list-style: none; display: contents; margin: 0; padding: 0; }
.chips:empty { display: none; }
.chips-row__n:focus { outline: none; }
.chips li { display: contents; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 14px; border: 0; border-radius: 999px; background: #EDE6FA; color: var(--p-d); font: 600 .85rem/1 var(--sans); cursor: pointer; transition: background-color .2s; }
.chip:hover { background: #E1D6F6; }
.chip .ic { width: 14px; height: 14px; stroke-width: 2; }

.fs { display: grid; gap: 8px; align-content: start; min-width: 0; }
.fs__t { font: 700 .78rem/1.2 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fs__nota { margin: 0; font-size: .82rem; line-height: 1.45; color: var(--muted); }
.seg { display: flex; border: 1.5px solid var(--field); border-radius: 999px; padding: 2px; background: #fff; }
.seg__o { position: relative; flex: 1; margin: 0; }
.seg__o input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg__o span { display: grid; place-content: center; min-width: 38px; height: 34px; padding: 0 10px; border-radius: 999px; font: 600 .85rem/1 var(--sans); color: var(--ink); white-space: nowrap; transition: background-color .2s, color .2s; }
.seg__o:hover span { background: var(--gray); }
.seg__o:has(input:checked) span { background: var(--p); color: #fff; }
.seg__o:has(input:focus-visible) span { outline: 2px solid var(--p); outline-offset: 2px; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.campo { margin: 0; }
.campo > span { display: block; margin-bottom: 6px; font: 600 .82rem/1.2 var(--sans); color: var(--ink); }
.campo input { width: 100%; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--field); border-radius: 10px; background: #fff; font: 500 1rem/1.4 var(--sans); color: var(--ink); }
.campo input:hover { border-color: var(--ink); }
.campo input:focus-visible { outline: 2px solid var(--p); outline-offset: 1px; border-color: var(--p); }
.chks { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.chk { display: flex; align-items: center; gap: 9px; min-height: 36px; margin: 0; font: 500 .9rem/1.3 var(--sans); cursor: pointer; }
.chk input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--p); cursor: pointer; }
.chk .n { margin-left: auto; font-size: .78rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.chks[data-col] .chk--x:not(.vis) { display: none; }
.chks__b { justify-self: start; min-height: 36px; padding: 0 2px; border: 0; background: none; font: 700 .85rem/1 var(--sans); color: var(--p); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.chks__b:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .chks:not([data-col]) .chk--x { animation: chkIn .25s ease-out both; }
  @keyframes chkIn { from { opacity: 0; transform: translateY(-4px); } }
}
.ord { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 .78rem/1.2 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ord select { min-height: 44px; padding: 0 38px 0 16px; border: 1.5px solid var(--field); border-radius: 999px; background-color: #fff; background-position: right 14px center; font: 600 .9rem/1 var(--sans); color: var(--ink); letter-spacing: 0; text-transform: none; }
.ord select:hover { border-color: var(--ink); }
.pop { position: relative; }
.pop__b { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 18px; border: 1.5px solid var(--field); border-radius: 999px; background: #fff; color: var(--ink); font: 700 .9rem/1 var(--sans); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.pop__b:hover { border-color: var(--ink); }
.pop__b.is-act { border-color: var(--p); background: #F1ECFB; color: var(--p-d); }
.pop__b[aria-expanded="true"] { border-color: var(--p); }
.pop__b .ic { width: 16px; height: 16px; stroke-width: 2; }
.pop__p { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; display: grid; gap: 16px; width: min(380px, calc(100vw - 32px)); max-height: min(72dvh, 600px); overflow: auto; overscroll-behavior: contain; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 2px 6px rgba(27, 11, 63, .08), 0 22px 44px -14px rgba(27, 11, 63, .35); visibility: hidden; opacity: 0; }
.pop__p--ancho { width: min(480px, calc(100vw - 32px)); }
.pop__p.abierto { visibility: visible; opacity: 1; }
.pop__p.der { left: auto; right: 0; }

@media (min-width: 900px) {
  .fbar__m { display: none; }
  .fbar__d { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px 16px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
  .fbar__d > .fs { display: flex; align-items: center; gap: 10px; }
  .fbar__d > .fs .seg__o span { height: 32px; min-width: 36px; padding: 0 9px; }
  .fbar__d > .ord { margin-left: auto; }
}
@media (max-width: 439px) {
  .chks { grid-template-columns: 1fr; }
}

/* Vender */
.vender { display: grid; gap: 24px; align-items: center; padding: clamp(28px, 4vw, 48px); background: var(--p); color: #fff; border-radius: 20px; }
.vender h2 { color: #fff; margin-bottom: .3em; }
.vender p { margin: 0; color: var(--on-p); max-width: 38em; }
.vender .btn { justify-self: start; }

/* Nosotros */
.about { display: grid; gap: 32px; align-items: end; }
.about h2 { max-width: 20ch; }
.cifra { font-size: clamp(4.5rem, 10vw, 7rem); font-weight: 800; line-height: .95; letter-spacing: -.05em; margin: 0; color: var(--p); font-variant-numeric: tabular-nums; }
.cifra__t { margin: 6px 0 0; font-weight: 600; color: var(--muted); max-width: 16em; }
.duo { display: grid; gap: 20px; margin: 48px 0; }
.duo > div { padding: 24px 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.duo h3 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mag-d); margin-bottom: .6em; }
.duo p { font-size: 1.2rem; font-weight: 600; line-height: 1.35; letter-spacing: -.015em; margin: 0; }
.h-sec { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 20px; }
.why { display: grid; gap: 0 32px; }
.why article { padding: 18px 0 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 24px 1fr; gap: 2px 14px; }
.why .ic { grid-row: span 2; margin-top: 2px; color: var(--mag-d); stroke-width: 2; }
.why h4 { margin: 0; }
.why p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Método: línea de tiempo (vertical en móvil, horizontal en escritorio) */
.steps { list-style: none; counter-reset: paso; margin: 32px 0 0; padding: 0; position: relative; }
.steps li { counter-increment: paso; position: relative; padding: 0 0 28px 56px; }
.steps li::before { content: counter(paso); position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--p); color: #fff; font: 700 .95rem/1 var(--sans); }
.steps li::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { margin: 0 0 .2em; font-size: 1.1rem; letter-spacing: -.02em; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }

/* OTEC */
.otec { display: grid; gap: 28px; padding: clamp(28px, 4vw, 48px); background: var(--p); color: #fff; border-radius: 20px; }
.otec h2, .otec h3 { color: #fff; }
.otec > div > p:not(.label) { color: var(--on-p); max-width: 34em; margin: 0; }
.otec__cta { padding-top: 24px; border-top: 2px solid var(--naranja); }
.otec__cta p { color: var(--on-p); }
.otec :focus-visible { outline-color: #fff; }

/* Contacto */
.contact { display: grid; gap: 40px; }
.info__list { list-style: none; padding: 0; margin: 0 0 28px; border-bottom: 1px solid var(--line); }
.info__list li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); align-items: baseline; }
.info__list span { font: 600 .75rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.info__list b { font-weight: 600; overflow-wrap: anywhere; }
.info__list a { color: var(--p); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.form { padding: clamp(20px, 3vw, 32px); background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.field { margin-bottom: 18px; }
label { display: block; font: 600 .82rem/1.2 var(--sans); color: var(--ink); margin-bottom: 6px; }
.form input:not(.hp), .form select, .form textarea { width: 100%; min-height: 48px; font: 500 1rem/1.4 var(--sans); color: var(--ink); background-color: #fff; border: 1.5px solid var(--field); border-radius: 10px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s; }
.form select { background-position: right 14px center; padding-right: 40px; }
.form textarea { resize: vertical; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--ink); }
.form select:required:invalid { color: var(--muted); }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--p); outline-offset: 1px; border-color: var(--p); }
.hp { display: none; }
.form .btn { width: 100%; margin-top: 6px; }
.estado { margin: 14px 0 0; min-height: 1.5em; font-weight: 500; }
.estado.ok { color: #14693a; }
.estado.err { color: #a3122a; }
.estado a { text-decoration: underline; }

/* Footer */
.footer { background: var(--p-ink); color: #fff; padding: 56px 0 0; }
.footer a:focus-visible { outline-color: #fff; }
.footer__in { display: grid; gap: 28px; }
.footer__name { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .2em; }
.footer__brand p:last-child { margin: 0; color: var(--on-p); }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; align-content: start; }
.footer nav a { text-decoration: none; padding: 8px 0; font-weight: 500; color: var(--on-p); transition: color .2s; }
.footer nav a:hover { color: #fff; }
.copy { margin: 40px auto 0; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .88rem; color: var(--on-p); }

/* WhatsApp: píldora flotante (escritorio) y barra inferior (móvil) */
.wa-float { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: none; align-items: center; gap: 10px; min-height: 58px; padding: 0 26px 0 20px; border-radius: 999px; background: var(--wa); color: var(--wa-ink); font: 700 1.02rem/1 var(--sans); text-decoration: none; box-shadow: 0 10px 30px -8px rgba(4, 33, 15, .55), 0 2px 6px rgba(4, 33, 15, .2); visibility: hidden; opacity: 0; transition: background-color .2s; }
.wa-float.on { visibility: visible; opacity: 1; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--wa); z-index: -1; opacity: 0; }
.wa-float .ic--fill { width: 26px; height: 26px; }
.wa-float:hover { background: var(--wa-h); }
.wa-float:focus-visible { outline-color: var(--p); outline-offset: 4px; }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); border-top: 1px solid var(--line); box-shadow: 0 -10px 28px -14px rgba(27, 11, 63, .3); }
.bar .btn { min-height: 50px; padding: 0 10px; font-size: .92rem; }
.bar .btn--line { background: #fff; }
body:has(dialog[open]) .bar { visibility: hidden; }

/* Ficha */
dialog { border: 0; padding: 0; width: min(1200px, calc(100% - 24px)); max-height: calc(100dvh - 24px); color: var(--ink); background: #fff; border-radius: 18px; overflow: hidden; }
dialog::backdrop { background: rgba(14, 6, 34, .62); }
body:has(dialog[open]) { overflow: hidden; }
.ficha { position: relative; display: grid; max-height: calc(100dvh - 24px); overflow: auto; }
.ficha__bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 4px 8px 4px 24px; background: #fff; border-bottom: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--muted); }
.ficha__x { display: grid; place-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--gray); color: var(--ink); cursor: pointer; transition: background-color .2s, color .2s, transform .25s var(--ease); }
.ficha__x:hover { background: var(--ink); color: #fff; }
.gal { min-width: 0; }
.gal__main { position: relative; aspect-ratio: 4/3; background: var(--gray); overflow: hidden; }
.gal__main img { width: 100%; height: 100%; object-fit: cover; }
.gal__nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-content: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); transition: background-color .2s, color .2s; }
.gal__nav:hover { background: var(--ink); color: #fff; }
.gal__prev { left: 12px; } .gal__next { right: 12px; }
.gal__count { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(23, 20, 43, .78); color: #fff; font: 600 .78rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.gal__thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.gal__thumbs button { flex: 0 0 76px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; opacity: .6; transition: opacity .2s, border-color .2s; }
.gal__thumbs button:hover, .gal__thumbs button[aria-current="true"] { opacity: 1; }
.gal__thumbs button[aria-current="true"] { border-color: var(--p); }
.gal__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ficha__info { display: flex; flex-direction: column; min-width: 0; }
.ficha__body { flex: 1; display: grid; gap: 12px; align-content: start; padding: 24px 24px 20px; }
.ficha__body p { margin: 0; }
.ficha__body h3 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.8rem); overflow-wrap: anywhere; }
.ficha__loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; }
.ficha__body .precio { font-size: 2rem; margin: 2px 0; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges .badge-op--tipo { background: var(--gray); color: var(--muted); }
.ficha__precio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.ficha__body .gc { color: var(--muted); font-weight: 600; font-size: .95rem; }
.facts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.facts li { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 0 8px; padding: 10px 12px; background: var(--gray); border-radius: 10px; }
.facts .ic { color: var(--p); grid-row: span 2; }
.facts b { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.facts span { font-size: .75rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.grupos { display: grid; gap: 12px; }
.ficha__sec { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.ficha__sec h4 { margin: 0; font-size: 1.05rem; }
.chars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.chars li { font-size: .92rem; font-weight: 500; line-height: 1.45; overflow-wrap: break-word; color: var(--muted); }
.chars li.si { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); }
.chars li.si .ic { flex: none; margin-top: 3px; color: var(--p); stroke-width: 2; width: 16px; height: 16px; }
.chars li b { font-weight: 700; color: var(--ink); }
.chars li.no b { color: var(--muted); font-weight: 500; }
.ficha__dir { color: var(--muted); font-weight: 500; }
.mapa { display: grid; gap: 8px; }
.mapa iframe { width: 100%; height: 220px; border: 1px solid var(--line); border-radius: 12px; background: var(--gray); }
.ficha__meta { font-size: .82rem; color: var(--muted); font-weight: 500; }
.desc { white-space: pre-line; overflow-wrap: anywhere; color: var(--muted); font-size: .95rem; }
.ficha__cta { position: sticky; bottom: 0; display: grid; gap: 8px; padding: 12px 24px 14px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -12px 24px -16px rgba(27, 11, 63, .25); }

/* Hoja de filtros (móvil): dialog nativo anclado abajo */
.hoja { width: 100%; max-width: none; margin: auto 0 0; max-height: 92dvh; border-radius: 20px 20px 0 0; }
.hoja__in { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: 92dvh; }
.hoja__h { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 20px; border-bottom: 1px solid var(--line); }
.hoja__h h3 { margin: 0; font-size: 1.15rem; }
.hoja__b { overflow: auto; display: grid; gap: 22px; align-content: start; padding: 20px; overscroll-behavior: contain; }
.hoja__f { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -10px 24px -16px rgba(27, 11, 63, .25); }
.hoja__f .btn--primary { flex: 1; }
.hoja .seg__o span { height: 44px; }

/* Tablet */
@media (min-width: 640px) {
  .props { grid-template-columns: repeat(2, 1fr); }
  .duo { grid-template-columns: 1fr 1fr; }
  .why { grid-template-columns: repeat(2, 1fr); }
  .footer__in { grid-template-columns: 1fr 1fr; }
  .footer nav { justify-content: flex-end; }
  .vender { grid-template-columns: 1fr auto; gap: 40px; }
  .vender .btn { justify-self: end; }
  .ficha__cta { grid-template-columns: 1.4fr 1fr; }
  .buscador { grid-template-columns: 1fr 1fr 1fr auto; }
  .buscador__f--wide { grid-column: auto; }
  .buscador__go { grid-column: auto; padding: 0 32px; }
  .hero__in { grid-template-columns: 1fr auto; align-items: end; }
  .hero .buscador { grid-column: 1 / -1; }
}

/* Escritorio */
@media (min-width: 900px) {
  :root { --header-h: 86px; }
  .brand img { height: 70px; }
  .burger { display: none; }
  .solo-sm { display: none; }
  .solo-md { display: inline; }
  .header__in { display: grid; grid-template-columns: 1fr auto 1fr; }
  .header__act { justify-self: end; }
  .nav { position: static; flex-direction: row; gap: 4px; padding: 0; background: none; border: 0; visibility: visible; opacity: 1; transform: none; }
  .nav a { font: 600 .95rem/1 var(--sans); padding: 10px 16px; border: 0; border-radius: 999px; transition: background-color .2s, color .2s; }
  .nav a:hover { background: var(--gray); color: var(--p); }
  .nav a[aria-current="true"] { color: var(--p); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; text-decoration-color: var(--p); }
  /* Propiedades siempre destaca: pill morado claro; relleno morado cuando es la sección activa */
  .nav a[href="#propiedades"] { background: #EDE6FA; }
  .nav a[href="#propiedades"]:hover { background: #E1D6F6; }
  .nav a[href="#propiedades"][aria-current="true"] { background: var(--p); color: #fff; text-decoration: none; }
  .hero { padding: 36px 0 40px; }
  .wa-float { display: inline-flex; }
  .bar { display: none; }
  .why { grid-template-columns: repeat(3, 1fr); }
  .about { grid-template-columns: 1.4fr 1fr; gap: 80px; }
  .about__stat { justify-self: end; }
  .contact { grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }
  .otec { grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
  .otec__cta { padding: 0 0 0 48px; border-top: 0; border-left: 2px solid var(--naranja); }
  .steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 20px; margin-top: 48px; }
  .steps li { padding: 52px 0 0; }
  .steps li::before { left: 0; top: 0; }
  .steps li::after { left: 36px; right: -20px; top: 17px; bottom: auto; width: auto; height: 2px; }
  .ficha { grid-template-columns: 1.25fr 1fr; grid-template-rows: auto minmax(0, 1fr); height: min(92dvh, 960px); overflow: hidden; }
  .gal { grid-column: 1; grid-row: 1 / 3; display: flex; flex-direction: column; min-height: 0; background: var(--gray); }
  .ficha__bar { grid-column: 2; grid-row: 1; position: static; }
  .gal__main { flex: 1; min-height: 0; aspect-ratio: auto; }
  .ficha__info { grid-column: 2; grid-row: 2; overflow: auto; }
  .ficha__body { padding: 24px 36px 24px; }
  .ficha__cta { padding: 14px 36px 18px; grid-template-columns: 1.55fr 1fr; gap: 8px; }
  .ficha__cta .btn { padding: 0 14px; font-size: .95rem; }
  .ficha__cta .btn--lg { min-height: 52px; }
}
@media (min-width: 1180px) {
  .props { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 899px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 639px) {
  .hero { padding-top: 22px; }
  .hero__count { margin-top: 2px; }
}

/* Movimiento: todo bajo no-preference; solo transform y opacity */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Entrada del hero */
  .js .hero [data-in] { animation: sube .7s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms + 100ms); }
  @keyframes sube { from { opacity: 0; transform: translateY(16px); } }

  /* Reveal al hacer scroll, con stagger */
  .js .rv { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .rv.in { opacity: 1; transform: none; }
  .js .steps.rv li::before { transform: scale(.6); transition: transform .5s var(--ease); transition-delay: calc(var(--n, 0) * 90ms + 200ms); }
  .js .steps.rv.in li::before { transform: none; }
  .js .steps.rv li::after { transform-origin: left; transform: scaleX(0); transition: transform .6s var(--ease); transition-delay: calc(var(--n, 0) * 90ms + 300ms); }
  .js .steps.rv.in li::after { transform: none; }
  @media (max-width: 899px) {
    .js .steps.rv li::after { transform-origin: top; transform: scaleY(0); }
    .js .steps.rv.in li::after { transform: none; }
  }
  .js .steps.rv { transform: none; }

  /* Skeleton con shimmer */
  .skel::after { animation: brillo 1.4s ease-in-out infinite; }
  @keyframes brillo { to { transform: translateX(100%); } }

  /* Filtrado: fundido de la grilla (fallback) o View Transition */
  #lista { transition: opacity .18s var(--ease); }
  #lista.sale { opacity: 0; }
  ::view-transition-group(root) { animation-duration: .3s; animation-timing-function: var(--ease); }

  /* Botones y tarjetas */
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(0) scale(.98); }
  .ficha__x:hover { transform: rotate(90deg); }
  .pcard { transition: transform .35s var(--ease); }
  .pcard.rv.in { transition: opacity .6s var(--ease), transform .35s var(--ease); transition-delay: calc(var(--i, 0) * 60ms), 0s; }
  .pcard.rv { transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
  @media (hover: hover) {
    .js .pcard.in:hover { transform: translateY(-5px); }
    .pcard:hover::after, .pcard:focus-within::after { opacity: 1; }
    .pcard:hover .pcard__img img:first-child { transform: scale(1.06); }
    .pcard:hover .pcard__img img + img { opacity: 1; transform: scale(1.06); }
  }

  /* WhatsApp: aparece y respira un anillo cada pocos segundos */
  .wa-float { transform: translateY(24px); transition: background-color .2s, opacity .4s var(--ease), transform .4s var(--ease), visibility 0s .4s; }
  .wa-float.on { transform: none; transition-delay: 0s; }
  .wa-float.on::before { animation: anillo 6s ease-out 2.5s infinite; }
  @keyframes anillo { 0% { opacity: .55; transform: scale(1); } 18% { opacity: 0; transform: scale(1.14, 1.5); } 100% { opacity: 0; transform: scale(1.14, 1.5); } }
  .wa-float.on:hover { transform: translateY(-2px); }

  /* Galería: fundido al cambiar de foto */
  .gal__main img { transition: opacity .35s var(--ease), transform .6s var(--ease); }
  .gal__main img:not(.in) { opacity: 0; transform: scale(1.03); }
  .gal__thumbs button:hover { transform: translateY(-2px); }
  .gal__thumbs button { transition: opacity .2s, border-color .2s, transform .25s var(--ease); }

  /* Ficha: apertura y cierre animados */
  dialog { opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .3s var(--ease), transform .35s var(--ease), overlay .35s allow-discrete, display .35s allow-discrete; }
  dialog[open] { opacity: 1; transform: none; }
  @starting-style { dialog[open] { opacity: 0; transform: translateY(24px) scale(.97); } }
  dialog::backdrop { background: rgba(14, 6, 34, 0); transition: background-color .35s var(--ease), overlay .35s allow-discrete, display .35s allow-discrete; }
  dialog[open]::backdrop { background: rgba(14, 6, 34, .62); }
  @starting-style { dialog[open]::backdrop { background: rgba(14, 6, 34, 0); } }
}
@media (max-width: 439px) {
  .chars { grid-template-columns: 1fr; }
}

/* Filtros: popovers y hoja animados (solo transform y opacity) */
@media (prefers-reduced-motion: no-preference) {
  .pop__p { transform: translateY(-6px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s; }
  .pop__p.abierto { transform: none; transition-delay: 0s; }
  .pop__b .ic { transition: transform .2s var(--ease); }
  .pop__b[aria-expanded="true"] .ic { transform: rotate(180deg); }
  .hoja { opacity: 1; transform: translateY(100%); transition: transform .38s var(--ease), overlay .38s allow-discrete, display .38s allow-discrete; }
  .hoja[open] { transform: none; }
  @starting-style { .hoja[open] { transform: translateY(100%); } }
}
