/* Base compartilhada da LP Fiscais de Urna. Usa tokens.css e fonts.css (Urbanist embutida). */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--text-md); line-height: var(--lh-body);
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 800; line-height: var(--lh-snug); letter-spacing: -.015em; text-wrap: balance; }
p { max-width: 68ch; }
[hidden] { display: none !important; }

.container { width: min(100% - clamp(32px, 6vw, 80px), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }

/* etiqueta pequena com a barrinha tricolor (assinatura do brandbook) */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  font-size: var(--text-xs); font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 26px; height: 6px; border-radius: 3px; flex: none;
  background: linear-gradient(90deg, var(--green) 0 34%, var(--yellow) 34% 67%, var(--blue) 67%);
}
.eyebrow--light { color: var(--yellow); }
.eyebrow--dark { color: var(--blue); }

/* barra tricolor fina, assinatura de rodapé/divisor */
.tricolor { height: 6px; background: linear-gradient(90deg, var(--green) 0 34%, var(--yellow) 34% 67%, var(--blue) 67%); }

/* botões: um primário por tela */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 56px; padding: 0 var(--space-xl); border-radius: var(--radius-pill);
  font: inherit; font-size: var(--text-lg); font-weight: 800; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .35s var(--ease-out), background-color .2s, color .2s, box-shadow .35s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; }
.btn--primary { background: var(--yellow); color: var(--blue-deep); box-shadow: 0 12px 28px rgba(2, 10, 26, .28); }
.btn--primary:hover { background: #FFD534; transform: translateY(-2px); box-shadow: 0 18px 34px rgba(2, 10, 26, .32); }
.btn--green { background: var(--green-deep); color: var(--white); box-shadow: 0 12px 28px rgba(2, 10, 26, .22); }
.btn--green:hover { background: #0A7A33; transform: translateY(-2px); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: var(--line-light); }
.btn--ghost-light:hover { border-color: var(--white); }
.btn--ghost-dark { background: transparent; color: var(--blue); border-color: var(--line); }
.btn--ghost-dark:hover { border-color: var(--blue); }
.btn--sm { min-height: 44px; padding: 0 var(--space-lg); font-size: var(--text-sm); }
.btn .arrow { width: 1.1em; height: 1.1em; flex: none; }

/* campos de formulário */
.field { display: grid; gap: var(--space-2xs); }
.field label { font-size: var(--text-sm); font-weight: 700; color: var(--ink-2); }
.field input, .field select {
  font: inherit; font-size: var(--text-md); color: var(--ink);
  min-height: 54px; padding: 0 var(--space-md); border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23586A79' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 16px center; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 91, 170, .14); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--orange); }
.field .hint { font-size: var(--text-xs); color: var(--muted); }
.field .error { font-size: var(--text-xs); color: #B4560A; font-weight: 700; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: var(--space-sm); align-items: start; font-size: var(--text-sm); color: var(--ink-2); }
.check input { width: 26px; height: 26px; margin: 0; accent-color: var(--green); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== movimento (animate/overdrive): só transform e opacity ===== */
/* Animações de entrada só quando o motion.js liga o preset (?anim=on); por padrão tudo já nasce visível. */
html[data-anim="editorial"] .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; will-change: auto; }
html[data-anim="editorial"] .reveal--left { transform: translateX(-28px); }
html[data-anim="editorial"] .reveal--scale { transform: scale(.94); }
.reveal--none { transform: none; }

/* barra de progresso tricolor colada na nav (scroll-driven, sem JS; some onde não há suporte) */
.progresso { position: fixed; left: 0; top: 72px; z-index: 99; height: 4px; width: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--green) 0 34%, var(--yellow) 34% 67%, var(--blue-2) 67%); display: none; }
@supports (animation-timeline: scroll()) {
  .progresso { display: block; animation: progresso linear both; animation-timeline: scroll(root); }
  @keyframes progresso { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@media (max-width: 680px) { .progresso { top: 64px; } }

/* botões: seta que avança, estado de envio */
.btn .arrow { transition: transform .35s var(--ease-out); }
.btn:hover .arrow, .btn:focus-visible .arrow { transform: translateX(4px); }
.btn.is-loading { pointer-events: none; color: transparent; position: relative; }
.btn.is-loading::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(0,62,126,.25); border-top-color: var(--blue-deep); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* checkbox própria com check desenhado (delight) */
.check input { appearance: none; -webkit-appearance: none; width: 26px; height: 26px; margin: 0; border-radius: 7px; border: 2px solid var(--muted); background: var(--white); cursor: pointer; flex: none;
  transition: background-color .2s, border-color .2s, transform .35s var(--ease-out); display: grid; place-items: center; }
.check input::after { content: ""; width: 14px; height: 8px; border: 3px solid var(--white); border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); transform-origin: center; transition: transform .3s var(--ease-out); margin-top: -3px; }
.check input:checked { background: var(--green); border-color: var(--green); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check input:active { transform: scale(.92); }
.check input:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 2px; }
.check input[aria-invalid="true"] { border-color: var(--orange); }
.check label { cursor: pointer; }

/* nav compacta depois de rolar */
.nav { transition: box-shadow .3s, background-color .3s; }
.nav--scrolled { box-shadow: 0 10px 30px rgba(7, 30, 74, .18); }

/* sucesso: check que se desenha */
.ok-check { width: 72px; height: 72px; margin-inline: auto; }
.ok-check circle { fill: none; stroke: var(--green); stroke-width: 3; stroke-dasharray: 220; stroke-dashoffset: 220; animation: traco .8s var(--ease-out) forwards; }
.ok-check path { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: traco .5s .5s var(--ease-out) forwards; }
@keyframes traco { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .progresso { display: none !important; }
  .ok-check circle, .ok-check path { stroke-dashoffset: 0; animation: none; }
}

html.semanim .reveal { opacity: 1; transform: none; transition: none; }
html.semanim *, html.semanim *::before, html.semanim *::after { animation: none !important; transition: none !important; }
html.semanim .progresso { display: none !important; }

/* ===== texto entrando palavra por palavra, em ordem ===== */
.split .w { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(1.5deg); transform-origin: left bottom;
  transition: opacity .55s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--w, 0) * 70ms); will-change: opacity, transform; }
.split.is-in .w { opacity: 1; transform: none; will-change: auto; }
html.semanim .split .w, .semanim .split .w { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .split .w { opacity: 1; transform: none; transition: none; } }

/* foco: azul-profundo em fundo claro, amarelo em fundo escuro */
a:focus-visible, button:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; }
.hero-c :focus-visible, .banda :focus-visible, .rodape :focus-visible, .nav :focus-visible, .redes-b__card :focus-visible, .faz-c-band :focus-visible, .form-c > .container > .form-c__head :focus-visible { outline-color: var(--yellow); }
.skip:focus { outline-color: var(--blue-deep); }
body { overflow-x: clip; }

