/* Liga da IA · formulário de perfil. Tema claro apenas. Tokens em DESIGN-SYSTEM.md. */
:root {
  color-scheme: light;
  --canvas: #FFFFFF;
  --ink: #0B3B30;
  --jade: #1DBF85;
  --mint: #CFF2E0;
  --page: var(--canvas);
  --text: var(--ink);
  --soft: var(--mint);
  --contrast: var(--ink);
  --contrast-text: var(--canvas);
  --muted: color-mix(in srgb, var(--text) 76%, var(--page));
  --line: color-mix(in srgb, var(--text) 18%, var(--page));
  --control-line: color-mix(in srgb, var(--text) 58%, var(--page));
  --quiet: color-mix(in srgb, var(--text) 4%, var(--page));
  --error: #B42318;
  --sans: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font: 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 0.22em; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
h1, h2, h3, p, fieldset, legend, ol { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
em, i { font-style: normal; }
::selection { color: var(--ink); background: var(--mint); }

.wrap { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 10; inset: 12px auto auto 12px; padding: 10px 14px; background: var(--page); }
.dot { color: var(--jade); }
.muted { color: var(--muted); }
.mono, .eyebrow { font-family: var(--mono); }
.eyebrow { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; font-weight: 750; font-size: 1.04rem; letter-spacing: -0.012em; }
.brand-mark { width: 34px; height: 34px; margin-right: 10px; background: var(--ink); mask: url('liga.svg') center / contain no-repeat; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(36px, 6vw, 72px) 80px;
}
.intro { position: sticky; top: 32px; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font: 0.7rem/1.5 var(--mono); }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--jade); }
.intro h1 { margin: 20px 0 18px; font-size: clamp(3rem, 6vw, 5.2rem); line-height: 1; font-weight: 700; letter-spacing: -0.06em; }
.lead { max-width: 38ch; color: var(--muted); font-size: 1.04rem; }

.steps { display: grid; gap: 2px; margin-top: 34px; list-style: none; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--muted); font-size: 0.9rem; }
.steps .num { font: 0.72rem var(--mono); }
.steps li[aria-current="step"] { background: var(--soft); color: var(--text); font-weight: 700; }
.steps li.feita { color: var(--text); }
.steps li.feita .num::after { content: " ✓"; color: var(--text); }

.panel { min-width: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.progress { height: 4px; background: var(--quiet); }
.progress span { display: block; width: 0; height: 100%; background: var(--jade); transition: width 220ms ease-out; }
form { padding: clamp(22px, 4vw, 40px); }
.loading { color: var(--muted); }

.etapa-head { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.etapa-head .eyebrow { color: var(--muted); }
.etapa-head h2 { margin: 8px 0 6px; font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.05em; font-weight: 650; }
.etapa-head p { color: var(--muted); font-size: 0.95rem; }

.campo { display: grid; gap: 8px; margin-bottom: 28px; }
.campo > label, .campo legend { font-weight: 650; font-size: 0.98rem; line-height: 1.4; }
.campo legend { margin-bottom: 8px; }
.opcional { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.ajuda { color: var(--muted); font-size: 0.84rem; margin-top: -4px; }
.campo legend + .ajuda { margin: -6px 0 12px; }
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"], .campo textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--control-line);
  border-radius: 9px;
  background: var(--page);
}
.campo textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.campo input:focus-visible, .campo textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.campo [aria-invalid="true"] { border-color: var(--error); }

.opcoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opcao { position: relative; display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.92rem; line-height: 1.35; cursor: pointer; }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.marca { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--control-line); border-radius: 5px; background: var(--page); font-size: 0.7rem; line-height: 1; color: transparent; }
.opcao input[type="radio"] + .marca { border-radius: 50%; }
.opcao:hover { border-color: var(--control-line); background: var(--quiet); }
.opcao:has(input:checked) { border-color: var(--ink); background: var(--soft); font-weight: 650; }
.opcao:has(input:checked) .marca { border-color: var(--ink); background: var(--ink); color: var(--mint); }
.opcao:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.opcao:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.opcao:has(input:disabled):hover { background: transparent; border-color: var(--line); }
.outro-texto { grid-column: 1 / -1; }
.contador { font: 0.72rem var(--mono); color: var(--muted); }

.escala { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.escala .opcao { justify-content: center; font: 600 1.05rem var(--mono); }
.escala .marca { display: none; }
.escala-rotulos { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.8rem; }

.campo:has(.consentimento) { margin: 8px 0 20px; }
.campo > .consentimento { display: flex; font-weight: 400; gap: 9px; align-items: flex-start; color: var(--muted); font-size: 0.8rem; line-height: 1.45; cursor: pointer; }
.consentimento input { width: 15px; height: 15px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }

.erro { display: flex; gap: 6px; color: var(--error); font-size: 0.85rem; font-weight: 600; }
.erro::before { content: "!"; display: grid; place-items: center; flex: none; width: 17px; height: 17px; margin-top: 2px; border-radius: 50%; background: var(--error); color: #FFFFFF; font-size: 0.7rem; }
.form-error { margin-bottom: 18px; padding: 12px 14px; border: 1px solid var(--error); border-radius: 9px; color: var(--error); font-size: 0.9rem; font-weight: 600; }

.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.step-count { font-size: 0.75rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--page);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { border-color: var(--control-line); text-decoration: underline; }
.button.primary { border-color: var(--ink); background: var(--ink); color: var(--mint); }
.button.primary:disabled { opacity: 0.6; cursor: progress; }
.button[hidden] { display: inline-flex !important; visibility: hidden; }

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

.done { padding: clamp(26px, 5vw, 48px); }
.done:focus { outline: none; }
.done h2 { margin: 18px 0 10px; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; letter-spacing: -0.06em; }
.done > p { max-width: 46ch; color: var(--muted); }
.done-card { margin-top: 30px; padding: 24px; border-radius: 14px; background: var(--contrast); color: var(--contrast-text); }
.done-card .eyebrow { color: var(--mint); }
.done-card p + p { margin-top: 6px; }
.done-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.button.on-contrast { border-color: var(--mint); background: var(--mint); color: var(--ink); }
.done-card .button:focus-visible { outline-color: var(--contrast-text); }

.footer { border-top: 1px solid var(--line); font-size: 0.8rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px 30px; padding-block: 22px 28px; }
.footer-inner .muted { max-width: 60ch; text-align: right; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 28px; }
  .intro { position: static; }
  .steps { display: none; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .masthead-inner { min-height: 62px; }
  .masthead .eyebrow { display: none; }
  .layout { padding-block: 28px 56px; }
  .intro h1 { font-size: clamp(2.7rem, 13vw, 3.6rem); }
  .panel { border-radius: 14px; }
  form { padding: 20px 16px; }
  .opcoes { grid-template-columns: 1fr; }
  .escala { gap: 6px; }
  .actions { flex-wrap: wrap; }
  .actions .step-count { order: -1; width: 100%; text-align: center; }
  .actions .button { flex: 1; }
  .footer-inner { flex-direction: column; }
  .footer-inner .muted { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .progress span { transition: none; } }
