/* Derlyz Design Tokens — copied from marketing site (derlyz.com) */

:root {
  /* Type scale — app uses tighter range (cap at --text-xl for titles) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.1vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: 0.9375rem; /* 15px — dashboard density */
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;

  /* Spacing (4px base) */
  --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;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 120ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts — app UI is Inter-only; Fraunces is for marketing pages */
  --font-body: 'Inter', 'Helvetica Neue', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Layout */
  --sidebar-w: 240px;
  --topbar-h: 56px;
}

/* LIGHT MODE */
:root,
[data-theme='light'] {
  --color-bg: #f7f9fa;
  --color-surface: #ffffff;
  --color-surface-2: #f1f4f6;
  --color-surface-offset: #e9eef0;
  --color-surface-dynamic: #dde4e8;
  --color-divider: #e2e8ec;
  --color-border: #d2dbe0;
  --color-border-strong: #b9c5cc;

  --color-text: #0c1d22;
  --color-text-muted: #556871;
  --color-text-faint: #8b9aa2;
  --color-text-inverse: #f7fbfc;

  --color-primary: #0d7378;
  --color-primary-hover: #0a5b5f;
  --color-primary-active: #074448;
  --color-primary-soft: #e0f1f2;
  --color-primary-ink: #074448;

  --color-accent: #6b3fd4;
  --color-accent-hover: #5a2fc0;
  --color-accent-active: #4722a1;
  --color-accent-soft: #ede6fb;
  --color-accent-ink: #2d1566;

  --color-success: #15803d;
  --color-success-soft: #dcfce7;
  --color-warning: #b45309;
  --color-warning-soft: #fef3c7;
  --color-error: #b42318;
  --color-error-soft: #fee2e2;

  --gradient-brand: linear-gradient(135deg, #0d7378 0%, #2a7ab0 45%, #6b3fd4 100%);
  --gradient-brand-soft: linear-gradient(135deg, #e0f1f2 0%, #ede6fb 100%);

  --shadow-xs: 0 1px 2px rgba(12, 29, 34, 0.04);
  --shadow-sm: 0 2px 6px rgba(12, 29, 34, 0.06);
  --shadow-md: 0 8px 24px rgba(12, 29, 34, 0.08);
  --shadow-lg: 0 20px 48px rgba(12, 29, 34, 0.12);

  /* Heatmap intensity gradient (teal to purple) */
  --heat-0: #f1f4f6;
  --heat-1: #d6e8ea;
  --heat-2: #a9d3d6;
  --heat-3: #6bb8be;
  --heat-4: #3d9098;
  --heat-5: #0d7378;
  --heat-6: #3e5dab;
  --heat-7: #6b3fd4;
  --heat-8: #4722a1;
}

/* DARK MODE */
[data-theme='dark'] {
  --color-bg: #0a1416;
  --color-surface: #0f1c1f;
  --color-surface-2: #142529;
  --color-surface-offset: #182d31;
  --color-surface-dynamic: #20383d;
  --color-divider: #1c3337;
  --color-border: #294247;
  --color-border-strong: #3a5760;

  --color-text: #e8eef0;
  --color-text-muted: #8ea4ab;
  --color-text-faint: #5c7178;
  --color-text-inverse: #0a1416;

  --color-primary: #3dc3c9;
  --color-primary-hover: #5ed4d9;
  --color-primary-active: #7ae2e6;
  --color-primary-soft: #123236;
  --color-primary-ink: #d8f5f6;

  --color-accent: #a481f0;
  --color-accent-hover: #b89af3;
  --color-accent-active: #ccb4f5;
  --color-accent-soft: #241842;
  --color-accent-ink: #ede6fb;

  --color-success: #4ade80;
  --color-success-soft: #0d2a18;
  --color-warning: #fbbf24;
  --color-warning-soft: #2a1f05;
  --color-error: #f87171;
  --color-error-soft: #2a0f0f;

  --gradient-brand: linear-gradient(135deg, #3dc3c9 0%, #6a8fdb 45%, #a481f0 100%);
  --gradient-brand-soft: linear-gradient(135deg, #123236 0%, #241842 100%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5);

  --heat-0: #142529;
  --heat-1: #1a3337;
  --heat-2: #1d4448;
  --heat-3: #1f5e63;
  --heat-4: #3dc3c9;
  --heat-5: #65a8c7;
  --heat-6: #8184d8;
  --heat-7: #a481f0;
  --heat-8: #c5a9f7;
}
