/* =====================================================================
   SPEEDBIT – extra.css
   Acessibilidade, contraste e ajustes de comportamento.
   Carregado depois do tailwind.css e do custom.css (não altere a ordem).
   ===================================================================== */

/* ---------- Rolagem: o header fixo (80px) não cobre mais os títulos ---------- */
html { scroll-padding-top: 5.5rem; }
section[id] { scroll-margin-top: 5.5rem; }

/* ---------- Utilitários de acessibilidade ---------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.not-italic { font-style: normal; }

/* Link "Pular para o conteúdo": invisível até receber foco pelo teclado */
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 100;
  padding: 0.75rem 1.25rem; border-radius: 0.75rem;
  background: #FACC15; color: #061224;
  font-weight: 800; font-size: 0.875rem; text-decoration: none;
  transform: translateY(-200%); transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }
main:focus { outline: none; }

/* Contorno de foco visível em toda a página (teclado), em ciano da marca */
:focus-visible {
  outline: 3px solid #00D2FF !important;
  outline-offset: 2px;
}
.bg-white :focus-visible,
.bg-slate-50 :focus-visible,
.bg-slate-100 :focus-visible {
  outline-color: #2D74C8 !important;
}

/* Listas semânticas sem marcadores (mantém o visual original) */
main ul, footer ul { list-style: none; padding-left: 0; }

/* Fieldset/legend sem a borda padrão do navegador */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

/* ---------- Contraste (WCAG AA: texto branco precisa de 4,5:1) ----------
   O verde #10B981 com texto branco tinha apenas 2,5:1.
   #047857 é o mesmo verde-esmeralda, um tom mais escuro (5,5:1). */
.btn-green { background-color: #047857; }
.btn-green:hover { background-color: #065F46; }

.btn-grad-green { background-image: linear-gradient(to right, #047857, #0A7F86); }
.btn-grad-blue  { background-image: linear-gradient(to right, #2D74C8, #0A7F86); }

.text-online { color: #047857; }

/* Mensagem de erro do formulário B2B */
.form-error {
  margin-top: 0.375rem;
  font-size: 0.75rem; font-weight: 600;
  color: #FCA5A5;
}
input[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: #F87171 !important;
}

/* ---------- Acordeão do FAQ ----------
   Sem JavaScript, as respostas ficam visíveis (nada se perde).
   Com JavaScript, ficam recolhidas e abrem com animação. */
.js .accordion-content {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height .3s ease, visibility .3s;
}
.js .accordion-item.is-open .accordion-content { visibility: visible; }
.accordion-item.is-open .accordion-icon { transform: rotate(180deg); }

/* ---------- Respeita quem pediu "reduzir movimento" no sistema ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Alto contraste do Windows ---------- */
@media (forced-colors: active) {
  .btn-green, .btn-grad-green, .btn-grad-blue { border: 2px solid ButtonText; }
}

/* ---------- Páginas de texto (Política de Privacidade) ---------- */
.legal h2 {
  margin-top: 2rem; margin-bottom: .5rem;
  font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
  font-weight: 800; font-size: 1.125rem; line-height: 1.4; color: #061224;
}
.legal p, .legal li { font-size: .9375rem; line-height: 1.7; color: #334155; }
.legal p { margin-top: .75rem; }
.legal ul { margin-top: .75rem; padding-left: 1.25rem; list-style: disc; }
.legal li + li { margin-top: .25rem; }
.legal a { color: #2D74C8; text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: #1E569B; }
.legal strong { color: #061224; }

/* Textos pequenos em azul royal sobre fundos claros tingidos: tom levemente
   mais escuro do mesmo azul para atingir 4,5:1 (WCAG AA) */
.bg-\[\#2D74C8\]\/10.text-\[\#2D74C8\],
.tracking-widest.text-\[\#2D74C8\],
.tracking-widest.text-royal { color: #235EA5; }
