/* ════════════════════════════════════════════════════════════════════════
   GRC Migrate — Design Tokens
   Single source of truth for the dashboard's visual system.
   Partner theming overrides --accent-* custom properties at render time.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted, woff2 only — zero external requests) ─────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2');
}

:root {
  /* ── Typography ────────────────────────────────────────────────────── */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;

  /* ── Dark shell ────────────────────────────────────────────────────── */
  --bg-shell: #0a0e1a;            /* deep navy near-black */
  --bg-shell-raised: #0f1526;
  --bg-grid-line: rgba(148, 163, 184, 0.05);
  --text-on-dark: #e2e8f0;
  --text-on-dark-dim: #94a3b8;
  --text-on-dark-faint: #64748b;

  /* ── Light content surfaces ────────────────────────────────────────── */
  --surface: #ffffff;
  --surface-dim: #f8fafc;
  --text-strong: #0f172a;
  --text-body: #334155;
  --text-dim: #64748b;

  /* ── Glass recipe (dark shell) ─────────────────────────────────────── */
  --glass-bg: rgba(21, 30, 51, 0.62);
  --glass-bg-raised: rgba(30, 41, 66, 0.7);
  --glass-border: rgba(148, 163, 184, 0.14);
  --glass-border-strong: rgba(148, 163, 184, 0.26);
  --glass-blur: 14px;

  /* ── Accent (partner theming overrides these three) ───────────────── */
  --accent: #00A67E;
  --accent-2: #0EA5E9;
  --accent-contrast: #ffffff;
  --accent-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-glow: 0 0 24px color-mix(in srgb, var(--accent) 38%, transparent);
  --accent-glow-strong: 0 0 44px color-mix(in srgb, var(--accent) 55%, transparent);

  /* ── Semantic status ───────────────────────────────────────────────── */
  --status-pass: #34d399;
  --status-pass-soft: rgba(52, 211, 153, 0.14);
  --status-warn: #fbbf24;
  --status-warn-soft: rgba(251, 191, 36, 0.14);
  --status-fail: #f87171;
  --status-fail-soft: rgba(248, 113, 113, 0.14);
  --status-skip: #94a3b8;
  --status-skip-soft: rgba(148, 163, 184, 0.14);
  --status-info: #60a5fa;
  --status-info-soft: rgba(96, 165, 250, 0.14);

  /* Demo banner amber */
  --demo-amber: #f59e0b;
  --demo-amber-text: #451a03;

  /* ── Spacing scale ─────────────────────────────────────────────────── */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* ── Radii ─────────────────────────────────────────────────────────── */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* ── Shadows ───────────────────────────────────────────────────────── */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.22);
  --shadow-raised: 0 4px 12px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.3);
  --shadow-light-card: 0 1px 3px rgba(15, 23, 42, 0.08);

  /* ── Motion ────────────────────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-med: 300ms;
  --dur-slow: 600ms;
}

/* Global reduced-motion collapse: every animation & transition in the app
   dies here. Individual keyframes below also carry their own guards. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
