/* ==========================================================================
   base.css
   Reset + tipografia + body.
   Sistema_de_Estilos.md:20 "base.css | Reset + tipografia + body"
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* CRITICO: Sistema_de_Estilos.md:70 e :141.
   Sem esta linha o form quebra pra Arial no Windows ou -apple-system no Mac,
   porque o browser NAO herda font-family do body nesses elementos. */
button,
input,
select,
textarea {
  font-family: inherit;
}

/* Sistema_de_Estilos.md:36 e :143-149
   Sora SO em titulo, sempre com letter-spacing -.02em. */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-titulo);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0;
}

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

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

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

/* Acessibilidade: foco visivel.
   Escada_Preguica_de_Codigo.md:36 "Acessibilidade: label em form, alt em
   imagem, contraste, foco visivel" (guardrail intocavel). */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--raio-sm);
}

::selection {
  background: var(--accent);
  color: var(--preto-quente);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
