/* ============================================================
   Casa en venta — "Verde parque"
   Verde profundo → esmeralda, fondo blanco, toques dorados.
   Tipografía: Plus Jakarta Sans.
   ============================================================ */
:root {
  --bg: #FFFFFF;
  --soft: #F3F7F4;
  --surface: #FFFFFF;
  --text: #111827;
  --muted: #4B5563;
  --line: #E5E9E6;
  --brand: #1F4D3A;
  --brand-2: #2F8A63;
  --brand-dark: #163A2B;
  --brand-tint: rgba(47, 138, 99, 0.10);
  --gold: #C9A45C;
  --gold-text: #8A6A2F;
  --grad: linear-gradient(135deg, #1F4D3A 0%, #2F8A63 100%);
  --grad-deep: linear-gradient(160deg, #163A2B 0%, #1F4D3A 45%, #2F8A63 100%);
  --grad-gold: linear-gradient(135deg, #B88F45 0%, #E3C37F 100%);
  --r-btn: 12px;
  --r-card: 18px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .06);
  --shadow-lg: 0 20px 48px rgba(22, 58, 43, .18);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font);
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}
img { display: block; max-width: 100%; height: auto; }
h1, h2 { font-family: var(--font); font-weight: 800; letter-spacing: -0.025em; margin: 0; line-height: 1.12; }
h2 { font-size: clamp(1.625rem, 6vw, 2.25rem); margin-bottom: 16px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: .8125rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main > section.wrap { margin-top: 64px; }
main > section.wrap:first-child { margin-top: 20px; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Buttons: rectangulares con bordes redondeados */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-btn); border: 0;
  font: 700 .9375rem var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(31, 77, 58, .28); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 10px 24px rgba(31, 77, 58, .34); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-outline { background: var(--surface); color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline:hover { background: var(--brand-tint); }
.btn-gold { background: var(--grad-gold); color: #1C1408; box-shadow: 0 6px 18px rgba(184, 143, 69, .35); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-white { background: #fff; color: var(--brand); }
.btn-lg { min-height: 56px; width: 100%; font-size: 1rem; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-btn); border: 1px solid rgba(255,255,255,.3);
  background: rgba(10, 30, 22, .35); color: #fff; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* Hero */
.hero { position: relative; min-height: calc(100svh - 76px - env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: space-between; color: #fff; overflow: hidden; background: var(--brand-dark); }
.hero picture, .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-img { animation: kenburns 9s ease-out both; transform-origin: 60% 40%; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 30, 22, .45) 0%, rgba(10, 30, 22, 0) 22%),
    linear-gradient(0deg, rgba(14, 38, 28, .95) 0%, rgba(18, 48, 36, .82) 42%, rgba(22, 58, 43, 0) 78%);
}
.hero-top, .hero-body { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: center; padding: calc(16px + env(safe-area-inset-top)) 16px 0; max-width: 1120px; width: 100%; margin: 0 auto; }
.badge { background: var(--grad-gold); color: #1C1408; padding: 8px 14px; border-radius: 10px; font-weight: 800; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; }
.hero-body { padding: 0 16px 56px; max-width: 1120px; width: 100%; margin: 0 auto; animation: rise .9s .2s ease-out both; }
@keyframes rise { from { transform: translateY(24px); } to { transform: none; } }
.hero-place { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: .9375rem; font-weight: 600; color: #E9D9B2; }
.hero-place .i { width: 16px; height: 16px; }
.hero h1 { font-size: clamp(2.375rem, 10vw, 4.5rem); text-wrap: balance; }
.h1-kicker { display: block; font-size: .9375rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.hero-sub { margin: 12px 0 0; font-size: 1.0625rem; color: rgba(255,255,255,.88); }
.hero-price { margin: 14px 0 0; font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.hero-price:empty { display: none; }
.hero-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.hero-actions .btn { flex: 1 1 140px; max-width: 220px; }

/* Stats */
.stats { list-style: none; margin: 0; padding: 0; position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border-radius: 14px; padding: 14px 6px; text-align: center; border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat .tint { width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; }
.stat .tint .i { width: 18px; height: 18px; }
.stat strong { display: block; font-size: 1.0625rem; font-weight: 800; line-height: 1.2; }
.stat span { font-size: .75rem; color: var(--muted); }

/* Intro + stories */
.eyebrow { margin: 0 0 10px; font-size: .8125rem; font-weight: 700; color: var(--gold-text); letter-spacing: .08em; text-transform: uppercase; }
.intro { text-align: center; max-width: 760px; }
.lead { margin: 0; font-size: clamp(1.25rem, 5vw, 1.75rem); font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.lead em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story { display: grid; gap: 20px; }
.story-media { display: grid; gap: 8px; }
.story-main, .story-thumbs img { width: 100%; object-fit: cover; transition: transform .6s ease; }
.story-main { aspect-ratio: 4 / 3; border-radius: var(--r-card); }
.story-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.story-thumbs img { aspect-ratio: 4 / 3; border-radius: 14px; }
.zoom { overflow: hidden; border-radius: var(--r-card); }
.zoom:hover img { transform: scale(1.04); }
.story-text h2 { font-size: clamp(1.875rem, 7vw, 2.75rem); margin-bottom: 14px; }
.story-text p { margin: 0; color: var(--muted); font-size: 1.0625rem; }
.pills { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); color: var(--brand); font-weight: 700; font-size: .875rem; }
.pills .i { width: 16px; height: 16px; }

/* Plano */
.plano-card { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.plano-card .small { margin-top: 10px; text-align: center; }
#plano-svg { display: flex; justify-content: center; }
.plano { width: 100%; max-width: 440px; height: auto; max-height: 72vh; font-family: var(--font); }
.plano .muro { fill: #fff; stroke: var(--brand-dark); stroke-width: .2; stroke-linejoin: miter; }
.plano .amb { fill: #fff; stroke: #CBD5CF; stroke-width: .04; }
.plano .muro-fino { stroke: var(--brand-dark); stroke-width: .08; }
.plano .vacio { fill: var(--soft); stroke: #CBD5CF; stroke-width: .04; stroke-dasharray: .12 .1; }
.plano .vacio-x { stroke: #CBD5CF; stroke-width: .03; }
.plano .z-semi { fill: rgba(47, 138, 99, .12); stroke: var(--brand-2); stroke-width: .04; stroke-dasharray: .15 .1; }
.plano .z-verde { fill: rgba(47, 138, 99, .18); }
.plano .esc { fill: #fff; stroke: var(--muted); stroke-width: .03; }
.plano .esc-l { stroke: var(--muted); stroke-width: .02; }
.plano text { text-anchor: middle; fill: var(--text); }
.plano .t-amb { font-size: .36px; font-weight: 700; }
.plano .t-sm { font-size: .28px; font-weight: 700; }
.plano .t-dim { font-size: .28px; fill: var(--muted); }
.plano .t-zona { font-size: .32px; font-weight: 700; fill: var(--brand); }
.plano .t-nota { font-size: .3px; fill: var(--muted); }

/* Tabs (segmentado rectangular) */
.sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.sec-head h2 { margin: 0; }
.tabs { display: flex; gap: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font: 600 .875rem var(--font); color: var(--muted); cursor: pointer; min-height: 38px; }
.tabs button[aria-selected="true"] { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(31, 77, 58, .25); }

/* Gallery */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.grid button { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: var(--soft); }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.grid button:hover img { transform: scale(1.05); }
.grid button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 38, 28, .6) 0%, rgba(14, 38, 28, 0) 40%); }
.grid button span { position: absolute; left: 10px; bottom: 10px; z-index: 1; color: #fff; font-size: .8125rem; font-weight: 600; }

.more { display: flex; width: 100%; margin-top: 12px; }

/* Desplegables (acordeones) */
.accs { display: grid; gap: 10px; }
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; }
#medidas-acc { margin-top: 10px; }
.acc summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; min-height: 64px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .tint { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; }
.acc summary .tint .i { width: 18px; height: 18px; }
.acc summary .row-txt strong { font-size: 1rem; }
.acc .chev { color: var(--brand); transition: transform .25s ease; }
.acc[open] .chev { transform: rotate(180deg); }
.acc[open] summary { border-bottom: 1px solid var(--line); }
.acc .checks, .acc .rows-in { border: 0; border-radius: 0; box-shadow: none; }
.rows-in .tint { background: var(--brand-tint); }

/* Features */
.feature { display: grid; gap: 20px; }
.feature-img { display: none; width: 100%; border-radius: var(--r-card); aspect-ratio: 4 / 3; object-fit: cover; }
.checks { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.checks .tint { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-tint); color: var(--brand-2); display: grid; place-items: center; flex: none; margin-top: 1px; }
.checks .tint .i { width: 15px; height: 15px; stroke-width: 2.5; }

/* Rows (superficies / barrio) */
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.rows li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows .tint { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex: none; }
.rows .tint .i { width: 18px; height: 18px; }
.row-txt { flex: 1; min-width: 0; display: grid; }
.row-txt strong { font-weight: 700; font-size: .9375rem; }
.row-txt span { font-size: .8125rem; color: var(--muted); }
.row-val { font-weight: 800; white-space: nowrap; color: var(--brand); }
.sec-lead { margin: -4px 0 16px; color: var(--muted); font-size: 1.0625rem; max-width: 640px; }
.barrio-nota { margin-top: 10px; }
main > #barrio-sec + #ubicacion { margin-top: 24px; }

/* Map */
.map { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--soft); }
.map iframe { width: 100%; height: 100%; border: 0; }
.map-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.map-foot p { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; }
.map-foot .tint { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex: none; }
.map-foot .tint .i { width: 18px; height: 18px; }

/* Video */
.video-facade { position: relative; display: block; width: 100%; max-width: 420px; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: var(--r-card); overflow: hidden; cursor: pointer; background: #000; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-facade .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 20px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.video-facade .play .i { width: 28px; height: 28px; fill: currentColor; margin-left: 4px; }
.video-facade iframe { width: 100%; height: 100%; border: 0; }

/* Contact: bloque con degradado verde */
.contact-card {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background: var(--grad-deep); border-radius: 24px; padding: 40px 20px; box-shadow: var(--shadow-lg);
}
.contact-card::before { content: ""; position: absolute; width: 320px; height: 320px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(227, 195, 127, .35), rgba(227, 195, 127, 0) 70%); }
.contact-card > * { position: relative; }
.contact-card h2 { font-size: clamp(1.875rem, 7vw, 2.75rem); }
.contact-card .muted { color: rgba(255,255,255,.82); font-size: 1.0625rem; }
.contact-card .eyebrow { color: var(--gold); }
.contact-price { font-size: 1.75rem; font-weight: 800; margin: 16px 0 0; color: var(--gold); }
.contact-price:empty { display: none; }
.contact-actions { display: grid; gap: 10px; margin-top: 24px; max-width: 420px; margin-inline: auto; }
.contact-card .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.contact-card .btn-outline:hover { background: rgba(255,255,255,.1); }
#no-contact { margin-top: 16px; }

.footer { text-align: center; color: var(--muted); font-size: .8125rem; padding-top: 40px; padding-bottom: 24px; }

/* Bottom CTA bar */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(17, 24, 39, .06);
}
.cta-bar strong { display: block; font-size: 1.0625rem; font-weight: 800; color: var(--brand); }
.cta-bar .btn { flex: none; }

/* Lightbox */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 20, 15, .97); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; }
.lightbox img { max-width: 100vw; max-height: 82dvh; object-fit: contain; }
.lightbox figcaption { font-size: .9375rem; opacity: .85; }
.lb-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 2; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }

/* Aparición al scrollear */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .cta-bar { display: none; }
  .hero { min-height: 92vh; }
  .hero-body { padding-bottom: 96px; }
  main > section.wrap { margin-top: 112px; }
  main > section.wrap:first-child { margin-top: 32px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .feature { grid-template-columns: 1fr 1fr; align-items: start; gap: 48px; }
  .feature-img { display: block; position: sticky; top: 24px; }
  .story { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; }
  .story-rev .story-media { order: 2; }
  .contact-card { padding: 64px 48px; }
  .video-facade { margin: 0 auto; }
  #video-sec h2 { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Versión por inmobiliaria */
.inmo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px 16px; background: #fff; }
.inmo-bar[hidden], .inmo-contacto[hidden], .inmo-cta[hidden] { display: none; }
.inmo-marca { min-width: 0; line-height: 1.25; }
.inmo-marca img { height: 40px; width: auto; max-width: 190px; object-fit: contain; }
.inmo-cta { min-height: 44px; padding: 8px 16px; flex: none; }
.con-inmo .hero { min-height: calc(100svh - 136px - env(safe-area-inset-bottom)); }
.inmo-contacto { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 22px; padding: 12px 20px; background: #fff; color: var(--text, #14231C); border-radius: 12px; }
.hero-place, .h1-kicker { text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
.h1-kicker { color: #E9CD8F; }
