/* ==========================================================================
   Base — reset + layout primitives
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--color-cream-50);
  color: var(--color-red-700);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--color-red-600);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  padding: 12px 20px; border-radius: var(--radius-pill);
  background: var(--color-red-700); color: var(--color-cream-50);
  font-family: var(--font-display); text-transform: uppercase;
}
.skip-link:focus { top: 16px; }

/* Container de conteúdo: largura útil do Figma (1216) + respiro lateral fluido */
.container {
  width: 100%;
  max-width: calc(var(--content-w) + 2 * var(--section-px));
  margin-inline: auto;
  padding-inline: var(--section-px);
}

/* Sem palavra viúva (uma palavra sozinha na última linha) em textos corridos.
   Regras de seção com text-wrap: balance continuam valendo (são mais específicas).
   Navegadores sem suporte recebem o fallback de assets/js/main.js. */
p, li, blockquote, figcaption { text-wrap: pretty; }

/* Tipografia utilitária de display (Anton, sempre uppercase no Figma) */
.u-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-display);
  text-transform: uppercase;
}

/* Mobile: textos balanceados (linhas de tamanho parecido, sem palavra viúva) */
@media (max-width: 767.98px) {
  h1, h2, h3, h4, h5, h6, p, li, blockquote, figcaption, dt, dd { text-wrap: balance !important; }
}
