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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--texto);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
  font-optical-sizing: auto;
}
h1 { font-size: var(--t-4xl); font-weight: 520; letter-spacing: -0.02em; }
h2 { font-size: var(--t-3xl); }
h3 { font-size: var(--t-xl); line-height: 1.2; }
h4 { font-size: var(--t-lg); line-height: 1.25; }

p, ul, ol, dl, figure, blockquote { margin: 0; }
p { text-wrap: pretty; }
ul, ol { padding: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--rapido) ease, text-decoration-color var(--rapido) ease;
}
a:hover { text-decoration-color: var(--nogueira); }

strong, b { font-weight: 700; }
small { font-size: var(--t-sm); }

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

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: var(--areia); color: var(--cafe); }

hr { border: 0; border-top: 1px solid var(--linha); margin: var(--s-6) 0; }

/* Ícones do sprite */
.i {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: currentColor;
}
.i--sm { width: 1em; height: 1em; }
.i--lg { width: 1.6em; height: 1.6em; }

/* Layout */
.container {
  width: 100%;
  max-width: calc(var(--largura) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--estreito { max-width: calc(880px + var(--gutter) * 2); }

.secao { padding-block: var(--secao); }
.secao--suave { background: var(--bg-suave); }

.prosa { max-width: var(--largura-texto); }
.prosa > * + * { margin-top: var(--s-4); }
.prosa ul { padding-left: 1.2em; }
.prosa li + li { margin-top: var(--s-2); }

.lede {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--texto-2);
  max-width: 56ch;
}

.muted { color: var(--texto-2); }

/* Acessibilidade */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--cafe);
  color: var(--papel);
  border-radius: var(--r-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

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

[hidden] { display: none !important; }

html[data-contraste="alto"] a { text-decoration: underline; }

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