/* ============================================================
   BUGAMBILIA — TERRITORIO CAMPESTRE
   Sopetrán · Occidente antioqueño

   Tipografías: Fraunces (títulos) · Ubuntu (cuerpo e interfaz)
   Paleta:  primario      #33544b · #4e8579 · negro · blanco
            secundario    #1b3a2f
            complementario #104458 · #046179
   El morado de marca vive solo en el logo, no en la interfaz.
   ============================================================ */

/* ---------- Fuentes ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/Fraunces-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/Fraunces-latin-ext.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/Fraunces-Italic-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/Fraunces-Italic-latin-ext.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face { font-family: "Ubuntu"; src: url("assets/fonts/Ubuntu-Light.ttf") format("truetype");
  font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("assets/fonts/Ubuntu-LightItalic.ttf") format("truetype");
  font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("assets/fonts/Ubuntu-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("assets/fonts/Ubuntu-Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("assets/fonts/Ubuntu-MediumItalic.ttf") format("truetype");
  font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("assets/fonts/Ubuntu-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Variables ---------- */
:root {
  /* ---- Primario ---- */
  --green:    #33544b;  /* verde principal: botones, acentos, velos */
  --sage:     #4e8579;  /* verde medio */
  /* negro y blanco completan el primario y se usan literales */

  /* ---- Secundario ---- */
  --green-x:  #1b3a2f;  /* verde profundo: texto y secciones oscuras */

  /* ---- Complementario ---- */
  --petrol-d: #104458;
  --petrol:   #046179;

  /* ---- Tintes claros ----
     Derivados del primario y del complementario. La paleta no trae ningún
     color claro salvo el blanco, y sobre los fondos oscuros hacen falta dos
     acentos legibles que se distingan entre sí. */
  --sage-l:   #a8d5c6;
  --petrol-l: #6fbcd4;

  --ink:      #1b3a2f;  /* texto y secciones oscuras */
  --footer:   #0c1814;  /* fondo del footer */
  --paper:    #f7f9f8;  /* fondo principal */
  --cream:    #e9efec;  /* fondo alterno */
  --line:     rgba(27, 58, 47, 0.16);
  --muted:    #55655f;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:    "Ubuntu", system-ui, -apple-system, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 80px);
  --radius: 18px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.68;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 144;
  margin: 0; line-height: 1.08; letter-spacing: -0.015em;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--green); display: inline-block; }
.eyebrow.center { justify-content: center; }
.eyebrow.light { color: var(--sage-l); }
.eyebrow.light::before { background: var(--sage-l); }

.lead { font-size: clamp(19px, 2.1vw, 23px); color: var(--muted); font-weight: 300; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 14.5px;
  letter-spacing: 0.02em;
  padding: 16px 30px; border-radius: 100px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 10px 30px -12px rgba(27,58,47,.45); }
.btn-primary:hover { transform: translateY(-2px); background: var(--green-x); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); background: var(--petrol); }
/* invertido: para el CTA del hero, sobre fotografía */
.btn-light { background: #fff; color: var(--green); box-shadow: 0 10px 30px -12px rgba(12,24,20,.55); }
.btn-light:hover { transform: translateY(-2px); background: var(--sage-l); color: var(--green-x); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 22px 0;
  transition: background .35s ease, padding .35s ease, box-shadow .35s ease;
}
/* El header es más ancho que el contenido (1520 frente a 1240px) para que el
   menú respire en pantallas grandes; por debajo de ~1240px ambos coinciden. */
.site-header .wrap { max-width: 1520px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; }
.brand img { height: 46px; width: auto; transition: height .35s ease; }
.nav { display: flex; align-items: center; gap: 24px; }
/* con más espacio, el menú se abre */
@media (min-width: 1320px) { .nav { gap: 32px; } }
@media (min-width: 1600px) { .nav { gap: 40px; } }
.nav a {
  font-size: 14.5px; font-weight: 400; color: #fff;
  position: relative; padding: 4px 0; opacity: .92;
  white-space: nowrap;   /* un enlace partido en dos líneas se ve roto */
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1.5px; background: var(--sage-l); transition: width .3s ease;
}
.nav a:hover::after { width: 100%; }
.header-cta { display: flex; align-items: center; gap: 16px; }

/* Pagos en línea: enlace discreto para propietarios. Va como texto con ícono,
   no como botón relleno, para no competir con la llamada al asesor. */
.pay-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: #fff;
  padding: 8px 4px; opacity: .92; white-space: nowrap;
  transition: opacity .2s ease, color .2s ease;
}
.pay-link svg { width: 19px; height: 19px; flex: 0 0 auto; }
.pay-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.site-header.scrolled .pay-link { color: var(--ink); }
/* versión del menú móvil: oculta en escritorio */
.nav .nav-pago { display: none; }

.site-header.scrolled {
  background: rgba(247, 249, 248, .94);
  backdrop-filter: blur(14px);
  padding: 13px 0;
  box-shadow: 0 1px 0 var(--line);
}
.site-header.scrolled .brand img { height: 38px; }
.site-header.scrolled .nav a { color: var(--ink); }
.site-header.scrolled .btn-ghost { color: var(--ink); border-color: var(--line); }
.site-header.scrolled .btn-ghost:hover { background: var(--green); color: #fff; border-color: var(--green); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }
.site-header.scrolled .nav-toggle span { background: var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: #fff; overflow: hidden; isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(51,84,75,.55) 0%, rgba(51,84,75,0) 32%),
    linear-gradient(0deg, rgba(51,84,75,.9) 0%, rgba(51,84,75,.25) 58%, rgba(51,84,75,0) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-bottom: clamp(48px, 8vh, 110px); padding-top: 160px; width: 100%; }
.hero h1 {
  font-size: clamp(42px, 6.8vw, 98px);
  font-weight: 400;
  max-width: 16ch;
  margin-bottom: 26px;
  text-shadow: 0 2px 40px rgba(0,0,0,.3);
}
.hero h1 em { font-style: italic; color: #fff; }
.hero__sub { max-width: 54ch; font-size: clamp(16px, 1.5vw, 19px); font-weight: 300; opacity: .94; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 28px; margin-top: 54px;
  padding-top: 30px; border-top: 1px solid rgba(255,255,255,.22);
}
.hero__meta div { min-width: 120px; }
.hero__meta b {
  font-family: var(--display); font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 400; display: block; line-height: 1;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 144;
}
.hero__meta span { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }

/* ============================================================
   SECCIONES BASE
   ============================================================ */
section { position: relative; }
.pad { padding-block: clamp(76px, 11vw, 150px); }
.section-head { max-width: 780px; }
.section-head.center { margin-inline: auto; text-align: center; }
h2.display {
  font-size: clamp(32px, 4.9vw, 58px);
  font-weight: 400;
  line-height: 1.06;
  margin-bottom: 24px;
}
h2.display em { font-style: italic; color: var(--green); }

/* ---------- Intro / statement ---------- */
.intro { background: var(--paper); text-align: center; }
.intro .statement {
  font-family: var(--display); font-weight: 300;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 144;
  font-size: clamp(26px, 3.9vw, 44px); line-height: 1.26;
  max-width: 21ch; margin: 0 auto; letter-spacing: -0.015em;
}
.intro .statement b { font-weight: 400; color: var(--green); font-style: italic; }
.intro p.lead { max-width: 62ch; margin: 34px auto 0; }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin-top: 64px;
}
.stats .cell { background: var(--paper); padding: 40px 22px; text-align: center; }
.stats b {
  font-family: var(--display); font-size: clamp(32px, 4.2vw, 50px);
  font-weight: 400; color: var(--ink); display: block; line-height: 1;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 144;
}
.stats b i { font-style: normal; color: var(--green); font-size: .58em; vertical-align: super; }
.stats span { display: block; margin-top: 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Split (imagen + texto) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(40px, 6vw, 96px); }
.split.reverse .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); aspect-ratio: 4/5; }
.split__media.tall img { aspect-ratio: 3/4; }
.split__media.wide img { aspect-ratio: 16/11; }
.split__body h2 { margin-bottom: 22px; }
.split__body p { color: var(--muted); margin: 0 0 18px; }

/* Imagen que se queda fija mientras el texto, más largo, se desplaza */
.split.sticky-media { align-items: start; }
.split.sticky-media .split__media { position: sticky; top: 108px; }
/* en pantallas bajas la recortamos para que quepa entera bajo el header */
.split.sticky-media .split__media img { max-height: calc(100svh - 140px); }

