/**
 * BASE & TYPOGRAPHY - PARA LER & APRENDER
 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-main);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Skip link de acessibilidade */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 0.75rem;
}

/* Tipografia Editorial */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.85rem, 2.2vw + 0.85rem, 2.55rem);
  line-height: 1.18;
}

h2 {
  font-size: clamp(1.5rem, 1.6vw + 0.75rem, 2.05rem);
  margin-bottom: 0.65rem;
}

h3 {
  font-size: clamp(1.15rem, 1vw + 0.65rem, 1.35rem);
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.075rem;
  font-weight: 700;
}

p {
  margin-bottom: 0.9rem;
  color: var(--color-text-muted);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

p.lead {
  font-size: 1.075rem;
  line-height: 1.6;
  color: var(--color-text-main);
}

li, blockquote {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

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

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

a:hover {
  color: var(--color-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 2px;
}

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

/* Contêineres */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* Acessibilidade */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Utilitários Visuais */
.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }
