:root {
  --navy: #0c2742;
  --navy-2: #112a46;
  --navy-3: #18385a;
  --green: #1f9d55;
  --green-d: #17824545;
  --green-dk: #178245;
  --gold: #e0b04a;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --line: #dde3ea;
  --text: #112a46;
  --muted: #5b6b7c;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(12, 39, 66, .06), 0 8px 24px rgba(12, 39, 66, .08);
  --shadow-lg: 0 24px 60px rgba(12, 39, 66, .22);
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font: 400 16px/1.6 var(--font-body); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
img:not([src]) { visibility: hidden; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 99px; border: 1px solid transparent; font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s var(--ease); white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(224, 176, 74, .55); outline-offset: 2px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dk); }
.btn-ghost { background: var(--bg); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: #fff; border-color: #c5cfda; }
.btn-wa { background: var(--green); color: #fff; height: 42px; padding: 0 18px; }
.btn-wa:hover { background: var(--green-dk); }
.btn-wa svg, .wa-link svg { width: 20px; height: 20px; }

/* ---------- barra superior y cabecera */
.topbar { background: var(--navy); color: #c9d6e3; font-size: 13.5px; }
.topbar-in { display: flex; gap: 24px; justify-content: flex-end; align-items: center; min-height: 38px; flex-wrap: wrap; }
.topbar a, .topbar span { display: inline-flex; gap: 7px; align-items: center; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar svg { width: 15px; height: 15px; color: var(--gold); }

.header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; }
.header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(12, 39, 66, .06); }
.header-in { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; margin-right: auto; }
.brand img { height: 46px; width: auto; max-width: 220px; object-fit: contain; }
.brand-text { font: 800 24px/1 var(--font-head); color: var(--navy); letter-spacing: -.03em; }
.brand-text small { display: block; font: 600 11px/1.6 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 99px; color: var(--navy-2); transition: background .2s; }
.nav a:hover { background: var(--bg); }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: var(--bg); border-radius: 12px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.menu-btn span { width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s var(--ease); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- portada */
.hero { position: relative; min-height: clamp(420px, 62vh, 600px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--navy); }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; animation: heroIn 1.4s var(--ease) both; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 39, 66, .15) 0%, rgba(12, 39, 66, .35) 40%, rgba(12, 39, 66, .88) 100%); }
.hero-in { position: relative; padding: 140px 0 120px; max-width: 820px; margin-left: max(20px, calc((100% - 1200px) / 2)); }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--gold); }
.hero h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
.hero-sub { margin: 18px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: #dbe5ef; max-width: 600px; }

/* ---------- buscador */
.search-wrap { position: relative; z-index: 5; margin-top: -54px; }
.search { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 14px; align-items: end; background: var(--surface); padding: 20px; border-radius: 18px; box-shadow: var(--shadow-lg); }
.search label span, .lead-form label span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
select, input, textarea { width: 100%; font: 500 15px/1.3 var(--font-body); color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .2s, background .2s; }
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' fill='none' stroke='%235b6b7c' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
select:hover, input:hover, textarea:hover { border-color: #c5cfda; }
select:focus, input:focus, textarea:focus { background-color: #fff; border-color: var(--navy-3); outline: none; }
.search .btn { height: 47px; padding: 0 28px; }

/* ---------- secciones */
.section { padding: 88px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 32px; }
.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.eyebrow.light { color: var(--gold); }
.count { margin: 0; color: var(--muted); font-weight: 600; }

/* ---------- tarjetas de propiedades */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 26px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.prop { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease); animation: rise .5s var(--ease) both; }
.prop:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(12, 39, 66, .06), 0 18px 40px rgba(12, 39, 66, .14); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.prop-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #e7edf3, #d4dee8); overflow: hidden; }
.prop-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.prop:hover .prop-media img { transform: scale(1.05); }
.prop-media .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #8ea0b3; font-weight: 600; }
.prop-media .media-count { position: absolute; right: 12px; bottom: 12px; background: rgba(12, 39, 66, .78); color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px; display: flex; gap: 6px; align-items: center; backdrop-filter: blur(4px); }
.prop-media .media-count svg { width: 14px; height: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.prop-media .badges { position: absolute; top: 12px; left: 12px; }
.badge { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 99px; background: #fff; color: var(--navy); letter-spacing: .02em; }
.badge.op { background: var(--navy); color: #fff; }
.badge.star { background: var(--gold); color: var(--navy); }
.badge.rented { background: #c0392b; color: #fff; }
.prop-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prop-body h3 { font-size: 21px; }
.prop-meta { margin: 0; color: var(--muted); font-size: 14.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prop-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: #b4c0cc; }
.prop-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.price-label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.price { font: 700 26px/1.1 var(--font-head); color: var(--navy); letter-spacing: -.02em; }
.price small { font-size: .55em; font-weight: 700; color: var(--green); margin-left: 4px; letter-spacing: 0; }
.ficha { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--navy-3); padding: 8px 12px; border-radius: 99px; background: var(--bg); transition: background .2s; }
.ficha:hover { background: #e6ebf1; }
.ficha svg { width: 16px; height: 16px; }
.skeleton { height: 420px; border-radius: var(--radius); background: linear-gradient(100deg, #e9eef3 30%, #f6f8fa 50%, #e9eef3 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.empty { text-align: center; padding: 60px 20px; background: var(--surface); border-radius: var(--radius); color: var(--muted); }

/* ---------- quiénes somos */
.about { background: var(--navy); color: #fff; padding: 96px 0; position: relative; overflow: hidden; }
.about::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; border: 80px solid rgba(255, 255, 255, .03); }
.about-in { display: grid; grid-template-columns: auto 1fr; gap: 28px 56px; align-items: center; position: relative; }
.about-badge { width: 168px; height: 168px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; text-align: center; padding: 20px; }
.about-badge span { font: 700 26px/1.1 var(--font-head); color: var(--gold); }
.about-copy p:not(.eyebrow) { color: #c9d6e3; font-size: 18px; max-width: 760px; margin: 16px 0 0; }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 28px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.stats div { padding: 26px 24px 0 0; }
.stats div + div { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .12); }
.stats dt { font: 700 34px/1 var(--font-head); color: #fff; }
.stats dd { margin: 8px 0 0; color: #9fb2c6; font-size: 14.5px; }

/* ---------- contacto */
.contact-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-info h2 { margin-bottom: 12px; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.contact-list li a, .contact-list li span { display: flex; gap: 14px; align-items: center; text-decoration: none; padding: 14px 16px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; transition: transform .2s var(--ease); }
.contact-list li a:hover { transform: translateX(4px); }
.contact-list i { width: 40px; height: 40px; border-radius: 10px; background: rgba(31, 157, 85, .1); color: var(--green); display: grid; place-items: center; flex: none; }
.contact-list small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.form-card { padding: 28px; }
.lead-form { display: grid; gap: 14px; }
.lead-form h3 { font-size: 22px; }
.form-prop { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-actions .btn { flex: 1 1 200px; }
.form-msg { margin: 0; font-size: 14px; font-weight: 600; min-height: 0; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: #c0392b; }

/* ---------- pie */
.footer { background: #08192b; color: #9fb2c6; padding: 64px 0 0; font-size: 15px; }
.footer-in { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1fr; gap: 40px; }
.footer h3 { color: #fff; font-size: 15px; font-family: var(--font-body); font-weight: 700; margin-bottom: 14px; letter-spacing: 0; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-logo { height: 58px; width: auto; max-width: 240px; object-fit: contain; background: #fff; padding: 8px 14px; border-radius: 12px; }
.footer-desc { max-width: 320px; margin: 16px 0 0; }
.social { display: flex; gap: 10px; }
.social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .16); transition: background .2s, border-color .2s; }
.social a:hover { background: var(--green); border-color: var(--green); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 48px; padding: 22px 0; font-size: 13.5px; }
.footer-bottom p { margin: 0; }

.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 30; width: 60px; height: 60px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37, 211, 102, .45); transition: transform .2s var(--ease); }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 32px; height: 32px; }

/* ---------- ficha (modal) */
.modal { max-width: none; width: min(1120px, 100% - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal::backdrop { background: rgba(8, 25, 43, .72); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-box { max-height: calc(100dvh - 24px); overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: var(--navy); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.gallery { position: relative; background: #08192b; }
.stage { height: min(62vh, 56vw, 620px); width: 100%; display: grid; place-items: center; overflow: hidden; }
.stage img, .stage video, .stage iframe { width: 100%; height: 100%; min-height: 0; object-fit: contain; border: 0; background: #08192b; }
.nav-arrow { position: absolute; top: calc(50% - 50px); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--navy); font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.nav-arrow:hover { background: #fff; }
.nav-arrow.prev { left: 16px; }
.nav-arrow.next { right: 16px; }
.counter { position: absolute; left: 16px; top: 16px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 99px; }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: #08192b; scrollbar-width: thin; }
.thumbs button { flex: none; width: 92px; height: 62px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: #18385a; opacity: .6; transition: opacity .2s, border-color .2s; position: relative; color: #fff; }
.thumbs button[aria-current="true"] { opacity: 1; border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs svg { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; }
.modal-body { display: grid; grid-template-columns: 1fr 380px; gap: 36px; padding: 32px; }
.modal-main h2 { font-size: clamp(26px, 3vw, 34px); margin-top: 12px; }
.meta { color: var(--muted); margin: 8px 0 0; display: flex; gap: 6px; align-items: center; }
.meta svg { width: 16px; height: 16px; }
.price-row { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin: 22px 0; padding: 18px 0; border-block: 1px solid var(--line); }
.price-row .price { font-size: 34px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 0 0 26px; }
.specs div { background: var(--bg); border-radius: 12px; padding: 14px 16px; }
.specs dt { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.specs dd { margin: 4px 0 0; font-weight: 700; font-size: 16px; }
.modal-main h3 { margin-bottom: 10px; }
.desc { color: #34495e; white-space: pre-line; }
.desc:empty::before { content: "Consúltanos para recibir más información sobre esta propiedad."; color: var(--muted); }
.features { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.features li { display: flex; gap: 10px; align-items: baseline; }
.features li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; transform: translateY(-1px); }
.map iframe { width: 100%; height: 280px; border: 0; border-radius: 14px; margin-top: 24px; }
.modal-side .form-card { box-shadow: none; border: 1px solid var(--line); padding: 22px; }

/* ---------- responsive */
@media (max-width: 1000px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search .btn { grid-column: 1 / -1; }
  .contact-in, .modal-body { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .stage { height: min(62vw, 46vh); }
  .menu-btn { display: flex; }
  .nav { position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 10px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(12, 39, 66, .1); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 12px; font-size: 17px; }
  .btn-wa span { display: none; }
  .btn-wa { width: 44px; padding: 0; }
  .header-in { gap: 10px; }
  .hero-in { padding: 120px 0 100px; }
  .grid { grid-template-columns: 1fr; }
  .about-in { grid-template-columns: 1fr; }
  .about-badge { width: 128px; height: 128px; }
  .about-badge span { font-size: 20px; }
  .stats { grid-template-columns: 1fr; }
  .stats div + div { border-left: 0; padding-left: 0; }
  .section { padding: 64px 0; }
  .section-head { flex-direction: column; align-items: start; }
  .modal { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .modal-box { max-height: 100dvh; }
  .modal-body { padding: 22px 18px; }
  .row2 { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr; }
  .topbar-in { justify-content: center; gap: 14px; }
  .nav-arrow { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
  .search { grid-template-columns: 1fr; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
