/* ============================================================
   Landing Masterclass "Financiamiento para terrenos" — PortalTerreno
   Paleta de marca: azul noche #0C1A33 / rojo #FF2800 / gris #EFF1F5
   Verde #25D366 reservado a los CTA de WhatsApp (página de gracias).
   ============================================================ */

:root {
  --azul-noche: #0C1A33;
  --azul-profundo: #030F27;
  --rojo: #FF2800;
  --rojo-hover: #E63A1A;
  --gris-claro: #EFF1F5;
  --gris-borde: #DFE3EC;
  --gris-texto: #606672;
  --blanco: #FFFFFF;
  --verde-wsp: #25D366;
  --verde-wsp-hover: #1DB954;
  --azul-dodger: #0068FF; /* PT: foco de inputs / estado activo */
  --radius: 14px;
  --shadow: 0 10px 30px rgba(12, 26, 51, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lexend', system-ui, -apple-system, sans-serif;
  color: var(--azul-noche);
  background: var(--blanco);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* Design system PortalTerreno: Lexend, pesos livianos (máx 500), sin uppercase. */
h1, h2, h3 { line-height: 1.2; font-weight: 500; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }
p { margin-bottom: .9rem; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }
.lead { font-size: 1.15rem; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; font-weight: 500; color: var(--rojo); margin-bottom: .35rem;
}
.only-desktop { display: none; }
@media (min-width: 720px) { .only-desktop { display: inline; } }

/* ===== Header ===== */
.site-header {
  background: var(--azul-profundo);
  padding: .9rem 1.25rem;
  display: flex; justify-content: center;
}
.logo { height: 34px; width: auto; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--azul-noche);
  color: var(--blanco);
  padding: 4.5rem 0 clamp(8rem, 18vw, 13rem);
  text-align: center;
}
/* Banda decorativa "Masterclass" sangrando en el borde inferior del hero.
   El fondo azul de la imagen (#0C1A34) empalma con --azul-noche; el mask
   funde el borde superior para que no se note el corte. */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(96px, 15vw, 230px);
  background: url('assets/back-masterclass.jpg') center bottom / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%);
  z-index: 1;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 1.15rem; }
