/* ═══════════════════════════════════════════════════════════════
   STAGE — reset.css
   Normalize, box-model, tipografia base, scrollbar, seleção
   ═══════════════════════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Tipografia base ─────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: 0.2px;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

p {
  color: var(--text);
  line-height: 1.7;
}

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

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

strong { font-weight: 600; color: var(--white); }
em { font-style: italic; }

small {
  font-size: var(--text-xs);
  color: var(--text2);
}

code, pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

code { padding: 1px 6px; }
pre  { padding: var(--space-4); overflow-x: auto; }

/* ── Elementos de formulário base ───────────────────────────── */

button, input, select, textarea {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
}

button { cursor: pointer; border: none; background: none; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

input, select, textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: var(--space-2) var(--space-3);
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text3);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: var(--bg4);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  accent-color: var(--accent);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa5be' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

select option { background: var(--bg3); }

textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

/* ── Listas ──────────────────────────────────────────────────── */

ul, ol { list-style: none; }

/* ── Imagens e mídia ─────────────────────────────────────────── */

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

img { height: auto; }

/* ── Scrollbar customizada ───────────────────────────────────── */

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--border3); }

/* ── Seleção de texto ────────────────────────────────────────── */

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

/* ── Focus visible (acessibilidade) ─────────────────────────── */

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

/* ── Utilitários de display básicos ─────────────────────────── */

.hidden { display: none !important; }
.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;
}
