@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ShieldCraft — Midnight Luxury. Dark mode only: :root and .dark share one palette.
   Matte black with a faint violet cast, royal purple as the working accent,
   old gold for highlights, key buttons and the borders of important panels. */

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.15 0.012 300);
  --foreground: oklch(0.95 0.012 85);
  --card: oklch(0.19 0.014 300);
  --card-foreground: oklch(0.95 0.012 85);
  --popover: oklch(0.21 0.015 300);
  --popover-foreground: oklch(0.95 0.012 85);
  --primary: oklch(0.5 0.2 300);
  --primary-foreground: oklch(0.985 0.005 300);
  --secondary: oklch(0.74 0.11 85);
  --secondary-foreground: oklch(0.16 0.02 85);
  --muted: oklch(0.24 0.014 300);
  --muted-foreground: oklch(0.74 0.014 85);
  --accent: oklch(0.26 0.03 300);
  --accent-foreground: oklch(0.96 0.01 85);
  --destructive: oklch(0.6 0.2 25);
  --destructive-foreground: oklch(0.15 0 0);
  --border: oklch(0.74 0.11 85 / 32%);
  --input: oklch(1 0 0 / 14%);
  --ring: oklch(0.74 0.11 85);
  --success: oklch(0.72 0.14 150);
  --warning: oklch(0.8 0.14 80);
  --chart-1: oklch(0.74 0.11 85);
  --chart-2: oklch(0.62 0.2 300);
  --chart-3: oklch(0.5 0.2 300);
  --chart-4: oklch(0.85 0.07 85);
  --chart-5: oklch(0.4 0.14 300);
  --sidebar: oklch(0.13 0.012 300);
  --sidebar-foreground: oklch(0.9 0.012 85);
  --sidebar-primary: oklch(0.74 0.11 85);
  --sidebar-primary-foreground: oklch(0.16 0.02 85);
  --sidebar-accent: oklch(0.21 0.02 300);
  --sidebar-accent-foreground: oklch(0.96 0.01 85);
  --sidebar-border: oklch(0.74 0.11 85 / 14%);
  --sidebar-ring: oklch(0.74 0.11 85);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.175 0.013 300);
  --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.23 0.016 300);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(1 0 0 / 6%);
  --border-muted: oklch(1 0 0 / 9%);
  --border-strong: oklch(0.74 0.11 85 / 55%);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.82 0.012 85);

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

  /* ── focus ring (alpha-blended, for soft ring style) ────────── */
  --focus-ring: oklch(0.74 0.11 85 / 0.45);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.7 0.18 25);
  --error-foreground: oklch(0.31 0 0);

  /* ── radius ───────────────────────────────────────────────────── */
  --radius: 0.625rem;
  --radius-none: 0rem;
  --radius-sm: 0.375rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.125rem;
  --radius-full: 9999px;

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 500;
  --line-height-display: 1.08;
  --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 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);

  /* ── 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.15 0.012 300);
  --foreground: oklch(0.95 0.012 85);
  --card: oklch(0.19 0.014 300);
  --card-foreground: oklch(0.95 0.012 85);
  --popover: oklch(0.21 0.015 300);
  --popover-foreground: oklch(0.95 0.012 85);
  --primary: oklch(0.5 0.2 300);
  --primary-foreground: oklch(0.985 0.005 300);
  --secondary: oklch(0.74 0.11 85);
  --secondary-foreground: oklch(0.16 0.02 85);
  --muted: oklch(0.24 0.014 300);
  --muted-foreground: oklch(0.74 0.014 85);
  --accent: oklch(0.26 0.03 300);
  --accent-foreground: oklch(0.96 0.01 85);
  --destructive: oklch(0.6 0.2 25);
  --destructive-foreground: oklch(0.985 0 0);
  --border: oklch(0.74 0.11 85 / 32%);
  --input: oklch(1 0 0 / 14%);
  --ring: oklch(0.74 0.11 85);
  --success: oklch(0.72 0.14 150);
  --warning: oklch(0.8 0.14 80);
  --chart-1: oklch(0.74 0.11 85);
  --chart-2: oklch(0.62 0.2 300);
  --chart-3: oklch(0.5 0.2 300);
  --chart-4: oklch(0.85 0.07 85);
  --chart-5: oklch(0.4 0.14 300);
  --sidebar: oklch(0.13 0.012 300);
  --sidebar-foreground: oklch(0.9 0.012 85);
  --sidebar-primary: oklch(0.74 0.11 85);
  --sidebar-primary-foreground: oklch(0.16 0.02 85);
  --sidebar-accent: oklch(0.21 0.02 300);
  --sidebar-accent-foreground: oklch(0.96 0.01 85);
  --sidebar-border: oklch(0.74 0.11 85 / 14%);
  --sidebar-ring: oklch(0.74 0.11 85);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.175 0.013 300);
  --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.23 0.016 300);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(1 0 0 / 6%);
  --border-muted: oklch(1 0 0 / 9%);
  --border-strong: oklch(0.74 0.11 85 / 55%);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.82 0.012 85);

  /* ── primary depth ────────────────────────────────────────────── */
  --primary-hover: color-mix(in srgb, var(--primary) 85%, 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) 7%,  var(--background));

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.74 0.11 85 / 0.45);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.7 0.18 25);
  --error-foreground: oklch(0.985 0 0);
}

/* Dark only: the html element is always treated as dark so shadcn's dark variants apply. */
html {
  color-scheme: dark;
}
