/* Stratus IA — modal de captura de lead (abre no lugar dos links do WhatsApp) */
.lead {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center; padding: 24px;
  visibility: hidden; pointer-events: none;
}
.lead.is-open { visibility: visible; pointer-events: auto; }
.lead__backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 6, 13, 0.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .35s var(--ease, ease);
}
.lead.is-open .lead__backdrop { opacity: 1; }

.lead__box {
  position: relative; width: min(460px, 100%);
  max-height: calc(100svh - 48px); overflow-y: auto; overscroll-behavior: contain;
  padding: 32px 30px 28px;
  background: linear-gradient(180deg, #0F1521 0%, var(--bg-2, #0A0E16) 100%);
  border: 1px solid var(--line-2, rgba(255,255,255,.16));
  border-radius: 22px;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(77, 163, 255, .06) inset;
  color: var(--text, #F2F4F7); font-family: var(--font, system-ui, sans-serif);
  opacity: 0; transform: translateY(24px);
  transition: opacity .35s var(--ease, ease), transform .45s var(--ease, ease);
}
.lead.is-open .lead__box { opacity: 1; transform: none; }

.lead__close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid var(--line, rgba(255,255,255,.08));
  color: var(--muted, rgba(242,244,247,.64)); cursor: pointer; transition: background .2s, color .2s;
}
.lead__close:hover { background: rgba(255,255,255,.12); color: var(--text, #fff); }
.lead__close svg { width: 16px; height: 16px; }

.lead__tag {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font: 600 12px/1 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase;
  color: var(--wa-green, #00A884);
}
.lead__tag svg { width: 16px; height: 16px; }
.lead__title { margin: 0 0 8px; font-size: clamp(22px, 3vw, 26px); line-height: 1.15; font-weight: 650; letter-spacing: -.02em; }
.lead__sub { margin: 0 0 22px; font-size: 15px; line-height: 1.5; color: var(--muted, rgba(242,244,247,.64)); }

.lead__form { display: grid; gap: 14px; }
.lead__field { display: grid; gap: 6px; }
.lead__field > span { font-size: 13px; font-weight: 500; color: var(--muted, rgba(242,244,247,.64)); }
.lead__field input, .lead__field select {
  width: 100%; height: 48px; padding: 0 14px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2, rgba(255,255,255,.16)); border-radius: 12px;
  color: var(--text, #fff); font: 400 16px/1 var(--font, system-ui, sans-serif); /* 16px evita zoom no iPhone */
  transition: border-color .2s, background .2s; appearance: none; -webkit-appearance: none;
}
.lead__field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23F2F4F7' stroke-opacity='.6' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.lead__field select option { background: #0F1521; color: #F2F4F7; }
.lead__field input::placeholder { color: var(--dim, rgba(242,244,247,.32)); }
.lead__field input:focus, .lead__field select:focus {
  outline: none; border-color: var(--accent, #4DA3FF); background: rgba(77,163,255,.06);
}
.lead__field input[aria-invalid="true"] { border-color: #FF6B6B; }

.lead__check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--muted, rgba(242,244,247,.64)); cursor: pointer; }
.lead__check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent, #4DA3FF); }
.lead__check a { color: var(--text, #fff); text-decoration: underline; text-underline-offset: 2px; }

.lead__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.lead__submit {
  margin-top: 4px; height: 52px; width: 100%; border: 0; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--text, #F2F4F7); color: #03060D; font: 600 16px/1 var(--font, system-ui, sans-serif);
  transition: transform .2s var(--ease, ease), opacity .2s;
}
.lead__submit:hover { transform: translateY(-1px); }
.lead__submit:disabled { opacity: .6; cursor: progress; transform: none; }
.lead__submit .lead__spin { width: 18px; height: 18px; border: 2px solid rgba(3,6,13,.25); border-top-color: #03060D; border-radius: 50%; animation: lead-spin .7s linear infinite; display: none; }
.lead__submit.is-loading .lead__spin { display: block; }
@keyframes lead-spin { to { transform: rotate(360deg); } }

.lead__error { margin: 0; min-height: 0; font-size: 14px; color: #FF8A8A; }
.lead__error:empty { display: none; }
.lead__note { margin: 2px 0 0; font-size: 12px; text-align: center; color: var(--dim, rgba(242,244,247,.32)); }

/* estado de sucesso */
.lead__done { display: none; text-align: center; padding: 8px 0 4px; }
.lead.is-done .lead__form, .lead.is-done .lead__head { display: none; }
.lead.is-done .lead__done { display: block; }
.lead__ok {
  width: 64px; height: 64px; margin: 4px auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0,168,132,.14); color: var(--wa-green, #00A884);
}
.lead__ok svg { width: 30px; height: 30px; }
.lead__wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; margin-top: 6px;
  border-radius: 999px; background: var(--wa-green, #00A884); color: #fff; font: 600 16px/1 var(--font, system-ui, sans-serif);
  text-decoration: none; transition: transform .2s var(--ease, ease);
}
.lead__wa:hover { transform: translateY(-1px); }
.lead__wa svg { width: 20px; height: 20px; }

html.lead-lock, html.lead-lock body { overflow: hidden; }

/* celular: sobe de baixo, como uma folha */
@media (max-width: 640px) {
  .lead { padding: 0; place-items: end stretch; }
  .lead__box {
    width: 100%; max-height: 92svh; border-radius: 22px 22px 0 0; border-bottom: 0;
    padding: 28px 20px calc(22px + env(safe-area-inset-bottom));
    transform: translateY(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead__box, .lead__backdrop { transition: none; }
}
