/* ============================================================
   BASE — reset, tipografia, layout, acessibilidade
   ============================================================ */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text-on-dark);
  background: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Tipografia ---------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tighter);
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--track-tighter);
}

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: 600;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
  color: var(--text, inherit);
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* ---------- Layout ---------- */

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

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--lg {
  padding-block: var(--section-y-lg);
}

.section--dark {
  background: var(--ink-900);
  color: var(--text-on-dark);
}

.section--dark-alt {
  background: var(--ink-850);
  color: var(--text-on-dark);
}

.section--light {
  background: var(--paper);
  color: var(--text-on-light);
}

.section--light-alt {
  background: var(--paper-2);
  color: var(--text-on-light);
}

/* Fio superior que estrutura a seção, no lugar de fundos decorativos.
   Ele se desenha da esquerda quando a seção entra na tela. */
.section--ruled {
  border-top: 1px solid transparent;
}

.rule {
  height: 1px;
  background: var(--line);
  transform-origin: left;
}

/* ---------- Cabeçalho de seção ---------- */

/* Rótulo discreto. Sem mono, sem tracinho, sem caixa: os dois viraram
   assinatura de página gerada por template. */
.label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-low);
  margin-bottom: var(--sp-4);
}

.label--accent {
  color: var(--accent);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2.25rem, 1.6rem + 2.6vw, 4rem);
}

.section-head__lead {
  margin-top: var(--sp-5);
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-mid);
  max-width: 38rem;
}

/* Numeral grande e silencioso, usado como marcação editorial */
.numeral {
  font-family: var(--font-display);
  font-size: var(--fs-numeral);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--track-tighter);
  color: var(--line-strong);
  font-variant-numeric: tabular-nums;
}

/* ---------- Utilitários ---------- */

.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-mid);
}

.muted {
  color: var(--text-mid);
}

.prose p + p {
  margin-top: var(--sp-4);
}

.prose {
  color: var(--text-mid);
  line-height: var(--lh-relaxed);
}

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

/* ---------- Acessibilidade ---------- */

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: var(--z-menu);
  padding: var(--sp-3) var(--sp-5);
  background: var(--brand-green);
  color: var(--accent-contrast);
  font-weight: 600;
  border-radius: var(--r-md);
  transform: translateY(-150%);
  transition: transform var(--dur) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

::selection {
  background: var(--brand-green);
  color: var(--accent-contrast);
}
