/* base.css — reset, tipografia, foco visível e movimento reduzido. Sem componentes aqui. */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cor-fundo);
  color: var(--cor-texto);
  font-family: var(--fonte-ui);
  font-size: var(--tam-md);
  line-height: var(--entrelinha);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* rede de segurança; o layout não deve depender disto */
}

h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: var(--entrelinha-curta); font-weight: var(--peso-forte); text-wrap: balance; }
h1 { font-size: var(--tam-2xl); }
h2 { font-size: var(--tam-xl); }
h3 { font-size: var(--tam-lg); }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cor-destaque); text-underline-offset: 0.15em; }
a:hover { color: var(--cor-destaque-hover); }
[hidden] { display: none !important; }

/* Foco visível sempre, em qualquer tema; só aparece para teclado. */
:focus-visible {
  outline: 3px solid var(--cor-foco);
  outline-offset: 2px;
  border-radius: var(--raio-sm);
}
:focus:not(:focus-visible) { outline: none; }

.so-leitor {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.pular-para-conteudo {
  position: fixed; top: var(--esp-2); left: var(--esp-2); z-index: calc(var(--z-toast) + 1);
  padding: var(--esp-2) var(--esp-4);
  background: var(--cor-destaque); color: var(--cor-sobre-destaque);
  border-radius: var(--raio-md); text-decoration: none; font-weight: var(--peso-medio);
  transform: translateY(-200%);
}
.pular-para-conteudo:focus { transform: none; color: var(--cor-sobre-destaque); }

/* Quem pede menos movimento não recebe transição nem animação. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
