/* Base: reset, tipografia e utilitários. Componentes em components.css; estrutura em layout.css. */

/* Fonte Sora (SIL Open Font License 1.1 — ver assets/fonts/sora/OFL.txt).
   Hospedada no próprio sistema: nenhuma requisição a serviços externos. */
@font-face {
  font-family: "Sora";
  src: url("../fonts/sora/Sora-Variable.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: var(--leading);
  font-weight: var(--weight-regular);
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: var(--text-2xl); font-weight: var(--weight-extrabold); }
h2 { font-size: var(--text-xl); font-weight: var(--weight-bold); }
h3 { font-size: var(--text-lg); font-weight: var(--weight-bold); }
p { margin: 0 0 var(--space-3); }

a { color: var(--h3-brand); text-underline-offset: 2px; }
a:hover { color: var(--h3-cyan); }

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

code, pre { font-family: var(--font-mono); }
pre {
  overflow-x: auto;
  padding: var(--space-3);
  background: var(--bg-app);
  border-radius: var(--radius-control);
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

img, svg { display: block; max-width: 100%; }

/* Ícones SVG herdam a cor do texto */
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }

/* Utilitários */
.muted { color: var(--text-muted); }
.small { font-size: var(--text-xs); }
.visually-hidden {
  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: var(--space-4);
  top: -48px;
  z-index: var(--z-popover);
  padding: var(--space-2) var(--space-4);
  background: var(--h3-brand);
  color: var(--text-on-brand);
  border-radius: var(--radius-control);
}
.skip-link:focus { top: var(--space-4); }

/* Telas isoladas (login, seleção de empresa, erros) */
.centered {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-6) var(--space-4);
}
.brand { margin: 0 0 var(--space-5); }
.logo { display: block; max-width: 100%; height: auto; }
