/* css/base.css — Dono: B2.
   Reset mínimo, tipografia base, foco visível, prefers-reduced-motion
   (ARQUITETURA.md §9.4, design-system.md §5). Usa exclusivamente os tokens
   de css/tokens.css (dono B3) — nunca hex fixo aqui. */

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

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

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

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

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

a {
  color: var(--color-accent);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  margin: 0;
}

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

table {
  border-collapse: collapse;
}

/* Alvo de toque mínimo 44x44px em qualquer elemento interativo (WCAG / design-system §4). */
button, a, input, select, [role="radio"], [role="button"] {
  min-height: 44px;
}

/* Foco visível customizado — nunca outline:none sem substituto (design-system §5). */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.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;
}

/* Respeita prefers-reduced-motion em todo o app (design-system §5). */
@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;
  }
}
