/* =========================================================
   Base: reset, tipografia, grid e utilitários
   ========================================================= */

/* ---------- Fontes (self-host, subconjunto latino, licença OFL) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italico.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: var(--corpo);
  line-height: var(--corpo-lh);
  overflow-x: clip;
}

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

a { color: var(--tinta); }
a:hover { color: var(--tinta); }

/* ---------- Tipografia ---------- */
.titulo-secao {
  font-family: var(--serifa);
  font-weight: 400;
  font-size: var(--h2);
  line-height: var(--h2-lh);
  letter-spacing: var(--tracking-titulo);
}

.titulo-item {
  font-family: var(--serifa);
  font-weight: 400;
  font-size: var(--h3);
  line-height: var(--h3-lh);
  letter-spacing: var(--tracking-titulo);
}

.texto-apoio {
  font-size: var(--apoio);
  line-height: var(--apoio-lh);
}

.rotulo-g {
  font-family: var(--mono);
  font-size: var(--rotulo-g);
  line-height: var(--rotulo-g-lh);
}

.rotulo-m {
  font-family: var(--mono);
  font-size: var(--rotulo-m);
  letter-spacing: var(--tracking-rotulo);
  text-transform: uppercase;
}

.rotulo-p {
  font-family: var(--mono);
  font-size: var(--rotulo-p);
  letter-spacing: var(--tracking-rotulo);
  text-transform: uppercase;
  color: var(--tinta-2);
}

/* ---------- Grid ---------- */
.wrap {
  padding-inline: max(var(--margem), calc((100% - var(--largura-max)) / 2));
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--colunas), minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* ---------- Utilitários ---------- */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.pular {
  position: absolute;
  left: var(--esp-2);
  top: var(--esp-1);
  z-index: 100;
  padding: var(--esp-1) var(--esp-2);
  background: var(--tinta);
  color: var(--creme-dymo);
  font-family: var(--mono);
  font-size: var(--rotulo-m);
  letter-spacing: var(--tracking-rotulo);
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-200%);
}
.pular:focus { transform: none; color: var(--creme-dymo); }

:focus { outline: none; }
:focus-visible { outline: var(--foco); outline-offset: 3px; }

.filtros { position: absolute; width: 0; height: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
