/* ALVORA — estilos */
:root {
  --noche: #131B2A;      /* fondo del logotipo */
  --noche-2: #1B2538;
  --abismo: #0E1420;
  --oro: #C4A877;        /* oro claro del logotipo */
  --bronce: #8F7448;     /* oro oscuro del logotipo */
  --cal: #EEF0F3;        /* fondo claro, frío */
  --papel: #FFFFFF;
  --tinta: #1A2130;
  --gris: #5C6576;
  --linea: #D5D9E0;
  --linea-osc: #2C374C;

  --display: "Tenor Sans", "Gill Sans", sans-serif;
  --body: "Figtree", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--cal);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: .01em; }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--oro); color: var(--noche); padding: 8px 14px; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--body); letter-spacing: .02em;
  padding: 15px 24px; border-radius: var(--r); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-gold { background: var(--oro); color: var(--noche); }
.btn-gold:hover { background: #D3B988; }
.btn-navy { background: var(--noche); color: #fff; }
.btn-navy:hover { background: var(--noche-2); }
.btn-ghost { background: transparent; color: var(--noche); border-color: var(--linea); }
.btn-ghost:hover { border-color: var(--noche); }
.btn-ghost-light { background: transparent; color: #fff; border-color: var(--linea-osc); }
.btn-ghost-light:hover { border-color: var(--oro); }

/* Campos */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--gris); }
select, input, textarea {
  font: inherit; font-size: 16px; color: var(--tinta);
  background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r);
  padding: 12px 14px; width: 100%; min-width: 0;
}
select {
  appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238F7448' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
textarea { resize: vertical; }

/* Segmentado */
.seg { display: inline-flex; border: 1px solid var(--linea-osc); border-radius: var(--r); padding: 3px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 9px 18px; font-size: 15px; font-weight: 500; color: #AEB6C4; border-radius: 1px; transition: background-color .15s, color .15s; }
.seg input:checked + span { background: var(--oro); color: var(--noche); }
.seg input:focus-visible + span { outline: 2px solid var(--oro); outline-offset: 2px; }
.seg-light { border-color: var(--linea); }
.seg-light span { color: var(--gris); }
.seg-light input:checked + span { background: var(--noche); color: #fff; }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19, 27, 42, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea-osc);
  color: #fff;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.brand-mark { width: 30px; height: 32px; }
.brand-word { width: 118px; height: 12px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { text-decoration: none; font-size: 15px; color: #C9CFD9; }
.nav a:not(.btn):hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 22px; height: 1.5px; background: #fff; position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; } .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { background: var(--noche); color: #fff; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px);
  align-items: end; padding-top: clamp(48px, 8vw, 104px);
}
.hero-copy { padding-bottom: clamp(48px, 7vw, 96px); }
.hero h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.06; max-width: 13ch; margin-bottom: 26px; }
.lede { color: #B9C1CE; font-size: 18px; max-width: 46ch; margin-bottom: 36px; }

.search {
  display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 12px; align-items: end;
  padding: 16px; background: var(--noche-2); border: 1px solid var(--linea-osc); border-radius: var(--r);
}
.search .field > span { color: #8D97A8; }
.search select { background-color: var(--noche); color: #fff; border-color: var(--linea-osc); }
.search .seg { align-self: stretch; }
.search .seg span { height: 100%; display: flex; align-items: center; }

.hero-contact { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 20px 0 0; color: #8D97A8; font-size: 15px; }
.hero-visual { align-self: end; }
.roof {
  position: relative; aspect-ratio: 100 / 108; width: 100%; max-width: 560px; margin-left: auto;
  clip-path: polygon(50% 0, 100% 100%, 68% 100%, 56% 42.6%, 32% 100%, 0 100%);
  animation: rise 1.4s cubic-bezier(.2, .7, .1, 1) .15s both;
}
.roof img { width: 100%; height: 100%; object-fit: cover; }
.roof-shade {
  position: absolute; inset: 0;
  background: var(--bronce); mix-blend-mode: multiply; opacity: .85;
  clip-path: polygon(65.3% 30.6%, 100% 100%, 68% 100%, 56% 42.6%);
}
@keyframes rise {
  from { clip-path: polygon(50% 100%, 100% 100%, 68% 100%, 56% 100%, 32% 100%, 0 100%); }
  to   { clip-path: polygon(50% 0, 100% 100%, 68% 100%, 56% 42.6%, 32% 100%, 0 100%); }
}

/* Propiedades */
.listings { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.count { color: var(--gris); margin: 0; }
.filters {
  display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 12px; align-items: end;
  padding-bottom: 28px; margin-bottom: 40px; border-bottom: 1px solid var(--linea);
}
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 28px; }
.card { display: grid; gap: 16px; align-content: start; cursor: pointer; }
.card.featured { grid-column: span 2; }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--linea); }
.card.featured .card-img { aspect-ratio: 16 / 9.4; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute; top: 14px; left: 14px;
  background: var(--noche); color: var(--oro); font-size: 13px; font-weight: 600;
  padding: 5px 10px; border-radius: var(--r);
}
.card-price { font-family: var(--display); font-size: 26px; color: var(--noche); line-height: 1; }
.card-price small { font-family: var(--body); font-size: 14px; color: var(--gris); margin-left: 4px; }
.card h3 { font-family: var(--body); font-weight: 600; font-size: 17px; line-height: 1.35; }
.card h3 button { all: unset; cursor: pointer; }
.card h3 button:focus-visible { outline: 2px solid var(--bronce); outline-offset: 3px; }
.card:hover h3 button { text-decoration: underline; text-decoration-color: var(--oro); text-underline-offset: 4px; }
.card-zone { color: var(--gris); font-size: 15px; margin: 4px 0 0; }
.card-specs { display: flex; gap: 18px; font-size: 14px; color: var(--tinta); margin: 0; padding: 12px 0 0; border-top: 1px solid var(--linea); list-style: none; }
.card-specs b { font-weight: 600; }

.empty { text-align: center; padding: 56px 16px; border: 1px dashed var(--linea); }
.empty h3 { margin-bottom: 10px; }
.empty p { color: var(--gris); }
.empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* Invertir */
.invest { background: var(--papel); padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--linea); }
.invest-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.invest-copy > p { color: var(--gris); max-width: 52ch; margin: 20px 0 36px; }
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 32px 36px; }
.services li { border-left: 2px solid var(--oro); padding-left: 18px; }
.services h3 { margin-bottom: 6px; }
.services p { color: var(--gris); font-size: 15px; margin: 0; }

.calc { background: var(--cal); padding: clamp(24px, 3vw, 36px); border-radius: var(--r); position: sticky; top: 96px; }
.calc h3 { font-size: 24px; margin-bottom: 24px; }
.calc-row { margin-bottom: 20px; }
.calc-row > label, .calc-row .lbl { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; color: var(--gris); margin-bottom: 8px; }
.calc-row output { color: var(--noche); font-weight: 600; }
.cur-row { display: flex; justify-content: space-between; align-items: center; }
.cur-row .lbl { margin: 0; }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gris); }
.money input { padding-left: 34px; }
input[type="range"] { -webkit-appearance: none; appearance: none; padding: 0; height: 4px; border: 0; background: var(--linea); accent-color: var(--bronce); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--noche); border: 3px solid var(--oro); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--noche); border: 3px solid var(--oro); cursor: pointer; }
.calc-result { background: var(--noche); color: #fff; margin: 28px calc(-1 * clamp(24px, 3vw, 36px)) calc(-1 * clamp(24px, 3vw, 36px)); padding: clamp(24px, 3vw, 36px); }
.pay { font-family: var(--display); font-size: clamp(38px, 4vw, 48px); color: var(--oro); line-height: 1; margin-bottom: 20px; }
.pay small { font-family: var(--body); font-size: 15px; color: #AEB6C4; margin-left: 8px; }
.calc-result dl { margin: 0 0 16px; display: grid; gap: 8px; }
.calc-result dl div { display: flex; justify-content: space-between; border-top: 1px solid var(--linea-osc); padding-top: 8px; font-size: 15px; }
.calc-result dt { color: #AEB6C4; } .calc-result dd { margin: 0; }
.note { font-size: 13px; color: #8D97A8; margin: 0; }

/* Nosotros */
.about { padding: clamp(64px, 9vw, 112px) 0; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-mark { width: 100%; max-width: 300px; aspect-ratio: 100 / 108; justify-self: center; }
.about h2 { margin-bottom: 22px; }
.about p { max-width: 58ch; color: #3A4354; }
.zones { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.zones li { border: 1px solid var(--linea); padding: 7px 14px; font-size: 15px; border-radius: 40px; background: var(--papel); }

/* Contacto */
.contact { background: var(--noche); color: #fff; padding: clamp(64px, 9vw, 112px) 0; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 88px); }
.contact-copy p { color: #B9C1CE; max-width: 40ch; margin: 20px 0 32px; }
.direct { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; color: #B9C1CE; }
.direct a { color: var(--oro); text-underline-offset: 4px; }
.contact-form { display: grid; gap: 18px; }
.contact-form .field > span { color: #8D97A8; }
.contact-form input, .contact-form select, .contact-form textarea { background-color: var(--noche-2); color: #fff; border-color: var(--linea-osc); }
.contact-form ::placeholder { color: #6E7889; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.form-error { color: #F2B8A6; margin: 0; font-size: 15px; }
[aria-invalid="true"] { border-color: #E08F78 !important; }

/* Pie */
.site-footer { background: var(--abismo); color: #8D97A8; padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; gap: 16px; align-items: center; color: #fff; }
.footer-brand .brand-mark { width: 38px; height: 41px; }
.footer-brand .brand-word { width: 140px; height: 14px; display: block; }
.tagline { color: var(--oro); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; margin: 8px 0 0; }
.legal { margin: 0; font-size: 14px; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--oro); color: var(--noche);
  box-shadow: 0 6px 20px rgba(14, 20, 32, .35);
}
.wa-float svg { width: 28px; height: 28px; }

/* Detalle */
.detail {
  width: min(1080px, calc(100% - 32px)); max-height: calc(100% - 32px);
  padding: 0; border: 0; border-radius: var(--r); background: var(--papel); color: var(--tinta);
}
.detail::backdrop { background: rgba(14, 20, 32, .72); }
.detail[open] { animation: open .22s ease-out; }
@keyframes open { from { opacity: 0; transform: translateY(12px); } }
.close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--noche); color: #fff; font-size: 24px; line-height: 1;
}
.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; }
.gallery { background: var(--noche); }
.gallery > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.thumbs { display: flex; gap: 8px; padding: 8px; }
.thumbs button { padding: 0; border: 2px solid transparent; width: 72px; height: 54px; cursor: pointer; background: none; opacity: .6; }
.thumbs button[aria-current="true"] { border-color: var(--oro); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { padding: clamp(24px, 3vw, 40px); }
.d-meta { color: var(--bronce); font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.detail h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 14px; padding-right: 32px; }
.d-price { font-family: var(--display); font-size: 30px; color: var(--noche); }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0 0 20px; border-top: 1px solid var(--linea); }
.specs div { padding: 10px 0; border-bottom: 1px solid var(--linea); }
.specs dt { font-size: 13px; color: var(--gris); } .specs dd { margin: 0; font-weight: 600; }
#dDesc { color: #3A4354; }
.d-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.d-code { font-size: 13px; color: var(--gris); margin: 16px 0 0; }

/* Responsive */
@media (max-width: 1240px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search .seg { grid-column: 1 / -1; justify-self: start; }
  .search .btn { grid-column: 1 / -1; }
  .filters { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1020px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--noche); border-bottom: 1px solid var(--linea-osc);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--linea-osc); font-size: 17px; }
  .nav .btn { margin-top: 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { padding-bottom: 40px; }
  .roof { max-width: 380px; margin: 0 auto; }
  .invest-grid, .about-grid, .contact-grid, .detail-grid { grid-template-columns: 1fr; }
  .calc { position: static; }
  .about-mark { max-width: 140px; justify-self: start; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .btn { grid-column: 1 / -1; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .card.featured { grid-column: auto; }
  .card.featured .card-img { aspect-ratio: 4 / 3; }
  .services, .two { grid-template-columns: 1fr; }
  .search { grid-template-columns: 1fr; }
  .seg span { padding: 9px 14px; }
  .form-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .roof, .detail[open] { animation: none; }
  * { transition: none !important; }
}

/* Inicio: botones del hero */
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-contact a { color: var(--oro); text-underline-offset: 4px; }
.page-head + .contact { background: var(--noche-2); }
.page-head + .contact .contact-form input,
.page-head + .contact .contact-form select,
.page-head + .contact .contact-form textarea { background-color: var(--noche); }
.nav a[aria-current="page"] { color: var(--oro); }

/* Página de propiedades */
.page-head { background: var(--noche); color: #fff; padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px); }
.page-head h1 { font-size: clamp(38px, 5vw, 60px); margin-bottom: 16px; }
.page-head .lede { margin: 0; }
.listings { padding-top: clamp(48px, 6vw, 72px); }

[hidden] { display: none !important; }

/* Franja de llamada a la acción */
.cta-band { background: var(--papel); border-top: 1px solid var(--linea); padding: clamp(48px, 6vw, 80px) 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(26px, 3vw, 36px); }

/* Cómo trabajamos (pasos en orden) */
.process { background: var(--papel); border-top: 1px solid var(--linea); padding: clamp(64px, 9vw, 112px) 0; }
.process h2 { margin-bottom: 40px; }
.steps { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps li { counter-increment: paso; border-top: 2px solid var(--oro); padding-top: 18px; }
.steps li::before { content: counter(paso); display: block; font-family: var(--display); font-size: 34px; color: var(--bronce); line-height: 1; margin-bottom: 14px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--gris); font-size: 15px; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.contact-copy .direct { margin-top: 24px; }
