/* =====================================================================
   Johanna Vásquez Inmobiliaria — estilos del sitio público
   Identidad: dorado, negro y marfil
   ===================================================================== */
:root {
  --gold: #B5975B;        /* dorado de marca */
  --gold-dark: #8C7140;   /* dorado para texto sobre fondo claro */
  --gold-soft: #E9DFC9;
  --black: #141414;
  --ink: #1C1A17;         /* texto */
  --muted: #6E675B;       /* texto secundario */
  --ivory: #FFFFFF;       /* fondo general */
  --sand: #F7F4EE;        /* fondo de secciones alternas */
  --line: #E4DED2;
  --white: #FFFFFF;

  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Outfit', system-ui, sans-serif;

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 300 1.0625rem/1.65 var(--body); }
img { max-width: 100%; display: block; }
a { color: inherit; }
strong, b { font-weight: 500; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; margin: 0; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
h2 { font-size: clamp(2.1rem, 4vw, 3rem); }
h3 { font-size: 1.45rem; line-height: 1.2; }
p { margin: 0; }
.eyebrow { font: 500 .78rem var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.5rem; border-radius: var(--r); border: 1px solid transparent;
  font: 500 .95rem var(--body); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary, .btn-dark { background: var(--black); color: #fff; border-color: var(--black); }
.btn-primary:hover, .btn-dark:hover { background: var(--gold); border-color: var(--gold); }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-light:hover { background: #fff; color: var(--black); }
.btn-wa { background: #1F7A4D; color: #fff; border-color: #1F7A4D; }
.btn-wa:hover { background: #17633E; border-color: #17633E; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-logo { height: 54px; width: auto; }
.brand-text { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.brand-text b { font: 600 1.05rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.brand-text small { font: 400 .55rem var(--body); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-top: .35rem; }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a { text-decoration: none; font-weight: 400; font-size: .95rem; white-space: nowrap; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current] { color: var(--gold); }
.site-nav .btn { min-height: 44px; padding: .5rem 1.3rem; margin-left: 1rem; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--ink); margin: 6px 0; }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 84px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1.4rem; display: none; }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin: 1rem 0 0; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 6vw, 4.8rem); line-height: 1.02; }
.hero-lead { margin-top: 1.4rem; font-size: 1.1rem; color: var(--muted); max-width: 44ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2.2rem; }
.hero-photo { aspect-ratio: 4 / 3.4; background: var(--black); overflow: hidden; position: relative; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(181,151,91,.55); pointer-events: none; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Buscador */
.search { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 0; background: #fff; border: 1px solid var(--line); margin-top: 2rem; }
.search label { display: flex; flex-direction: column; padding: .6rem 1rem; border-left: 1px solid var(--line); }
.search label:first-of-type { border-left: 0; }
.search span { font-size: .72rem; color: var(--gold-dark); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.search select, .search input { border: 0; background: transparent; font: 400 1rem var(--body); color: var(--ink); padding: .2rem 0; outline: none; min-width: 0; }
.search .btn { border-radius: 0; min-height: 100%; }
@media (max-width: 620px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search label { border-left: 0; border-bottom: 1px solid var(--line); }
  .search label:nth-of-type(2n) { border-left: 1px solid var(--line); }
  .search label:last-of-type { grid-column: 1 / -1; border-left: 0; }
  .search .btn { grid-column: 1 / -1; min-height: 50px; }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-sand { background: var(--sand); }
.section-dark { background: var(--black); color: #F3EFE6; }
.section-dark p { color: #BDB6A8; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2.4rem; flex-wrap: wrap; }
.section-head p { color: var(--muted); max-width: 54ch; margin-top: .8rem; }
.section-note { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 2.4rem; }
.section-note a { color: var(--gold-dark); }

/* ---------- Tarjetas de propiedad ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: #fff; }
.grid > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid > .empty, .grid > .skeleton { grid-column: 1 / -1; }
.card { background: #fff; }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #1F1D1A; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-link:hover .card-media img { transform: scale(1.04); }
.card-media.is-empty { display: grid; place-items: center; color: #8A8273; font-size: .9rem; }
.tag { position: absolute; top: 14px; left: 14px; padding: .3rem .65rem; font: 500 .7rem var(--body); letter-spacing: .12em; text-transform: uppercase; background: var(--gold); color: #fff; }
.tag-arriendo { background: var(--gold); }
.tag-venta { background: var(--gold); }
.tag-proyecto { background: var(--black); color: var(--gold); }
.tag-status { left: auto; right: 14px; background: #fff; color: var(--ink); }
.card-body { padding: 1.3rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-title { font: 500 1.4rem/1.2 var(--display); }
.card-link:hover .card-title { color: var(--gold-dark); }
.card-where { color: var(--muted); font-size: .9rem; margin-top: .35rem; }
.card-price { font: 500 1.45rem var(--display); margin-top: .9rem; }
.card-specs { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .4rem; font-size: .85rem; color: var(--muted); }
.card-cta { margin-top: auto; padding-top: 1.1rem; }
.card-cta span { display: flex; justify-content: center; align-items: center; min-height: 44px; border: 1px solid var(--ink); font-size: .9rem; font-weight: 500; transition: background-color .15s, color .15s; }
.card-link:hover .card-cta span { background: var(--black); color: #fff; }

.empty { padding: 3.5rem 1.5rem; text-align: center; background: #fff; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font: 500 1.6rem var(--display); margin-bottom: .4rem; }
.skeleton { aspect-ratio: 4 / 4.2; background: linear-gradient(90deg, #EFEBE3 25%, #F7F4EE 50%, #EFEBE3 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.grid > .skeleton { grid-column: auto; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Mosaico ---------- */
.mosaic { display: grid; grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: repeat(2, minmax(220px, 1fr)); gap: 12px; }
.tile { position: relative; overflow: hidden; background: var(--black); color: #fff; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; min-height: 220px; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.78)); z-index: 1; }
.tile > *:not(img) { position: relative; z-index: 2; }
.tile:hover img { transform: scale(1.04); }
.tile .eyebrow { margin-bottom: .4rem; font-size: .7rem; }
.tile h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.tile p { color: #D9D3C7; font-size: .92rem; margin-top: .4rem; max-width: 36ch; }
.tile-link { display: inline-block; margin-top: .9rem; font-size: .85rem; color: var(--gold-soft); border-bottom: 1px solid var(--gold); padding-bottom: 2px; align-self: flex-start; }
.tile-big { grid-row: 1 / 3; }
.tile-big h3 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
@media (max-width: 900px) { .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; } .tile-big { grid-column: 1 / -1; grid-row: auto; min-height: 380px; } }
@media (max-width: 520px) { .mosaic { grid-template-columns: 1fr; } }

/* ---------- Pasos ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: step; list-style: none; padding: 0; margin: 2.8rem 0 0; }
.steps li { counter-increment: step; border-top: 1px solid rgba(181,151,91,.5); padding-top: 1.4rem; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: italic 500 2.6rem/1 var(--display); color: var(--gold); margin-bottom: .9rem; }
.steps h3 { margin-bottom: .5rem; color: #fff; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Sobre Johanna ---------- */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about:not(:has(.about-photo)) { grid-template-columns: 1fr; max-width: 760px; }
.about-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--sand); position: relative; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.6); pointer-events: none; }
.about p + p { margin-top: 1rem; }
.about .lead { font: italic 500 clamp(1.4rem, 2.4vw, 1.8rem)/1.35 var(--display); color: var(--ink); margin: 1.2rem 0 1.4rem; }
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 2rem; margin-top: 1.8rem; padding: 0; list-style: none; }
.services li { padding-left: 1.5rem; position: relative; }
.services li::before { content: ""; position: absolute; left: 0; top: .72em; width: 12px; height: 1px; background: var(--gold); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } .about-photo { max-width: 420px; } }
@media (max-width: 480px) { .services { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.contact-list { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; gap: 1.2rem; }
.contact-list span { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.contact-list a { text-decoration: none; font-size: 1.1rem; color: #fff; }
.contact-list a:hover { color: var(--gold); }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

.form { display: grid; gap: 1rem; background: #fff; color: var(--ink); padding: clamp(1.4rem, 3vw, 2.2rem); }
.form h3 { font-size: 1.7rem; }
.form label { display: grid; gap: .35rem; font-weight: 400; font-size: .88rem; color: var(--muted); }
.form input, .form textarea, .form select { font: 400 1rem var(--body); padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--r); background: #FDFCF9; color: var(--ink); width: 100%; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--gold); background: #fff; }
.form textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-status { font-size: .92rem; min-height: 1.4em; }
.form-status[data-state="ok"] { color: #1F7A4D; }
.form-status[data-state="error"] { color: #A23B2A; }
.hp { position: absolute; left: -9999px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--black); color: #A9A293; padding: 3.5rem 0 2rem; font-size: .92rem; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.site-footer .brand-text b { color: #fff; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid #2A2824; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #1F7A4D; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Encabezado de página ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; background: var(--sand); margin-bottom: 2rem; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.page-head p { color: var(--muted); margin-top: .8rem; max-width: 56ch; }

/* ---------- Listado ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; padding: 1.1rem; background: #fff; border: 1px solid var(--line); margin-bottom: 1.4rem; }
.filters label { display: grid; gap: .3rem; font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark); flex: 1 1 150px; }
.filters select, .filters input { font: 400 .98rem var(--body); padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--r); background: #FDFCF9; color: var(--ink); width: 100%; text-transform: none; letter-spacing: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); flex: 0 0 auto; }
.seg button { border: 0; background: none; padding: .6rem 1rem; font: 400 .95rem var(--body); color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--black); color: #fff; }
.results-meta { color: var(--muted); margin-bottom: 1.2rem; font-size: .95rem; }
.link-btn { background: none; border: 0; color: var(--gold-dark); font: 500 .95rem var(--body); cursor: pointer; text-decoration: underline; padding: .6rem 0; }

/* ---------- Detalle ---------- */
.detail-top { padding: 1.6rem 0 0; }
.crumbs { font-size: .88rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--gold-dark); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; margin: 1.2rem 0 2.4rem; height: clamp(300px, 52vw, 560px); }
.gallery button { padding: 0; border: 0; overflow: hidden; cursor: zoom-in; background: #1F1D1A; position: relative; }
.gallery button:first-child { grid-row: 1 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,20,20,.55); color: #fff; font: italic 500 1.6rem var(--display); }
.gallery.single { grid-template-columns: 1fr; }
.gallery.single button:first-child { grid-row: auto; }
.gallery.empty-g { display: grid; place-items: center; background: var(--sand); color: var(--muted); grid-template-columns: 1fr; height: 260px; }
@media (max-width: 700px) {
  .gallery { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
  .gallery button { aspect-ratio: 4 / 3; }
  .gallery button:first-child { grid-row: auto; }
  .gallery button:nth-child(n+2) { display: none; }
  .gallery button:first-child::after { content: attr(data-count); position: absolute; right: 12px; bottom: 12px; background: rgba(20,20,20,.75); color: #fff; padding: .25rem .7rem; font-size: .85rem; }
}

.detail { display: grid; grid-template-columns: 1fr 370px; gap: clamp(2rem, 5vw, 4rem); align-items: start; padding-bottom: 5rem; }
.detail h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.detail-where { color: var(--muted); margin-top: .6rem; font-size: 1.02rem; }
.detail-price { font: 500 clamp(1.9rem, 3.2vw, 2.4rem) var(--display); margin-top: 1.3rem; color: var(--gold-dark); }
.detail-price small { display: block; font: 300 .95rem var(--body); color: var(--muted); margin-top: .2rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0; background: #fff; border: 1px solid var(--line); overflow: hidden; margin: 2.2rem 0; }
.facts div { padding: 1rem 1.1rem; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.facts dt { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dark); font-weight: 500; }
.facts dd { margin: .2rem 0 0; font: 500 1.35rem var(--display); }
.detail h2 { font-size: 1.9rem; margin: 2.4rem 0 .9rem; }
.detail-desc { white-space: pre-line; max-width: 68ch; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem 1.5rem; }
.feature-list li { padding-left: 1.5rem; position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 12px; height: 1px; background: var(--gold); }
.video { aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }
.aside { position: sticky; top: 108px; display: grid; gap: 1rem; }
.aside-box { background: #fff; border: 1px solid var(--line); padding: 1.6rem; }
.aside-box h3 { margin-bottom: .4rem; }
.aside-box > p { color: var(--muted); font-size: .95rem; margin-bottom: 1.1rem; }
.aside-box .btn { width: 100%; }
.aside-box .btn + .btn { margin-top: .6rem; }
.aside .form { padding: 0; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } .aside { position: static; } }

/* Visor de fotos */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12,12,12,.95); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(181,151,91,.6); width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lightbox button:hover { background: var(--gold); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 20px; color: #fff; font-size: .95rem; }

/* ---------- Consigna ---------- */
.consign { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; padding-bottom: 5rem; }
.consign .form { border: 1px solid var(--line); }
.benefits { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1.3rem; }
.benefits li { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.benefits h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.benefits p { color: var(--muted); }
@media (max-width: 860px) { .consign { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
