:root {
  --blue: #5b3fd6;
  --blue-dark: #3f2a9e;
  --ink: #14181f;
  --muted: #5b6573;
  --line: #c9d1dc;
  --danger: #b42318;
  --ok: #067647;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #4a2fb8 url('/assets/fundo.jpg') right center / cover no-repeat fixed;
  display: flex;
  justify-content: flex-start;
  padding: 24px 16px 48px max(16px, 3vw);
}

.card {
  width: 100%;
  max-width: min(480px, 36vw);
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  align-self: flex-start;
}

h1 { margin: 0 0 8px; font-size: 1.6rem; line-height: 1.2; }
.lead { margin: 0 0 24px; color: var(--muted); line-height: 1.5; }

.field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
label, legend { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; }
.optional { font-weight: 400; color: var(--muted); }

input[type="text"], input[type="tel"], input[type="email"], input[type="file"] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

input:focus-visible, button:focus-visible {
  outline: 3px solid rgba(91, 63, 214, 0.45);
  outline-offset: 1px;
  border-color: var(--blue);
}

input[aria-invalid="true"] { border-color: var(--danger); }
input.is-valid { border-color: var(--ok); }

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
.option input { width: 20px; height: 20px; margin: 0; }
.option:has(input:checked) { border-color: var(--blue); background: #f1edff; }

.hint { margin: 6px 0 0; font-size: 0.9rem; color: var(--muted); min-height: 1.2em; }
.hint.ok { color: var(--ok); font-weight: 600; }
.hint.bad { color: var(--danger); }
.error { margin: 6px 0 0; font-size: 0.9rem; color: var(--danger); font-weight: 600; }
.form-error { margin: 0 0 14px; }

button[type="submit"] {
  width: 100%;
  font: inherit;
  font-weight: 700;
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
}
button[type="submit"]:hover { background: var(--blue-dark); }
button[type="submit"]:disabled { opacity: 0.6; cursor: progress; }

[hidden] { display: none !important; }

/* Campo-armadilha fora da tela (não usar display:none, robôs ignoram esse caso) */
.trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

#successView:focus { outline: none; }

@media (max-width: 1000px) {
  .card { max-width: 560px; }
  body { background-image: url('/assets/fundo-mobile.jpg'); background-position: 75% center; justify-content: center; padding-left: 16px; }
}
