/* ==========================================================================
   lead-popup.css — Popup de captura de correo que entrega el checklist en PDF.
   Paleta tomada de la portada del propio PDF: fondo #221A14, acento #E9A13B.
   Todo va con prefijo .bl- para no chocar con main.css.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&display=swap');

.bl-root {
  --bl-bg:      #221A14;
  --bl-bg-2:    #2b211a;
  --bl-acc:     #E9A13B;
  --bl-acc-dim: rgba(233, 161, 59, .16);
  --bl-txt:     #f3ece5;
  --bl-mut:     #a4917f;
  --bl-line:    #3d3025;
  --bl-err:     #e59090;
  --bl-ok:      #8fd18f;
  --bl-head:    Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bl-body:    Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(12, 8, 5, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: var(--bl-body);
}

.bl-root.is-open { opacity: 1; visibility: visible; }

/* Bloqueo de scroll del documento mientras el popup está abierto. */
html.bl-locked, body.bl-locked { overflow: hidden !important; }

/* ── Caja ─────────────────────────────────────────────────────────── */

.bl-box {
  position: relative;
  width: 100%;
  max-width: 880px;
  background: var(--bl-bg);
  color: var(--bl-txt);
  border: 1px solid var(--bl-line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .75);
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateY(14px) scale(.985);
  transition: transform .32s cubic-bezier(.2, .8, .3, 1);
}

.bl-root.is-open .bl-box { transform: none; }

/* ── Cerrar ───────────────────────────────────────────────────────── */

.bl-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bl-line);
  border-radius: 50%;
  background: rgba(34, 26, 20, .78);
  color: var(--bl-mut);
  cursor: pointer;
  padding: 0;
  line-height: 0;
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}

.bl-close:hover { color: var(--bl-acc); border-color: var(--bl-acc); transform: rotate(90deg); }
.bl-close:focus-visible { outline: 2px solid var(--bl-acc); outline-offset: 2px; }
.bl-close svg { width: 15px; height: 15px; }

/* ── Columna izquierda: mockup de la portada ──────────────────────── */

.bl-cover {
  position: relative;
  display: grid;
  place-items: center;
  padding: 38px 30px;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(233, 161, 59, .16) 0%, transparent 58%),
    linear-gradient(160deg, #2b211a 0%, #1c1510 100%);
  border-right: 1px solid var(--bl-line);
}

.bl-cover-shot {
  position: relative;
  width: min(230px, 68%);
  aspect-ratio: 720 / 932;
  border-radius: 6px 10px 10px 6px;
  overflow: hidden;
  transform: rotate(-3deg);
  box-shadow: 0 26px 46px -16px rgba(0, 0, 0, .8), 0 2px 0 rgba(255, 255, 255, .06) inset;
  transition: transform .4s cubic-bezier(.2, .8, .3, 1);
}

.bl-box:hover .bl-cover-shot { transform: rotate(-1deg) translateY(-4px); }

.bl-cover-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Lomo del "cuadernillo": lo que convierte la captura en un mockup. */
.bl-cover-shot::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .12) 55%, transparent 100%);
  pointer-events: none;
}

.bl-cover-tag {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bl-acc);
  color: #221A14;
  font-family: var(--bl-head);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .04em;
  white-space: nowrap;
  box-shadow: 0 10px 22px -8px rgba(233, 161, 59, .6);
}

/* ── Columna derecha: formulario ──────────────────────────────────── */

.bl-panel { padding: 40px 36px 34px; display: flex; flex-direction: column; justify-content: center; }

.bl-eyebrow {
  display: inline-block;
  font-family: var(--bl-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bl-acc);
  margin-bottom: 12px;
}

.bl-title {
  font-family: var(--bl-head);
  font-weight: 600;
  font-size: clamp(21px, 2.4vw, 26px);
  line-height: 1.22;
  margin: 0 0 12px;
  color: #fff;
}

.bl-title em { font-style: normal; color: var(--bl-acc); }

.bl-text { margin: 0 0 22px; color: #cdbfb1; font-size: 14.5px; line-height: 1.6; }

.bl-perks { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; }

.bl-perks li {
  position: relative;
  padding-left: 24px;
  font-size: 13.5px;
  color: #cdbfb1;
  line-height: 1.5;
}

.bl-perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bl-acc-dim);
  box-shadow: inset 0 0 0 1.5px var(--bl-acc);
}

/* ── Campos ───────────────────────────────────────────────────────── */

.bl-form { display: grid; gap: 12px; }

.bl-field { display: grid; gap: 6px; }

.bl-field label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--bl-mut);
}

.bl-field input[type="text"],
.bl-field input[type="email"] {
  width: 100%;
  background: var(--bl-bg-2);
  border: 1px solid var(--bl-line);
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--bl-txt);
  font: inherit;
  font-size: 15px;      /* 16px o más evita el zoom automático de iOS al enfocar */
  line-height: 1.3;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.bl-field input::placeholder { color: #7a6a5c; }

.bl-field input:focus {
  outline: none;
  border-color: var(--bl-acc);
  box-shadow: 0 0 0 3px rgba(233, 161, 59, .17);
}

.bl-field.has-error input { border-color: var(--bl-err); }

/* Honeypot: fuera de la vista y del foco, pero presente en el DOM. */
.bl-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.bl-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--bl-mut);
  cursor: pointer;
}