.badge {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: .4rem 1rem;
  font-size: .85rem; font-weight: 500; letter-spacing: .02em;
}
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #C0C7D9; margin: 0; }
.hero-sub strong { color: var(--blanco); }
.gratis { color: var(--rojo); font-weight: 500; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: .45rem 1rem;
  font-size: .9rem; font-weight: 500;
  color: #E4E8F2;
}
.chip-ico { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.chip-ico-yt { width: 19px; height: 19px; opacity: 1; }
.chip-live { padding-left: .85rem; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #FF3B30; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(255, 59, 48, .55);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 59, 48, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* ===== Botones ===== */
/* Botones: design system PT — planos (sin sombra), Lexend 500.
   Base = secundario/WhatsApp (rect redondeado 8px); .btn-primary lo pisa a PILL. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border: none; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-weight: 500; text-decoration: none;
  transition: background .2s ease, box-shadow .15s ease, opacity .2s ease;
}
.btn:active { opacity: .92; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--blanco), 0 0 0 5.5px var(--azul-noche);
}
.btn-primary {
  background: var(--rojo); color: var(--blanco);
  border-radius: 8px;                 /* rect redondeado (preferencia Hugo, no pill) */
  padding: .85rem 2.6rem; font-size: 1rem;
}
.btn-primary:hover { background: var(--rojo-hover); }
.btn-lg { padding: .95rem 3rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-whatsapp {
  background: var(--verde-wsp); color: var(--blanco);
  padding: 1rem 2.2rem; font-size: 1.05rem;
  margin: .6rem 0 1.4rem;
}
.btn-whatsapp:hover { background: var(--verde-wsp-hover); }
.wa-icon { width: 22px; height: 22px; }

/* ===== Secciones ===== */
.section { padding: 4rem 0; }
.section-alt { background: var(--gris-claro); }

.doubt-list {
  list-style: none; margin: 0 0 1.4rem; display: grid; gap: .55rem;
}
.doubt-list li {
  background: var(--gris-claro);
  border-left: 4px solid var(--rojo);
  border-radius: 0 10px 10px 0;
  padding: .7rem 1rem;
  font-weight: 500;
}
.question-highlight {
  font-size: 1.25rem; font-weight: 500; color: var(--azul-noche);
  margin: 1.4rem 0;
}

/* ===== Cards 3 financiamientos ===== */
.cards-3 {
  display: grid; gap: 1.25rem; margin: 2.2rem 0 1.6rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(12, 26, 51, .13);
  border-color: #CFD5E2;
}
.card-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(255, 40, 0, .09); color: var(--rojo);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.card-icon svg { width: 28px; height: 28px; }
.card p { margin: 0; color: var(--gris-texto); }
.no-sale { font-size: 1.15rem; font-weight: 500; margin: 1.2rem 0 1.4rem; }

/* ===== Experto ===== */
.expert {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .expert { grid-template-columns: 320px 1fr; } }
.expert-img {
  width: min(320px, 70vw); aspect-ratio: 1/1; margin: 0 auto;
  display: block; object-fit: cover; object-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.expert-bio h3 { margin-top: 1.4rem; }
.expert-bio p { color: var(--gris-texto); }
.expert-bio .lead { color: var(--rojo); font-weight: 500; }

/* ===== CTA band ===== */
.cta-band {
  background:
    radial-gradient(700px 300px at 15% 120%, rgba(255, 40, 0, .16), transparent 60%),
    var(--azul-noche);
  color: var(--blanco);
  padding: 3.5rem 0;
}
.cta-band .lead { color: #C0C7D9; }
.cta-band .lead strong { color: var(--blanco); }
.cta-band .btn { margin-top: .8rem; }

/* ===== Es / No es para ti ===== */
.fit-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .fit-grid { grid-template-columns: 1fr 1fr; } }
.fit-col {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow);
  border-top: 5px solid;
}
.fit-yes { border-top-color: #10B981; }
.fit-no { border-top-color: var(--rojo); }
.fit-col ul { list-style: none; display: grid; gap: .9rem; margin-top: 1rem; }
.fit-col li { padding-left: 2.35rem; position: relative; color: var(--gris-texto); }
.fit-col li::before {
  position: absolute; left: 0; top: .05rem;
  width: 1.55rem; height: 1.55rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 500; line-height: 1;
}
.fit-yes li::before { content: '✓'; color: #0E9E6E; background: rgba(16, 185, 129, .12); }
.fit-no li::before { content: '✕'; color: var(--rojo); background: rgba(255, 40, 0, .10); }

/* ===== FAQ ===== */
/* FAQ estilo PT: card blanca + chevron; abierto = gris claro + acento navy a la izquierda. */
.faq { display: grid; gap: .8rem; margin-top: 1.8rem; }
.faq details {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(12, 26, 51, .04);
}
.faq details[open] { box-shadow: inset 4px 0 0 var(--azul-noche); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.05rem 3rem 1.05rem 1.3rem;
  font-weight: 500; position: relative;
  user-select: none;
  transition: background .18s ease;
}
.faq details[open] summary { background: var(--gris-claro); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: 2px solid var(--azul-dodger); outline-offset: -2px; }
/* Chevron (⌄) construido con bordes; rota a ⌃ al abrir. */
.faq summary::after {
  content: ''; position: absolute; right: 1.4rem; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--gris-texto);
  border-bottom: 2px solid var(--gris-texto);
  margin-top: -7px;
  transform: rotate(45deg);
  transition: transform .2s ease, border-color .2s ease;
}
.faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
  border-color: var(--azul-noche);
}
.faq .faq-body { padding: .1rem 1.3rem 1.15rem; color: var(--gris-texto); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ===== Formulario ===== */
.form-section {
  background:
    radial-gradient(800px 400px at 50% -20%, rgba(255, 40, 0, .14), transparent 60%),
    linear-gradient(180deg, var(--azul-noche), var(--azul-profundo));
}
.form-card {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 2.4rem 2rem;
  box-shadow: 0 24px 60px rgba(3, 15, 39, .45);
}
@media (min-width: 720px) { .form-card { padding: 3rem 3.2rem; } }
.form-card form { margin-top: 1.6rem; display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 500; font-size: .92rem; }
.field input {
  font-family: inherit; font-size: 1rem;
  padding: .85rem 1rem;
  border: 1.5px solid var(--gris-borde);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus {
  outline: none; border-color: var(--azul-dodger);
  box-shadow: 0 0 0 3px rgba(0, 104, 255, .15);
}
.field input:user-invalid {
  border-color: var(--rojo);
  box-shadow: 0 0 0 3px rgba(255, 40, 0, .12);
}
.form-error {
  color: var(--rojo); font-weight: 500; font-size: .92rem;
  margin: 0; text-align: center;
}
button.btn { border: none; }
button.btn:disabled { opacity: .65; cursor: wait; }

/* ===== Footer ===== */
.site-footer {
  background: var(--azul-profundo);
  color: #8D94A6;
  text-align: center;
  padding: 2.6rem 1.25rem;
}
.logo-footer { height: 26px; margin-bottom: 1rem; opacity: .9; }
.site-footer p { margin-bottom: .3rem; }
.site-footer .fine { font-size: .85rem; }

/* ===== Página de gracias ===== */
.page-gracias main { padding-top: 3.2rem; }
.check-icon {
  width: 84px; height: 84px; margin: 0 auto 1.4rem;
  border-radius: 50%;
  background: rgba(37, 211, 102, .12); color: var(--verde-wsp);
  display: flex; align-items: center; justify-content: center;
}
.check-icon svg { width: 46px; height: 46px; }
.ahora-que { margin-top: 2.2rem; }
.promise-card {
  background: var(--gris-claro);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  margin: 1.6rem auto;
  max-width: 460px;
  text-align: left;
}
.promise-title { font-weight: 500; }
.promise-list { list-style: none; display: grid; gap: .7rem; margin: .8rem 0 1.1rem; }
.promise-list li { display: flex; align-items: flex-start; gap: .65rem; color: var(--azul-noche); }
.promise-check { width: 20px; height: 20px; flex-shrink: 0; color: var(--verde-wsp); margin-top: .15rem; }
.promise-word { font-weight: 500; margin: 0; }

/* ===== Accesibilidad / movimiento reducido ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
