/* ================================================================
   RESET — normalização mínima
   ================================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Âncoras não podem parar embaixo do header fixo */
  scroll-padding-top: calc(var(--altura-header) + 1rem);
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--fonte);
  font-size: var(--fs-base);
  line-height: var(--lh-corpo);
  color: var(--cor-texto);
  background-color: var(--cor-fundo);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  line-height: var(--lh-titulo);
  font-weight: 700;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img,
picture,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--cor-primaria);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 3px solid var(--cor-secundaria);
  outline-offset: 2px;
  border-radius: var(--raio-sm);
}

/* Conteúdo só para leitor de tela */
.sr-apenas {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Pular para o conteúdo — aparece só no foco por teclado */
.pular-link {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -110%);
  z-index: calc(var(--z-modal) + 1);
  padding: 0.75rem 1.25rem;
  background: var(--cor-primaria-escura);
  color: var(--cor-branco);
  border-radius: 0 0 var(--raio-md) var(--raio-md);
  font-weight: 600;
  text-decoration: none;
}

.pular-link:focus {
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
