/* GTE Real Estate — hoja de estilos principal */
:root {
  --bg: #f6f5f2;
  --bg-2: #ecebe6;
  --ink: #111111;
  --ink-2: #4a4a48;
  --ink-3: #8a8a86;
  --line: #dcdbd5;
  --white: #ffffff;
  --accent: #111111;
  --radius: 20px;
  --pill: 999px;
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --max: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22,1,.36,1);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* ---------- Tipografía ---------- */
.display { font-size: clamp(44px, 7.4vw, 108px); }
.h1 { font-size: clamp(38px, 5.4vw, 76px); }
.h2 { font-size: clamp(30px, 4vw, 56px); }
.h3 { font-size: clamp(22px, 2.2vw, 30px); }
.lead { font-size: clamp(17px, 1.4vw, 21px); color: var(--ink-2); line-height: 1.5; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.muted { color: var(--ink-2); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: var(--pill);
  background: var(--ink); color: var(--white); border: 1px solid var(--ink);
  font-weight: 500; font-size: 15px; line-height: 1;
  transition: transform .4s var(--ease), background .3s, color .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); background: #2a2a2a; }
.btn svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--white); border-color: var(--ink); }
.btn.light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn.light:hover { background: var(--bg); }
.btn.sm { padding: 10px 16px; font-size: 14px; }
.btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn.wa:hover { background: #1fb457; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: 18px 0;
  transition: background .4s, padding .4s, box-shadow .4s;
}
.header.scrolled { background: rgba(246,245,242,.86); backdrop-filter: blur(14px); padding: 10px 0; box-shadow: 0 1px 0 var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; }
.brand img { width: 46px; height: 46px; border-radius: 50%; background: #fff; }
.brand span { font-size: 15px; line-height: 1.05; }
.brand small { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.nav { display: flex; gap: 6px; }
.nav a { padding: 9px 14px; border-radius: var(--pill); font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background .3s, color .3s; }
.nav a:hover, .nav a.active { background: var(--white); color: var(--ink); }
.header-cta { display: flex; align-items: center; gap: 8px; }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .3s, opacity .3s; }
.burger span:nth-child(1) { top: 17px; } .burger span:nth-child(2) { top: 22px; } .burger span:nth-child(3) { top: 27px; }
.burger.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.mobile-menu { display: none; }

@media (max-width: 900px) {
  .nav, .header-cta .btn.ghost { display: none; }
  .burger { display: block; }
  .mobile-menu { display: block; position: fixed; inset: 0; z-index: 49; background: var(--bg); padding: 110px var(--gutter) 40px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s var(--ease); }
  .mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-menu a { display: block; font-family: var(--font-display); font-size: 38px; letter-spacing: -.03em; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .mobile-menu .btn { margin-top: 24px; font-size: 16px; }
}

/* Header sobre el hero (texto claro hasta hacer scroll) */
body.has-hero .header:not(.scrolled) { color: #fff; }
body.has-hero .header:not(.scrolled) .nav a { color: rgba(255,255,255,.85); }
body.has-hero .header:not(.scrolled) .nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
body.has-hero .header:not(.scrolled) .brand small { color: rgba(255,255,255,.6); }
body.has-hero .header:not(.scrolled) .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
body.has-hero .header:not(.scrolled) .btn.ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; }
body.has-hero .header:not(.scrolled) .btn:not(.ghost) { background: #fff; color: var(--ink); border-color: #fff; }
body.has-hero .header:not(.scrolled) .burger { background: transparent; border-color: rgba(255,255,255,.4); }
body.has-hero .header:not(.scrolled) .burger span { background: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: end start; overflow: hidden; color: var(--white); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 9s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%); }
.hero-content { position: relative; padding: 140px var(--gutter) clamp(40px, 6vw, 72px); width: 100%; max-width: var(--max); margin: 0 auto; }
.hero-content .display { max-width: 12ch; text-wrap: balance; }
.hero-content .lead { color: rgba(255,255,255,.82); max-width: 52ch; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { position: absolute; right: var(--gutter); bottom: clamp(40px, 6vw, 72px); display: flex; gap: 32px; font-size: 13px; color: rgba(255,255,255,.7); }
.hero-meta strong { display: block; font-family: var(--font-display); font-size: 28px; color: var(--white); letter-spacing: -.02em; }
@media (max-width: 1180px) { .hero-meta { display: none; } }

/* Buscador rápido en hero */
.quick-search {
  position: relative; margin-top: 36px; display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 6px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-radius: 18px; padding: 6px; max-width: 820px; color: var(--ink);
}
.quick-search select, .quick-search input { border: 0; background: transparent; padding: 14px 16px; font: inherit; font-size: 15px; border-radius: 12px; min-width: 0; color: var(--ink); }
.quick-search select:focus, .quick-search input:focus { outline: none; background: var(--bg); }
.quick-search .btn { border-radius: 12px; justify-content: center; }
@media (max-width: 720px) { .quick-search { grid-template-columns: 1fr 1fr; } .quick-search .btn { grid-column: 1 / -1; } }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 9vw, 140px) 0; }
.section.tight { padding: clamp(48px, 6vw, 88px) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head .lead { max-width: 46ch; }
.section-head .right { display: flex; justify-content: flex-end; align-items: end; gap: 12px; flex-wrap: wrap; }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; } .section-head .right { justify-content: flex-start; } }

