@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ── Brand typefaces (The Legal Paige) ─────────────────────────── */
@font-face {
  font-family: 'IvyPresto Display';
  src: url('/assets/fonts/IvyPresto-Display-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IvyPresto Display';
  src: url('/assets/fonts/IvyPresto-Display-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Acherus Grotesque';
  src: url('/assets/fonts/acherusgrotesque-regular-webfont.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Acherus Grotesque';
  src: url('/assets/fonts/acherusgrotesque-bold-webfont.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* ── shadcn base tokens (TLP warm editorial palette) ──────────── */
  --background: oklch(1 0 0);                 /* white */
  --foreground: oklch(0.145 0 0);             /* black text */
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.392 0.114 15.5);         /* #7a2232 Merlot */
  --primary-foreground: oklch(0.982 0.01 80);
  --secondary: oklch(0.965 0.006 70);
  --secondary-foreground: oklch(0.25 0.01 50);
  --muted: oklch(0.965 0.006 70);
  --muted-foreground: oklch(0.47 0.008 60);
  --accent: oklch(0.928 0.024 20);            /* #f3e8ea Merlot tint */
  --accent-foreground: oklch(0.392 0.114 15.5);
  --destructive: oklch(0.505 0.16 22);
  --destructive-foreground: oklch(0.982 0.01 80);
  --border: oklch(0.9 0.005 70);
  --input: oklch(0.88 0.006 70);
  --ring: oklch(0.392 0.114 15.5);
  --success: oklch(0.34 0.055 155);           /* #1d3a26 Moss */
  --warning: oklch(0.66 0.11 62);
  --chart-1: oklch(0.392 0.114 15.5);
  --chart-2: oklch(0.34 0.055 155);
  --chart-3: oklch(0.47 0.07 55);
  --chart-4: oklch(0.66 0.11 62);
  --chart-5: oklch(0.62 0.02 50);

  /* ── sidebar (Merlot-deep, ivory text) ────────────────────────── */
  --sidebar: oklch(0.278 0.088 16);           /* deep merlot */
  --sidebar-foreground: oklch(0.9 0.014 74);
  --sidebar-primary: oklch(0.972 0.012 74);
  --sidebar-primary-foreground: oklch(0.392 0.114 15.5);
  --sidebar-accent: oklch(0.34 0.09 16);
  --sidebar-accent-foreground: oklch(0.97 0.012 74);
  --sidebar-border: oklch(0.35 0.07 16);
  --sidebar-ring: oklch(0.55 0.09 18);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.975 0.005 70);
  --surface-hover: oklch(0.96 0.006 60);
  --surface-active: oklch(0.93 0.008 50);
  --surface-elevated: oklch(1 0 0);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.935 0.004 70);
  --border-muted: oklch(0.915 0.005 70);
  --border-strong: oklch(0.8 0.008 60);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.36 0.008 55);

  /* ── primary depth ────────────────────────────────────────────── */
  --primary-hover: oklch(0.34 0.108 15);
  --primary-muted: oklch(0.9 0.05 18);
  --primary-soft:  oklch(0.945 0.024 20);
  --primary-tint:  oklch(0.96 0.016 24);

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.392 0.114 15.5 / 0.35);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.505 0.16 22);
  --error-foreground: oklch(0.982 0.01 80);

  /* ── brand role tokens (badges) ───────────────────────────────── */
  --merlot: oklch(0.392 0.114 15.5);
  --moss: oklch(0.34 0.055 155);
  --coffee: oklch(0.44 0.06 45);
  --amber: oklch(0.62 0.1 62);
  --tlp-gray: oklch(0.62 0.006 50);
  --ivory: oklch(0.972 0.012 74);
  --cream: oklch(0.935 0.018 68);

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

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: 'IvyPresto Display', Georgia, serif;
  --font-sans: 'Acherus Grotesque', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 400;
  --line-height-display: 1.08;
  --tracking-display: -0.01em;
  --font-weight-body: 400;
  --line-height-body: 1.55;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px oklch(0.44 0.06 45 / 0.06);
  --shadow-md: 0 4px 14px oklch(0.44 0.06 45 / 0.09);
  --shadow-lg: 0 16px 40px oklch(0.392 0.114 15.5 / 0.14);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 320ms;
  --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 {
  --background: oklch(0.2 0.014 40);
  --foreground: oklch(0.95 0.01 74);
  --card: oklch(0.245 0.016 38);
  --card-foreground: oklch(0.95 0.01 74);
  --popover: oklch(0.245 0.016 38);
  --popover-foreground: oklch(0.95 0.01 74);
  --primary: oklch(0.62 0.13 16);
  --primary-foreground: oklch(0.16 0.01 40);
  --secondary: oklch(0.3 0.018 36);
  --secondary-foreground: oklch(0.95 0.01 74);
  --muted: oklch(0.3 0.018 36);
  --muted-foreground: oklch(0.72 0.02 55);
  --accent: oklch(0.32 0.04 18);
  --accent-foreground: oklch(0.95 0.01 74);
  --destructive: oklch(0.62 0.16 22);
  --destructive-foreground: oklch(0.98 0.01 80);
  --border: oklch(1 0 0 / 12%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.62 0.13 16);
  --success: oklch(0.62 0.09 155);
  --warning: oklch(0.76 0.12 66);

  --sidebar: oklch(0.16 0.02 20);
  --sidebar-foreground: oklch(0.9 0.014 74);
  --sidebar-primary: oklch(0.62 0.13 16);
  --sidebar-primary-foreground: oklch(0.98 0.01 80);
  --sidebar-accent: oklch(0.26 0.04 18);
  --sidebar-accent-foreground: oklch(0.95 0.01 74);
  --sidebar-border: oklch(0.3 0.04 18);
  --sidebar-ring: oklch(0.55 0.1 18);

  --background-secondary: oklch(0.23 0.014 38);
  --surface-hover: oklch(0.28 0.02 36);
  --surface-active: oklch(0.32 0.024 36);
  --surface-elevated: oklch(0.28 0.018 38);

  --border-subtle: oklch(1 0 0 / 7%);
  --border-muted: oklch(1 0 0 / 10%);
  --border-strong: oklch(1 0 0 / 20%);

  --foreground-secondary: oklch(0.75 0.03 55);

  --primary-hover: oklch(0.68 0.13 16);
  --primary-muted: oklch(0.36 0.06 18);
  --primary-soft: oklch(0.3 0.03 18);
  --primary-tint: oklch(0.27 0.024 18);

  --focus-ring: oklch(0.62 0.13 16 / 0.5);
  --error: oklch(0.62 0.16 22);
  --error-foreground: oklch(0.98 0.01 80);

  --merlot: oklch(0.62 0.13 16);
  --moss: oklch(0.62 0.09 155);
  --coffee: oklch(0.68 0.05 50);
  --amber: oklch(0.72 0.11 66);
  --tlp-gray: oklch(0.68 0.006 50);
}
