/* =========================================================================
   reset.css — Modern minimal reset for AM Softwares site
   Baseado em Andy Bell + Josh Comeau + ajustes próprios.
   Princípios:
     - Box-sizing border-box em tudo
     - Remover margens/paddings padrão só onde atrapalha
     - Respeitar preferências do usuário (movimento, contraste)
     - Acessibilidade first: focus visível, sem outline em click de mouse
   ========================================================================= */

/* 1. Use border-box por padrão (largura inclui padding + border) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove margin padrão só do que nos interessa (preserva h*, p, ul) */
* {
  margin: 0;
}

/* 3. HTML/body base: altura cheia, scroll suave, antialiasing */
html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Evita flash de tema claro em dark mode forçado */
  color-scheme: dark;
}

body {
  min-height: 100%;
  line-height: 1.6;
  font-family: var(--font-sans, system-ui, sans-serif);
  color: var(--color-text, #ffffff);
  background: var(--color-bg, #0d1f33);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 4. Mídia (img, vídeo, svg) responsiva por padrão */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 5. Inputs herdam tipografia (botões não ficam com fonte do sistema) */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* 6. Botões sem estilos nativos (a gente desenha) */
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* 7. Links: cor via herança, sem sublinhado padrão em estado neutro */
a {
  color: inherit;
  text-decoration: none;
}

/* 8. Heading: sem preferência por tamanho; definimos nos tokens */
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  font-size: inherit;
}

/* 9. Listas: tira bullets só quando a classe .list-reset for aplicada */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* 10. Fieldset/legend: zero padding padrão, borda controlada no componente */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend {
  padding: 0;
}

/* 11. Table: bordas colapsadas, sem espaçamento extra */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 12. Hidden attribute respeitado visualmente */
[hidden] {
  display: none !important;
}

/* 13. Focus ring só pra teclado (mouse não precisa) */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent, #C8933F);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 14. Reduced motion: desliga transições/animação se o usuário pedir */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 15. Seleção de texto: usa cor de marca */
::selection {
  background: var(--color-accent, #C8933F);
  color: var(--color-bg, #0d1f33);
}

/* 16. Scrollbar minimalista (Webkit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 147, 63, 0.6);
}

/* 17. Placeholder de input/textarea: opacidade reduzida */
::placeholder {
  opacity: 0.6;
}
