/* Real Mindstate — estilos de marca (negro y dorado). */
:root {
  --bg: #0C0B0A;
  --bg-2: #110F0D;
  --surface: #161412;
  --surface-2: #1E1B17;
  --line: #2E2922;
  --line-gold: #5C4A2A;
  --gold: #D4AF6A;
  --gold-hi: #E6C47F;
  --on-gold: #14110C;
  --ink: #F4ECDD;
  --ink-2: #D9CFBE;
  --muted: #B3A893;
  --muted-2: #8F8574;
  --danger: #F2A49A;
  --radius: 14px;
  --serif: Cinzel, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; color: var(--gold); text-transform: uppercase; }
.grid-bg { background-image: linear-gradient(rgba(212,175,106,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(212,175,106,.06) 1px, transparent 1px); background-size: 28px 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cabecera */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 15px; letter-spacing: 2.4px; line-height: 1.05; }
.top-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.top-nav a, .top-nav button { font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; background: none; border: 0; cursor: pointer; }
.top-nav a:hover, .top-nav button:hover { color: var(--gold-hi); }
.top-nav .pill { border: 1px solid var(--line-gold); color: var(--gold); border-radius: 99px; padding: 9px 14px; }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 4px; border-radius: 99px; background: var(--gold); color: var(--on-gold); font-size: 12px; font-weight: 700; text-align: center; }

/* Botones y formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: 12px; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-hi); color: var(--on-gold); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-gold); }
.btn-ghost:hover { color: var(--gold-hi); border-color: var(--gold); }
.btn-block { width: 100%; }
.btn[disabled] { background: var(--surface-2); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 12px; font-weight: 700; letter-spacing: 1.4px; color: var(--gold); text-transform: uppercase; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=tel], .field input[type=datetime-local], .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line-gold); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px;
}
.field textarea { min-height: 96px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
::placeholder { color: var(--muted-2); }
.help { font-size: 13px; color: var(--muted); }
.errors { color: var(--danger); font-size: 14px; margin: 0; padding-left: 18px; }
.alert { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-gold); background: var(--surface-2); color: var(--ink-2); font-size: 14px; }
.alert-error { border-color: #7A3B33; color: var(--danger); }

/* Opciones tipo tarjeta (radio) */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.wrap-row { display: flex; flex-wrap: wrap; }
.choices.stack { grid-template-columns: 1fr; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 16px; border-radius: 12px; border: 1px solid #3A3328; background: var(--surface); font-weight: 600; text-align: center; }
.choice.stack span { justify-content: flex-start; flex-direction: column; align-items: flex-start; text-align: left; }
.choice small { font-weight: 400; color: var(--muted); font-size: 13px; }
.choice input:checked + span { border: 2px solid var(--gold); background: #2A2215; color: var(--gold-hi); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line-gold); border-radius: var(--radius); cursor: pointer; font-size: 14px; color: var(--ink-2); }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }

/* Portada */
.hero { position: relative; min-height: 420px; overflow: hidden; display: flex; align-items: flex-end; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,11,10,0) 25%, rgba(12,11,10,.9) 75%, var(--bg) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-bottom: 28px; display: flex; flex-direction: column; gap: 12px; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); max-width: 640px; }

/* Buscador y filtros */
.search { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 0 8px; }
.search .input { flex: 1 1 240px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line-gold); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.chip:hover { color: var(--gold-hi); }
.chip.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }

