/* ==========================================================================
   ECHEV — formulário de lead (site e funis)
   Um único componente: valida, envia para api/lead.php e cai no painel admin.
   ========================================================================== */

.lf-card {
  --lf-bg: #12203a;
  --lf-field: #0c1729;
  --lf-line: #2a4061;
  --lf-text: #edf2f8;
  --lf-muted: #9fb2ca;
  --lf-accent: #F28F38;
  --lf-accent-ink: #1d1206;
  --lf-ok: #3ccf8e;
  --lf-err: #ff8a7a;
  position: relative;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(33,104,166,.22), transparent 60%),
    var(--lf-bg);
  border: 1px solid var(--lf-line);
  border-radius: 18px;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 24px 60px -24px rgba(4,10,22,.85), inset 0 1px 0 rgba(255,255,255,.05);
  color: var(--lf-text);
}
.lf-card::before {
  content: ''; position: absolute; left: 1.5rem; right: 1.5rem; top: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--lf-accent), transparent);
  border-radius: 2px;
}
.lf-head h3 {
  font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--lf-text);
  font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.25; margin: 0 0 .35rem; text-wrap: balance;
}
.lf-head p { color: var(--lf-muted); font-size: .88rem; line-height: 1.55; margin: 0 0 1.25rem; }

.lf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1rem; }
.lf-full { grid-column: 1 / -1; }
.lf-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.lf-field > span { font-size: .8rem; font-weight: 600; color: var(--lf-muted); }
.lf-field > span b { color: var(--lf-accent); font-weight: 700; }
.lf-field input, .lf-field select, .lf-field textarea {
  width: 100%; background: var(--lf-field); color: var(--lf-text);
  border: 1.5px solid var(--lf-line); border-radius: 10px;
  padding: .75rem .9rem; font: 500 .92rem/1.4 Inter, system-ui, sans-serif;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.lf-field textarea { resize: vertical; min-height: 84px; }
.lf-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239fb2ca' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.2rem; cursor: pointer;
}
.lf-field select option { background: #0c1729; color: #edf2f8; }
.lf-field input::placeholder, .lf-field textarea::placeholder { color: #6f86a3; }
.lf-field input:hover, .lf-field select:hover, .lf-field textarea:hover { border-color: #3b5780; }
.lf-field input:focus, .lf-field select:focus, .lf-field textarea:focus {
  outline: none; border-color: var(--lf-accent); box-shadow: 0 0 0 3px rgba(242,143,56,.18); background: #0e1b30;
}
.lf-field.bad input, .lf-field.bad select, .lf-field.bad textarea { border-color: var(--lf-err); }
.lf-msg { font-size: .76rem; color: var(--lf-err); min-height: 0; }
.lf-msg:empty { display: none; }

/* armadilha para robôs: invisível para pessoas e leitores de tela */
.lf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.lf-submit {
  margin-top: 1.1rem; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  background: var(--lf-accent); color: var(--lf-accent-ink);
  font: 700 1rem/1 'Poppins', sans-serif; letter-spacing: .01em; white-space: nowrap;
  padding: 1rem 1.25rem; border: 0; border-radius: 12px; cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(242,143,56,.75);
  transition: transform .18s, box-shadow .25s, background .2s;
}
.lf-submit:hover { background: #f59d4f; transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(242,143,56,.85); }
.lf-submit:active { transform: translateY(1px) scale(.99); }
.lf-submit:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lf-submit[disabled] { opacity: .75; cursor: progress; transform: none; }
.lf-spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(29,18,6,.25); border-top-color: var(--lf-accent-ink); animation: lfSpin .7s linear infinite; }
@keyframes lfSpin { to { transform: rotate(360deg); } }

.lf-note { margin: .85rem 0 0; font-size: .74rem; line-height: 1.55; color: var(--lf-muted); }
.lf-note i { color: var(--lf-ok); margin-right: .3rem; }

.lf-alert {
  margin-top: .9rem; padding: .8rem .95rem; border-radius: 10px; font-size: .84rem; line-height: 1.55;
  background: rgba(255,138,122,.1); border: 1px solid rgba(255,138,122,.35); color: #ffd3cc;
}
.lf-alert a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* estado enviado */
.lf-done { text-align: left; animation: lfIn .5s cubic-bezier(.2,.7,.2,1) both; }
.lf-done[hidden] { display: none; }
.lf-check {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(60,207,142,.12); color: var(--lf-ok); font-size: 1.5rem; margin-bottom: 1rem;
}
.lf-check svg { width: 28px; height: 28px; }
.lf-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: lfDraw .6s .15s ease-out forwards; }
@keyframes lfDraw { to { stroke-dashoffset: 0; } }
@keyframes lfIn { from { opacity: 0; transform: translateY(10px); } }
.lf-done h3 { font-family: 'Poppins', sans-serif; font-size: 1.25rem; color: var(--lf-text); margin: 0 0 .4rem; }
.lf-done p { color: var(--lf-muted); font-size: .9rem; line-height: 1.6; margin: 0; }
.lf-done ol { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .55rem; }
.lf-done li { counter-increment: s; display: grid; grid-template-columns: 1.6rem 1fr; gap: .5rem; font-size: .86rem; color: var(--lf-muted); line-height: 1.5; }
.lf-done li::before { content: counter(s); width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: rgba(242,143,56,.15); color: var(--lf-accent); }
.lf-wa {
  margin-top: 1.25rem; display: inline-flex; align-items: center; gap: .55rem;
  background: #25d366; color: #06280f; font: 700 .92rem/1 'Poppins', sans-serif;
  padding: .85rem 1.2rem; border-radius: 11px; text-decoration: none; white-space: nowrap;
  transition: transform .18s, filter .2s;
}
.lf-wa:hover { transform: translateY(-1px); filter: brightness(1.05); }

@media (max-width: 560px) {
  .lf-grid { grid-template-columns: 1fr; }
  .lf-card { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-done, .lf-check path { animation: none; stroke-dashoffset: 0; }
}
