/* ═══════════════════════════════════════════════════════════════════ MODAL COMPONENT Application form with multi-step flow — Máscara de telefone BR: (XX) XXXX-XXXX / (XX) 9 XXXX-XXXX — Validação de e-mail com regex + feedback visual em tempo real ═══════════════════════════════════════════════════════════════════ */ /* ─── Helpers de validação e máscara ─────────────────────────────── */ function maskPhone(raw) { const d = raw.replace(/\D/g, "").slice(0, 11); if (!d) return ""; if (d.length <= 2) return `(${d}`; if (d.length <= 6) return `(${d.slice(0,2)}) ${d.slice(2)}`; if (d.length <= 10) return `(${d.slice(0,2)}) ${d.slice(2,6)}-${d.slice(6)}`; /* 11 dígitos → celular: (XX) 9 XXXX-XXXX */ return `(${d.slice(0,2)}) ${d.slice(2,3)} ${d.slice(3,7)}-${d.slice(7)}`; } function isValidEmail(v) { return /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(v.trim()); } function isValidPhone(v) { const d = v.replace(/\D/g, ""); return d.length === 0 || d.length === 10 || d.length === 11; } /* ─── Campo com estado de validação ─────────────────────────────── */ function Field({ label, error, valid, children }) { return (
Quanto mais específico, melhor o diagnóstico na sessão.
> )} {/* ── Step 2: Identidade ── */} {step === 2 && ( <>Suas informações são confidenciais. Em até{" "} 48h úteis, um de nossos sócios responde se há fit.
> )}Obrigado,{" "} {data.name.split(" ")[0] || "estrategista"} . Se houver fit com nossa metodologia, retornaremos em até{" "} 48h úteis.