/* Estilos globais de documento, texto e acessibilidade. */
@layer base {
  html {
    background: var(--bg);
    color-scheme: dark;
    /* âncoras do menu param abaixo do navbar fixo */
    scroll-padding-top: calc(var(--nav-h) + var(--space-md));
  }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }

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

  /* trava de rolagem enquanto o portão está fechado ou o menu mobile aberto */
  html.gate-locked,
  html:has(.drawer[open]) { overflow: hidden; }
  html.gate-locked body { height: 100%; overflow: hidden; touch-action: none; }

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

  /* foco visível só para teclado; nunca remover sem substituto */
  :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; border-radius: 2px; }

  /* texto só para leitores de tela e buscadores (espelha o que está na imagem) */
  .sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }

  /* "Pular para o conteúdo": aparece só ao receber foco pelo teclado */
  .skip-link {
    position: fixed; top: var(--space-md); left: 50%; z-index: calc(var(--z-gate) + 1);
    translate: -50% -200%;
    padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-pill);
    background: var(--c-cream); color: var(--c-green-ink);
    font-family: var(--ff-display); text-transform: uppercase; letter-spacing: var(--tracking-display);
    transition: translate var(--dur-base) var(--ease-out);
  }
  .skip-link:focus-visible { translate: -50% 0; }
}
