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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--creme);
  color: var(--tinta);
  font-family: var(--fonte-texto);
  font-size: var(--t-base);
  line-height: 1.6;
  overflow-x: hidden;
}

main { flex: 1; }

h1, h2, h3, h4 {
  font-family: var(--fonte-titulo);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
p { margin: 0 0 1em; }

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

a { color: var(--azul-texto); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--roxo-texto); }

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

.container { width: min(100% - 2 * var(--gutter), var(--largura)); margin-inline: auto; }

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

.pular-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--tinta); color: var(--creme); padding: 0.6rem 1rem; border-radius: var(--raio-sm);
}
.pular-link:focus { top: 1rem; color: var(--creme); }

::selection { background: var(--amarelo); color: var(--tinta); }

/* Entrada ao rolar (ativada pelo JS só quando há suporte e o usuário aceita movimento) */
.js-reveal .revelar { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms ease; }
.js-reveal .revelar.visivel { opacity: 1; transform: none; }

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