/* Statement */
.statement { text-align: center; }
.statement .h1 { max-width: 20ch; margin: 0 auto; text-wrap: balance; }
.statement .lead { max-width: 60ch; margin: 24px auto 0; }

/* Marquee de colonias */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: 48px; animation: marquee 38s linear infinite; }
.marquee span { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -.02em; color: var(--ink-2); }
.marquee span::after { content: "·"; margin-left: 48px; color: var(--ink-3); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Tarjetas de propiedades ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { display: block; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -28px rgba(0,0,0,.35); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.tag { position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: var(--pill); background: rgba(255,255,255,.92); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.tag.dark { background: var(--ink); color: var(--white); }
.card-body { padding: 20px 22px 22px; }
.card-body h3 { font-size: 21px; margin-bottom: 4px; }
.card-body .loc { font-size: 14px; color: var(--ink-2); }
.specs { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.specs span { display: inline-flex; align-items: center; gap: 6px; }
.specs svg { width: 15px; height: 15px; opacity: .7; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.price-hidden { font-size: 13px; color: var(--ink-2); }
.price-hidden strong { display: block; font-size: 14px; color: var(--ink); font-weight: 500; }

/* ---------- Bloques con imagen ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split .media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.split .media img { width: 100%; height: 100%; object-fit: cover; }
.split .media.wide { aspect-ratio: 16 / 11; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split .media { aspect-ratio: 4 / 3; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.step { padding: 32px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); }
.step .num { font-family: var(--font-display); font-size: 48px; letter-spacing: -.04em; color: var(--ink-3); line-height: 1; }
.step h3 { margin: 22px 0 10px; font-size: 22px; }
.step p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service { position: relative; min-height: 420px; border-radius: var(--radius); overflow: hidden; color: var(--white); display: flex; align-items: flex-end; padding: 28px; }
.service img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.service::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.7) 100%); }
.service:hover img { transform: scale(1.06); }
.service > div { position: relative; }
.service h3 { font-size: 30px; margin-bottom: 8px; }
.service p { color: rgba(255,255,255,.8); font-size: 15px; max-width: 34ch; }
@media (max-width: 900px) { .services { grid-template-columns: 1fr; } .service { min-height: 300px; } }

/* Banda oscura CTA */
.band { background: var(--ink); color: var(--white); border-radius: calc(var(--radius) + 8px); padding: clamp(48px, 7vw, 110px) clamp(24px, 6vw, 96px); position: relative; overflow: hidden; }
.band .h1 { max-width: 16ch; text-wrap: balance; }
.band .lead { color: rgba(255,255,255,.72); }
.band .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.band img { position: absolute; right: -10%; bottom: -30%; width: 55%; opacity: .18; filter: grayscale(1); mask-image: linear-gradient(180deg, transparent, #000 40%); }

/* ---------- Detalle de propiedad ---------- */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: clamp(360px, 55vw, 620px); border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery img:first-child { grid-row: 1 / 3; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; } .gallery img { aspect-ratio: 4/3; } .gallery img:first-child { grid-row: auto; } .gallery img:nth-child(n+3) { display: none; } }
.detail { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 5vw, 72px); margin-top: 40px; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.detail-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 32px 0; }
.detail-specs div { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.detail-specs small { display: block; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.detail-specs strong { font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.features { columns: 2; gap: 24px; padding-left: 18px; color: var(--ink-2); }
.features li { margin-bottom: 6px; break-inside: avoid; }
.sticky-card { position: sticky; top: 100px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.sticky-card .btn { width: 100%; justify-content: center; }
.sticky-card .btn + .btn { margin-top: 10px; }
.prose { max-width: 70ch; color: var(--ink-2); font-size: 17px; }
.prose p + p { margin-top: 16px; }
.prose h2 { font-size: 28px; margin: 40px 0 12px; color: var(--ink); }
.prose h3 { font-size: 21px; margin: 28px 0 8px; color: var(--ink); }
.prose ul { padding-left: 20px; }

/* ---------- Filtros ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filters select, .filters input { padding: 12px 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--white); font: inherit; font-size: 14px; }
.chip { padding: 10px 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--white); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.chip.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.empty { padding: 64px 24px; text-align: center; color: var(--ink-2); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--white); font: inherit; font-size: 15px; color: var(--ink);
  transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(17,17,17,.06); }
.field textarea { min-height: 130px; resize: vertical; }
.form .btn { justify-self: start; }
.form-note { font-size: 12px; color: var(--ink-3); }
.hp { position: absolute; left: -9999px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(17,17,17,.55); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { width: min(560px, 100%); background: var(--bg); border-radius: var(--radius); padding: 32px; position: relative; transform: translateY(16px); transition: transform .5s var(--ease); max-height: 92vh; overflow: auto; }
.modal.open .modal-card { transform: none; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; object-fit: contain; }

/* ---------- Blog ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr; } }
.post { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post img { aspect-ratio: 16/10; width: 100%; object-fit: cover; }
.post div { padding: 22px; }
.post .eyebrow { margin-bottom: 10px; }
.post h3 { font-size: 22px; margin-bottom: 8px; }
.post p { font-size: 15px; color: var(--ink-2); }

/* ---------- Footer ---------- */
.footer { background: var(--bg-2); padding: 64px 0 28px; margin-top: clamp(48px, 6vw, 96px); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; font-family: var(--font-body); }
.footer a { display: block; color: var(--ink-2); font-size: 15px; padding: 4px 0; }
.footer a:hover { color: var(--ink); }
.footer .brand { margin-bottom: 14px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.footer-bottom a { display: inline; font-size: 13px; padding: 0; }

/* ---------- WhatsApp flotante ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 12px 28px -10px rgba(0,0,0,.4); transition: transform .4s var(--ease); }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ---------- Animaciones de scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.split-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.split-words .w > span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); }
.split-words.in .w > span { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .split-words .w > span { opacity: 1; transform: none; transition: none; }
  .hero-media img { animation: none; transform: none; }
  .marquee-track { animation: none; }
}

/* Página interior con hero corto */
.page-hero { padding: 160px 0 48px; }
.page-hero .h1 { max-width: 16ch; text-wrap: balance; }
.page-hero .lead { margin-top: 18px; max-width: 56ch; }

/* Aviso / textos legales */
.legal { max-width: 78ch; color: var(--ink-2); }
.legal h2 { font-size: 24px; margin: 36px 0 10px; color: var(--ink); }
.legal p + p { margin-top: 12px; }

/* Mensajes de estado */
.alert { padding: 14px 16px; border-radius: 14px; font-size: 14px; background: var(--white); border: 1px solid var(--line); }
.alert.ok { border-color: #b7e0c3; background: #eef8f1; color: #1d5a31; }
.alert.err { border-color: #f0c1c1; background: #fdf0f0; color: #8b2020; }
