/* Reset, tipografia e corpo. Cor e medida vêm de tokens.css. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + var(--sp-5));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Sem isto, botão e campo caem para a fonte do sistema */
button,
input,
select,
textarea {
  font-family: inherit;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-family: var(--font-titulo);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

p,
ul,
ol,
blockquote,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

strong {
  font-weight: 600;
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: var(--raio-sm);
}

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

.so-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Atalho de teclado para pular a barra superior: só aparece com foco */
.pular {
  position: fixed;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 100;
  padding: var(--sp-3) var(--sp-4);
  background: var(--accent);
  color: var(--texto-sobre-accent);
  border-radius: var(--raio-sm);
  font-weight: 600;
  transform: translateY(-200%);
}

.pular:focus {
  transform: none;
}
