/* ============================================
   BASE — Reset e estilos globais
   Reset moderno, tipografia base e comportamentos
   padrão do documento.
   ============================================ */

/* — Reset moderno — */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* — Comportamento suave de scroll — */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* — Ajuste de scroll para âncoras (fixed header) — */
section[id] {
  scroll-margin-top: calc(var(--nav-height) + var(--space-1));
}

/* — Body — */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* — Tipografia — */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-hero);
  font-weight: var(--font-weight-extrabold);
}

h2 {
  font-size: clamp(1.75rem, 4vw, var(--font-size-4xl));
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

p {
  max-width: 65ch;
  line-height: var(--line-height-relaxed);
}

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

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

/* Foco visível para acessibilidade (navegação por teclado) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* — Imagens — */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* — Listas — */
ul,
ol {
  list-style: none;
}

/* — Formulários — */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

/* — Seleção de texto com cor do brand — */
::selection {
  background: var(--color-primary);
  color: var(--color-white);
}

::-moz-selection {
  background: var(--color-primary);
  color: var(--color-white);
}

/* — Container principal — */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* — Skip navigation (acessibilidade) — */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-3) var(--space-6);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: var(--z-toast);
  font-weight: var(--font-weight-semibold);
  transition: top var(--transition-fast);
}

.skip-nav:focus {
  top: 0;
}

/* — Scrollbar customizada — */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-bg-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}