/* Badge flotante sobre imagen */
.media-badge {
  position: absolute; left: 24px; bottom: 24px;
  background: rgba(247,249,248,.96); backdrop-filter: blur(6px);
  border-radius: 14px; padding: 16px 22px; max-width: 250px;
  box-shadow: 0 20px 50px -20px rgba(27,58,47,.5);
}
.media-badge b {
  font-family: var(--display); font-size: 21px; display: block; color: var(--ink);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 144; line-height: 1.15;
}
.media-badge span { font-size: 13px; color: var(--muted); line-height: 1.4; display: block; margin-top: 4px; }

/* ---------- Rejilla de features ---------- */
p.feature-intro {
  font-size: 12.5px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 34px 0 0;
}
.feature-grid {
  list-style: none; padding: 0;
  margin: 14px 0 38px;
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: 34px;
}
.feature-grid li {
  display: flex; align-items: center; gap: 13px;
  padding: 15px 0; border-top: 1px solid var(--line);
}
.feature-grid li:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
.feature-grid .ic { flex: 0 0 auto; width: 22px; height: 22px; color: var(--green); }
.feature-grid b { font-weight: 400; font-size: 15.5px; line-height: 1.35; }
.dark .feature-intro { color: rgba(232,240,237,.62); }
.dark .feature-grid li { border-color: rgba(255,255,255,.14); }
.dark .feature-grid .ic { color: var(--sage-l); }

/* ============================================================
   SECCIONES OSCURAS
   ============================================================ */
.dark { background: var(--ink); color: #e8f0ed; }
.dark h2.display { color: #fff; }
.dark h2.display em { color: var(--sage-l); }
.dark .lead, .dark p { color: rgba(232,240,237,.78); }

/* Sección a sangre con fotografía de fondo y velo verde */
.photo-bg { isolation: isolate; overflow: hidden; }
.photo-bg__img { position: absolute; inset: 0; z-index: 0; }
.photo-bg__img img { width: 100%; height: 100%; object-fit: cover; }
.photo-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(51,84,75,.94) 0%, rgba(51,84,75,.84) 55%, rgba(51,84,75,.92) 100%);
}
.photo-bg > .wrap { position: relative; z-index: 2; }
.photo-bg .amen-grid { margin-top: 48px; }
.photo-bg .section-head .lead { color: rgba(255,255,255,.82); }

/* Sostenibilidad — banda horizontal con fotografía */
.band {
  position: relative; color: #fff; overflow: hidden;
  border-radius: var(--radius); isolation: isolate;
  display: grid; align-items: center;
  min-height: clamp(320px, 32vw, 440px);
}
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.band::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg,
    rgba(51,84,75,.92) 0%, rgba(51,84,75,.74) 46%, rgba(51,84,75,.12) 100%);
}
.band .band__inner {
  position: relative; z-index: 2;
  padding: clamp(32px, 4vw, 58px); max-width: 730px;
}
.band h2.display { color: #fff; font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 18px; }
.band h2.display em { color: var(--sage-l); }
.band p { color: rgba(255,255,255,.9); margin: 0 0 4px; }

/* Dos notas de agua dentro de la banda */
.eco-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.eco-note {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px; padding: 16px 18px;
}
.eco-note .ic { width: 22px; height: 22px; color: var(--sage-l); grid-row: span 2; }
.eco-note b { font-size: 15px; font-weight: 500; color: #fff; }
.eco-note span { font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.82); }

/* ---------- Tipologías de vivienda (acordeón) ---------- */
.levels { display: grid; gap: 14px; margin-top: 8px; }
.level {
  border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px;
  background: var(--paper); transition: border-color .3s ease;
}
.level summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 18px; }
.level summary::-webkit-details-marker { display: none; }
/* el número va en Ubuntu: a 13px la serif de titulares se vuelve ilegible */
.level .num {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: .1em; color: var(--green);
}
/* opsz bajo = corte de texto de Fraunces, con trazos más firmes que el de titulares */
.level .ttl {
  font-family: var(--display); font-size: 22px; font-weight: 500;
  flex: 1; line-height: 1.28;
  font-variation-settings: "opsz" 24;
}
.level .ttl i {
  font-family: var(--sans); font-style: normal; font-size: 14px; font-weight: 400;
  color: var(--muted); margin-left: 8px; white-space: nowrap;
  letter-spacing: .01em;
}
.level .plus { font-size: 22px; color: var(--muted); transition: transform .3s ease; }
.level[open] { border-color: var(--sage); }
.level[open] .plus { transform: rotate(45deg); }
/* mientras se cierra seguimos con [open] puesto: esta clase adelanta el estado visual */
.level.closing { border-color: var(--line); }
.level.closing .plus { transform: none; }
/* la altura de .body la anima el script; el espaciado va dentro para que colapse a 0 */
.level .body { overflow: hidden; }
.level .body > :first-child { margin-top: 16px; }
.level .body p { color: var(--muted); margin: 0; font-size: 15.5px; }
.level .rooms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.level .rooms span { font-size: 13.5px; padding: 7px 14px; background: var(--cream); border-radius: 100px; color: var(--green-x); }

