/* ==========================================================================
   Reset + tipografia base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg-white);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: var(--lh-heading);
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: -0.035em;
  font-weight: 800;
}

h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); }

p { margin: 0; }

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

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

/* --- Utilitários de layout --- */

/* --content-max é a largura do CONTEÚDO; o padding lateral generoso
   (marca registrada do template de referência) fica por fora dele. */
.container {
  --container-pad: var(--gutter);

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

.section {
  padding-block: var(--section-py);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

.section--light {
  background: var(--bg-white);
  color: var(--text-dark);
}

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

/* Link "pular para o conteúdo" (acessibilidade de teclado) */
.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  translate: -50% -200%;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--brand-primary);
  color: var(--text-white);
  font-size: var(--fs-small);
  font-weight: 600;
  transition: translate var(--dur) var(--ease);
}

.skip-link:focus-visible {
  translate: -50% 0;
}

@media (min-width: 768px) {
  .container {
    --container-pad: clamp(32px, 9vw, var(--gutter-desktop));
  }
}

@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;
  }
}
