@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600&family=Nunito:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.975 0.012 90);
  --foreground: oklch(0.27 0.025 150);
  --card: oklch(0.992 0.007 90);
  --card-foreground: oklch(0.27 0.025 150);
  --popover: oklch(0.992 0.007 90);
  --popover-foreground: oklch(0.27 0.025 150);
  --primary: oklch(0.47 0.06 152);
  --primary-foreground: oklch(0.985 0.01 90);
  --secondary: oklch(0.92 0.025 240);
  --secondary-foreground: oklch(0.34 0.05 245);
  --muted: oklch(0.945 0.016 95);
  --muted-foreground: oklch(0.48 0.025 110);
  --accent: oklch(0.93 0.028 150);
  --accent-foreground: oklch(0.3 0.045 152);
  --destructive: oklch(0.52 0.17 28);
  --destructive-foreground: oklch(0.985 0.01 90);
  --border: oklch(0.89 0.022 100);
  --input: oklch(0.86 0.024 100);
  --ring: oklch(0.6 0.06 152);
  --success: oklch(0.48 0.11 142);
  --warning: oklch(0.51 0.1 55);
  --chart-1: oklch(0.6 0.07 152);
  --chart-2: oklch(0.62 0.06 240);
  --chart-3: oklch(0.65 0.1 50);
  --chart-4: oklch(0.78 0.07 85);
  --chart-5: oklch(0.45 0.05 160);
  --sidebar: oklch(0.955 0.02 120);
  --sidebar-foreground: oklch(0.27 0.025 150);
  --sidebar-primary: oklch(0.47 0.06 152);
  --sidebar-primary-foreground: oklch(0.985 0.01 90);
  --sidebar-accent: oklch(0.915 0.032 150);
  --sidebar-accent-foreground: oklch(0.3 0.045 152);
  --sidebar-border: oklch(0.89 0.025 120);
  --sidebar-ring: oklch(0.6 0.06 152);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.955 0.018 90);
  --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(0.997 0.004 90);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.94 0.016 100);
  --border-muted: oklch(0.915 0.02 100);
  --border-strong: oklch(0.78 0.03 110);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.4 0.025 140);

  /* ── primary depth (hover/tint states for brand colour) ─────── */
  --primary-hover: color-mix(in srgb, var(--primary) 90%, var(--foreground));
  --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));

  /* ── focus ring (alpha-blended, for soft ring style) ────────── */
  --focus-ring: oklch(0.6 0.06 152 / 0.4);

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

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

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: Fredoka, Nunito, ui-rounded, system-ui, sans-serif;
  --font-sans: Nunito, ui-rounded, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 500;
  --line-height-display: 1.15;
  --tracking-display: -0.01em;
  --font-weight-body: 400;
  --line-height-body: 1.6;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px oklch(0.35 0.04 110 / 0.06);
  --shadow-md: 0 6px 16px oklch(0.35 0.04 110 / 0.09);
  --shadow-lg: 0 16px 40px oklch(0.35 0.04 110 / 0.13);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 220ms;
  --duration-slow: 360ms;
  --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.2 0.015 150);
  --foreground: oklch(0.95 0.012 90);
  --card: oklch(0.245 0.017 150);
  --card-foreground: oklch(0.95 0.012 90);
  --popover: oklch(0.245 0.017 150);
  --popover-foreground: oklch(0.95 0.012 90);
  --primary: oklch(0.8 0.07 152);
  --primary-foreground: oklch(0.2 0.03 152);
  --secondary: oklch(0.32 0.03 240);
  --secondary-foreground: oklch(0.92 0.025 240);
  --muted: oklch(0.285 0.016 150);
  --muted-foreground: oklch(0.76 0.02 110);
  --accent: oklch(0.31 0.028 152);
  --accent-foreground: oklch(0.94 0.025 150);
  --destructive: oklch(0.72 0.14 28);
  --destructive-foreground: oklch(0.18 0.03 28);
  --border: oklch(0.34 0.018 150);
  --input: oklch(0.38 0.02 150);
  --ring: oklch(0.65 0.06 152);
  --success: oklch(0.8 0.11 142);
  --warning: oklch(0.82 0.09 60);
  --chart-1: oklch(0.75 0.07 152);
  --chart-2: oklch(0.72 0.06 240);
  --chart-3: oklch(0.74 0.09 50);
  --chart-4: oklch(0.84 0.07 85);
  --chart-5: oklch(0.6 0.05 160);
  --sidebar: oklch(0.225 0.017 150);
  --sidebar-foreground: oklch(0.95 0.012 90);
  --sidebar-primary: oklch(0.8 0.07 152);
  --sidebar-primary-foreground: oklch(0.2 0.03 152);
  --sidebar-accent: oklch(0.31 0.028 152);
  --sidebar-accent-foreground: oklch(0.94 0.025 150);
  --sidebar-border: oklch(0.32 0.018 150);
  --sidebar-ring: oklch(0.65 0.06 152);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.225 0.016 150);
  --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(0.285 0.018 150);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.28 0.016 150);
  --border-muted: oklch(0.31 0.017 150);
  --border-strong: oklch(0.46 0.022 150);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.84 0.015 100);

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

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.65 0.06 152 / 0.5);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.76 0.13 28);
  --error-foreground: oklch(0.18 0.03 28);

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

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: Fredoka, Nunito, ui-rounded, system-ui, sans-serif;
  --font-sans: Nunito, ui-rounded, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 500;
  --line-height-display: 1.15;
  --tracking-display: -0.01em;
  --font-weight-body: 400;
  --line-height-body: 1.6;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px oklch(0.1 0.01 150 / 0.3);
  --shadow-md: 0 6px 16px oklch(0.1 0.01 150 / 0.4);
  --shadow-lg: 0 16px 40px oklch(0.1 0.01 150 / 0.5);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 220ms;
  --duration-slow: 360ms;
  --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;
}
