:root {
  --bone: #f5f1ea;
  --sand: #ebe4d8;
  --ink: #23221f;
  --graphite: #2b2a28;
  --muted: #5d5a54;
  --line: #d9d1c3;
  --terracotta: #b4552d;
  --terracotta-dark: #8f3f1f;
  --wood: #9a6b43;
  --wa: #1f8f4e;
  --wa-dark: #187340;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(35, 34, 31, .08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bone);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracotta-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.8rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.small { font-size: .85rem; color: var(--muted); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 820px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; }
.btn .i { width: 1.25em; height: 1.25em; flex: none; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-ghost { border-color: rgba(255,255,255,.8); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-ghost-dark { border-color: var(--ink); color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }
.btn-lg { padding: 1em 1.8em; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 241, 234, .94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .55em; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.15rem; }
.brand strong { font-weight: 600; color: var(--terracotta-dark); }
.brand-mark { width: 34px; height: 34px; fill: var(--graphite); flex: none; }
.brand-mark .bm-up { fill: var(--terracotta); }

.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--terracotta-dark); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bone); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Hero */
.hero { position: relative; min-height: calc(100svh - var(--header-h)); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--graphite); }
.hero picture { position: absolute; inset: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,19,17,.15) 0%, rgba(20,19,17,.35) 40%, rgba(20,19,17,.85) 100%); }
.hero-content { position: relative; padding-top: 80px; padding-bottom: 56px; }
.hero h1 { max-width: 16ch; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.hero-lead { max-width: 52ch; font-size: 1.1rem; color: rgba(255,255,255,.92); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--terracotta); margin-bottom: .9em; }
.hero .eyebrow { color: #f1c7a8; }
.hero-price { display: inline-flex; flex-direction: column; margin: .4em 0 1.4em; padding: .7em 1.2em; border-left: 4px solid var(--terracotta); background: rgba(20,19,17,.45); border-radius: 0 10px 10px 0; }
.price-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.8); }
.price { font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 600; line-height: 1.1; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Facts */
.facts { background: var(--graphite); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,.12); }
.fact { background: var(--graphite); padding: 22px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.fact:last-child { grid-column: 1 / -1; }
.fact-n { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: #f1c7a8; }
.fact-t { font-size: .85rem; color: rgba(255,255,255,.78); }
@media (min-width: 800px) {
  .facts-grid { grid-template-columns: repeat(5, 1fr); }
  .fact:last-child { grid-column: auto; }
}

/* Sections */
.section { padding: 80px 0; }
@media (max-width: 700px) { .section { padding: 56px 0; } }
.section-alt { background: var(--sand); }
.section-dark { background: var(--graphite); color: #f1ece4; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: #f1c7a8; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 70ch; }
.section-dark .lead { color: rgba(241,236,228,.85); }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }

/* Compare */
.compare { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.compare-row { margin-bottom: 20px; }
.compare-label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.bar { height: 52px; border-radius: 8px; display: flex; align-items: center; padding: 0 16px; font-weight: 600; white-space: nowrap; }
.bar-market { width: 100%; background: var(--line); color: var(--ink); }
.bar-ours { width: 65%; min-width: 150px; background: var(--terracotta); color: #fff; }
.checks { list-style: none; padding: 0; margin: 20px 0 24px; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border-left: 2.5px solid var(--terracotta); border-bottom: 2.5px solid var(--terracotta); transform: rotate(-45deg); }
.compare .checks { margin-bottom: 0; }

/* Cards */
.cards-3 { display: grid; gap: 20px; margin: 40px 0; }
@media (min-width: 800px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 28px; }
.card p { color: rgba(241,236,228,.82); margin: 0; }
.card-i { width: 36px; height: 36px; fill: none; stroke: #f1c7a8; stroke-width: 1.6; margin-bottom: 14px; }
.specs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.specs li { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: .4em 1em; font-size: .9rem; }

/* Units */
.units { display: grid; gap: 18px; margin: 36px 0 48px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.unit { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.unit header { display: flex; justify-content: space-between; align-items: center; }
.unit-id { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; }
.tag { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--wa-dark); background: #e2f2e8; padding: .3em .7em; border-radius: 999px; }
.tag.sold { color: #fff; background: var(--terracotta); }
.unit-sold { background: var(--sand); box-shadow: none; }
.unit-sold .unit-price { color: var(--muted); }
.btn-disabled { background: var(--line); color: var(--muted); cursor: default; }
.btn-disabled:hover { transform: none; }
.unit-floor { color: var(--terracotta-dark); font-weight: 600; font-size: .9rem; margin: 2px 0 10px; }
.unit ul { padding-left: 1.1em; margin: 0 0 14px; color: var(--muted); font-size: .95rem; flex: 1; }
.unit-price { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin-bottom: 14px; }

.plan { margin: 0; background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.plan img { width: 100%; border-radius: 6px; }
.plan figcaption, .framed figcaption { font-size: .9rem; color: var(--muted); margin-top: 12px; }

/* Gallery */
.gallery { display: grid; gap: 12px; margin-top: 28px; grid-template-columns: repeat(2, 1fr); }
.gallery a { display: block; border-radius: 10px; overflow: hidden; background: var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.03); }
@media (min-width: 800px) { .gallery-renders { grid-template-columns: repeat(3, 1fr); } }
.gallery-renders img { aspect-ratio: 3 / 2; }

/* Real photos: fixed layout so every cell fills */
.gallery-real {
  display: grid; gap: 12px; margin-top: 28px;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 230px 170px 170px 230px 170px 170px;
  grid-template-areas: "f f" "a i1" "a i2" "m m" "k b1" "k b2";
}
.gallery-real a { display: block; border-radius: 10px; overflow: hidden; background: var(--line); }
.gallery-real img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-real a:hover img { transform: scale(1.03); }
.gallery-real picture { display: block; height: 100%; }
.gr-f { grid-area: f; } .gr-a { grid-area: a; } .gr-i1 { grid-area: i1; } .gr-i2 { grid-area: i2; }
.gr-m { grid-area: m; } .gr-k { grid-area: k; } .gr-b1 { grid-area: b1; } .gr-b2 { grid-area: b2; }
.gr-k img { object-position: 35% center; }
@media (min-width: 800px) {
  .gallery-real {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 220px 220px 220px 220px;
    grid-template-areas: "f f a i1" "f f a i2" "m m k b1" "m m k b2";
  }
}

/* Stats */
.stats { display: grid; gap: 18px; margin: 36px 0; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: #fff; border-radius: var(--radius); padding: 26px; border-top: 4px solid var(--terracotta); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat-n { font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--graphite); margin-bottom: 8px; }
.stat p { color: var(--muted); flex: 1; }
.src { font-size: .8rem; color: var(--terracotta-dark); }
.src::before { content: "Fuente: "; color: var(--muted); }
.note { background: var(--sand); border-radius: var(--radius); padding: 26px; }
.note p:last-child { margin: 0; }

/* Location */
.framed { margin: 0; display: grid; gap: 12px; }
.framed a { display: block; border-radius: 10px; overflow: hidden; background: #fff; }
.framed img { width: 100%; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; font-size: 1.05rem; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.5rem; font-weight: 400; color: var(--terracotta); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding-right: 32px; }

/* Contact */
.contact { background: var(--terracotta); color: #fff; padding: 72px 0; text-align: center; }
.contact h2 { color: #fff; }
.contact p { font-size: 1.1rem; color: rgba(255,255,255,.9); }
.contact .btn-wa { background: #fff; color: var(--wa-dark); }
.contact .btn-wa:hover { background: #f1ece4; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 40px 0 96px; }
.site-footer .small { color: rgba(255,255,255,.55); max-width: 90ch; }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .2s, background .2s;
}
.wa-float:hover { transform: scale(1.06); background: var(--wa-dark); }
.wa-float svg { width: 30px; height: 30px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15,14,12,.94); display: flex; align-items: center; justify-content: center; padding: 56px 12px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100svh - 150px); object-fit: contain; border-radius: 6px; background: #fff; }
.lightbox figcaption { color: rgba(255,255,255,.85); font-size: .95rem; margin-top: 12px; text-align: center; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; } }

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