:root {
  --ink: #2f2a24;
  --ink-2: #6b6157;
  --cream: #f6f1e9;
  --paper: #fffdf9;
  --sand: #b39f86;
  --olive: #7d7a52;
  --terra: #b9773f;
  --line: #e4dbcf;
  --st-disponible: #6e9a5e;
  --st-reservado: #d4a72c;
  --st-vendido: #e6ded2;
  --wa: #25d366;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --topbar: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

.screen { position: fixed; inset: 0; }

/* ---------- Logo ---------- */
.logo { display: flex; flex-direction: column; align-items: center; line-height: 1; letter-spacing: .28em; text-transform: uppercase; }
.logo-top { font-size: 12px; font-weight: 400; }
.logo-main { font-family: var(--serif); font-size: 46px; letter-spacing: .12em; margin: 6px 0 4px; }
.logo-sub { font-size: 9px; letter-spacing: .35em; opacity: .85; }
.logo.light { color: #fff; }
.logo.small .logo-top { font-size: 8px; }
.logo.small .logo-main { font-size: 22px; margin: 2px 0 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  transition: transform .15s ease, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-wa { background: var(--wa); color: #08361c; width: 100%; }
.link-light { color: #fff; opacity: .8; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; margin-top: 14px; }

/* ---------- Intro ---------- */
#intro { display: grid; place-items: center; background: #2f2a24; z-index: 30; }
.intro-bg { position: absolute; inset: 0; background: url(assets/andes-hero.jpg) center/cover; animation: kenburns 18s ease-out forwards; }
.intro-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,24,18,.35), rgba(30,24,18,.15) 40%, rgba(30,24,18,.75)); }
@keyframes kenburns { from { transform: scale(1.15); } to { transform: scale(1); } }
.intro-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px; gap: 18px; animation: fadeUp 1.4s .3s both; }
.intro-greeting { font-family: var(--serif); font-style: italic; font-size: 24px; color: #fff; max-width: 420px; }
.intro-greeting:empty { display: none; }
.intro-tag { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .9; max-width: 340px; line-height: 1.6; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Vuelo ---------- */
#flight { z-index: 20; background: #1d1a16; }
#flight.fading { transition: opacity .9s ease; pointer-events: none; }
#map { position: absolute; inset: 0; background: #cbb999; }
.flight-caption {
  position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%);
  color: #fff; text-align: center; pointer-events: none;
  font-family: var(--serif); font-size: clamp(28px, 6vw, 52px); letter-spacing: .06em;
  text-shadow: 0 2px 24px rgba(0,0,0,.55); transition: opacity .8s; width: 90%;
}
.flight-caption small { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; margin-top: 8px; opacity: .9; }
.btn-skip { position: absolute; top: calc(env(safe-area-inset-top) + 16px); right: 16px; color: #fff; font-size: 13px; letter-spacing: .1em; background: rgba(0,0,0,.35); padding: 8px 14px; border-radius: 999px; backdrop-filter: blur(6px); }
.flight-end {
  position: absolute; left: 0; right: 0; margin: 0 auto; bottom: 8%;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  color: #fff; padding: 22px 28px; border-radius: 20px; background: rgba(30,24,18,.55); backdrop-filter: blur(10px);
  animation: fadeUp .9s both; width: min(92%, 380px); font-size: 14px;
}
.site-marker { transition: opacity .8s; width: 22px; height: 22px; border-radius: 50%; background: var(--terra); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(185,119,63,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 26px rgba(185,119,63,0); } 100% { box-shadow: 0 0 0 0 rgba(185,119,63,0); } }

/* ---------- App ---------- */
#app { display: flex; flex-direction: column; background: var(--cream); }
.topbar {
  height: var(--topbar); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 16px; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 5;
}
.tabs { display: flex; gap: 4px; }
.tabs button { padding: 8px 12px; font-size: 13px; letter-spacing: .04em; border-radius: 999px; color: var(--ink-2); }
.tabs button.active { background: var(--ink); color: #fff; }
.wa-btn { display: flex; align-items: center; gap: 6px; text-decoration: none; background: var(--wa); color: #08361c; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.wa-btn svg { width: 18px; height: 18px; fill: currentColor; }

.personal {
  flex: none; padding: 10px 16px; background: var(--terra); color: #fff; font-size: 14px; text-align: center;
}
.personal strong { font-weight: 500; }

.view { display: none; flex: 1; min-height: 0; position: relative; }
.view.active { display: block; }
.view.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Masterplan ---------- */
.plan-wrap { position: absolute; inset: 0; background: #e9e1d2; }
#plan { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; cursor: grab; }
#plan.dragging { cursor: grabbing; }
#plan .sat { transition: opacity .25s; }
/* Los lotes son una capa casi invisible sobre la ilustración: solo velan lo vendido y marcan lo reservado */
#plan .lot { fill: rgba(255,255,255,0); stroke: none; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .3s; }
#plan.show-status .lot.vendido { fill: rgba(246,241,233,.72); }
#plan.show-status .lot.reservado { fill: rgba(245,196,40,.62); stroke: #b8860b; stroke-width: 2.5px; }
#plan.only-avail .lot:not(.disponible) { fill: rgba(246,241,233,.9); }
/* Filtro por tipo: lo que no coincide se vela, lo que coincide se marca con borde */
#plan.filtering .lot:not(.match) { fill: rgba(246,241,233,.9); stroke: none; }
#plan.filtering .lot.match { stroke: #fff; stroke-width: 2px; }
#plan.filtering.only-avail .lot.match:not(.disponible) { fill: rgba(246,241,233,.9); stroke: none; }
#plan .lot:hover { fill: rgba(255,255,255,.3); stroke: #fff; stroke-width: 2px; }
#plan .lot.selected { fill: rgba(185,119,63,.28); stroke: var(--ink); stroke-width: 3px; }
#plan .lot.focus { animation: lotPulse 1.6s ease-in-out infinite; }
@keyframes lotPulse { 50% { fill: rgba(185,119,63,.65); } }

.plan-hud { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; pointer-events: none; }
.filters { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; scrollbar-width: none; padding: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 7px 12px; border-radius: 999px; background: var(--paper); font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.filters button i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.filters button.active { background: var(--ink); color: #fff; }
.filter-sum { background: rgba(47,42,36,.88); color: #fff; font-size: 12px; padding: 7px 12px; border-radius: 999px; }
.filter-sum strong { font-weight: 500; }
.plan-hud > * { pointer-events: auto; }
.stats { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--paper); font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; background: var(--paper); padding: 6px 10px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.toggle input { accent-color: var(--st-disponible); }
.plan-tools { position: absolute; right: 12px; bottom: 56px; display: flex; flex-direction: column; gap: 6px; }
.plan-tools button { width: 40px; height: 40px; border-radius: 12px; background: var(--paper); font-size: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.layers {
  position: absolute; left: 12px; bottom: 44px; width: min(270px, calc(100% - 76px));
  background: rgba(255,253,249,.94); backdrop-filter: blur(8px); border-radius: 16px; padding: 10px 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 8px; font-size: 12px;
}
.sat-ctl { display: grid; grid-template-columns: auto 1fr 36px; align-items: center; gap: 8px; }
.sat-ctl span { font-weight: 500; letter-spacing: .04em; }
.sat-ctl input { width: 100%; accent-color: var(--terra); }
.sat-ctl output { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.layer-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.layer-toggles .toggle { box-shadow: none; background: var(--cream); }
.plan-hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--ink-2); pointer-events: none; }

/* ---------- Ficha (bottom sheet) ---------- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; background: var(--paper);
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.18);
  transform: translateY(105%); transition: transform .38s cubic-bezier(.2,.8,.2,1);
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
}
.sheet.open { transform: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 10px; }
.sheet-close { position: absolute; top: 10px; right: 14px; font-size: 26px; line-height: 1; color: var(--ink-2); width: 36px; height: 36px; }
.f-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 4px; padding-right: 30px; }
.f-title { font-family: var(--serif); font-size: 40px; line-height: 1; font-weight: 500; }
.f-sub { color: var(--ink-2); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.pill { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; color: #fff; white-space: nowrap; font-weight: 500; }
.pill.disponible { background: var(--st-disponible); }
.pill.reservado { background: var(--st-reservado); }
.pill.vendido { background: #a89d90; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
.facts div { background: var(--paper); padding: 10px 12px; }
.facts dt { font-size: 11px; color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase; }
.facts dd { font-size: 16px; font-weight: 400; margin-top: 2px; }
.f-section { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin: 18px 0 8px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--cream); padding: 4px; border-radius: 12px; gap: 4px; }
.seg button { padding: 9px 4px; border-radius: 9px; font-size: 13px; }
.seg button.active { background: var(--paper); box-shadow: 0 1px 4px rgba(0,0,0,.1); font-weight: 500; }
.plan-box { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.plan-total { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.plan-total span { font-size: 13px; color: var(--ink-2); }
.plan-total strong { font-family: var(--serif); font-size: 32px; font-weight: 500; }
.rows div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.rows div span:first-child { color: var(--ink-2); }
.rows .hl { font-weight: 500; }
.note { font-size: 12px; color: var(--ink-2); margin-top: 8px; line-height: 1.5; }
details.gastos { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
details.gastos summary { font-size: 14px; cursor: pointer; }
details.gastos .rows { margin-top: 8px; }
.ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.ctas .row { display: flex; gap: 10px; }
.ctas .row .btn { flex: 1; }
.similar { display: flex; flex-wrap: wrap; gap: 8px; }
.similar button { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; }
.similar button b { font-weight: 500; }
.msg { background: var(--cream); padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; margin-bottom: 8px; }

/* ---------- Barrio / Ubicación ---------- */
.content { max-width: 980px; margin: 0 auto; padding: 8px 16px 48px; }
.section-title { font-family: var(--serif); font-weight: 500; font-size: 28px; margin: 28px 0 12px; }
.muted { color: var(--ink-2); margin-bottom: 12px; }
.wide-img { width: 100%; border-radius: 16px; display: block; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zoomable { cursor: zoom-in; }
.bullets { list-style: none; margin: 18px 0; }
.bullets li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); position: relative; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--terra); }
.bullets strong { font-weight: 500; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.disclaimer { font-size: 11px; color: var(--ink-2); margin-top: 14px; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20,16,12,.92); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; z-index: 60; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .topbar { padding: 0 10px; }
  .topbar .logo { display: none; }
  .tabs button { padding: 7px 10px; font-size: 12px; }
  .wa-btn span { display: none; }
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- Desktop: ficha como panel lateral ---------- */
@media (min-width: 900px) {
  .sheet {
    top: calc(var(--topbar) + 12px); bottom: 12px; left: auto; right: 12px; width: 420px; max-height: none;
    border-radius: 22px; transform: translateX(calc(100% + 24px));
  }
  .sheet-grip { display: none; }
  .plan-hint { bottom: 20px; }
}

/* ==========================================================
   Marca: hoja de acacia (tomada de la portada del brochure)
   ========================================================== */
:root { --tan: #a99477; --ease: cubic-bezier(.2,.8,.2,1); }
.leaf {
  display: inline-block; width: 30px; height: 30px; flex: none; background: currentColor;
  -webkit-mask: url(assets/hoja.png) center / contain no-repeat; mask: url(assets/hoja.png) center / contain no-repeat;
}
.leaf-intro { width: 64px; height: 64px; color: #fff; margin-bottom: -4px; animation: leafIn 1.6s .2s var(--ease) both; transform-origin: 10% 95%; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--tan); padding: 4px 6px 4px 0; border-radius: 12px; }
.brand .logo { color: var(--ink); }
.brand .leaf { transition: transform .5s var(--ease); transform-origin: 10% 95%; }
.brand:hover .leaf, .brand.active .leaf { transform: rotate(-12deg); }
.brand.active .leaf { color: var(--terra); }
@keyframes leafIn { from { opacity: 0; transform: rotate(-40deg) scale(.55); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(5deg); } }

/* ==========================================================
   Portada
   ========================================================== */
.hero-bg { position: absolute; inset: -12% 0 0; background-size: cover; background-position: center; will-change: transform; }
.home-hero, .b-hero { position: relative; overflow: hidden; min-height: max(520px, calc(100dvh - var(--topbar))); display: grid; color: #fff; }
.home-hero::before, .b-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.home-hero::before { background: linear-gradient(180deg, rgba(47,38,28,.45), rgba(110,90,62,.35) 45%, rgba(40,32,24,.8)); }
.home-inner { position: relative; z-index: 2; place-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 32px 20px 80px; }
.leaf-xl { width: 96px; height: 96px; color: #fff; transform-origin: 10% 95%; animation: leafIn 1.8s .2s var(--ease) both, sway 7s 2s ease-in-out infinite; }
.logo.big .logo-top { font-size: 14px; }
.logo.big .logo-main { font-size: clamp(48px, 13vw, 92px); letter-spacing: .14em; margin: 8px 0 6px; }
.logo.big .logo-sub { font-size: 11px; }
.home-inner .logo > span { animation: fadeUp 1.1s var(--ease) both; }
.home-inner .logo > span:nth-child(1) { animation-delay: .6s; }
.home-inner .logo > span:nth-child(2) { animation-delay: .75s; }
.home-inner .logo > span:nth-child(3) { animation-delay: .95s; }
.home-tag { font-size: 14px; letter-spacing: .22em; text-transform: uppercase; line-height: 1.5; animation: fadeUp 1.1s 1.2s var(--ease) both; }
.home-tag em { display: block; font-family: var(--serif); font-size: 26px; letter-spacing: .02em; text-transform: none; }
.home-greeting { font-family: var(--serif); font-style: italic; font-size: 20px; max-width: 420px; background: rgba(30,24,18,.35); padding: 10px 18px; border-radius: 14px; backdrop-filter: blur(6px); animation: fadeUp 1.1s 1.35s var(--ease) both; }
.home-ctas { display: flex; flex-direction: column; align-items: center; animation: fadeUp 1.1s 1.5s var(--ease) both; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 22px; width: 24px; height: 38px; margin-left: -12px; border: 1.5px solid rgba(255,255,255,.8); border-radius: 14px; animation: fadeUp 1s 2s both; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.eyebrow { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--terra); margin: 36px 0 14px; }
.eyebrow.light { color: #f3dcc0; margin: 0 0 10px; }
.center { display: flex; justify-content: center; margin-top: 22px; }

.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.nums > div { background: var(--paper); padding: 26px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.nums strong { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 6vw, 48px); line-height: 1; font-variant-numeric: tabular-nums; }
.nums > div > span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.nums.dark { background: #463d33; border: 0; margin: 40px 0 0; }
.nums.dark > div { background: var(--ink); color: #fff; }
.nums.dark > div > span { color: #cdbda6; }

.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.xcard { position: relative; display: block; text-align: left; border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 4; color: #fff; background: var(--ink); isolation: isolate; }
.xcard .img { position: absolute; inset: 0; overflow: hidden; z-index: -1; }
.xcard .img img { width: 100%; height: 120%; object-fit: cover; margin-top: -10%; transition: scale .8s var(--ease); }
.xcard:hover .img img { scale: 1.06; }
.xcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(30,24,18,.85)); }
.xcard .txt { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 4px; }
.xcard small { font-size: 11px; letter-spacing: .25em; opacity: .8; }
.xcard b { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1; }
.xcard .txt > span { font-size: 13px; opacity: .9; line-height: 1.4; padding-right: 26px; }
.xcard .txt::after { content: "→"; position: absolute; right: 0; bottom: 0; font-size: 20px; transition: transform .3s; }
.xcard:hover .txt::after { transform: translateX(4px); }

.closing { text-align: center; padding: 64px 20px 72px; background: var(--paper); border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.closing .leaf { width: 54px; height: 54px; color: var(--tan); }
.closing h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 6vw, 44px); line-height: 1.1; max-width: 640px; }
.closing .center { margin-top: 0; }
.btn-wa-inline { background: var(--wa); color: #08361c; }

/* ==========================================================
   El barrio
   ========================================================== */
.b-hero::before { background: linear-gradient(180deg, rgba(30,24,18,.1) 30%, rgba(30,24,18,.85)); }
.b-hero-txt { position: relative; z-index: 2; align-self: end; padding: 28px 20px 84px; max-width: 760px; }
.b-hero h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 8vw, 68px); line-height: 1.02; margin-bottom: 14px; }
.b-hero-txt > p:last-child { font-size: 16px; line-height: 1.6; max-width: 520px; opacity: .92; }

.manifesto { max-width: 900px; margin: 0 auto; padding: 18vh 20px; }
.manifesto p { font-family: var(--serif); font-size: clamp(28px, 5.4vw, 50px); line-height: 1.2; }
[data-scrub] .w { opacity: .14; transition: opacity .4s; }
[data-scrub] .w.lit { opacity: 1; }

.section-title { position: relative; padding-bottom: 12px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 64px; background: var(--terra); }

.amen { display: flex; flex-direction: column; gap: 56px; margin-top: 28px; }
.amen-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; }
.amen-row:nth-child(even) .reveal-img { order: 2; }
.amen-row .reveal-img { aspect-ratio: 4 / 3; }
.amen-txt .num { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--tan); opacity: .55; display: block; margin-bottom: 6px; }
.amen-txt h4 { font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.1; margin-bottom: 10px; }
.amen-txt p { font-size: 16px; line-height: 1.6; color: var(--ink-2); }

.reveal-img { position: relative; overflow: hidden; border-radius: 18px; margin: 0; background: #e2d7c6; }
.reveal-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery .reveal-img { aspect-ratio: 16 / 10; }

/* ==========================================================
   Animaciones al scrollear (el JS agrega .in al entrar en pantalla)
   ========================================================== */
.anim [data-reveal="up"] { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }
.anim [data-reveal="leaf"] { opacity: 0; transform: rotate(-40deg) scale(.5); transform-origin: 10% 95%; transition: opacity 1s var(--ease), transform 1.4s var(--ease); }
.anim [data-reveal].in { opacity: 1; transform: none; }
.anim [data-reveal="words"] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.anim [data-reveal="words"] .w > span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease) calc(var(--i) * 70ms + var(--d, 0s)); }
.anim [data-reveal="words"].in .w > span { transform: none; }
.anim [data-reveal="line"] { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform 1s var(--ease); }
.anim [data-reveal="line"]::after { width: 0; transition: width 1.2s var(--ease) .2s; }
.anim [data-reveal="line"].in::after { width: 64px; }
/* imágenes: se descubren con una cortina y se asientan desde un leve zoom */
.anim .reveal-img { clip-path: inset(14% 10% 14% 10% round 18px); transition: clip-path 1.3s var(--ease) var(--d, 0s); }
.anim .reveal-img.from-left { clip-path: inset(0 100% 0 0 round 18px); }
.anim .reveal-img.from-right { clip-path: inset(0 0 0 100% round 18px); }
.anim .reveal-img img { scale: 1.25; transition: scale 1.8s var(--ease) var(--d, 0s); }
.anim .reveal-img.in { clip-path: inset(0 0 0 0 round 18px); }
.anim .reveal-img.in img { scale: 1.06; }
@media (prefers-reduced-motion: reduce) {
  .anim [data-reveal], .anim [data-reveal] .w > span, .anim .reveal-img, .anim .reveal-img img { opacity: 1 !important; transform: none !important; clip-path: none !important; scale: 1 !important; transition: none !important; }
  .leaf-xl, .leaf-intro { animation: none; }
}

/* ==========================================================
   Masterplan: capas, pantalla completa, minimapa, aviso de girar
   ========================================================== */
.plan-tools svg { width: 20px; height: 20px; fill: currentColor; }
.plan-tools button { display: grid; place-items: center; }
.plan-tools button[aria-expanded="true"] { background: var(--ink); color: #fff; }
#full-btn .i-close, .plan-full #full-btn .i-open { display: none; }
.plan-full #full-btn .i-close { display: inline; }
.only-mobile { display: none !important; }

.minimap {
  position: absolute; left: 12px; bottom: 150px; width: 168px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  border: 2px solid var(--paper); box-shadow: 0 2px 10px rgba(0,0,0,.2); background: #e9e1d2; cursor: pointer; touch-action: none;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.minimap.show { opacity: 1; transform: none; pointer-events: auto; }
.minimap img { width: 100%; height: 100%; display: block; pointer-events: none; }
.minimap i { position: absolute; border: 2px solid var(--terra); background: rgba(185,119,63,.15); border-radius: 3px; pointer-events: none; }

.rotate-hint {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center; color: #fff; background: rgba(36,30,24,.82); backdrop-filter: blur(4px); animation: fadeUp .5s both;
}
.rotate-hint p { font-size: 17px; max-width: 260px; line-height: 1.5; }
.rotate-hint strong { font-weight: 500; display: block; font-family: var(--serif); font-size: 30px; }
.rotate-hint .link-light { margin-top: 0; }
.rotate-hint .phone { width: 46px; height: 78px; border: 3px solid #fff; border-radius: 10px; position: relative; animation: turn 2.4s var(--ease) infinite; }
.rotate-hint .phone::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 12px; height: 3px; margin-left: -6px; border-radius: 2px; background: #fff; }
@keyframes turn { 0%, 20% { transform: rotate(0); } 55%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }

/* Pantalla completa: el plano ocupa todo, sin barra superior */
.plan-full .topbar, .plan-full .personal, .plan-full .plan-hint { display: none; }

@media (max-width: 640px) {
  .brand { padding: 4px; }
  .brand .leaf { width: 28px; height: 28px; }
  .tabs button { padding: 7px 9px; }
  .only-mobile { display: grid !important; }
  .layers { display: none; bottom: 56px; }
  .layers.open { display: flex; animation: fadeUp .3s both; }
  .minimap { bottom: 44px; width: 132px; }
  .plan-hud .stats { display: none; }
  .nums { grid-template-columns: 1fr 1fr; }
  .explore { grid-template-columns: 1fr; }
  .xcard { aspect-ratio: 16 / 10; }
  .amen { gap: 40px; }
  .amen-row { grid-template-columns: 1fr; gap: 16px; }
  .amen-row:nth-child(even) .reveal-img { order: 0; }
  .amen-txt .num { font-size: 44px; }
  .amen-txt h4 { font-size: 27px; }
  .manifesto { padding: 14vh 20px; }
}

/* Celular en horizontal: barra más baja, ficha como panel lateral, controles compactos */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --topbar: 46px; }
  .topbar .logo { display: none; }
  .plan-hud { top: 8px; left: 8px; right: 60px; gap: 6px; }
  .plan-hud .stats { display: none; }
  .plan-tools { right: 8px; bottom: auto; top: 8px; }
  .plan-tools button { width: 36px; height: 36px; }
  .plan-hint { display: none; }
  .only-mobile { display: grid !important; }
  .layers { display: none; left: auto; right: 54px; top: 8px; bottom: auto; }
  .layers.open { display: flex; }
  .minimap { left: 8px; bottom: 8px; width: 150px; }
  .sheet {
    top: 8px; bottom: 8px; left: auto; right: 8px; width: min(380px, 48vw); max-height: none;
    border-radius: 18px; transform: translateX(calc(100% + 20px)); padding-top: 4px;
  }
  .sheet.open { transform: none; }
  .sheet-grip { display: none; }
  .home-hero, .b-hero { min-height: 100dvh; }
  .nums { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  .plan-full .sheet { top: 12px; }
}

/* ==========================================================
   Ubicación: mapa fijo + tarjetas que cuentan la historia al bajar
   ========================================================== */
.story { position: relative; --mapH: calc(100dvh - var(--topbar)); }
.story-map { position: sticky; top: 0; height: var(--mapH); overflow: hidden; background: #ece4d6; }
#loc-map { position: absolute; inset: 0; }
#loc-map .maplibregl-ctrl-attrib { font-size: 10px; }
.story-steps { position: relative; margin-top: calc(-1 * var(--mapH)); padding-bottom: 30vh; pointer-events: none; }
.step { min-height: 92vh; display: flex; align-items: flex-end; padding: 0 16px 9vh; }
.step:first-child { min-height: 125vh; }
.step .card {
  pointer-events: auto; width: min(400px, 100%); background: rgba(255,253,249,.96); backdrop-filter: blur(8px);
  border-radius: 20px; padding: 20px 22px; box-shadow: 0 10px 40px rgba(40,30,20,.18);
  opacity: .35; transform: translateY(16px) scale(.98); transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.step.active .card { opacity: 1; transform: none; }
.step .eyebrow { margin: 0 0 8px; }
.step h3 { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.1; margin-bottom: 8px; }
.step p { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.step .time { font-family: var(--serif); font-size: 64px; line-height: .9; color: var(--terra); margin-bottom: 4px; }
.step .time span { font-size: 88px; }
.step .meta { font-size: 13px; letter-spacing: .04em; }
.step .btn { margin-top: 16px; }
.poi-list { list-style: none; margin-top: 6px; }
.poi-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.poi-list li:last-child { border-bottom: 0; }
.poi-list b { font-weight: 500; font-size: 15px; }
.poi-list small { grid-column: 1; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.poi-list em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-family: var(--serif); font-size: 22px; color: var(--terra); white-space: nowrap; }

/* marcadores del mapa */
.m-site { width: 46px; height: 46px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.25); position: relative; }
.m-site .leaf { width: 28px; height: 28px; color: var(--terra); }
.m-site::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; animation: pulse 2s infinite; box-shadow: 0 0 0 0 rgba(185,119,63,.6); }
.m-dest, .m-poi { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .6s var(--ease); pointer-events: none; }
.m-dest.on, .m-poi.on { opacity: 1; transform: none; }
.m-dest { display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 6px 12px 6px 6px; border-radius: 999px; font-size: 13px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.m-dest b { background: var(--terra); border-radius: 999px; padding: 3px 8px; font-weight: 500; font-size: 12px; }
.m-dest.dim { background: rgba(47,42,36,.75); }
.m-poi { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink); text-shadow: 0 0 3px #fff, 0 0 6px #fff; white-space: nowrap; }
.m-poi i { width: 14px; height: 14px; border-radius: 50%; background: var(--terra); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); flex: none; }
.m-poi[data-cat="hoteles"] i { background: #6e9a5e; }
.m-poi[data-cat="gastro"] i { background: #c58b2c; }
.m-poi[data-cat="aire"] i { background: #4f8aa6; }

@media (min-width: 900px) {
  .step { align-items: center; padding: 0 40px; }
  .step .card { width: 400px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .step { align-items: center; padding: 0 12px; min-height: 100vh; }
  .step .card { width: min(340px, 45vw); padding: 14px 16px; }
  .step .time span { font-size: 60px; }
  .step .time { font-size: 44px; }
  .step h3 { font-size: 22px; }
  .step p { font-size: 13px; }
}

/* aviso de medición */
.legal { font-size: 11px; line-height: 1.4; opacity: .55; margin: 22px auto 0; max-width: 34em; text-align: center; }
.legal.light { color: #fff; margin-top: 18px; }
