/* ==========================================================================
   base.css · reset, tipografia de elemento, acessibilidade e utilitários
   Sem classes de componente aqui.
   ========================================================================== */

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

  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;       /* compensa o menu fixo nas âncoras */
  }

  body {
    margin: 0;
    font: var(--fw-regular) var(--fs-body) / var(--lh-body) var(--font);
    color: var(--text);
    background: var(--bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, h3, h4 {
    margin: 0 0 var(--s-4);
    font-weight: var(--fw-xbold);
    line-height: var(--lh-tight);
    letter-spacing: -.01em;
    text-wrap: balance;
  }
  h1 { font-size: var(--fs-h1); }
  h2 { font-size: var(--fs-h2); }
  h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }

  p { margin: 0 0 var(--s-4); text-wrap: pretty; }
  ul, ol { margin: 0; padding: 0; }
  li { margin: 0; }
  img, svg, video { display: block; max-width: 100%; }
  img { height: auto; }
  a { color: inherit; }
  figure { margin: 0; }
  button, input, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }

  :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: var(--s-1);
  }

  .surface--teal :focus-visible,
  .card-port--teal :focus-visible { outline-color: var(--focus-on-dark); }

  ::selection { background: var(--c-red); color: var(--c-paper); }

  /* Sprite de ícones inline: presente no DOM, sem ocupar espaço */
  .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

  /* Utilitários de acessibilidade */
  .sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .skip-link {
    position: fixed; left: var(--s-2); top: var(--s-2); z-index: var(--z-skip);
    padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
    background: var(--c-black); color: var(--c-ice); text-decoration: none;
    transform: translateY(-200%);
  }
  .skip-link:focus { transform: none; }

  /* Utilitários de texto */
  .text-center { text-align: center; }
  .aux { font-size: var(--fs-aux); line-height: 1.5; }
}
