/* ============================================
   PROVITA ANESTESIA — BASE
   Reset CSS e tipografia global do site.
   Consome apenas variáveis de tokens.css.
   ============================================ */

/* ── RESET MODERNO ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* <picture> dentro de flex containers não deve criar caixa extra */
.cabecalho__logo picture,
.rodape__marca picture { display: contents; }

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

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

/* ── BODY — BASE DE LEITURA ── */
body {
  font-family: var(--fonte-corpo);
  font-size: var(--fs-body);
  font-weight: var(--peso-corpo);
  line-height: 1.7;
  color: var(--cor-texto);
  background-color: var(--cor-fundo);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── TÍTULOS ── */
h1, h2, h3, h4 {
  font-family: var(--fonte-titulo);
  color: var(--cor-texto);
  line-height: 1.15;
  font-weight: var(--peso-titulo);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }

/* H3 usa Montserrat — hierarquia visual distinta dos títulos nobres */
h3 {
  font-family: var(--fonte-corpo);
  font-size: var(--fs-h3);
  font-weight: var(--peso-forte);
  line-height: 1.3;
}

h4 { font-size: var(--fs-body); }

/* ── TEXTO AUXILIAR ── */
/* Não limita p globalmente para não conflitar com layouts de card */
.texto-leitura {
  max-width: 65ch;
}

.legenda {
  font-size: var(--fs-caption);
  color: var(--cor-texto-suave);
}

/* ── FOCO ACESSÍVEL ── */
:focus-visible {
  outline: 3px solid var(--cor-acento);
  outline-offset: 3px;
  border-radius: var(--raio-sm);
}

/* ── UTILITÁRIOS DE LAYOUT GLOBAIS ── */
.container {
  width: 100%;
  max-width: var(--largura-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.secao {
  padding-block: var(--secao-padding-y);
}

.fundo-alt {
  background-color: var(--cor-fundo-alt);
}

/* Texto visível apenas para leitores de tela */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── MOVIMENTO REDUZIDO (acessibilidade) ── */
@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;
  }
}
