/* MiCasaBolivia — sistema visual
   Banca privada + asesoría inmobiliaria. Calma, confianza, oro con moderación. */

:root {
  /* Color */
  --navy-950: oklch(0.16 0.042 258);
  --navy-900: oklch(0.205 0.048 258);
  --navy-800: oklch(0.25 0.052 258);
  --navy-700: oklch(0.32 0.055 258);
  --navy-100: oklch(0.93 0.012 258);
  --ink: oklch(0.24 0.03 258);
  --ink-soft: oklch(0.42 0.025 258);
  --gold-300: oklch(0.82 0.10 88);
  --gold-400: oklch(0.74 0.115 85);
  --gold-600: oklch(0.55 0.105 80);
  --gold-700: oklch(0.47 0.095 78);
  --cloud: oklch(0.966 0.004 258);
  --line: oklch(0.885 0.008 258);
  --line-navy: oklch(0.34 0.045 258);
  --white: #ffffff;
  --wa: oklch(0.62 0.17 152);

  /* Tipografía */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  /* Escala */
  --text-sm: 0.9rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --h3: clamp(1.3rem, 2vw, 1.55rem);
  --h2: clamp(1.8rem, 3.6vw, 2.7rem);
  --h1: clamp(2.3rem, 5.2vw, 3.9rem);

  /* Ritmo */
  --space-section: clamp(4.5rem, 9vw, 8rem);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --measure: 64ch;

  /* Z */
  --z-nav: 50;
  --z-toast: 80;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: var(--h1); letter-spacing: -0.015em; }
h2 { font-size: var(--h2); letter-spacing: -0.01em; }
h3 { font-size: var(--h3); }

p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
ul { padding-left: 1.2em; }
li { margin-bottom: 0.4em; }

a { color: var(--navy-800); text-decoration-color: var(--gold-400); text-underline-offset: 3px; }
a:hover { color: var(--gold-700); }

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

/* ---------- Navegación ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--navy-900);
  text-decoration: none;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.brand b { font-weight: 600; }
.brand span { color: var(--gold-600); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.5rem 0;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--navy-900); }
.nav-links a[aria-current="page"] {
  border-bottom: 2px solid var(--gold-400);
}

.nav-cta {
  display: inline-block;
  background: var(--navy-900);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.65rem 1.2rem;
  border-radius: 3px;
}
.nav-cta:hover { background: var(--navy-700); color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  color: var(--navy-900);
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.5rem;
  }
  .nav-menu.open { display: block; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .nav-links a { display: block; padding: 0.7rem 0; font-size: 1rem; }
  .nav-cta { margin-top: 0.75rem; display: inline-block; }
}
@media (min-width: 761px) {
  .nav-menu { display: flex; align-items: center; gap: 2rem; }
}

/* ---------- Héroe (drench navy) ---------- */

.hero {
  position: relative;
  background: var(--navy-900);
  color: var(--white);
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.38;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    oklch(0.205 0.048 258 / 0.96) 0%,
    oklch(0.205 0.048 258 / 0.82) 45%,
    oklch(0.205 0.048 258 / 0.35) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(5rem, 12vw, 9.5rem);
  max-width: 44rem;
}
.hero h1 { color: var(--white); margin-bottom: 0.5em; }
.hero h1 em {
  font-style: italic;
  color: var(--gold-300);
}
.hero p {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--navy-100);
  max-width: 38rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.hero-note {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-navy);
}
.hero-note-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 3rem;
  padding-block: 1.1rem;
  font-size: var(--text-sm);
  color: var(--navy-100);
}
.hero-note-inner strong { color: var(--gold-300); font-weight: 600; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: background-color 160ms cubic-bezier(0.22, 1, 0.36, 1), border-color 160ms;
}
.btn-gold { background: var(--gold-400); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-300); color: var(--navy-950); }
.btn-navy { background: var(--navy-900); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); color: var(--white); }
.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border-color: var(--line-navy);
}
.btn-ghost-light:hover { border-color: var(--gold-300); color: var(--gold-300); }
.btn-wa { background: transparent; color: inherit; border-color: var(--line); }
.btn-wa:hover { border-color: var(--wa); color: var(--ink); }
.btn-wa svg { color: var(--wa); }

