/* ===========================================================================
   machado.group — Base
   ---------------------------------------------------------------------------
   Minimal reset + document defaults wired to tokens. Sets the warm paper
   surface, ink color, and the sans family as the document baseline.
   =========================================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv01";
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

/* tabular figures everywhere numbers matter by default */
.tnum { font-variant-numeric: tabular-nums; }

/* ===========================================================================
   VÍDEO DECORATIVO — contrato (2026-07-27)
   ---------------------------------------------------------------------------
   Vídeo decorativo NUNCA depende de mix-blend-mode para esconder o próprio
   fundo. A composição entra ASSADA no arquivo, UM ARQUIVO POR TEMA, com o
   fundo do arquivo batendo com o do container (desvio ≤ 1/255). Em CSS o clip
   fica neutro: filter:none · opacity:1 · mix-blend-mode:normal.

   Por quê (medido): webm VP9 não carrega canal alpha no Safari, e o WebKit de
   iOS compõe vídeo numa camada de GPU que IGNORA o blend — o retângulo opaco
   aparece no aparelho. Não reproduz em Chromium nem em WebKit headless (esses
   compõem por software e aplicam o blend): defeito visual de Safari/iOS só se
   valida no APARELHO. Receita de bake e teto de peso em readme.md → Media.

   Marcação: data-decor="light|dark" no <video>; o tema ativo mostra o seu.
   O componente dá o display do clip visível via --decor-display (default block).
   =========================================================================== */
video[data-decor] { filter: none; opacity: 1; mix-blend-mode: normal; background: transparent; }
video[data-decor="light"] { display: none; }
[data-theme="light"] video[data-decor="light"] { display: var(--decor-display, block); }
[data-theme="light"] video[data-decor="dark"] { display: none; }

/* LEGADO — NÃO USAR EM NADA NOVO. Clips "*-screen.*" (traço claro sobre preto)
   escondiam o próprio fundo por blend. Viola o contrato acima e mostra
   retângulo opaco no Safari/iOS. Mantido só para os assets legados de media/
   ainda não reassados; migre para o par por tema + data-decor. */
video[src*="-screen."], video[data-legacy-blend] { mix-blend-mode: screen; filter: brightness(.94) contrast(1.14); }
[data-theme="light"] video[src*="-screen."], [data-theme="light"] video[data-legacy-blend] { filter: brightness(.94) contrast(1.14) invert(1); mix-blend-mode: multiply; }

