/* Design tokens — values from Figma (lyakigq9lR336PWi8mtchR) */

:root,
:root[data-theme="light"] {
  --background-1: #f8fafc;
  --background-2: #ffffff;
  --surface-muted: #ececf0;
  --foreground-1: #030712;
  --foreground-2: #374151;
  --foreground-3: #6b7280;
  --foreground-on-primary: #ffffff;

  --primary: #06624a;
  --primary-strong: #054f3a;
  --secondary: #72bda3;
  --secondary-soft: #469e7b;

  --tertiary-green-soft: #ecfdf5;
  --tertiary-amber-soft: #fef3c7;
  --tertiary-blue-soft: #eff6ff;

  --border-1: #e5e7eb;
  --border-soft: rgba(0, 0, 0, 0.1);
  --divider-on-primary: rgba(255, 255, 255, 0.2);

  --shadow-card:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.15);
  --shadow-card-strong:
    0 4px 8px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-graph:
    0 20px 25px rgba(0, 0, 0, 0.1),
    0 8px 10px rgba(0, 0, 0, 0.1);

  --gradient-hero: linear-gradient(180deg, #469e7b 6.57%, #06624a 44.84%);

  /* Card-on-muted backgrounds keep light card surface even in dark theme contexts */
  --card-on-muted-bg: #ffffff;
  --card-on-muted-fg: #030712;
  --card-on-muted-fg-muted: #6b7280;

  --hero-link-text: #3b82f6;
}

:root[data-theme="dark"] {
  --background-1: #1f2937;
  --background-2: #111827;
  --surface-muted: #ececf0;
  --foreground-1: #f9fafb;
  --foreground-2: #e2e8f0;
  --foreground-3: #cbd5e1;
  --foreground-on-primary: #f9fafb;

  --primary: #06624a;
  --primary-strong: #054f3a;
  --secondary: #72bda3;
  --secondary-soft: #469e7b;

  --tertiary-green-soft: #ecfdf5;
  --tertiary-amber-soft: #fef3c7;
  --tertiary-blue-soft: #eff6ff;

  --border-1: rgba(229, 231, 235, 0.2);
  --border-soft: rgba(255, 255, 255, 0.1);
  --divider-on-primary: rgba(255, 255, 255, 0.2);

  --shadow-card:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-card-strong:
    0 4px 8px rgba(0, 0, 0, 0.45),
    0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-graph:
    0 20px 25px rgba(0, 0, 0, 0.4),
    0 8px 10px rgba(0, 0, 0, 0.3);

  --gradient-hero: linear-gradient(180deg, #469e7b 6.57%, #06624a 44.84%);

  --card-on-muted-bg: #374151;
  --card-on-muted-fg: #f9fafb;
  --card-on-muted-fg-muted: #cbd5e1;

  --hero-link-text: #60a5fa;
}

/* Auto dark when user hasn't set a preference (no [data-theme] attr) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --background-1: #1f2937;
    --background-2: #111827;
    --foreground-1: #f9fafb;
    --foreground-2: #e2e8f0;
    --foreground-3: #cbd5e1;
    --border-1: rgba(229, 231, 235, 0.2);
    --border-soft: rgba(255, 255, 255, 0.1);
    --card-on-muted-bg: #374151;
    --card-on-muted-fg: #f9fafb;
    --card-on-muted-fg-muted: #cbd5e1;
    --hero-link-text: #60a5fa;
  }
}

/* Spacing & radii */
:root {
  --gap-block: 5px;
  --radius-block: 20px;
  --radius-card: 20px;
  --radius-button: 20px;
  --radius-button-sm: 10px;
  --radius-pill: 9999px;
  --radius-circle: 50px;

  --container-max: 1280px;

  /* Type scale (px) */
  --fz-h1: 60px;
  --fz-h2: 40px;
  --fz-h3: 32px;
  --fz-h4: 24px;
  --fz-h5: 20px;
  --fz-body-lg: 18px;
  --fz-body-md: 16px;
  --fz-body-sm: 14px;
  --fz-caption: 12px;
}
