/* =============================================================
   RESET MODERNO. baseado em Andy Bell / Josh Comeau,
   adaptado para o sistema OBP. Mínimo necessário, sem opinião
   visual (essa fica no base.css e nos tokens).
   ============================================================= */

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

/* 2. Margens zeradas. controle total via spacing scale */
* {
  margin: 0;
}

/* 3. Body: altura mínima da tela, suaviza renderização de fonte */
html, body {
  height: 100%;
}

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

/* 4. Scroll suave (override pra reduce-motion) */
html {
  scroll-behavior: smooth;
}

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

/* 5. Imagens, vídeos, embeds: responsivos por padrão */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 6. Inputs e botões herdam fonte do contexto */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* 7. Quebra de palavras longas em parágrafos e headings */
p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 8. Headings sem peso ou tamanho default. deixamos o sistema decidir */
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  font-size: inherit;
}

/* 9. Listas sem marcadores quando usadas como nav/UI */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* 10. Links sem decoração default. controlamos no base.css */
a {
  color: inherit;
  text-decoration: none;
}

/* 11. Hr suave */
hr {
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.15;
}

/* 12. Foco visível para acessibilidade (todos os elementos focáveis) */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-xs);
}

/* Remove outline default em foco com mouse (mantém com teclado) */
:focus:not(:focus-visible) {
  outline: none;
}

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

/* 14. Esconder visualmente mantendo acessível para leitores de tela */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 15. Skip link para a11y */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--action-primary);
  color: var(--action-primary-text);
  font-weight: var(--fw-semibold);
  z-index: var(--z-tooltip);
  transition: top var(--motion-fast) var(--ease-out);
}

.skip-link:focus {
  top: 0;
}
