/* Inmobiliarium — diseño editorial premium (no estándar)
   Paleta: tinta #0F1B24 · papel #F6F2EA · oro #C9973F · teal #2F6D62 · terracota #8A4B32 */

:root {
  --ink: #0F1B24;
  --ink-2: #16242F;
  --paper: #F6F2EA;
  --paper-2: #EFE9DC;
  --gold: #C9973F;
  --gold-soft: #E3C98F;
  --teal: #2F6D62;
  --terra: #8A4B32;
  --line: rgba(15, 27, 36, .14);
  --line-inv: rgba(246, 242, 234, .16);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
  --radius: 18px;
  --shadow: 0 24px 60px -24px rgba(15, 27, 36, .35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

::selection { background: var(--gold); color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(15, 27, 36, .82);
  border-bottom: 1px solid var(--line-inv);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: baseline; gap: 2px; font-family: var(--serif); font-size: 1.35rem; color: var(--paper); letter-spacing: .02em; }
.brand b { color: var(--gold); font-weight: 400; }
.brand .dot { color: var(--gold); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: rgba(246,242,234,.72); font-size: .92rem; transition: color .2s; }
.nav-links a:hover { color: var(--gold-soft); }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 10px 30px -10px rgba(201,151,63,.55); }
.btn-gold:hover { background: var(--gold-soft); }
.btn-ghost { border-color: var(--line-inv); color: var(--paper); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-2); }
.nav .btn { padding: 9px 20px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--ink); color: var(--paper);
  padding: 170px 0 110px; overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.hero::before { width: 560px; height: 560px; background: rgba(47,109,98,.55); top: -180px; right: -120px; }
.hero::after { width: 420px; height: 420px; background: rgba(201,151,63,.32); bottom: -200px; left: -80px; }
.hero-in { position: relative; z-index: 1; max-width: 900px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-soft);
  margin-bottom: 26px;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--gold); }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.08; letter-spacing: -.01em;
}
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero p.lead {
  margin: 26px 0 38px; font-size: 1.16rem; color: rgba(246,242,234,.78); max-width: 640px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-stats { display: flex; gap: 0; margin-top: 64px; flex-wrap: wrap; border-top: 1px solid var(--line-inv); }
.hstat { padding: 22px 34px 0 0; margin-right: 34px; }
.hstat b { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; color: var(--gold-soft); display: block; }
.hstat span { font-size: .84rem; color: rgba(246,242,234,.62); }

/* ---------- Marquee ---------- */
.marquee { background: var(--gold); color: var(--ink); overflow: hidden; padding: 13px 0; }
.marquee-track { display: flex; gap: 48px; white-space: nowrap; animation: slide 26s linear infinite; width: max-content; }
.marquee-track span { font-size: .92rem; font-weight: 600; letter-spacing: .06em; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; }
.section-head p { margin-top: 14px; color: rgba(15,27,36,.66); font-size: 1.05rem; }

/* Dolores — lista editorial numerada */
.pains { border-top: 1px solid var(--line); }
.pain {
  display: grid; grid-template-columns: 110px 1fr 1fr; gap: 28px; align-items: start;
  padding: 34px 0; border-bottom: 1px solid var(--line); transition: background .25s;
}
.pain:hover { background: rgba(201,151,63,.06); }
.pain .num {
  font-family: var(--serif); font-size: 2.6rem; color: rgba(15,27,36,.18); line-height: 1;
  transition: color .25s;
}
.pain:hover .num { color: var(--gold); }
.pain h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 6px; }
.pain .prob { color: rgba(15,27,36,.62); font-size: .96rem; }
.pain .sol { position: relative; padding-left: 22px; color: var(--teal); font-size: .96rem; }
.pain .sol::before { content: "→"; position: absolute; left: 0; color: var(--gold); }
.pain .sol b { color: var(--ink); }

/* ---------- Bento features ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon { font-size: 1.7rem; margin-bottom: 14px; display: block; }
.card h3 { font-size: 1.14rem; margin-bottom: 8px; }
.card p { color: rgba(15,27,36,.64); font-size: .95rem; }
.card .tag {
  position: absolute; top: 22px; right: 22px; font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 999px; padding: 3px 10px;
}
.b-ia { grid-column: span 4; background: var(--ink); color: var(--paper); border: none; }
.b-ia h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; }
.b-ia p { color: rgba(246,242,234,.72); }
.b-redes { grid-column: span 2; }
.b-crm { grid-column: span 2; }
.b-kpi { grid-column: span 2; }
.b-market { grid-column: span 2; }

/* Chat de muestra dentro de la card IA */
.mini-chat { margin-top: 22px; display: grid; gap: 10px; }
.mini-chat .msg {
  max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: .88rem; line-height: 1.45;
}
.mini-chat .from-client { background: rgba(246,242,234,.1); border: 1px solid var(--line-inv); justify-self: start; }
.mini-chat .from-ia { background: var(--gold); color: var(--ink); justify-self: end; border-bottom-right-radius: 4px; }
.mini-chat .who { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .65; margin-bottom: 3px; }

