/* ============================================================
   Captura de Leads — patrickviaja.com
   Usa os tokens já definidos em :root da LP (--black, --gold, etc.)
   Fallbacks inclusos para funcionar também na LP da isca.
   ============================================================ */

/* Lê os tokens da LP nova (--accent/--raised/...) primeiro e cai nos
   tokens da LP antiga (--gold/--card/...) depois, com literal por último.
   Assim o mesmo arquivo serve as duas páginas sem fork.
   Sem isto, na paleta clara o botão herdava o laranja escuro da paleta
   escura e o texto branco caía para 2.38:1 (medido). */
.pv-cap {
  --_gold:      var(--accent,       var(--gold,       #E8954A));
  --_gold-dark: var(--accent-hover, var(--gold-dark,  #C9773A));
  --_on-gold:   var(--on-accent,                      #0D1B2A);
  --_white:     var(--text,         var(--white,      #F5F0E8));
  --_gray:      var(--text-3,       var(--gray,       #A8B8C4));
  --_card:      var(--raised,       var(--card,       #2E3B42));
  --_black:     var(--bg,           var(--black,      #0D1B2A));
  --_line:      var(--line,         var(--gray-light, rgba(255, 255, 255, .10)));
  --_err:       var(--err,                            #C8372D);
}

/* ---------- Bloco inline ---------- */
.pv-cap-inline {
  background: var(--_card);
  border: 1px solid var(--_line);
  border-left: 3px solid var(--_gold);
  border-radius: 6px;
  padding: 40px;
  max-width: 680px;
  margin: 0 auto;
}

.pv-cap-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--_gold);
  margin: 0 0 14px;
}

.pv-cap-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--_white);
  margin: 0 0 12px;
}

.pv-cap-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--_gray);
  margin: 0 0 26px;
}

.pv-cap-sub strong { color: var(--_white); font-weight: 500; }

/* ---------- Formulário ---------- */
.pv-cap-form { display: flex; flex-direction: column; gap: 12px; }

.pv-cap-row { display: flex; gap: 12px; }
.pv-cap-row > * { flex: 1; }

.pv-cap-field { position: relative; }

.pv-cap-label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pv-cap-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(13, 27, 42, .55);
  border: 1px solid var(--_line);
  border-radius: 4px;
  padding: 16px 18px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;   /* 16px evita zoom automático no iOS */
  font-weight: 300;
  color: var(--_white);
  transition: border-color .18s ease, background .18s ease;
}

.pv-cap-input::placeholder { color: var(--_gray); opacity: .75; }

.pv-cap-input:focus-visible {
  outline: none;
  border-color: var(--_gold);
  background: rgba(13, 27, 42, .85);
}

.pv-cap-input[aria-invalid="true"] { border-color: var(--_err); }

/* honeypot */
.pv-cap-hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  pointer-events: none;
}

.pv-cap-btn {
  appearance: none;
  border: 0;
  background: var(--_gold);
  /* Texto ESCURO no laranja: #fff sobre #E8954A dá 2.38:1 e falha o AA
     (mínimo 4.5). Escuro dá 7.31:1 — e é o elemento mais importante do
     bloco. --_on-gold acompanha a paleta ativa da página. */
  color: var(--_on-gold);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 17px 32px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.pv-cap-btn:hover { background: var(--_gold-dark); }
.pv-cap-btn:active { transform: translateY(1px); }
.pv-cap-btn:focus-visible { outline: 2px solid var(--_white); outline-offset: 2px; }
.pv-cap-btn[disabled] { opacity: .6; cursor: progress; }

.pv-cap-fine {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--_gray);
  margin: 4px 0 0;
}

.pv-cap-error {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--_err);
  margin: 0;
  min-height: 0;
}

.pv-cap-error:empty { display: none; }

/* ---------- Estado de sucesso ---------- */
.pv-cap-done {
  text-align: center;
  padding: 18px 0;
}

.pv-cap-done-check {
  font-size: 40px;
  line-height: 1;
  color: var(--_gold);
  margin-bottom: 14px;
}

.pv-cap-done h3 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--_white);
  margin: 0 0 10px;
}

.pv-cap-done p {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--_gray);
  margin: 0;
  line-height: 1.6;
}

/* ---------- Modal exit-intent ---------- */
.pv-cap-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 27, 42, .88);
  backdrop-filter: blur(6px);
}

.pv-cap-modal[data-open="true"] { display: flex; }

.pv-cap-modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: pvCapIn .28s ease;
}

@keyframes pvCapIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pv-cap-modal-box { animation: none; }
}

.pv-cap-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 1;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--_line);
  border-radius: 4px;
  color: var(--_gray);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease;
}

.pv-cap-close:hover { color: var(--_white); border-color: var(--_white); }
.pv-cap-close:focus-visible { outline: 2px solid var(--_gold); outline-offset: 2px; }

/* ---------- Barra sticky mobile ---------- */
.pv-cap-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--_card);
  border-top: 1px solid var(--_line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
  transform: translateY(110%);
  transition: transform .3s ease;
}

.pv-cap-bar[data-open="true"] { transform: none; }

.pv-cap-bar-txt {
  flex: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.35;
  color: var(--_white);
  margin: 0;
}

.pv-cap-bar-btn {
  flex-shrink: 0;
  background: var(--_gold);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.pv-cap-bar-close {
  flex-shrink: 0;
  background: none;
  border: 0;
  color: var(--_gray);
  font-size: 22px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

@media (max-width: 767px) {
  .pv-cap-bar { display: flex; }
  .pv-cap-inline { padding: 28px 22px; }
  .pv-cap-row { flex-direction: column; }
}
