@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700&family=Instrument+Sans:wght@400..700&family=JetBrains+Mono:wght@400&display=swap");

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.962 0.018 73.1);
  --foreground: oklch(0.257 0.099 264.4);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.257 0.099 264.4);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.257 0.099 264.4);
  --primary: oklch(0.686 0.206 34.8);
  --primary-foreground: oklch(0.257 0.099 264.4);
  --secondary: oklch(0.93 0.03 78);
  --secondary-foreground: oklch(0.257 0.099 264.4);
  --muted: oklch(0.94 0.025 78);
  --muted-foreground: oklch(0.481 0.027 52.3);
  --accent: oklch(0.93 0.03 78);
  --accent-foreground: oklch(0.257 0.099 264.4);
  --destructive: oklch(0.5 0.19 28);
  --destructive-foreground: oklch(0.985 0.01 75);
  --border: oklch(0.910 0.034 77.6);
  --input: oklch(0.86 0.04 80);
  --ring: oklch(0.257 0.099 264.4);
  --success: oklch(0.43 0.1 155);
  --warning: oklch(0.47 0.1 75);
  --chart-1: oklch(0.875 0.187 109.7);
  --chart-2: oklch(0.833 0.127 339.4);
  --chart-3: oklch(0.799 0.070 248.1);
  --chart-4: oklch(0.686 0.206 34.8);
  --chart-5: oklch(0.859 0.074 157.8);
  --sidebar: oklch(1 0 0);
  --sidebar-foreground: oklch(0.257 0.099 264.4);
  --sidebar-primary: oklch(0.686 0.206 34.8);
  --sidebar-primary-foreground: oklch(0.257 0.099 264.4);
  --sidebar-accent: oklch(0.962 0.018 73.1);
  --sidebar-accent-foreground: oklch(0.257 0.099 264.4);
  --sidebar-border: oklch(0.910 0.034 77.6);
  --sidebar-ring: oklch(0.257 0.099 264.4);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.945 0.025 76);
  --surface-hover:   color-mix(in srgb, var(--foreground) 6%,  var(--background));
  --surface-active:  color-mix(in srgb, var(--foreground) 10%, var(--background));
  --surface-elevated: oklch(1 0 0);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.945 0.025 80);
  --border-muted: oklch(0.925 0.03 80);
  --border-strong: oklch(0.8 0.05 78);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.481 0.027 52.3);

  /* ── primary depth (hover/tint states for brand colour) ─────── */
  --primary-hover: oklch(0.631 0.198 34.4);
  --primary-muted: color-mix(in srgb, var(--primary) 15%, var(--background));
  --primary-soft:  color-mix(in srgb, var(--primary) 8%,  var(--background));
  --primary-tint:  color-mix(in srgb, var(--primary) 6%,  var(--background));

  /* ── highlight: the theme's second brand colour, a fill only (never text) ── */
  --highlight: oklch(0.875 0.187 109.7);
  --highlight-foreground: oklch(0.257 0.099 264.4);

  /* ── focus ring (alpha-blended, for soft ring style) ────────── */
  --focus-ring: oklch(0.257 0.099 264.4 / 0.35);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.5 0.19 28);
  --error-foreground: oklch(0.985 0.01 75);

  /* ── radius ───────────────────────────────────────────────────── */
  --radius: 0.75rem;
  --radius-none: 0rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 700;
  --line-height-display: 1.05;
  --tracking-display: -0.03em;
  --font-weight-body: 400;
  --line-height-body: 1.68;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(10, 30, 82, 0.05);
  --shadow-md: 0 4px 14px rgba(10, 30, 82, 0.08);
  --shadow-lg: 0 14px 36px rgba(10, 30, 82, 0.12);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);

  /* ── spacing ──────────────────────────────────────────────────── */
  --spacing-base: 0.25rem;
}

.dark {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.19 0.06 265);
  --foreground: oklch(0.962 0.02 75);
  --card: oklch(0.24 0.07 265);
  --card-foreground: oklch(0.962 0.02 75);
  --popover: oklch(0.24 0.07 265);
  --popover-foreground: oklch(0.962 0.02 75);
  --primary: oklch(0.7 0.2 35);
  --primary-foreground: oklch(0.17 0.08 265);
  --secondary: oklch(0.29 0.07 265);
  --secondary-foreground: oklch(0.962 0.02 75);
  --muted: oklch(0.29 0.07 265);
  --muted-foreground: oklch(0.8 0.035 75);
  --accent: oklch(0.29 0.07 265);
  --accent-foreground: oklch(0.962 0.02 75);
  --destructive: oklch(0.55 0.2 28);
  --destructive-foreground: oklch(0.985 0.01 75);
  --border: oklch(0.34 0.07 265);
  --input: oklch(0.4 0.07 265);
  --ring: oklch(0.87 0.18 108);
  --success: oklch(0.85 0.09 160);
  --warning: oklch(0.87 0.14 95);
  --chart-1: oklch(0.7 0.2 35);
  --chart-2: oklch(0.79 0.08 245);
  --chart-3: oklch(0.85 0.09 160);
  --chart-4: oklch(0.83 0.13 340);
  --chart-5: oklch(0.87 0.18 108);
  --sidebar: oklch(0.22 0.065 265);
  --sidebar-foreground: oklch(0.962 0.02 75);
  --sidebar-primary: oklch(0.7 0.2 35);
  --sidebar-primary-foreground: oklch(0.17 0.08 265);
  --sidebar-accent: oklch(0.29 0.07 265);
  --sidebar-accent-foreground: oklch(0.962 0.02 75);
  --sidebar-border: oklch(0.34 0.07 265);
  --sidebar-ring: oklch(0.87 0.18 108);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.215 0.065 265);
  --surface-hover:   color-mix(in srgb, var(--foreground) 8%,  var(--background));
  --surface-active:  color-mix(in srgb, var(--foreground) 13%, var(--background));
  --surface-elevated: oklch(0.28 0.07 265);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.27 0.065 265);
  --border-muted: oklch(0.3 0.07 265);
  --border-strong: oklch(0.46 0.07 265);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.87 0.03 75);

  /* ── primary depth ────────────────────────────────────────────── */
  --primary-hover: color-mix(in srgb, var(--primary) 88%, var(--foreground));
  --primary-muted: color-mix(in srgb, var(--primary) 22%, var(--background));
  --primary-soft:  color-mix(in srgb, var(--primary) 12%, var(--background));
  --primary-tint: color-mix(in srgb, var(--primary) 8%, var(--background));

  /* ── highlight ────────────────────────────────────────────────── */
  --highlight: oklch(0.87 0.18 108);
  --highlight-foreground: oklch(0.2 0.1 265);

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.87 0.18 108 / 0.5);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.76 0.15 28);
  --error-foreground: oklch(0.17 0.08 265);

  /* ── radius ───────────────────────────────────────────────────── */
  --radius: 0.75rem;
  --radius-none: 0rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ── typography ───────────────────────────────────────────────── */
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 700;
  --line-height-display: 1.05;
  --tracking-display: -0.03em;
  --font-weight-body: 450;
  --line-height-body: 1.65;
  --tracking-body: 0.01em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.45);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);

  /* ── spacing ──────────────────────────────────────────────────── */
  --spacing-base: 0.25rem;
}
