/* =========================================================
   TERRENOS EN PIURA — Design tokens
   Color:  Navy #203A6B (primario) · Blue #04689A (secundario)
           Turquoise #2DB9D2 (acento) · Orange #E5901C (CTA)
   Type:   Sora (display) + Inter (texto)
   Signature: la "línea de crecimiento" ascendente del isotipo,
   reutilizada como motivo de sección en toda la web.
   ========================================================= */

:root {
  --navy: #203A6B;
  --navy-dark: #172A4E;
  --blue: #04689A;
  --turquoise: #2DB9D2;
  --orange: #E5901C;
  --ink: #16202E;
  --grey: #5B6472;
  --grey-light: #8A93A2;
  --bg: #F6F8FA;
  --bg-alt: #EDF3F6;
  --white: #FFFFFF;
  --whatsapp: #25D366;
  --whatsapp-dark: #1DA851;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -12px rgba(32, 58, 107, 0.25);
  --shadow-sm: 0 4px 14px -6px rgba(32, 58, 107, 0.18);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { color: var(--grey); margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--orange);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: .96rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #cf7f12; }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.btn-whatsapp svg { width: 20px; height: 20px; fill: var(--white); }
.btn-lg { padding: 17px 34px; font-size: 1.03rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(32,58,107,.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 40px; width: auto; }
.brand-text { font-family: 'Sora', sans-serif; font-weight: 700; color: var(--navy); font-size: 1.05rem; line-height: 1.1; }
.brand-text span { display: block; font-size: .68rem; font-weight: 500; color: var(--blue); letter-spacing: .04em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--navy);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--blue); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn { white-space: nowrap; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

@media (max-width: 1080px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 22px 24px;
    gap: 18px;
    box-shadow: 0 14px 24px -12px rgba(32,58,107,.3);
    border-bottom: 1px solid rgba(32,58,107,.08);
    z-index: 90;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .site-header .nav { position: relative; }
}
@media (max-width: 560px) {
  .nav-cta .btn-primary { display: none; }
  .brand-text span { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 62%, #0F1D38 100%);
  color: var(--white);
  padding: 86px 0 70px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.growth-line {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
}
.hero h1 { color: var(--white); }
.hero .lede { color: #C9D3E4; font-size: 1.12rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.hero-badge-row { display: flex; gap: 26px; margin-top: 40px; flex-wrap: wrap; }
.hero-stat { font-family: 'Sora', sans-serif; }
.hero-stat b { display: block; font-size: 1.6rem; color: var(--turquoise); }
.hero-stat span { font-size: .78rem; color: #9FB0CC; text-transform: uppercase; letter-spacing: .06em; }

.hero-panel {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(6px);
}
.hero-panel h3 { color: var(--white); margin-bottom: 10px; }
.hero-panel p { color: #C9D3E4; font-size: .92rem; }
.hero-check-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.hero-check-list li { display: flex; gap: 10px; align-items: flex-start; color: #E4EAF3; font-size: .92rem; }
.hero-check-list svg { flex: none; width: 18px; height: 18px; fill: var(--turquoise); margin-top: 2px; }
.hero-check-list.on-light li { color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 0 42px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Badge Verificado TEP ---------- */
.badge-verificado {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(45,185,210,.14);
  color: var(--blue);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.badge-verificado svg { width: 13px; height: 13px; fill: var(--blue); }
.badge-pendiente {
  background: rgba(229,144,28,.14);
  color: #a5620c;
}

/* ---------- Cards: catalog ---------- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card-terreno {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.card-terreno:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media {
  height: 170px;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.card-media .badge-verificado, .card-media .badge-pendiente { background: rgba(255,255,255,.92); }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-family: 'Sora', sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.card-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.04rem; color: var(--navy); }
.card-meta { font-size: .85rem; color: var(--grey); }
.card-price { font-family: 'Sora', sans-serif; font-weight: 700; color: var(--navy); font-size: 1.15rem; margin-top: 4px; }
.card-actions { margin-top: 10px; }
.card-actions .btn { width: 100%; justify-content: center; padding: 11px 18px; font-size: .88rem; }

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.filter-chip {
  font-family: 'Sora', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(32,58,107,.18);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: all .15s ease;
}
.filter-chip:hover { border-color: var(--blue); }
.filter-chip.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}
.filter-selects select {
  border: 1.5px solid rgba(32,58,107,.18);
  border-radius: 999px;
  padding: 10px 38px 10px 16px;
  font-family: 'Sora', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23203A6B'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.filter-selects select:focus { outline: 2px solid var(--turquoise); outline-offset: 1px; }
.filter-count { font-size: .85rem; color: var(--grey); align-self: center; margin-left: auto; }

/* ---------- Video en ficha ---------- */
.detalle-videos { margin: 6px 0 30px; display: grid; gap: 14px; }
.detalle-videos video {
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius);
  background: #000;
}

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; }
.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--turquoise);
}
.feature-card .icon-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(4,104,154,.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-card .icon-wrap svg { width: 22px; height: 22px; fill: var(--blue); }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.testi-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.testi-quote { font-size: 1.02rem; color: var(--ink); font-style: italic; margin-bottom: 18px; }
.testi-name { font-family: 'Sora', sans-serif; font-weight: 700; color: var(--navy); font-size: .92rem; }
.testi-role { font-size: .8rem; color: var(--grey-light); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
  margin-top: 50px;
}
@media (max-width: 700px) { .stat-row { grid-template-columns: 1fr; } }
.stat-item b { display: block; font-family: 'Sora', sans-serif; font-size: 2.4rem; color: var(--navy); }
.stat-item span { color: var(--grey); font-size: .92rem; }
.stat-row.on-dark .stat-item b { color: var(--turquoise); }
.stat-row.on-dark .stat-item span { color: #B7C4DC; }

/* ---------- Plan cards (Compra / Venta Terreno Seguro) ---------- */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 800px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--orange);
}
.plan-card.alt { border-top-color: var(--blue); }
.plan-card ul { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; }
.plan-card li { display: flex; gap: 10px; font-size: .93rem; color: var(--ink); }
.plan-card li svg { width: 18px; height: 18px; fill: var(--turquoise); flex: none; margin-top: 2px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 4px; }
.step .num {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  color: rgba(32,58,107,.14);
  line-height: 1;
  margin-bottom: 6px;
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid rgba(32,58,107,.12); padding: 20px 0; }
.faq-item summary { cursor: pointer; font-family: 'Sora', sans-serif; font-weight: 700; color: var(--navy); font-size: 1.02rem; }
.faq-item p { margin-top: 10px; }

/* ---------- Form ---------- */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; gap: 8px; margin-bottom: 18px; }
.form-row label { font-family: 'Sora', sans-serif; font-weight: 600; font-size: .88rem; color: var(--navy); }
.form-row input, .form-row select, .form-row textarea {
  border: 1.5px solid rgba(32,58,107,.18);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  color: var(--ink);
  background: var(--bg);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--turquoise);
  outline-offset: 1px;
}
.form-note { font-size: .82rem; color: var(--grey-light); margin-top: 10px; }
#form-status { font-size: .9rem; font-weight: 600; margin-top: 12px; }
#form-status.ok { color: #1a7a4c; }
#form-status.err { color: #b23a2e; }

/* ---------- Referral / codes ---------- */
.code-box {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
}
.code-box .code {
  font-family: 'Sora', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--turquoise);
  letter-spacing: .04em;
  margin: 10px 0 16px;
}

/* ---------- Split section (image + text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split-media {
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--navy));
  min-height: 320px;
  position: relative;
  overflow: hidden;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--blue), var(--navy));
  color: var(--white);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  margin: 0 auto;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #D3DCEC; max-width: 52ch; margin: 0 auto 26px; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--whatsapp);
  color: var(--white);
  padding: 13px 20px 13px 15px;
  border-radius: 999px;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,.35);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: .88rem;
}
.wa-float svg { width: 22px; height: 22px; fill: var(--white); }
.wa-float:hover { background: var(--whatsapp-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #B9C4D9;
  padding: 56px 0 26px;
  margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.site-footer a { color: #B9C4D9; }
.site-footer a:hover { color: var(--turquoise); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 34px; }
.footer-tagline { font-style: italic; color: var(--turquoise); }

/* ---------- Carrusel de proyecto (caso de éxito) ---------- */
.proyecto-carrusel { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.proyecto-slides { position: relative; aspect-ratio: 16 / 9; background: var(--bg-alt); }
.proyecto-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .4s ease;
}
.proyecto-slide.active { opacity: 1; }
.proyecto-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.88); color: var(--navy); border: none;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 3;
}
.proyecto-arrow:hover { background: #fff; }
.proyecto-arrow.prev { left: 12px; }
.proyecto-arrow.next { right: 12px; }
.proyecto-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.proyecto-dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; }
.proyecto-dot.active { background: var(--turquoise); }

/* ---------- Ficha de detalle de terreno ---------- */
.detalle-hero-media {
  height: 340px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--navy));
  background-size: cover;
  background-position: center;
  margin-bottom: 12px;
  position: relative;
  cursor: zoom-in;
}
.detalle-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-bottom: 30px; }
.detalle-thumb {
  height: 84px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
  cursor: pointer;
  opacity: .55;
  border: 2px solid transparent;
  transition: opacity .15s ease, border-color .15s ease;
}
.detalle-thumb:hover { opacity: .85; }
.detalle-thumb.active { opacity: 1; border-color: var(--turquoise); }

.galeria-fullscreen-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22,32,46,.72);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-family: 'Sora', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.galeria-fullscreen-btn svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; }
.galeria-fullscreen-btn:hover { background: rgba(22,32,46,.9); }

.galeria-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  color: var(--navy);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.galeria-arrow-left { left: 12px; }
.galeria-arrow-right { right: 12px; }
.galeria-arrow:hover { background: #fff; }

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10,14,22,.94);
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 86vh; border-radius: 6px; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer;
}
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); color: #fff; border: none;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.8rem; cursor: pointer;
}
.lightbox-arrow:hover { background: rgba(255,255,255,.24); }
.lightbox-arrow-left { left: 18px; }
.lightbox-arrow-right { right: 18px; }
.lightbox-counter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: #cdd6e5; font-family: 'Sora', sans-serif; font-size: .82rem;
}
.detalle-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; margin-top: 20px; align-items: start; }
@media (max-width: 860px) { .detalle-grid { grid-template-columns: 1fr; } }
.detalle-side {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
}
#mapa-terreno { background: var(--bg-alt); }
.leaflet-container { font-family: 'Inter', sans-serif; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
