/*
  Design tokens for Pulseline.
  Every color, space, and type value the rest of the CSS uses is defined
  here once. Theme switching works by swapping the value of these custom
  properties on [data-theme], not by duplicating rules per theme.
*/

:root {
  /* ---- Color: dark theme (default) ---- */
  --color-bg: #0A0D12;
  --color-surface: #12161F;
  --color-surface-raised: #171C27;
  --color-glass-fill: rgba(255, 255, 255, 0.045);
  --color-glass-fill-strong: rgba(255, 255, 255, 0.07);
  --color-glass-border: rgba(63, 224, 197, 0.16);
  --color-border: #1E2430;
  --color-border-strong: #2A3140;

  --color-text-primary: #E9EDF1;
  --color-text-secondary: #8B94A3;
  --color-text-muted: #545D6B;
  --color-text-on-accent: #06110F;

  --color-accent: #3FE0C5;      /* pulse / healthy signal */
  --color-accent-dim: #1F5A50;
  --color-accent-alert: #FFB84D; /* attention signal */
  --color-danger: #FF6B6B;

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.45);
  --scrim: rgba(6, 8, 12, 0.72);

  /* ---- Type ---- */
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --fs-eyebrow: 0.75rem;
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --fs-h2: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem);
  --fs-h1: clamp(2.4rem, 1.9rem + 2.6vw, 4rem);

  --lh-tight: 1.1;
  --lh-normal: 1.55;

  /* ---- Space (8px base scale) ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 7rem;

  --content-width: 1180px;

  /* ---- Shape ---- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-base: 320ms;
  --dur-slow: 620ms;

  --blur-glass: 18px;
  --focus-ring: 0 0 0 3px rgba(63, 224, 197, 0.55);
}

/* ---- Color: light theme override ---- */
[data-theme='light'] {
  --color-bg: #F3F5F8;
  --color-surface: #FFFFFF;
  --color-surface-raised: #FFFFFF;
  --color-glass-fill: rgba(255, 255, 255, 0.55);
  --color-glass-fill-strong: rgba(255, 255, 255, 0.8);
  --color-glass-border: rgba(15, 154, 133, 0.22);
  --color-border: #E2E6EC;
  --color-border-strong: #CBD2DB;

  --color-text-primary: #10151C;
  --color-text-secondary: #4B5563;
  --color-text-muted: #6B7280;
  --color-text-on-accent: #06110F;

  --color-accent: #0F9A85;
  --color-accent-dim: #CDEDE6;
  --color-accent-alert: #B76E00;
  --color-danger: #D6483F;

  --shadow-glass: 0 8px 32px rgba(16, 21, 28, 0.08);
  --shadow-elevated: 0 24px 60px rgba(16, 21, 28, 0.12);
  --scrim: rgba(243, 245, 248, 0.72);
}

/* Reduce motion globally when the user asks for it. Individual components
   also check this query for anything JS-driven (see js/modules). */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
  }
}
