/* ISOSCELES PHARMACEUTICALS — Design Tokens
   Brand evolution: clinical biotech, science-forward.
   Palette: deep midnight navy, parchment cream, signal teal accent (immunology),
   warm ember (cold→hot story). */

:root {
  /* Type scale */
  --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.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 1rem + 6vw, 6.5rem);

  /* Spacing */
  --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;

  /* Fonts */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Radii */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

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

  /* Content widths */
  --content-narrow: 680px;
  --content-default: 1040px;
  --content-wide: 1280px;
  --content-full: 100%;
}

/* LIGHT MODE — parchment / midnight */
:root,
[data-theme='light'] {
  --color-bg: #f5f2ec;          /* warm parchment */
  --color-surface: #faf8f3;
  --color-surface-2: #ffffff;
  --color-surface-offset: #ece8df;
  --color-surface-offset-2: #e3ddd0;
  --color-surface-dynamic: #d8d1c0;
  --color-divider: #d8d3c5;
  --color-border: #c9c2b0;

  /* Ink — deep midnight navy */
  --color-text: #0d1b2a;
  --color-text-muted: #51616f;
  --color-text-faint: #98a2ac;
  --color-text-inverse: #f5f2ec;

  /* Primary — Signal Teal (immunotherapy / clinical) */
  --color-primary: #0a7a82;
  --color-primary-hover: #095e64;
  --color-primary-active: #064046;
  --color-primary-highlight: #d2e6e7;

  /* Accent — Ember (the "hot" in cold-to-hot) */
  --color-ember: #c2410c;
  --color-ember-hover: #9a330a;
  --color-ember-highlight: #f3d8c8;

  /* Cold side */
  --color-ice: #2c5b7a;
  --color-ice-highlight: #cfdde6;

  /* Status */
  --color-success: #0f6b3e;
  --color-warning: #b45309;
  --color-error: #9b2c2c;

  /* Shadows tuned to warm parchment */
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, 0.06);
  --shadow-md: 0 6px 18px rgba(13, 27, 42, 0.08);
  --shadow-lg: 0 18px 48px rgba(13, 27, 42, 0.14);
}

/* DARK MODE — midnight surfaces, glowing teal */
[data-theme='dark'] {
  --color-bg: #0a1420;
  --color-surface: #0f1c2c;
  --color-surface-2: #142336;
  --color-surface-offset: #182a3f;
  --color-surface-offset-2: #1d3148;
  --color-surface-dynamic: #243a52;
  --color-divider: #1c2b3e;
  --color-border: #2a3c52;

  --color-text: #e8eef5;
  --color-text-muted: #97a4b3;
  --color-text-faint: #5b6776;
  --color-text-inverse: #0d1b2a;

  --color-primary: #4cc4cc;
  --color-primary-hover: #6cd4db;
  --color-primary-active: #87e0e6;
  --color-primary-highlight: #1a3a3e;

  --color-ember: #f97316;
  --color-ember-hover: #fb923c;
  --color-ember-highlight: #3a1f10;

  --color-ice: #6ba3c9;
  --color-ice-highlight: #1e3447;

  --color-success: #4ade80;
  --color-warning: #fbbf24;
  --color-error: #f87171;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a1420;
    --color-surface: #0f1c2c;
    --color-surface-2: #142336;
    --color-surface-offset: #182a3f;
    --color-surface-offset-2: #1d3148;
    --color-divider: #1c2b3e;
    --color-border: #2a3c52;
    --color-text: #e8eef5;
    --color-text-muted: #97a4b3;
    --color-text-faint: #5b6776;
    --color-text-inverse: #0d1b2a;
    --color-primary: #4cc4cc;
    --color-primary-hover: #6cd4db;
    --color-primary-highlight: #1a3a3e;
    --color-ember: #f97316;
    --color-ice: #6ba3c9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  }
}
