/* Reset, tipografia, foco e utilitários. Sem overflow-x em html/body: quebraria o position: sticky. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  /* Foco visível não pode ficar atrás da barra fixa de WhatsApp (WCAG 2.2, 2.4.11). js/barra-wa.js grava aqui a altura real
     da barra (borda e área segura incluídas) mais a folga do anel de foco; 0 a partir de 768 px, onde a barra é display: none */
  scroll-padding-bottom: var(--wa-bar-reserva, 0px);
}

/* Rolagem suave só enquanto o <html> tem a classe (js/ancoras.js a liga no clique em link de âncora e a tira ao fim da
   rolagem). Global, `scroll-behavior: smooth` animava a página inteira ao abrir index.html#demo (M-1 da auditoria). */
@media (prefers-reduced-motion: no-preference) {
  html.rolagem-suave {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  color: var(--white);
  font-family: var(--font-serif);
  font-weight: 400;
  text-wrap: balance;
}

h1,
h2 {
  font-variation-settings: "opsz" 144;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.012em;
}

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

h4 {
  font-size: 1.375rem;
  line-height: 1.25;
}

p {
  text-wrap: pretty;
}

em.destaque {
  font-style: normal;
  color: var(--blue);
}

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

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

img {
  height: auto;
}

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

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: inherit;
}

a,
button,
summary,
label,
input {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

fieldset {
  min-width: 0;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--blue-hi);
  outline-offset: 3px;
}

/* Reset do atributo hidden: regra global exigida pelo wireframe (5.1, utilitários). */
[hidden] {
  display: none !important;
}

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

.skip {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-2);
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--s2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  color: var(--white);
  font-weight: 600;
  transform: translateY(-300%);
}

.skip:focus-visible {
  transform: none;
}

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

/* Seções que sangram até a borda da viewport: recortar sem criar contêiner de rolagem. */
.secao {
  position: relative;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Reveal: só esconde quando o JS marcou <html class="js">. Nada fica invisível: sem JS a classe não existe; sem
   IntersectionObserver reveal.js mostra tudo; e a trava "reveal-tudo" do <head> (4 s) cobre JS quebrado, script atrasado
   ou observador mudo. Com o observador funcionando, reveal.js põe "reveal-ok" e a trava não dispara. */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}

.js .reveal.is-in,
.reveal-tudo .reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* Impressão e "salvar como PDF": quem imprime sem ter rolado até o fim não pode receber páginas em branco */
@media print {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
