/* ==========================================================================
   BASE — reset moderno, elementos e utilitários de acessibilidade
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height, 0px);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- Tipografia ---------- */

/* Títulos em Kagsto (fallback Unbounded). Peso bold, entrelinha curta e
   espaçamento levemente negativo — o conjunto dá o ar compacto dos títulos. */
h1, h2, h3, h4, h5, h6,
.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); line-height: var(--lh-tight); }
h6 { font-size: var(--fs-base); line-height: var(--lh-tight); }

/* Anton é desenhada para caixa alta em títulos de impacto. */
.display--upper,
.title--upper { text-transform: uppercase; }

/* Texto: Nunito Sans */
p, li, dd, dt, figcaption, label, blockquote {
  font-family: var(--font-sans);
  text-wrap: pretty;
}

p { line-height: var(--lh-normal); }

/* Texto de apoio logo abaixo de um título (lead) */
.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-regular);
}

/* Variações de tamanho para texto corrido */
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }

/* Texto secundário / complementar */
.text-muted { color: var(--color-text-muted); }

/* Ênfase */
.text-medium   { font-weight: var(--fw-medium); }
.text-semibold { font-weight: var(--fw-semibold); }
.text-bold     { font-weight: var(--fw-bold); }

strong, b { font-weight: var(--fw-bold); }

/* Limita a largura da linha para leitura confortável */
.measure { max-width: var(--measure); }
.measure--narrow { max-width: var(--measure-narrow); }

/* Rótulos curtos acima de títulos (kicker / eyebrow) */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

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

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

/* Controles herdam a família de texto; tamanhos nunca abaixo de 16px
   (evita também o zoom automático de campos no iOS). */
button, input, select, textarea {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  color: inherit;
}

button {
  font-size: var(--fs-button);
  font-weight: var(--fw-bold);
  background: none;
  border: 0;
  cursor: pointer;
}

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

address { font-style: normal; }

/* ---------- Foco visível e consistente ---------- */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

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

.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.section {
  position: relative;
  padding-block: var(--section-padding-y);
}

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

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-modal);
  padding: var(--space-2) var(--space-4);
  background: var(--color-brand);
  color: var(--color-text-invert);
  border-radius: var(--radius-md);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus { transform: translateY(0); }

/* ---------- Preferência por menos movimento ---------- */
@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;
    scroll-behavior: auto !important;
  }
}

/* Trava a rolagem do fundo enquanto o menu mobile está aberto */
body.has-nav-open {
  overflow: hidden;
}

/* O atributo hidden precisa vencer o display dos componentes
   (.btn, .nav-toggle e afins definem display próprio). */
[hidden] {
  display: none !important;
}
