/* Reset, tipografia e o que vale em toda tela. */

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

html, body { margin: 0; padding: 0; overflow-x: hidden; }

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

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Sem esta linha o formulário inteiro cai em Arial no Windows e em
 * -apple-system no Mac: o navegador não herda font-family nestes elementos, e a
 * identidade visual colapsa no lugar em que o usuário mais olha. */
button, input, select, textarea { font-family: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-titulo);
  font-weight: var(--fw-bold);
  letter-spacing: -.02em;
  color: var(--texto);
  line-height: var(--lh-tight);
  margin: 0;
}

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

p { margin: 0 0 var(--sp-3); }

a {
  color: var(--cor-primaria-texto);
  text-decoration: none;
  transition: color var(--transicao);
}
a:hover { color: var(--cor-primaria-escura); }

ul, ol { margin: 0; padding-left: 1.2em; }

/* Foco visível de teclado. Sem isto a navegação por Tab fica invisível, e quem
 * não usa mouse perde a tela. */
:focus-visible {
  outline: 2px solid var(--cor-primaria);
  outline-offset: 2px;
  border-radius: var(--raio-sm);
}

/* 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;
}

.ph { line-height: 1; }

::selection {
  background: var(--cor-primaria-suave);
  color: var(--cor-primaria-em-suave);
}
