/* ============================================================
   base.css — Tipografia, body, links, headings, defaults
   Mobile-first. Consome tokens-v1.css.
   ============================================================ */

html {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  font-weight: var(--fw-regular);
}

/* ===== Headings ===== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-body); }
h6 { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: var(--ls-wide); }

/* ===== Texto e parágrafos ===== */

p {
  margin: 0;
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  max-width: 70ch;
}

p + p { margin-top: var(--sp-4); }

small { font-size: var(--fs-small); color: var(--color-text-muted); }

strong, b { font-weight: var(--fw-bold); }

em, i { font-style: italic; }

/* ===== Links ===== */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover { color: var(--color-primary-hover); }
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Links inline em parágrafos: sublinhado */
p a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
p a:hover { text-decoration-thickness: 2px; }

/* ===== Listas (default em conteúdo editorial) ===== */

ul:not([role="list"]), ol:not([role="list"]) {
  padding-left: var(--sp-6);
  line-height: var(--lh-relaxed);
}

li + li { margin-top: var(--sp-2); }

/* ===== Imagens ===== */

img { vertical-align: middle; }

/* ===== Code ===== */

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--color-neutral-100);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-xs);
}

/* ===== Selection ===== */

::selection {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* ===== HR ===== */

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--sp-8) 0;
}

/* ===== Skip link (acessibilidade) ===== */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-2);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  z-index: var(--z-toast);
  font-weight: var(--fw-semibold);
}
.skip-link:focus { top: var(--sp-2); }

/* ===== Visually hidden (acessibilidade) ===== */

.visually-hidden,
.sr-only {
  position: absolute !important; /* documentado: utility de screen-reader-only */
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
