/* =====================================================================
   M8 Partners · Sorteio XP Expert
   Design system portado da apresentação: conceito "altitude/cume".
   Archivo · azul #2743e8 SÓLIDO (nunca glow) · radius 0 · hairlines que
   dissolvem nas pontas · labels em caps com tracking largo · grain sutil.
   ===================================================================== */

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

:root {
  --blue:   #2743e8;
  --blue-2: #1c31c4;
  --ink:    #0b0d12;   /* fundo */
  --ink-2:  #0f1219;
  --surface:#12151e;   /* painéis */
  --surface-2:#161b28;
  --paper:  #eef0f4;   /* texto primário */
  --mist:   #9aa0ae;   /* texto secundário */
  --fog:    #5a6072;   /* texto terciário / labels */
  --line:   rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --ok:     #3f9f74;
  --err:    #c9564a;
  --f: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f);
  background: var(--ink);
  color: var(--paper);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grão sutil sobre tudo (não intercepta cliques) */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Brilho de cume: um leve gradiente azul no topo */
body::after {
  content: "";
  position: fixed; inset: 0 0 auto 0;
  height: 42vh; z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% -20%, rgba(39,67,232,.18), transparent 60%);
}

/* ---------- layout ---------- */
.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- topo / marca ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 88px; color: var(--paper); flex: none; }
.brand .logo svg { display: block; width: 100%; height: auto; }
.brand .sep { width: 1px; height: 26px; background: var(--line-2); }
.brand .kicker { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--fog); line-height: 1.4; }
.brand .expert-logo { height: 19px; width: auto; display: block; opacity: .92; }

.hairline {
  height: 1px; border: 0; margin: 20px 0;
  background: linear-gradient(90deg, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent);
}

/* ---------- herói ---------- */
.hero { margin-top: 6px; }
.hero .label {
  display: inline-block;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(30px, 8.5vw, 40px);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.05;
  margin: 0 0 12px;
}
.hero p {
  color: var(--mist);
  font-size: 15px;
  margin: 0;
  max-width: 40ch;
}

/* ---------- quiz (respondido no site) ---------- */
.quiz { margin-top: 26px; }
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.qprog { display: flex; gap: 8px; }
.qprog i { width: 26px; height: 3px; background: var(--line-2); display: block; transition: background .25s; }
.qprog i.on { background: var(--blue); }
.qcount { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--fog); font-weight: 600; white-space: nowrap; }
.qtext { font-size: clamp(19px, 5.4vw, 23px); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 20px; }

.qopts { display: flex; flex-direction: column; gap: 10px; }
.qopt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  font-family: var(--f); font-size: 15px; color: var(--paper);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 0;
  padding: 15px 16px; cursor: pointer; transition: border-color .15s, background .15s;
}
.qopt:hover { border-color: var(--mist); }
.qopt .k { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--mist); }
.qopts.locked .qopt { cursor: default; pointer-events: none; }
.qopt.ok { border-color: var(--ok); background: rgba(63,159,116,.12); }
.qopt.ok .k { border-color: var(--ok); color: var(--ok); }
.qopt.no { border-color: var(--err); background: rgba(201,86,74,.1); }
.qopt.no .k { border-color: var(--err); color: var(--err); }

.qfeed { display: none; margin-top: 16px; padding: 14px 15px; background: var(--surface); border: 1px solid var(--line); }
.qfeed.show { display: block; animation: rise .3s ease both; }
.qfeed b { display: block; font-size: 14px; margin-bottom: 6px; }
.qfeed b.ok { color: var(--ok); }
.qfeed b.no { color: var(--err); }
.qfeed p { margin: 0; font-size: 13.5px; color: var(--mist); line-height: 1.55; }
#qnext { margin-top: 18px; }

/* ---------- formulário ---------- */
form { margin-top: 24px; }
.field { margin-bottom: 18px; }
.field > label:not(.consent) {
  display: block;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fog); font-weight: 600;
  margin-bottom: 8px;
}
.field > label .opt { color: var(--fog); opacity: .7; letter-spacing: .04em; text-transform: none; font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  font-family: var(--f);
  font-size: 16px;              /* >=16px evita zoom no iOS */
  color: var(--paper);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 0;
  padding: 14px 15px;
  transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
input::placeholder { color: var(--fog); }
input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--surface-2);
}
input[aria-invalid="true"] { border-color: var(--err); }

.err-msg {
  display: none;
  color: var(--err);
  font-size: 12.5px;
  margin-top: 7px;
}
.field.invalid .err-msg { display: block; }

/* honeypot escondido */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* consentimento */
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 6px; cursor: pointer; text-transform: none; letter-spacing: normal; font-weight: 400; }
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent .box {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 1px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center; transition: .15s;
}
.consent .box svg { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.6); transition: .15s; }
.consent input:checked + .box { background: var(--blue); border-color: var(--blue); }
.consent input:checked + .box svg { opacity: 1; transform: scale(1); }
.consent input:focus-visible + .box { outline: 2px solid var(--blue); outline-offset: 2px; }
.consent .txt { font-size: 12.5px; color: var(--mist); line-height: 1.5; }
.consent .txt a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
.field.invalid .consent .box { border-color: var(--err); }

/* botão */
.btn {
  width: 100%;
  font-family: var(--f);
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 0;
  padding: 17px 20px;
  margin-top: 18px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--blue-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn .spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; display: none;
}
.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-label { opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }

/* erro geral do form */
.form-error {
  display: none;
  margin-top: 14px; padding: 12px 14px;
  background: rgba(201,86,74,.1); border: 1px solid rgba(201,86,74,.4);
  color: #e79b92; font-size: 13px;
}
.form-error.show { display: block; }

/* ---------- estado de sucesso ---------- */
.success { display: none; text-align: center; padding: 8px 0; }
.success.show { display: block; animation: rise .4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.success .check {
  width: 66px; height: 66px; margin: 10px auto 22px;
  border: 1px solid var(--blue); background: rgba(39,67,232,.12);
  display: grid; place-items: center;
}
.success .check svg { width: 30px; height: 30px; color: var(--blue); }
.success h2 { font-size: 26px; font-weight: 600; margin: 0 0 10px; letter-spacing: -.01em; }
.success p { color: var(--mist); font-size: 15px; margin: 0 auto; max-width: 34ch; }
.success .badge {
  display: inline-block; margin-top: 22px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--fog);
  border: 1px solid var(--line); padding: 8px 14px;
}

/* ---------- rodapé ---------- */
.foot {
  margin-top: auto; padding-top: 28px;
  font-size: 11px; color: var(--fog); line-height: 1.6;
}
.foot .sig { letter-spacing: .16em; text-transform: uppercase; color: var(--mist); }

/* utilitário */
.spacer { flex: 1; }