/* Tom Select (município com busca) no tom da página */
.ts-wrapper.single .ts-control { min-height: 60px; padding: 0 44px 0 var(--space-md); border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--white); font: inherit; font-size: var(--text-lg); color: var(--ink); box-shadow: none; display: flex; align-items: center; }
.ts-wrapper.single .ts-control:after { border-color: var(--muted) transparent transparent; right: 18px; }
.ts-wrapper.focus .ts-control { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 91, 170, .14); }
.ts-wrapper.disabled .ts-control { opacity: .6; background: var(--paper); }
.ts-wrapper .ts-control input { font: inherit; font-size: var(--text-lg); }
.ts-dropdown { border-radius: var(--radius-sm); border: 1.5px solid var(--line); box-shadow: var(--shadow); font: inherit; font-size: var(--text-md); z-index: 50; }
.ts-dropdown .option { padding: 12px var(--space-md); }
.ts-dropdown .active { background: color-mix(in oklch, var(--blue) 10%, var(--white)); color: var(--blue-deep); }
.ts-dropdown .no-results { padding: 12px var(--space-md); color: var(--muted); }
.field .ts-wrapper + .error { margin-top: var(--space-2xs); }
/* SplitText: palavras sem herdar a regra antiga */
.split .w { opacity: 1; transform: none; transition: none; }

/* arrastando o crachá 3D: nada de seleção de texto pelo caminho */
html.is-grabbing, html.is-grabbing * { user-select: none !important; -webkit-user-select: none !important; cursor: grabbing !important; }