/* ---------- Amenidades grid ---------- */
.amen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.amen {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; border-radius: 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.13);
}
.amen .ic { width: 24px; height: 24px; color: var(--sage-l); flex: 0 0 auto; }
.amen b { font-weight: 400; font-size: 15px; color: #fff; line-height: 1.3; }

/* ============================================================
   AVANCES DE OBRA (línea de tiempo)
   ============================================================ */
.timeline { display: grid; gap: 0; margin-top: 56px; }
.tl-item {
  display: grid; grid-template-columns: 190px 1fr; gap: clamp(20px, 4vw, 60px);
  padding: 34px 0; border-top: 1px solid rgba(255,255,255,.14);
  align-items: start;
}
.tl-item:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.tl-state {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 500; color: var(--petrol-l);
}
.tl-state::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--petrol-l); flex: 0 0 auto;
}
.tl-item.is-done .tl-state { color: var(--sage-l); }
.tl-item.is-done .tl-state::before { background: var(--sage-l); }
.tl-body h3 {
  font-size: clamp(22px, 2.6vw, 30px); color: #fff; margin-bottom: 10px;
}
.tl-body p { margin: 0; max-width: 62ch; }

/* ============================================================
   GALERÍA (filmstrip horizontal)
   ============================================================ */
.gallery { background: var(--cream); overflow: hidden; }
.gallery__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 44px;
}
.gallery__head .section-head { margin: 0; }
/* carrusel sin encabezado: las flechas se quedan solas, alineadas a la derecha */
.gallery__head.solo-flechas { justify-content: flex-end; margin-bottom: 28px; }
.gallery__nav { display: flex; gap: 12px; }
.gallery__nav button {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; display: grid; place-items: center;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.gallery__nav button:hover { background: var(--green); color: #fff; border-color: var(--green); }
.gallery__nav button:active { transform: scale(.94); }
.gallery__nav button:disabled { opacity: .35; cursor: default; }
.gallery__nav button:disabled:hover { background: transparent; color: var(--ink); border-color: var(--line); }
.gallery__nav svg { width: 20px; height: 20px; }

/* El carrusel va a sangre: ocupa todo el ancho de la página.
   El relleno izquierdo replica el borde interno de .wrap para que la primera
   foto quede alineada con el título, y las siguientes llegan al borde derecho. */
.gallery__track {
  --strip-start: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  display: flex; gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  padding-left: var(--strip-start);
  padding-right: var(--gutter);
  scroll-padding-left: var(--strip-start);
  scrollbar-width: none; cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery__track.dragging .g-item { pointer-events: none; }

.g-item {
  position: relative; flex: 0 0 clamp(280px, 62vw, 780px);
  margin: 0;   /* <figure> trae margen del navegador */
  scroll-snap-align: start; border-radius: var(--radius); overflow: hidden;
  background: var(--paper);
}
.g-item img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
  -webkit-user-drag: none; user-select: none;
}
.g-item:hover img { transform: scale(1.04); }
.g-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(27,58,47,.75) 0%, rgba(27,58,47,0) 44%);
}
/* sin pie de foto el degradado no cumple ninguna función: solo oscurecería */
.gallery__track.sin-pie .g-item::after { content: none; }
.g-item figcaption { position: absolute; left: 26px; bottom: 22px; z-index: 2; color: #fff; }
.g-item figcaption b {
  font-family: var(--display); font-size: clamp(19px, 2.1vw, 26px);
  font-weight: 400; display: block; line-height: 1.15;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 144;
}
.g-item figcaption span { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.gallery__hint { margin-top: 22px; font-size: 13px; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.gallery__hint svg { width: 18px; height: 18px; }

/* El mismo carrusel sobre fondo oscuro (sección de avances) */
.dark .gallery__nav button { border-color: rgba(255,255,255,.3); color: #fff; }
.dark .gallery__nav button:hover { background: #fff; color: var(--ink); border-color: #fff; }
.dark .gallery__nav button:disabled:hover { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.dark .g-item { background: rgba(255,255,255,.06); }
.dark .gallery__hint { color: rgba(232,240,237,.62); }

/* Imágenes que abren en lightbox */
[data-lightbox] { cursor: zoom-in; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(12,24,20,.94);
  padding: clamp(12px, 4vw, 48px);
  opacity: 0; transition: opacity .28s ease;
}
.lightbox.open { display: flex; }
.lightbox.visible { opacity: 1; }
.lightbox__fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 16px; }
.lightbox__img {
  max-width: 100%; max-height: calc(100svh - clamp(120px, 18vh, 190px));
  width: auto; margin-inline: auto; border-radius: 8px;
  object-fit: contain; background: rgba(255,255,255,.04);
}
.lightbox__cap { text-align: center; color: #fff; }
.lightbox__cap b {
  font-family: var(--display); font-variation-settings: "opsz" 24;
  font-size: 19px; font-weight: 500; display: block;
}
.lightbox__cap span { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.lightbox__cap .lb-count { display: block; margin-top: 8px; text-transform: none; color: rgba(255,255,255,.45); }
.lightbox__cap .lb-count:empty { display: none; }

.lightbox button {
  position: absolute; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28);
  color: #fff; display: grid; place-items: center;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.lightbox button:hover { background: #fff; color: var(--ink); }
.lightbox button:active { transform: scale(.94); }
.lightbox button:disabled { opacity: .3; cursor: default; }
.lightbox button:disabled:hover { background: rgba(255,255,255,.1); color: #fff; }
.lightbox svg { width: 22px; height: 22px; }
.lb-close { top: clamp(12px, 3vw, 28px); right: clamp(12px, 3vw, 28px); width: 46px; height: 46px; }
.lb-prev, .lb-next { top: 50%; margin-top: -27px; width: 54px; height: 54px; }
.lb-prev { left: clamp(10px, 2.5vw, 30px); }
.lb-next { right: clamp(10px, 2.5vw, 30px); }

@media (max-width: 620px) {
  .lb-prev, .lb-next { top: auto; bottom: 18px; margin-top: 0; width: 48px; height: 48px; }
  .lb-prev { left: 22%; }
  .lb-next { right: 22%; }
  .lightbox__img { max-height: calc(100svh - 240px); }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox { transition: none; }
}

/* ---------- Masterplan ---------- */
.masterplan { background: var(--paper); }
.masterplan__frame {
  margin-top: 48px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #fff; padding: clamp(16px, 3vw, 44px);
}
.masterplan__frame img { margin-inline: auto; max-height: 80vh; width: auto; }
.masterplan__note {
  margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--muted);
}

/* ============================================================
   FORMULARIO / CTA FINAL
   ============================================================ */
/* La textura de curvas de nivel promedia exactamente el verde primario, así que
   va sin velo: el color de respaldo cubre el caso de que la imagen no cargue.

   OJO: esta textura tiene apenas 13 colores sobre una superficie lisa, el peor
   caso posible para una recompresión JPEG. Si el hosting reoptimiza imágenes
   (el CDN de Hostinger lo hacía: la servía a 1600px y un tercio del peso)
   aparecen bandas muy visibles. Si vuelve a pasar, la mitigación rápida es
   mover la imagen a un ::before con opacity ~.55 sobre el color plano. */
.contact {
  background-color: var(--green);
  background-image: url("assets/img/form-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff; overflow: hidden;
}
.contact__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.contact h2.display { color: #fff; }
.contact h2.display em { color: var(--sage-l); }
.contact .lead { color: rgba(255,255,255,.75); margin-top: 10px; }
.contact__points { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 16px; }
.contact__points li { display: flex; gap: 14px; align-items: center; font-size: 15.5px; color: rgba(255,255,255,.9); }
.contact__points .ic { width: 22px; height: 22px; color: var(--sage-l); flex: 0 0 auto; }

.form-card { background: var(--paper); color: var(--ink); border-radius: 22px; padding: clamp(28px, 3.5vw, 44px); box-shadow: 0 40px 90px -40px rgba(0,0,0,.65); }
.form-card h3 { font-size: 27px; margin-bottom: 6px; }
.form-card p.sub { color: var(--muted); font-size: 15px; margin: 0 0 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 500; letter-spacing: .04em; margin-bottom: 8px; color: var(--green-x); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-weight: 300; font-size: 15.5px; color: var(--ink);
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(51,84,75,.18);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card .btn-primary { width: 100%; justify-content: center; margin-top: 8px; }
.form-note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 16px 0 0; line-height: 1.5; }
.form-success { display: none; text-align: center; padding: 40px 10px; }
.form-success.show { display: block; }
.form-success .check { width: 64px; height: 64px; margin: 0 auto 20px; color: var(--sage); }
.form-success h3 { font-size: 26px; margin-bottom: 8px; }
.form-success p { color: var(--muted); }

/* ============================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================================ */
.wa-float {
  position: fixed; right: clamp(16px, 3vw, 30px); bottom: clamp(16px, 3vw, 30px);
  z-index: 90; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 14px 34px -10px rgba(37,211,102,.75);
  transition: transform .25s ease, box-shadow .25s ease;
}
.wa-float:hover { transform: translateY(-3px) scale(1.04); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float span {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--footer); color: #fff; padding-block: 72px 34px; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.16); }
.footer__brand img { height: 54px; margin-bottom: 22px; }
.footer__brand p { max-width: 36ch; font-size: 15px; }
.footer__brand .dev { margin-top: 18px; font-size: 13.5px; }
.footer__brand .dev b { font-weight: 500; }
.footer h4 { font-family: var(--sans); font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; color: #fff; margin-bottom: 20px; font-weight: 500; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer li { font-size: 15px; }
/* todo el footer va en blanco: el hover se marca con subrayado, no con color */
.footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; font-size: 13px; }

/* ============================================================
   REVEAL / animaciones
   ============================================================ */
.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 (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .g-item img, .btn, .wa-float { transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Header por tramos. Medido con las fuentes reales: logo + 6 enlaces +
   "Pagos en línea" + "Solicita información" ocupan 1056px con gap de 24px.
   Por debajo de ~1240px el espacio útil es el 90% del ancho de pantalla.
   - desde 1200px: todo con texto (el gap crece a 32 y 40px en 1320 y 1600)
   - 1100–1199px: pagos queda solo con el ícono
   - bajo 1100px: menú hamburguesa (antes era 980px, y entre 981 y ~1100
     los enlaces ya se partían en dos líneas incluso sin el enlace de pagos) */
@media (max-width: 1199px) {
  .pay-link span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .pay-link { padding: 8px; }
}
@media (max-width: 1099px) {
  .nav, .header-cta .btn-ghost, .header-cta .pay-link { display: none; }
  .nav-toggle { display: block; }
  .nav.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 4px; padding: 20px var(--gutter) 30px;
    background: var(--paper); box-shadow: 0 20px 40px -20px rgba(0,0,0,.3);
  }
  .nav.open a { color: var(--ink); font-size: 17px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  /* en el menú, pagos va de último (su lugar en el HTML) */
  .nav.open .nav-pago {
    display: flex; align-items: center; gap: 10px;
    font-weight: 500; color: var(--green);
  }
  .nav.open .nav-pago svg { width: 20px; height: 20px; flex: 0 0 auto; }
}

@media (max-width: 980px) {
  .split, .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse .split__media { order: 0; }
  .split.sticky-media .split__media { position: static; }
  .split__media img, .split__media.tall img { aspect-ratio: 16/11; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tl-item { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .amen-grid { grid-template-columns: 1fr 1fr; }
  .eco-notes { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero__meta div { min-width: 45%; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid li:nth-last-child(-n+2) { border-bottom: 0; }
  .feature-grid li:last-child { border-bottom: 1px solid var(--line); }
  .dark .feature-grid li:last-child { border-color: rgba(255,255,255,.14); }
}
