/* ============================================================
   RESET + BASE
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* clip (e não hidden) para nunca quebrar position:sticky */
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--preto);
  color: var(--off);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: .98; letter-spacing: var(--ls-tight); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Foco visível e consistente em todo o site */
:focus-visible {
  outline: 3px solid var(--amarelo);
  outline-offset: 3px;
  border-radius: 2px;
}
.section--accent :focus-visible { outline-color: var(--preto); }

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

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 200;
  padding: .9rem 1.4rem;
  background: var(--amarelo);
  color: var(--preto);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* [hidden] precisa vencer qualquer display de componente
   (ex.: a grade de indicadores, que só entra quando houver dados) */
[hidden] { display: none !important; }

/* Acessível para leitor de tela, invisível na tela */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   ESTRUTURA DE SEÇÃO
   ============================================================ */

.section {
  position: relative;
  background: var(--bg);
  color: var(--text);
  padding-block: var(--section-y);
}

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

/* ============================================================
   PREFERS-REDUCED-MOTION
   Reduz drasticamente o movimento, sem quebrar o layout.
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  /* nada pode ficar invisível com movimento reduzido */
  [data-reveal], [data-anima] {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Âncoras não ficam escondidas atrás do header fixo */
section[id], div[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* Trava o scroll do corpo com o menu mobile aberto */
body.is-locked { overflow: hidden; }
