/* 1. Variáveis globais */
:root {
  color-scheme: dark;
  --menu-width: min(82vw, 310px);
  --speed: 350ms;
  --header-height: 72px;
  --mobile-header-height: 74px;
}

/* 2. Reset de dimensões e espaçamentos, incluindo pseudoelementos */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 3. Documento e tipografia base */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--mobile-header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101820;
  color: #fff;
}

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

button {
  color: inherit;
}

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

img,
video {
  height: auto;
}

/* Preserva elementos ocultos mesmo quando há regras de display. */
[hidden] {
  display: none !important;
}

/* 4. Navegação por teclado */
:focus-visible {
  outline: 2px solid #8bd4ff;
  outline-offset: 3px;
}

@media (min-width: 768px) {
  html {
    scroll-padding-top: 0;
  }
}

/* 5. Preferência por movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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