/* ─────────────────────────────────────────────────────────────────────
   Trinet Visions · Command Center — Design Tokens
   Light, spatial, agent-ops. Trinet red as the pulse.
   ───────────────────────────────────────────────────────────────────── */

:root {
  /* ── Brand ───────────────────────────────────────────────────────── */
  --brand-red: #9E2525;
  --brand-red-deep: #8E2121;
  --brand-red-dark: #8B0000;
  --brand-red-soft: #F5E1E1;
  --brand-red-wash: #FBF3F3;

  /* ── Canvas ──────────────────────────────────────────────────────── */
  --canvas: #FAFAF7;            /* warm off-white page bg */
  --canvas-tint: #F4F5F2;       /* subtle separator regions */
  --surface: #FFFFFF;           /* card/panel surface */
  --surface-raised: #FFFFFF;    /* same, but with shadow */
  --surface-sunken: #F7F8F6;    /* nested wells, code blocks */
  --surface-overlay: rgba(255, 255, 255, 0.72); /* glass over canvas */

  /* ── Ink (text) ──────────────────────────────────────────────────── */
  --ink-1: #0A0B0F;             /* headlines, primary */
  --ink-2: #2A2D36;             /* body */
  --ink-3: #5A6072;             /* secondary, captions */
  --ink-4: #8E94A6;             /* muted, placeholders */
  --ink-5: #B7BCC8;             /* disabled */

  /* ── Lines ───────────────────────────────────────────────────────── */
  --line-1: rgba(15, 18, 25, 0.06);   /* hairline, default border */
  --line-2: rgba(15, 18, 25, 0.10);   /* divider */
  --line-3: rgba(15, 18, 25, 0.16);   /* hover/focus border */

  /* ── Status accents ──────────────────────────────────────────────── */
  --success: #06A66B;
  --success-soft: #E6F7EF;
  --warning: #E89B0E;
  --warning-soft: #FCF2DC;
  --danger: var(--brand-red);
  --danger-soft: var(--brand-red-wash);
  --info: #2E6BE8;
  --info-soft: #E5EDFD;

  /* Agent state */
  --agent-idle: #B7BCC8;
  --agent-active: var(--brand-red);
  --agent-thinking: #6A4FE8;

  /* ── Shadows ─────────────────────────────────────────────────────── */
  --shadow-xs:  0 1px 2px rgba(15, 18, 25, 0.04);
  --shadow-sm:  0 2px 4px rgba(15, 18, 25, 0.04), 0 1px 2px rgba(15, 18, 25, 0.04);
  --shadow-md:  0 4px 12px rgba(15, 18, 25, 0.06), 0 2px 4px rgba(15, 18, 25, 0.04);
  --shadow-lg:  0 12px 32px rgba(15, 18, 25, 0.08), 0 4px 8px rgba(15, 18, 25, 0.04);
  --shadow-xl:  0 24px 64px rgba(15, 18, 25, 0.12), 0 8px 16px rgba(15, 18, 25, 0.06);
  --shadow-pop: 0 32px 80px rgba(15, 18, 25, 0.18), 0 12px 24px rgba(15, 18, 25, 0.08);

  /* Trinet red glow / bloom — the pulse */
  --bloom-soft:   0 0 0 1px rgba(231, 27, 36, 0.20), 0 0 18px rgba(231, 27, 36, 0.18);
  --bloom-strong: 0 0 0 1px rgba(231, 27, 36, 0.40), 0 0 32px rgba(231, 27, 36, 0.28);

  /* Focus ring — accessibility */
  --ring: 0 0 0 2px var(--canvas), 0 0 0 4px var(--brand-red);

  /* ── Type ────────────────────────────────────────────────────────── */
  --font-ui: 'Inter', 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'JetBrains Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-display: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;

  --fs-11: 0.6875rem;   /* 11px */
  --fs-12: 0.75rem;     /* 12px */
  --fs-13: 0.8125rem;   /* 13px */
  --fs-14: 0.875rem;    /* 14px — base */
  --fs-15: 0.9375rem;   /* 15px */
  --fs-16: 1rem;        /* 16px */
  --fs-18: 1.125rem;    /* 18px */
  --fs-20: 1.25rem;     /* 20px */
  --fs-24: 1.5rem;      /* 24px */
  --fs-32: 2rem;        /* 32px */
  --fs-44: 2.75rem;     /* 44px */
  --fs-64: 4rem;        /* 64px */

  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-uppercase: 0.08em;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ── Space ───────────────────────────────────────────────────────── */
  --space-1: 0.25rem;   /* 4 */
  --space-2: 0.5rem;    /* 8 */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.25rem;   /* 20 */
  --space-6: 1.5rem;    /* 24 */
  --space-8: 2rem;      /* 32 */
  --space-10: 2.5rem;   /* 40 */
  --space-12: 3rem;     /* 48 */
  --space-16: 4rem;     /* 64 */
  --space-24: 6rem;     /* 96 */

  /* ── Radii ───────────────────────────────────────────────────────── */
  --radius-2: 2px;
  --radius-4: 4px;
  --radius-6: 6px;
  --radius-8: 8px;
  --radius-10: 10px;
  --radius-12: 12px;
  --radius-16: 16px;
  --radius-20: 20px;
  --radius-full: 9999px;

  /* ── Layout ──────────────────────────────────────────────────────── */
  --sidebar-w: 240px;
  --sidebar-rail-w: 56px;
  --topbar-h: 52px;
  --content-max: 1240px;
  --reading-max: 720px;

  /* ── Motion ──────────────────────────────────────────────────────── */
  --dur-instant: 80ms;
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;
  --dur-slower: 560ms;
  --dur-cinematic: 820ms;

  /* Springs (cubic-bezier approximations) */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);   /* slight overshoot */
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);          /* sharp start, soft land */
  --ease-glide: cubic-bezier(0.4, 0, 0.2, 1);          /* material */

  /* ── Z ───────────────────────────────────────────────────────────── */
  --z-base: 1;
  --z-sticky: 20;
  --z-overlay: 50;
  --z-popover: 80;
  --z-modal: 100;
  --z-toast: 200;
  --z-command: 300;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-instant: 0ms;
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
    --dur-slower: 0ms;
    --dur-cinematic: 0ms;
  }
}
