/* ============================================================
   Base: reset contido, tipografia, acessibilidade
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

/* O atributo hidden sempre vence estilos de display de autor */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.55;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: var(--font-mono); }

h1 { font-size: var(--fs-2xl); font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; }
h2 { font-size: var(--fs-lg); font-weight: 640; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-md); font-weight: 640; }

::selection { background: var(--brand-dim); }

/* Foco visível sempre */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -48px;
  z-index: 120;
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 120ms ease;
}
.skip-link:focus { top: var(--sp-3); }

/* Utilidades */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
/* Scrollbars discretos */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* Movimento reduzido: sem transições/animações */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
