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

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  /* "clip" (e não "hidden") evita rolagem horizontal sem quebrar elementos fixos (sticky) */
  overflow-x: clip;
}

body { font-feature-settings: 'cv11', 'ss01'; }

h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: var(--fs-h1); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); line-height: 1.35; font-weight: 600; }

a { color: var(--primary); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
img, svg, canvas { display: block; max-width: 100%; }
svg.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

::selection { background: var(--primary-soft); }

.muted { color: var(--text-2); }
.small { font-size: var(--fs-small); }
.xs { font-size: var(--fs-xs); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--s2); }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.grow { flex: 1; min-width: 0; }

/* Tela de carregamento */
.boot {
  min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: var(--s4);
  color: var(--text-2); font-size: var(--fs-small);
}
.boot-mark {
  width: 48px; height: 48px; border-radius: 14px; background: var(--primary);
  mask: url('../../assets/icone.svg') center / contain no-repeat;
  animation: pulse 1.2s var(--ease) infinite alternate;
}
@keyframes pulse { from { opacity: .45; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
