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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* CRÍTICO: sem isto, form e botão caem para a fonte do sistema */
button, input, select, textarea { font-family: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-titulo);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }

p { margin: 0; }

a {
  color: var(--prata);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transicao);
}

a:hover { color: var(--prata-hover); }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 2px solid var(--prata);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pular-conteudo {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-2);
  z-index: 30;
  padding: var(--sp-2) var(--sp-4);
  background: var(--prata);
  color: var(--accent);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.pular-conteudo:focus {
  transform: translateY(0);
  color: var(--accent);
}

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