/* Reset, tipografia e body. */

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

html,
body {
  margin: 0;
  padding: 0;
}

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

/* CRÍTICO: sem esta linha, form vai para Arial no Windows e -apple-system no
 * Mac, porque esses quatro elementos não herdam font-family do body por
 * default do navegador. Regra: Font_Inherit_em_Form. */
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(--texto);
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

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

a:hover {
  text-decoration: underline;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--cor-primaria);
  outline-offset: 2px;
}

/* Ícone Phosphor: tamanho e cor por classe, nunca style inline.
 * Regra: Icones_Phosphor, "Tamanho e cor (via CSS, nunca inline)". */
.icon {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  vertical-align: middle;
}

.icon-sm { font-size: .9rem; }
.icon-md { font-size: 1.25rem; }
.icon-lg { font-size: 1.75rem; }
.icon-xl { font-size: 2.5rem; }

.icon-accent  { color: var(--cor-primaria); }
.icon-success { color: var(--verde); }
.icon-danger  { color: var(--vermelho); }
.icon-muted   { color: var(--texto-fraco); }

/* Só para leitor 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;
}
