/* ═══════════════════════════════════════════════════════════════════
   APEX v2 — Base (Dark)
   Reset + tipografia editorial + fundo com textura subtil.
═══════════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  height: 100%;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100%;
  overflow-x: hidden;
}

/* Gradiente subtil no fundo — dá profundidade sem distrair */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at top left, rgba(74, 144, 199, 0.04), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(34, 194, 138, 0.03), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variation-settings: "SOFT" 50;
  color: var(--text);
}

h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h3 { font-size: 1.125rem; line-height: 1.25; }
h4 { font-size: 1rem; line-height: 1.3; }

p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

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

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

.serif {
  font-family: var(--font-serif);
  font-variation-settings: "SOFT" 50;
}

.mono {
  font-family: var(--font-mono);
}

/* Eyebrow label — "tipo capítulo I" */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-3);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--line-3);
}

/* ── Inputs base ──────────────────────────────────── */

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* Date/time inputs ficam legíveis em dark */
input[type="time"],
input[type="date"],
input[type="datetime-local"] {
  color-scheme: dark;
}

button {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ── Utilitários ──────────────────────────────────── */

.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;
}

.no-scroll {
  overflow: hidden;
}

/* "SEM DADOS" honesto */
.empty-state {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Scroll em dark fica discreto */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-3) transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--line-3);
  border-radius: 3px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--line-4);
}