/* ---------- Secciones ---------- */

.section { padding-block: var(--space-section); }
.section-cloud { background: var(--cloud); }
.section-navy { background: var(--navy-900); color: var(--navy-100); }
.section-navy h2, .section-navy h3 { color: var(--white); }

.lede {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 46rem;
}
.section-navy .lede { color: var(--navy-100); }

/* Tres preguntas: lista serif con filetes, no tarjetas */
.questions { margin-top: 3rem; }
.question {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr);
  gap: 1rem 4rem;
  padding-block: 2.2rem;
  border-top: 1px solid var(--line);
}
.question:last-child { border-bottom: 1px solid var(--line); }
.question h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  margin: 0;
  color: var(--navy-900);
}
.question p { margin-bottom: 0.6em; }
.more {
  font-weight: 600;
  font-size: var(--text-sm);
}
@media (max-width: 700px) {
  .question { grid-template-columns: 1fr; gap: 0.6rem; }
}

/* Proceso: secuencia real numerada */
.steps {
  counter-reset: paso;
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5rem 2.5rem;
}
.steps li { counter-increment: paso; margin: 0; }
.steps li::before {
  content: counter(paso, decimal-leading-zero);
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--gold-600);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.section-navy .steps li::before {
  color: var(--gold-300);
  border-bottom-color: var(--line-navy);
}
.steps h3 { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; margin-bottom: 0.4em; }
.steps p { font-size: var(--text-sm); color: var(--ink-soft); margin: 0; }
.section-navy .steps p { color: var(--navy-100); }

/* Propiedades: fila editorial con imagen dominante */
.prop-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.prop-row + .prop-row { border-top: 1px solid var(--line); }
.prop-row:nth-child(even) .prop-media { order: 2; }
.prop-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
}
.prop-media img { width: 100%; height: 100%; object-fit: cover; }
.prop-row h3 { color: var(--navy-900); }
.prop-row .tag {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold-700);
}
@media (max-width: 740px) {
  .prop-row { grid-template-columns: 1fr; }
  .prop-row:nth-child(even) .prop-media { order: 0; }
}

/* Selma / credibilidad */
.advisor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.advisor-portrait {
  background: var(--navy-800);
  border: 1px solid var(--line-navy);
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border-radius: 3px;
}
.advisor-portrait .monogram {
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 7rem);
  color: var(--gold-300);
  letter-spacing: 0.04em;
}
.advisor blockquote {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.45;
  color: var(--white);
}
.advisor blockquote em { color: var(--gold-300); font-style: italic; }
.cred-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.4rem 2rem;
  font-size: var(--text-sm);
}
.cred-list li {
  padding-block: 0.55rem;
  border-top: 1px solid var(--line-navy);
}
.cred-list strong { color: var(--gold-300); font-weight: 600; display: block; }
@media (max-width: 740px) {
  .advisor { grid-template-columns: 1fr; }
  .advisor-portrait { max-width: 20rem; }
}

/* Servicios resumen */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}
.svc-grid h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--navy-900);
}
.svc-grid p { font-size: var(--text-sm); color: var(--ink-soft); }

/* ---------- Formulario ---------- */

.form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1.75rem, 4vw, 3rem);
  max-width: 34rem;
}
.section-navy .form-panel { border: none; color: var(--ink); }

.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 0.35rem;
  color: var(--navy-900);
}
.field input, .field select {
  width: 100%;
  font: inherit;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  min-height: 44px;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--gold-600);
  outline-offset: 1px;
  border-color: var(--gold-600);
}
.form-panel .btn { width: 100%; justify-content: center; }
.form-fine {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.9rem;
  margin-bottom: 0;
}
.form-success {
  display: none;
  background: var(--cloud);
  border: 1px solid var(--gold-400);
  border-radius: 3px;
  padding: 1.25rem;
  font-weight: 600;
  color: var(--navy-900);
}
.form-success.visible { display: block; }

