/* Brazilian Dev — shared design tokens (single source of truth).
   Plain hand-authored CSS, no build. Factored out of styles.css (Slice 2) so the
   hub and every tool page under /ferramentas share one token system. Load this
   BEFORE styles.css (and before any page CSS). Themed by a [data-theme]
   attribute on <html>; the anti-FOUC inline script sets it before first paint. */

/* ---------- Design tokens (sibling model) ---------- */
:root {
  color-scheme: dark;

  /* Background ramp: deepest -> elevated */
  --bg-0: #0b0f1a;
  --bg-1: #111827;
  --bg-2: #1f2937;
  --bg-3: #232c3d;

  /* Ink ramp: primary / secondary / muted */
  --ink-0: #f9fafb;
  --ink-1: #cbd5e1;
  --ink-2: #9ca3af;

  /* Accent (brand hues kept) */
  --accent: #3b82f6;        /* brand blue */
  --accent-strong: #2563eb; /* button fill — passes 4.5:1 with white */
  --accent-hi: #60a5fa;     /* brighter accent for text-on-dark */
  --accent-ink: #ffffff;    /* text on accent fill */
  --amber: #fbbf24;
  --teal: #2dd4bf;

  /* Lines & focus */
  --border: #374151;
  --border-strong: #4b5563;
  --focus: #fbbf24;         /* dedicated focus token, distinct from brand */
  --link: var(--accent-hi);

  /* Surfaces derived from the ramp */
  --nav-veil: color-mix(in srgb, var(--bg-0) 82%, transparent);
  --grid-line: rgba(148, 163, 184, 0.06); /* blueprint grid, theme-aware */
  --shadow-card: 0 4px 24px #0009, 0 2px 6px #00000059;

  /* One 8px spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  --font-mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Menlo, Consolas, monospace;

  --radius: 1.1rem;
  --maxw: min(1400px, 93vw); /* wide frame; text stays readable via --measure */
  --measure: 64ch;           /* comfortable reading width for long text */
  --ease: 0.15s ease;
  --nav-h: 72px;
}

/* Light theme — brand hues stay; ramps/ink/border/link flip. */
:root[data-theme="light"] {
  color-scheme: light;

  --bg-0: #f4f7fb;
  --bg-1: #ffffff;
  --bg-2: #eef2f8;
  --bg-3: #e6ecf5;

  --ink-0: #13203a;
  --ink-1: #33415c;
  --ink-2: #566175;

  --accent-hi: #2563eb;     /* accent text needs to be readable on light */
  --link: #2563eb;

  --border: #d3dbe8;
  --border-strong: #b7c2d6;

  --nav-veil: color-mix(in srgb, var(--bg-0) 82%, transparent);
  --grid-line: rgba(19, 32, 58, 0.05);
  --shadow-card: 0 4px 24px rgba(19, 32, 58, 0.10), 0 2px 6px rgba(19, 32, 58, 0.06);
}
