/* ESPAÇAMENTOS EM MÚLTIPLOS DE 4 (como documentado na seção "Espaços") */
:root {
  --e-1: 4px;
  --e-2: 8px;
  --e-3: 12px;
  --e-4: 16px;
  --e-5: 20px;
  --e-6: 24px;
  --e-8: 32px;
  --e-9: 36px;
  --e-12: 48px;
  --e-16: 64px;
  --e-24: 96px;
  --e-32: 128px;

  --gutter: clamp(16px, 4vw, 48px);
  --largura-max: 1320px;
  --secao-espaco: clamp(96px, 12vw, 192px);
  --raio: 12px;
  --header-altura: 72px;
}

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

html {
  scroll-padding-top: var(--header-altura);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 400 var(--fs-corpo) / 1.65 var(--fonte-texto);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--fonte-titulo);
  font-weight: 600;
  color: var(--texto-forte);
  line-height: 1.1;
}

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

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

img,
video {
  height: auto;
}

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

::selection {
  background: var(--cor-v1);
  color: var(--cor-c0);
}

:focus-visible {
  outline: 2px solid var(--foco);
  outline-offset: 4px;
  border-radius: 4px;
}

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

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

.pular-conteudo {
  position: fixed;
  top: var(--e-3);
  left: var(--e-3);
  z-index: 100;
  padding: var(--e-3) var(--e-5);
  background: var(--cor-c0);
  color: var(--cor-c13);
  font: 500 var(--fs-pequeno) / 1 var(--fonte-titulo);
  border-radius: 8px;
  transform: translateY(-200%);
}

.pular-conteudo:focus {
  transform: none;
}

/* Barra de progresso de leitura: animação ligada à rolagem, sem JavaScript.
   Navegadores sem suporte simplesmente não a exibem. */
.progresso-leitura {
  display: none;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progresso-leitura {
      display: block;
      position: fixed;
      inset: 0 0 auto;
      z-index: 60;
      height: 2px;
      background: var(--gradiente-v2);
      transform-origin: 0 50%;
      animation: progresso-leitura linear both;
      animation-timeline: scroll(root);
    }
  }
}

@keyframes progresso-leitura {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Barra de rolagem */
html {
  scrollbar-color: var(--cor-v1) var(--fundo);
}
::-webkit-scrollbar {
  width: 10px;
  background-color: var(--fundo);
}
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: var(--cor-v1);
  border: 2px solid var(--fundo);
}
