/* Reset CSS Moderno e Otimizado */

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

/* Remove margem e padding padrão */
* {
  margin: 0;
  padding: 0;
}

/* HTML e Body */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

/* Elementos de texto */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Listas */
ul, ol {
  list-style: none;
}

/* Imagens e mídia */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Formulários */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

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

input:focus,
button:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--cor-primaria);
  outline-offset: 2px;
}

/* Tabelas */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Elementos semânticos */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, nav, section {
  display: block;
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Remove autofill amarelo */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px var(--cor-branco) inset;
  -webkit-text-fill-color: var(--cor-preto);
}

/* Remove spinners dos inputs number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Remove X do IE em inputs */
input::-ms-clear {
  display: none;
}

/* Fieldset */
fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

/* Legend */
legend {
  padding: 0;
}