/* Tarjetas de propiedad */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 22px 0 12px; flex-wrap: wrap; }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); padding-bottom: 32px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.card:hover { border-color: var(--line-gold); color: var(--ink); }
.card-photo { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; left: 12px; top: 12px; background: rgba(12,11,10,.82); color: var(--gold); border: 1px solid var(--line-gold); font-size: 12px; font-weight: 700; letter-spacing: .8px; padding: 5px 12px; border-radius: 99px; text-transform: uppercase; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.price { font-family: var(--serif); font-weight: 700; color: var(--gold-hi); font-size: 22px; }
.card-title { font-weight: 600; font-size: 16px; }
.source { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.empty { padding: 28px; text-align: center; border: 1px dashed var(--line-gold); border-radius: 18px; color: var(--muted); }

/* Paneles */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.panel.gold { border-color: var(--line-gold); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 14px; align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > .main { flex: 999 1 480px; min-width: 0; }
.split > .side { flex: 1 1 300px; min-width: 0; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.avatar { flex: none; width: 54px; height: 54px; border-radius: 99px; border: 2px solid var(--gold); color: var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 18px; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list svg { flex: none; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 20px; }
.stat span { font-size: 12px; color: var(--muted); }
.gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.detail-hero { width: 100%; aspect-ratio: 16 / 9; max-height: 480px; object-fit: cover; border-radius: 18px; }

/* Conversación */
.thread { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble small { display: block; font-size: 11px; margin-top: 4px; }
.bubble.theirs { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.theirs small { color: var(--muted-2); }
.bubble.mine { align-self: flex-end; background: var(--gold); color: var(--on-gold); border-bottom-right-radius: 4px; }
.bubble.mine small { color: #4A3A1C; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-width: 0; min-height: 52px; max-height: 160px; padding: 13px 16px; border: 1px solid var(--line-gold); border-radius: 24px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; resize: vertical; }

/* Estados */
.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.s-new, .s-proposed { background: #2A2215; color: var(--gold-hi); }
.s-contacted, .s-conversation { background: #1A2230; color: #A9C4EA; }
.s-appointment, .s-confirmed { background: #16251E; color: #9ED2B6; }
.s-closed, .s-not_interested, .s-declined, .s-cancelled { background: #22201C; color: var(--muted); }

/* Portal */
.portal { display: flex; flex-wrap: wrap; min-height: calc(100vh - 69px); }
.portal-side { flex: 1 1 230px; background: var(--bg-2); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; }
.portal-side a { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 15px; }
.portal-side a.on { background: var(--surface-2); border: 1px solid var(--line-gold); color: var(--ink); font-weight: 600; }
.portal-main { flex: 999 1 560px; min-width: 0; padding: 26px 22px 40px; display: flex; flex-direction: column; gap: 20px; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.kpi b { display: block; font-family: var(--serif); font-size: 28px; margin-top: 4px; }
.table-box { overflow-x: auto; }
.lead-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.lead-table th { text-align: left; font-size: 11px; letter-spacing: 1.2px; color: var(--gold); text-transform: uppercase; padding: 10px 16px; background: var(--bg-2); }
.lead-table td { padding: 14px 16px; border-top: 1px solid var(--line); }
.lead-table tr.on td { background: #2A2215; }
.lead-table tr.on td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.lead-table a { color: var(--ink); text-decoration: none; font-weight: 600; }
.status-form { display: flex; flex-wrap: wrap; gap: 6px; }
.status-form button { min-height: 38px; padding: 0 12px; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: transparent; color: var(--ink); border: 1px solid var(--line-gold); }
.status-form button.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }

/* Pie y barra inferior en móvil */
.foot { border-top: 1px solid var(--line); padding: 22px 0 90px; color: var(--muted-2); font-size: 13px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--bg-2); border-top: 1px solid var(--line); padding: 6px 4px 10px; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; font-size: 12px; text-decoration: none; color: var(--muted-2); }
.tabbar a.on { color: var(--gold); font-weight: 600; }
@media (min-width: 860px) {
  .tabbar { display: none; }
  .foot { padding-bottom: 28px; }
}
@media (max-width: 859px) {
  .top-nav .desk { display: none; }
  .top .wrap { min-height: 60px; flex-wrap: nowrap; }
  .top-nav { flex-wrap: nowrap; gap: 0; }
  .top-nav a, .top-nav button { padding: 10px 8px; }
  .brand-name { font-size: 13px; letter-spacing: 1.8px; }
}

/* Inversión */
.count { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--gold); border: 1px solid var(--line-gold); border-radius: 99px; padding: 1px 9px; vertical-align: middle; margin-left: 6px; }
.strategy { padding-bottom: 8px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 320px); gap: 16px; overflow-x: auto; padding-bottom: 18px; scroll-snap-type: x mandatory; }
.rail > .card { scroll-snap-align: start; }
.metric { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.metric span { color: var(--muted); font-weight: 500; }
.photo-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; background: rgba(12,11,10,.8); color: var(--ink); font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 99px; }
.locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 4 / 3; border-radius: 12px; border: 1px dashed var(--line-gold); background: var(--surface); color: var(--gold); text-decoration: none; text-align: center; padding: 10px; }
.locked span { font-size: 12px; color: var(--muted); }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0; }
.inv-grid div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.inv-grid dt { font-size: 12px; color: var(--muted); }
.inv-grid dd { margin: 4px 0 0; font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--gold-hi); }

/* Pie de página */
.foot-grid { display: flex; flex-direction: column; gap: 14px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--gold-hi); }

/* Membresías */
.plans-hero { padding: 44px 0 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.plans-hero h1 { font-size: clamp(28px, 4.6vw, 42px); max-width: 760px; }
.plans-hero p { color: var(--ink-2); max-width: 620px; }
.trial-badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--gold); color: var(--gold-hi); background: rgba(212,175,106,.08); border-radius: 99px; padding: 7px 16px; font-weight: 700; font-size: 14px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; padding: 26px 0; }
.plan { background: linear-gradient(180deg, #1C1812, var(--surface)); border: 1px solid var(--line-gold); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.plan.featured { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(212,175,106,.35), 0 18px 50px rgba(0,0,0,.45); }
.plan h2 { font-size: 24px; }
.plan .amount { font-family: var(--serif); font-size: 46px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.plan .amount small { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-2); }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { flex: none; margin-top: 3px; }
.plan .btn { margin-top: auto; }
.bridge { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; text-align: center; padding: 22px; }
.bridge .side-box { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.bridge b { font-size: 16px; }
.faq { display: flex; flex-direction: column; gap: 10px; padding-bottom: 40px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin-top: 8px; color: var(--ink-2); }
@media (max-width: 640px) { .bridge { grid-template-columns: 1fr; } }

/* Páginas legales */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 0 48px; display: flex; flex-direction: column; gap: 18px; }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 19px; margin-top: 8px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.7; }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.draft-note { border: 1px dashed var(--gold); background: rgba(212,175,106,.07); color: var(--gold-hi); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.kv-contact { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 16px; }
.kv-contact dt { color: var(--muted); }
.kv-contact dd { margin: 0; font-weight: 600; }

/* Confirmar correo */
.verify-bar { background: rgba(212,175,106,.1); border-bottom: 1px solid var(--line-gold); font-size: 14px; color: var(--ink-2); }
.verify-bar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 9px; padding-bottom: 9px; }
.verify-bar button { background: none; border: 0; color: var(--gold-hi); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 0; }
.verified-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-hi); font-weight: 700; font-size: 14px; }

/* Escalera de 4 planes */
.plans4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plans4 .plan { padding: 22px; }
.plans4 .plan .amount { font-size: 38px; }

/* Niveles por resultados */
.rank { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.rank .stars { letter-spacing: 1px; color: var(--muted-2); }
.rank.r2 .stars, .rank.r3 .stars { color: var(--gold); }
.rank.r3 { border-color: var(--line-gold); color: var(--gold-hi); }
.rank.r4 { border-color: var(--gold); color: var(--gold-hi); background: rgba(212,175,106,.1); }
.rank.r4 .stars, .rank.r5 .stars { color: var(--gold-hi); }
.rank.r5 { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.rank.r5 .stars { color: var(--on-gold); }
.ranks-box { margin: 6px 0 26px; }
.ranks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rank-step { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.closing-box { margin-bottom: 18px; }
.plans-hero .paths { display: inline-flex; border: 1px solid var(--line-gold); border-radius: 999px; padding: 4px; background: var(--bg-2); margin-top: 4px; }
.plans-hero .paths a { color: var(--muted); font-weight: 700; font-size: 15px; padding: 9px 18px; border-radius: 999px; text-decoration: none; }
.plans-hero .paths a.on { background: var(--gold); color: var(--on-gold); }