/* ---------- Panel de costos ---------- */
.cost { background: var(--ink); color: var(--paper); border-radius: 26px; padding: 56px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.cost h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.18; }
.cost h2 em { font-style: italic; color: var(--gold-soft); }
.cost p { margin-top: 16px; color: rgba(246,242,234,.72); }
.cost ul { margin-top: 20px; display: grid; gap: 10px; }
.cost li { padding-left: 26px; position: relative; color: rgba(246,242,234,.85); font-size: .96rem; }
.cost li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.meter {
  background: rgba(246,242,234,.05); border: 1px solid var(--line-inv); border-radius: 18px;
  padding: 26px; font-family: var(--mono); font-size: .88rem;
}
.meter .row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line-inv); }
.meter .row:last-child { border: none; }
.meter .row b { color: var(--gold-soft); font-weight: 400; }
.meter .total { font-size: 1.05rem; }
.meter .total b { color: #7FD8A4; }
.meter-cap { margin-top: 12px; font-size: .78rem; color: rgba(246,242,234,.5); font-family: var(--sans); }

/* ---------- Planes ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s;
}
.plan:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.plan.pro { background: var(--ink); color: var(--paper); border: 1px solid var(--gold); position: relative; }
.plan.pro::before {
  content: "El más elegido"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--ink); font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; }
.plan .price { margin: 14px 0 4px; font-size: 2rem; font-weight: 700; }
.plan .price small { font-size: .85rem; font-weight: 400; opacity: .6; }
.plan .for { font-size: .86rem; opacity: .65; margin-bottom: 20px; }
.plan ul { display: grid; gap: 9px; margin-bottom: 28px; }
.plan li { padding-left: 24px; position: relative; font-size: .93rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.plan.pro li::before { color: var(--gold); }
.plan .btn { margin-top: auto; text-align: center; }

/* ---------- CTA final / footer ---------- */
.cta-final { text-align: center; padding: 110px 24px; }
.cta-final h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.6vw, 3.1rem); max-width: 760px; margin: 0 auto 18px; line-height: 1.15; }
.cta-final p { color: rgba(15,27,36,.62); margin-bottom: 34px; }
.footer { background: var(--ink); color: rgba(246,242,234,.6); padding: 44px 0; font-size: .88rem; }
.footer-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer .brand { font-size: 1.1rem; }

/* ---------- PORTAL ---------- */
.portal-hero { background: var(--ink); color: var(--paper); padding: 120px 0 46px; position: relative; overflow: hidden; }
.portal-hero::before { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%; filter: blur(90px); opacity: .45; background: rgba(47,109,98,.6); top: -220px; right: -100px; }
.portal-hero .wrap { position: relative; z-index: 1; }
.agency { display: flex; align-items: center; gap: 16px; }
.agency .logo {
  width: 58px; height: 58px; border-radius: 16px; background: linear-gradient(135deg, var(--gold), var(--terra));
  display: grid; place-items: center; font-size: 1.6rem;
}
.agency h1 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; }
.agency .sub { color: rgba(246,242,234,.6); font-size: .9rem; }
.powered { margin-top: 10px; font-size: .78rem; color: rgba(246,242,234,.45); }
.powered b { color: var(--gold-soft); font-weight: 600; }

