/* base — reset, tipografia e estrutura. Valores vêm de tokens.css (specs/design.md). */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-altura) + var(--e-24));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--branco);
  color: var(--texto);
  font-family: var(--fonte-corpo);
  font-size: var(--corpo);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* contexto escuro: nav, hero, faixas escuras e rodapé */
.escuro {
  --texto: var(--branco);
  --texto-2: var(--cinza-400);
  --linha: var(--grafite-700);
  --acento: var(--menta);
  --superficie: var(--grafite-800);
  color: var(--texto);
}

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

ul,
ol {
  padding: 0;
  list-style: none;
}

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

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

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

:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 2px;
}

/* tipografia */

h1,
.h1 {
  font-family: var(--fonte-titulo);
  font-size: var(--h1);
  font-weight: 600;
  letter-spacing: var(--h1-tracking);
  line-height: 1.12;
}

h2,
.h2 {
  font-family: var(--fonte-titulo);
  font-size: var(--h2);
  font-weight: 600;
  letter-spacing: var(--h2-tracking);
  line-height: 1.15;
}

h3,
.h3 {
  font-family: var(--fonte-titulo);
  font-size: var(--h3);
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.25;
}

.titulo-cartao {
  font-family: var(--fonte-titulo);
  font-size: var(--titulo-cartao);
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.35;
}

.lead {
  font-size: var(--lead);
  line-height: 1.6;
  color: var(--texto-2);
  max-width: var(--leitura);
}

.link {
  color: var(--acento);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover {
  text-decoration-thickness: 2px;
}

/* estrutura */

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

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

.secao--suave {
  background: var(--branco-suave);
}

.secao--preta {
  background: var(--preto);
}

/* topo de seção: título, texto e, às vezes, um botão — sempre à esquerda */

.secao__topo {
  margin-bottom: var(--e-48);
}

.secao__topo h2 {
  max-width: 760px;
}

.secao__topo .lead {
  margin-top: var(--e-16);
}

.secao__topo .botao {
  margin-top: var(--e-32);
}

.pular {
  position: absolute;
  left: var(--e-16);
  top: -100px;
  z-index: 200;
  padding: var(--e-12) var(--e-24);
  border-radius: var(--raio-botao);
  background: var(--menta);
  color: var(--preto);
  font-weight: 600;
  font-size: var(--corpo-pequeno);
}

.pular:focus {
  top: var(--e-16);
}

.so-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* movimento — sem JavaScript, tudo aparece */

.js .revelar {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
  transition-delay: var(--atraso, 0ms);
}

.js .revelar.visivel {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .js .revelar {
    opacity: 1;
    transform: none;
  }
}
