/* ============================================================
   Connecticut Managed IT — Design Tokens
   Concept: modern tech-forward / security-minded consultancy
   Fonts: Cabinet Grotesk (display) + Satoshi (body) — Fontshare
   ============================================================ */

:root {
  /* ---- Type scale (fluid clamp) ---- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);
  --text-hero: clamp(2.75rem, 0.8rem + 6vw, 6rem);

  /* ---- Spacing (4px system) ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ---- Radius ---- */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* ---- Transitions ---- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Content widths ---- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1220px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'Cabinet Grotesk', 'General Sans', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

/* ---- Light mode (default) ---- */
:root,
[data-theme='light'] {
  --color-bg: #f4f6fa;
  --color-surface: #ffffff;
  --color-surface-2: #fbfcfe;
  --color-surface-offset: #eaeef4;
  --color-surface-offset-2: #dde3ec;
  --color-surface-dynamic: #d3dae5;
  --color-divider: #e3e8f0;
  --color-border: #d3dae5;

  --color-text: #10141f;
  --color-text-muted: #576174;
  --color-text-faint: #97a0b3;
  --color-text-inverse: #f4f6fa;

  /* Primary — circuit blue-violet */
  --color-primary: #3448e0;
  --color-primary-hover: #2837b3;
  --color-primary-active: #1e2a8c;
  --color-primary-highlight: #dde2fa;

  /* Secondary accent — signal cyan (used sparingly: icons, small highlights) */
  --color-cyan: #0e94a8;
  --color-cyan-hover: #0b7686;
  --color-cyan-active: #085a66;
  --color-cyan-highlight: #d4eef2;

  --color-success: #1c7d4e;
  --color-success-hover: #146239;
  --color-success-active: #0e4a2b;
  --color-success-highlight: #d7ece1;

  --color-warning: #a15c12;
  --color-warning-highlight: #f0ddc4;

  --color-error: #b3253f;
  --color-error-highlight: #f2d6dc;

  --shadow-sm: 0 1px 2px oklch(0.15 0.02 265 / 0.06);
  --shadow-md: 0 6px 20px oklch(0.15 0.02 265 / 0.08);
  --shadow-lg: 0 20px 48px oklch(0.15 0.02 265 / 0.14);
}

/* ---- Dark mode ---- */
[data-theme='dark'] {
  --color-bg: #0a0d14;
  --color-surface: #10141e;
  --color-surface-2: #141926;
  --color-surface-offset: #171d2c;
  --color-surface-offset-2: #1d2434;
  --color-surface-dynamic: #262e42;
  --color-divider: #1e2434;
  --color-border: #2a3245;

  --color-text: #e6e9f2;
  --color-text-muted: #929cb3;
  --color-text-faint: #5c6580;
  --color-text-inverse: #10141e;

  --color-primary: #7b8bf5;
  --color-primary-hover: #97a4f7;
  --color-primary-active: #aeb9f9;
  --color-primary-highlight: #232a4d;

  --color-cyan: #4fd2e6;
  --color-cyan-hover: #6fdcec;
  --color-cyan-active: #93e5f0;
  --color-cyan-highlight: #17313a;

  --color-success: #55c58a;
  --color-success-highlight: #143526;

  --color-warning: #e0a35d;
  --color-warning-highlight: #3a2a15;

  --color-error: #e8637d;
  --color-error-highlight: #3a1922;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a0d14;
    --color-surface: #10141e;
    --color-surface-2: #141926;
    --color-surface-offset: #171d2c;
    --color-surface-offset-2: #1d2434;
    --color-surface-dynamic: #262e42;
    --color-divider: #1e2434;
    --color-border: #2a3245;
    --color-text: #e6e9f2;
    --color-text-muted: #929cb3;
    --color-text-faint: #5c6580;
    --color-text-inverse: #10141e;
    --color-primary: #7b8bf5;
    --color-primary-hover: #97a4f7;
    --color-primary-active: #aeb9f9;
    --color-primary-highlight: #232a4d;
    --color-cyan: #4fd2e6;
    --color-cyan-hover: #6fdcec;
    --color-cyan-active: #93e5f0;
    --color-cyan-highlight: #17313a;
    --color-success: #55c58a;
    --color-success-highlight: #143526;
    --color-warning: #e0a35d;
    --color-warning-highlight: #3a2a15;
    --color-error: #e8637d;
    --color-error-highlight: #3a1922;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 6px 20px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.55);
  }
}