.filters {
  position: sticky; top: 66px; z-index: 40; background: rgba(246,242,234,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); padding: 14px 0;
}
.filters-in { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chip {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: .88rem; cursor: pointer; transition: all .2s; font-weight: 500;
}
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters select {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: .88rem; font-family: var(--sans); cursor: pointer; color: var(--ink);
}
.filters .count { margin-left: auto; font-size: .84rem; color: rgba(15,27,36,.55); }

.grid-props { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 22px; padding: 40px 0 90px; }
.prop {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.prop:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.prop .cover { height: 190px; display: grid; place-items: center; font-size: 3.4rem; position: relative; }
.prop .cover .op {
  position: absolute; top: 14px; left: 14px; background: rgba(15,27,36,.85); color: var(--paper);
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.prop .cover .op.arriendo { background: var(--teal); }
.prop-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.prop .precio { font-size: 1.3rem; font-weight: 700; }
.prop .precio small { font-weight: 400; font-size: .8rem; color: rgba(15,27,36,.5); }
.prop h3 { font-size: 1.02rem; margin: 4px 0 2px; }
.prop .ubi { font-size: .85rem; color: rgba(15,27,36,.55); margin-bottom: 14px; }
.prop .specs { display: flex; gap: 14px; font-size: .84rem; color: rgba(15,27,36,.7); border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto; flex-wrap: wrap; }
.empty { padding: 60px 0; text-align: center; color: rgba(15,27,36,.5); grid-column: 1/-1; }

/* Modal detalle */
.modal-bg {
  position: fixed; inset: 0; background: rgba(15,27,36,.6); backdrop-filter: blur(6px);
  z-index: 90; display: none; align-items: flex-end; justify-content: center; padding: 0;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--paper); width: min(880px, 100%); max-height: 92vh; overflow-y: auto;
  border-radius: 26px 26px 0 0; animation: up .3s ease;
}
@keyframes up { from { transform: translateY(60px); opacity: 0; } }
.modal .cover { height: 240px; display: grid; place-items: center; font-size: 4.6rem; position: relative; }
.modal .close {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(15,27,36,.8); color: var(--paper); border: none; font-size: 1.1rem; cursor: pointer;
}
.modal-body { padding: 32px 38px 42px; }
.modal .precio { font-size: 1.9rem; font-weight: 700; }
.modal .precio small { font-size: .95rem; font-weight: 400; color: rgba(15,27,36,.55); }
.modal h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 6px 0 2px; }
.modal .ubi { color: rgba(15,27,36,.55); margin-bottom: 20px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 22px 0; }
.spec { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.spec b { display: block; font-size: 1.15rem; }
.spec span { font-size: .76rem; color: rgba(15,27,36,.55); }
.modal .desc { margin: 18px 0; color: rgba(15,27,36,.78); }
.feat-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.feat-tags span { background: rgba(47,109,98,.1); color: var(--teal); font-size: .82rem; padding: 6px 14px; border-radius: 999px; font-weight: 500; }
.modal-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Chat IA ---------- */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--ink); color: var(--paper); font-size: 1.5rem;
  box-shadow: 0 16px 40px -12px rgba(15,27,36,.55); transition: transform .2s;
  display: grid; place-items: center;
}
.fab:hover { transform: scale(1.08); }
.fab .pulse {
  position: absolute; top: 4px; right: 4px; width: 13px; height: 13px; border-radius: 50%;
  background: #46C07E; border: 2px solid var(--ink); animation: pulse 2s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(70,192,126,.15); } }
.chat {
  position: fixed; right: 22px; bottom: 96px; z-index: 85;
  width: min(390px, calc(100vw - 44px)); height: min(560px, 72vh);
  background: #fff; border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(15,27,36,.5);
  display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--line);
}
.chat.open { display: flex; animation: up .25s ease; }
.chat-head { background: var(--ink); color: var(--paper); padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.chat-head .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--teal));
  display: grid; place-items: center; font-size: 1.15rem;
}
.chat-head b { display: block; font-size: .98rem; }
.chat-head span { font-size: .76rem; color: rgba(246,242,234,.6); }
.chat-head .status { margin-left: auto; font-size: .7rem; color: #7FD8A4; display: flex; align-items: center; gap: 5px; }
.chat-head .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #46C07E; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--paper); }
.chat-msgs .m { max-width: 84%; padding: 11px 15px; border-radius: 16px; font-size: .92rem; line-height: 1.5; white-space: pre-line; }
.chat-msgs .m.ia { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 5px; }
.chat-msgs .m.yo { background: var(--ink); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 5px; }
.chat-msgs .typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.chat-msgs .typing i { width: 7px; height: 7px; border-radius: 50%; background: rgba(15,27,36,.35); animation: ty 1.2s infinite; }
.chat-msgs .typing i:nth-child(2) { animation-delay: .15s; }
.chat-msgs .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ty { 30% { transform: translateY(-5px); opacity: 1; } }
.chat-quick { display: flex; gap: 8px; padding: 0 18px 10px; flex-wrap: wrap; background: var(--paper); }
.chat-quick button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px;
  font-size: .8rem; cursor: pointer; transition: all .2s;
}
.chat-quick button:hover { border-color: var(--gold); background: rgba(201,151,63,.08); }
.chat-in { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-in input {
  flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px;
  font-size: .92rem; font-family: var(--sans); outline: none;
}
.chat-in input:focus { border-color: var(--gold); }
.chat-in button {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--gold);
  color: var(--ink); font-size: 1.05rem; cursor: pointer; transition: background .2s;
}
.chat-in button:hover { background: var(--gold-soft); }
.chat-note { font-size: .68rem; color: rgba(15,27,36,.45); text-align: center; padding: 0 14px 10px; background: #fff; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .pain { grid-template-columns: 56px 1fr; }
  .pain .num { font-size: 1.9rem; }
  .pain .sol { grid-column: 2; }
  .bento { grid-template-columns: 1fr 1fr; }
  .b-ia { grid-column: span 2; }
  .cost { grid-template-columns: 1fr; padding: 36px 26px; }
  .plans { grid-template-columns: 1fr; }
  .modal-body { padding: 26px 22px 34px; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .b-ia, .b-redes, .b-crm, .b-kpi, .b-market { grid-column: span 1; }
  .hstat b { font-size: 1.5rem; }
}
