/*
 * F.O.C.O — tokens do design system.
 * Neutros frios + um único azul de ação (#3e63dd).
 * --foco-navy = tinta de títulos; --foco-blue = cor de ação.
 * Grade de 8px; raio de 6px; sombras discretas.
 */

:root,
[data-theme="light"] {
  color-scheme: light;

  /* Marca */
  --accent: #3e63dd;
  --accent-hover: #3451c4;
  --accent-soft: #edf1fe;
  --brand-dot: #3e63dd;
  --foco-navy: #111318;
  --foco-navy-strong: #08090c;
  --foco-navy-soft: #2a2d35;
  --foco-blue: var(--accent);
  --foco-blue-hover: var(--accent-hover);
  --foco-cyan: #0ea5c6;
  --foco-yellow: #fde68a;
  --foco-yellow-hover: #fcd34d;
  --foco-yellow-soft: #fef3c7;

  /* Superfícies */
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #f0f0f2;
  --surface-sunken: #f0f0f2;
  --header-bg: rgba(255, 255, 255, 0.86);
  --header-fg: #111318;
  --header-fg-muted: #6b6f7a;

  /* Texto */
  --text: #111318;
  --text-2: #3c3f47;
  --text-muted: #6b6f7a;
  --text-subtle: #a0a3ab;
  --text-inverse: #ffffff;
  --link: var(--accent);
  --link-hover: var(--accent-hover);

  /* Bordas */
  --border: #e6e6ea;
  --border-strong: #d3d4da;
  --divider: #eeeef1;

  /* Estados */
  --success: #127a4b;
  --success-bg: #ebf7f1;
  --success-border: #b5dfc9;
  --danger: #c2410c;
  --danger-bg: #fef1eb;
  --danger-border: #f6c9b4;
  --warning: #8a5a00;
  --warning-bg: #fef8e7;
  --warning-border: #f3d891;
  --info: var(--accent);
  --info-bg: var(--accent-soft);
  --info-border: #c9d4fa;
  --neutral: #3c3f47;
  --neutral-bg: #f0f0f2;
  --neutral-border: #e6e6ea;
  --brand-badge: #2f4fc0;
  --brand-badge-bg: var(--accent-soft);
  --brand-badge-border: #c9d4fa;

  /* Código */
  --code-bg: #f7f7f9;
  --code-fg: #111318;
  --code-del-bg: #fdeee6;
  --code-del-fg: #8f2c00;
  --code-add-bg: #e6f4ee;
  --code-add-fg: #005c36;

  /* Botões */
  --btn-primary-bg: #111318;
  --btn-primary-bg-hover: #2a2d35;
  --btn-primary-fg: #ffffff;
  --btn-secondary-bg: #ffffff;
  --btn-secondary-fg: #111318;
  --btn-secondary-border: #d3d4da;
  --btn-secondary-bg-hover: #f4f4f6;

  /* Foco */
  --focus-ring: 0 0 0 3px rgba(62, 99, 221, 0.28);
  --focus-outline: 2px solid var(--accent);

  /* Sombras */
  --shadow-1: 0 1px 2px rgba(17, 19, 24, 0.05);
  --shadow-2: 0 1px 3px rgba(17, 19, 24, 0.08), 0 1px 2px rgba(17, 19, 24, 0.04);
  --shadow-3: 0 12px 32px -8px rgba(17, 19, 24, 0.18), 0 2px 6px rgba(17, 19, 24, 0.06);

  /* Grafo */
  --graph-bg: #fafbfc;
  --graph-dot: rgba(102, 110, 122, 0.18);
  --graph-edge: #a2a8b1;

  /* Tipografia */
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-text: "Segoe UI Variable Text", "Segoe UI Variable", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: Consolas, "Cascadia Mono", "SFMono-Regular", Menlo, "Liberation Mono", monospace;

  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --lh-tight: 1.25;
  --lh-base: 1.5;
  --lh-prose: 1.6;

  /* Espaçamento (grade de 8px) */
  --sp-0: 0;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 40px;
  --sp-8: 48px;
  --sp-9: 64px;

  /* Raio */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;

  /* Layout */
  --header-h: 56px;
  --nav-w: 248px;
  --run-w: 304px;
  --content-max: 1200px;
  --content-max-wide: 1440px;
  --measure: 72ch;
}

[data-theme="dark"] {
  color-scheme: dark;

  --accent: #6b8afd;
  --accent-hover: #8aa2ff;
  --accent-soft: rgba(107, 138, 253, 0.14);
  --brand-dot: #6b8afd;
  --foco-navy: #ededf0;

  --bg: #0b0c0f;
  --surface: #121318;
  --surface-2: #17181e;
  --surface-3: #1d1e25;
  --surface-sunken: #0e0f13;
  --header-bg: rgba(11, 12, 15, 0.86);
  --header-fg: #ededf0;
  --header-fg-muted: #8b8d96;

  --text: #ededf0;
  --text-2: #c4c5cb;
  --text-muted: #8b8d96;
  --text-subtle: #5d5f69;
  --link: var(--accent);
  --link-hover: var(--accent-hover);

  --border: #25262e;
  --border-strong: #34363f;
  --divider: #1d1e25;

  --success: #3ccf8e;
  --success-bg: rgba(8, 206, 121, 0.12);
  --success-border: rgba(8, 206, 121, 0.35);
  --danger: #ff8f66;
  --danger-bg: rgba(250, 124, 74, 0.12);
  --danger-border: rgba(250, 124, 74, 0.4);
  --warning: #ffd862;
  --warning-bg: rgba(255, 216, 98, 0.1);
  --warning-border: rgba(255, 216, 98, 0.4);
  --info: var(--accent);
  --info-bg: var(--accent-soft);
  --info-border: rgba(107, 138, 253, 0.35);
  --neutral: #c4c5cb;
  --neutral-bg: #1d1e25;
  --neutral-border: #2a2b33;
  --brand-badge: #c7d2ff;
  --brand-badge-bg: var(--accent-soft);
  --brand-badge-border: rgba(107, 138, 253, 0.35);

  --code-bg: #0e0f13;
  --code-fg: #dbe2ec;
  --code-del-bg: rgba(250, 124, 74, 0.14);
  --code-del-fg: #ffb394;
  --code-add-bg: rgba(8, 206, 121, 0.12);
  --code-add-fg: #8de8bd;

  --btn-primary-bg: #ededf0;
  --btn-primary-bg-hover: #ffffff;
  --btn-primary-fg: #0b0c0f;
  --btn-secondary-bg: transparent;
  --btn-secondary-fg: #ededf0;
  --btn-secondary-border: #34363f;
  --btn-secondary-bg-hover: #1d1e25;

  --focus-ring: 0 0 0 3px rgba(107, 138, 253, 0.3);
  --focus-outline: 2px solid var(--accent);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.5);

  --graph-bg: #0e0f13;
  --graph-dot: rgba(139, 141, 150, 0.14);
  --graph-edge: #4a4d58;
}
