/* ============================================================
   base.css — reset, fontes, tipografia e utilitários.
   Só consome tokens.css. Nenhum valor literal.
   ============================================================ */

/* ---------- Fontes (site.md §13: máx. 4 arquivos — usamos 2 variáveis) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/spacegrotesk-var.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("../fonts/oswald-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* O atributo hidden esconde via `display:none` da folha do navegador, e
   qualquer `display` de autor vence dele. Sem esta linha, tudo que tem
   `display:flex` na classe reaparece mesmo com hidden. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol, fieldset { margin: 0; }

/* `:where()` zera a especificidade do seletor de atributo. Sem isso o reset
   valeria (0,1,1) e venceria qualquer classe de componente que tentasse dar
   padding à lista — foi o que zerou o recuo do menu. */
ul:where([role="list"]), ol:where([role="list"]) { list-style: none; padding: 0; }

fieldset { border: 0; padding: 0; }

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button { background: none; border: 0; padding: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; }

/* ---------- Documento ---------- */
html { scroll-behavior: smooth; }

/* Seleção de texto em roxo (14/10/2026, pedido do cliente). Não havia regra:
   o que aparecia era o cinza padrão do navegador, igual ao de qualquer site.

   Funciona nos dois fundos do site porque a seleção troca o fundo, não a
   superfície por baixo — e o par é o mesmo do botão de sinal (design.md §6),
   roxo com texto --ink, medido em 6,63:1. Isso **não** fura a regra de §2 que
   proíbe --signal como texto sobre --paper: aqui ele é fundo, não texto.

   `::-moz-selection` existe porque o Firefox só aplica a regra se o seletor
   dele vier separado — numa lista com `::selection` ele descarta as duas. */
::-moz-selection { background: var(--signal); color: var(--ink); }
::selection      { background: var(--signal); color: var(--ink); }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;                 /* site.md §11: nenhum scroll horizontal */
}

/* ---------- Foco (design.md §6 — nunca removido) ---------- */
:focus-visible {
  outline: var(--bw-strong) solid var(--signal);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- Tipografia ---------- */
.display, .h1, .h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-700);
  text-transform: uppercase;          /* design.md §3: display sempre em caixa alta */
  margin: 0;
}
.display { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
.h1      { font-size: var(--fs-h1);      line-height: var(--lh-title);   letter-spacing: var(--ls-title); }
.h2      { font-size: var(--fs-h2);      line-height: var(--lh-title);   letter-spacing: var(--ls-title); }

.h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-500);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-title);
  margin: 0;
}

.lead { font-size: var(--fs-lead); max-width: var(--measure); }
.body { font-size: var(--fs-body); max-width: var(--measure); }
.sm   { font-size: var(--fs-sm); }

/* rótulo / metadado — design.md §3 */
.label {
  font-family: var(--font-display);
  font-weight: var(--fw-500);
  font-size: var(--fs-xs);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
}

.muted { color: var(--muted-strong); }
.on-paper .muted { color: var(--muted-ink); }   /* plano C1 */

/* números de preço — design.md §3 */
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

/* bloco claro — design.md §2: exceção deliberada, sempre em bloco inteiro */
.on-paper {
  background: var(--paper);
  color: var(--ink);
}

/* cabeçalho de seção — design.md §3: alinhado à esquerda, com filete acima */
.section-head {
  border-top: var(--bw) solid var(--line);
  padding-top: var(--space-5);      /* 16 -> 24: o filete estava colado no rótulo */
  margin-bottom: var(--space-7);    /* 32 -> 48: mais ar antes do conteúdo */
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.on-paper .section-head { border-top-color: var(--line-soft); }

.section-head__label {
  color: var(--signal);
  margin-bottom: var(--space-3);   /* era 0: rótulo grudava no título */
}

/* ---------- Utilitários ---------- */
.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-skip);
  transform: translateY(-200%);
  background: var(--paper);
  color: var(--ink);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
}
.skip-link:focus { transform: translateY(0); }

/* full-bleed — design.md §4 */
.bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

/* ---------- Movimento reduzido (site.md §12) ---------- */
@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;
  }
}