/* Casilla propia: la nativa se ve como un cuadro blanco sobre el fondo oscuro. */
.bl-check input {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  cursor: pointer;
  border: 1.5px solid var(--bl-line);
  border-radius: 5px;
  background: var(--bl-bg-2);
  display: grid;
  place-content: center;
  transition: background .15s ease, border-color .15s ease;
}

.bl-check input::after {
  content: "";
  width: 10px;
  height: 6px;
  border: 2px solid #221A14;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform .15s ease;
}

.bl-check input:checked { background: var(--bl-acc); border-color: var(--bl-acc); }
.bl-check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.bl-check input:focus-visible { outline: 2px solid var(--bl-acc); outline-offset: 2px; }
.bl-check.has-error input { border-color: var(--bl-err); }

.bl-check a { color: var(--bl-acc); text-decoration: underline; text-underline-offset: 2px; }
.bl-check.has-error { color: var(--bl-err); }

/* ── Botón ────────────────────────────────────────────────────────── */

.bl-submit {
  margin-top: 6px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--bl-acc);
  color: #221A14;
  font-family: var(--bl-head);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: filter .18s ease, transform .18s ease;
}

.bl-submit:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
.bl-submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bl-submit:disabled { opacity: .62; cursor: default; }

.bl-spin {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(34, 26, 20, .3);
  border-top-color: #221A14;
  border-radius: 50%;
  animation: bl-spin .7s linear infinite;
}

.bl-root.is-loading .bl-spin { display: block; }

@keyframes bl-spin { to { transform: rotate(360deg); } }

.bl-legal { margin: 12px 0 0; font-size: 11.5px; color: #7d6c5d; line-height: 1.5; text-align: center; }

/* ── Mensajes ─────────────────────────────────────────────────────── */

.bl-msg {
  display: none;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 13.5px;
  line-height: 1.5;
  background: rgba(229, 144, 144, .12);
  border: 1px solid rgba(229, 144, 144, .35);
  color: var(--bl-err);
}

.bl-msg.is-on { display: block; }
.bl-msg a { color: inherit; }

/* ── Éxito (reemplaza al formulario dentro del mismo popup) ───────── */

.bl-done { display: none; text-align: center; padding: 8px 0; }
.bl-root.is-done .bl-form-wrap { display: none; }
.bl-root.is-done .bl-done { display: block; }

.bl-done-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bl-acc-dim);
  color: var(--bl-acc);
}

.bl-done-icon svg { width: 28px; height: 28px; }
.bl-done h3 { font-family: var(--bl-head); font-weight: 600; font-size: 20px; margin: 0 0 10px; color: #fff; }
.bl-done p { margin: 0 0 8px; color: #cdbfb1; font-size: 14.5px; line-height: 1.6; }
.bl-done .bl-hint { color: var(--bl-mut); font-size: 12.5px; }
.bl-done .bl-hint a { color: var(--bl-acc); }

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .bl-root { padding: 0; place-items: end stretch; }

  .bl-box {
    grid-template-columns: 1fr;
    max-width: none;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    max-height: 94dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(24px);
  }

  /* En vertical la portada pasa a ser una tira horizontal: así el botón de
     enviar sigue entrando en pantalla sin hacer scroll dentro del popup. */
  .bl-cover {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--bl-line);
    padding: 14px 60px 14px 18px;
  }

  .bl-cover-shot { width: 62px; transform: rotate(-2deg); }
  .bl-cover-tag { position: static; transform: none; margin: 0; }
  .bl-panel { padding: 22px 20px 26px; }
  .bl-perks { display: none; }          /* los beneficios ya están en el titular */
  .bl-text { margin-bottom: 18px; }
}

/* 360 px: el ancho al que se prueba todo. */
@media (max-width: 380px) {
  .bl-panel { padding: 20px 16px 24px; }
  .bl-cover { padding: 12px 52px 12px 16px; gap: 12px; }
  .bl-cover-shot { width: 54px; }
  .bl-cover-tag { font-size: 11px; padding: 6px 12px; }
  .bl-title { font-size: 20px; }
  .bl-text { font-size: 13.8px; margin-bottom: 16px; }
  .bl-close { top: 8px; right: 8px; width: 34px; height: 34px; }
}

/* Pantallas bajas: que el popup nunca deje el botón fuera de vista. */
@media (max-height: 720px) and (min-width: 761px) {
  .bl-panel { padding: 28px 32px 26px; }
  .bl-perks { display: none; }
  .bl-cover-shot { width: min(190px, 60%); }
}

@media (prefers-reduced-motion: reduce) {
  .bl-root, .bl-box, .bl-cover-shot, .bl-close, .bl-submit { transition: none; }
  .bl-spin { animation-duration: 2s; }
}
