/* ============================================================
   PERCURSO FERENCZI — BASE
   Reset, tipografia global (Source Serif 4 em tudo, como nas
   postagens) e utilitários.
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-body);
  font-family: var(--f-serif);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection { background: var(--c-red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 3px;
}

/* ---------- rampa tipográfica (uma classe por degrau) ---------- */

.t-capa {
  font-size: var(--t-capa);
  line-height: var(--lh-capa);
  letter-spacing: var(--ls-capa);
  font-weight: 600;
  color: var(--c-ink);
  text-wrap: balance;
}

.t-d1 {
  font-size: var(--t-d1);
  line-height: var(--lh-d1);
  letter-spacing: var(--ls-d1);
  font-weight: 600;
  color: var(--c-ink);
  text-wrap: balance;
}

.t-d2 {
  font-size: var(--t-d2);
  line-height: var(--lh-d2);
  letter-spacing: var(--ls-d2);
  font-weight: 600;
  color: var(--c-ink);
  text-wrap: balance;
}

.t-d3 {
  font-size: var(--t-d3);
  line-height: var(--lh-d3);
  letter-spacing: var(--ls-d3);
  font-weight: 600;
  color: var(--c-ink);
  text-wrap: balance;
}

.t-h {
  font-size: var(--t-h);
  line-height: var(--lh-h);
  letter-spacing: var(--ls-h);
  font-weight: 600;
  color: var(--c-ink);
}

.t-lead {
  font-size: var(--t-lead);
  line-height: var(--lh-lead);
  letter-spacing: var(--ls-lead);
  font-weight: 400;
  text-wrap: pretty;
  max-width: 36em;
}

.t-cap {
  font-size: var(--t-cap);
  line-height: var(--lh-cap);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

/* variação extraleve (contraste de peso, como nos posts) */
.t-light { font-weight: 200; }

/* ---------- dispositivos das postagens ---------- */

/* tarja vermelha de destaque (marca-texto) */
.hl {
  background: var(--c-red);
  color: #fff;
  padding: 0.04em 0.18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ênfase itálica vermelha */
.em-red {
  font-style: italic;
  color: var(--c-red);
}

/* seta direcional */
.arrow { color: var(--c-red); }

/* não quebrar (nomes próprios, pares numéricos) */
.nowrap { white-space: nowrap; }

/* link textual dentro de parágrafos (abre modal / âncora) */
.link-inline {
  font: inherit;
  color: var(--c-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--c-red);
  text-underline-offset: 0.2em;
}
.link-inline:hover { color: var(--c-red); }

/* ---------- grid ---------- */

.container {
  max-width: var(--grid-max);
  margin-inline: auto;
  padding-inline: var(--grid-margin);
}

/* ---------- acessibilidade ---------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-3);
  z-index: 200;
  background: var(--c-ink);
  color: #fff;
  padding: var(--sp-2) var(--sp-3);
}
.skip-link:focus { top: var(--sp-2); }

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