.cta-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) {
  .cta-split { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */

.faq { max-width: 46rem; margin-top: 2.5rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 600;
  color: var(--navy-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--gold-600);
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1.2rem; color: var(--ink-soft); }

/* ---------- Guía / lead magnet ---------- */

.guide-band {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.guide-band form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.guide-band input[type="email"] {
  flex: 1 1 14rem;
  font: inherit;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line-navy);
  border-radius: 3px;
  background: var(--navy-800);
  color: var(--white);
  min-height: 44px;
}
.guide-band input[type="email"]::placeholder { color: var(--navy-100); opacity: 1; }
.guide-band input[type="email"]:focus { outline: 2px solid var(--gold-300); }
@media (max-width: 740px) {
  .guide-band { grid-template-columns: 1fr; }
}

/* ---------- Página interior ---------- */

.page-head {
  background: var(--cloud);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.page-head h1 { color: var(--navy-900); max-width: 22ch; }
.page-head .lede { margin-bottom: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

.aside-note {
  background: var(--cloud);
  border-radius: 4px;
  padding: 1.75rem;
  font-size: var(--text-sm);
}
.aside-note h3 { font-family: var(--sans); font-weight: 700; font-size: 1rem; }
.aside-note ul { margin: 0; }

/* ---------- Blog / artículos ---------- */

.article {
  max-width: 46rem;
}
.article h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin-top: 2.2em;
}
.article h3 {
  font-size: 1.2rem;
  margin-top: 1.8em;
}
.article ul, .article ol { max-width: var(--measure); }
.post-meta {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin-bottom: 2rem;
}
.post-meta b { color: var(--navy-900); }

.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: 1.5rem 0 2rem;
}
.article th, .article td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.article th {
  font-weight: 700;
  color: var(--navy-900);
  border-bottom: 2px solid var(--navy-900);
}
.article .note {
  background: var(--cloud);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  font-size: var(--text-sm);
  margin: 2rem 0;
}

.post-list { list-style: none; padding: 0; margin: 2.5rem 0 0; max-width: 46rem; }
.post-list li {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
  margin: 0;
}
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list h3 { margin-bottom: 0.4em; }
.post-list h3 a { text-decoration: none; color: var(--navy-900); }
.post-list h3 a:hover { color: var(--gold-700); }
.post-list p { font-size: var(--text-sm); color: var(--ink-soft); margin: 0 0 0.5em; }
.post-list .post-meta { margin-bottom: 0.5rem; }

/* ---------- Pie ---------- */

.footer {
  background: var(--navy-950);
  color: var(--navy-100);
  padding-block: 3.5rem 2.5rem;
  font-size: var(--text-sm);
}
.footer a { color: var(--navy-100); text-decoration-color: var(--gold-600); }
.footer a:hover { color: var(--gold-300); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer .brand { color: var(--white); font-size: 1.25rem; }
.footer ul { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.footer li { margin-bottom: 0.55rem; }
.footer-legal {
  border-top: 1px solid var(--line-navy);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ---------- WhatsApp flotante ---------- */

.wa-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: var(--z-toast);
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px oklch(0.2 0.05 258 / 0.35);
  text-decoration: none;
}
.wa-float:hover { color: #fff; transform: translateY(-2px); }
.wa-float { transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------- Revelado (mejora progresiva, visible por defecto) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
                transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Formulario en el héroe (texto izquierda, formulario derecha) ---------- */

.hero-inner.hero-grid {
  max-width: 72rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 25rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.page-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 24rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-form {
  box-shadow: 0 18px 50px oklch(0.16 0.042 258 / 0.18);
}
.hero .hero-form { border: none; }
.hero-form p { color: var(--ink); }
.hero-form .form-fine { color: var(--ink-soft); }
.hero-form-title, .hero-form .hero-form-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--navy-900);
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.hero-form .field { margin-bottom: 0.85rem; }
.hero-form .field input, .hero-form .field select {
  padding: 0.6rem 0.75rem;
  min-height: 40px;
}
.hero-form .form-fine { margin-top: 0.7rem; }

/* Honeypot: invisible para personas */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 860px) {
  .hero-inner.hero-grid, .page-head-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-form { max-width: 34rem; }
}

.photo-credit, .photo-credit a { color: oklch(0.55 0.02 258); font-size: 0.72rem; }
