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

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.972 0.01 70);
  --foreground: oklch(0.24 0.05 22);
  --card: oklch(0.99 0.007 75);
  --card-foreground: oklch(0.24 0.05 22);
  --popover: oklch(0.99 0.007 75);
  --popover-foreground: oklch(0.24 0.05 22);
  --primary: oklch(0.35 0.13 20);
  --primary-foreground: oklch(0.97 0.015 75);
  --secondary: oklch(0.93 0.022 45);
  --secondary-foreground: oklch(0.32 0.08 22);
  --muted: oklch(0.94 0.015 55);
  --muted-foreground: oklch(0.5 0.035 28);
  --accent: oklch(0.93 0.025 40);
  --accent-foreground: oklch(0.32 0.08 22);
  --destructive: oklch(0.52 0.19 25);
  --destructive-foreground: oklch(0.98 0.01 80);
  --border: oklch(0.88 0.02 45);
  --input: oklch(0.88 0.02 45);
  --ring: oklch(0.62 0.16 40);
  --success: oklch(0.55 0.11 150);
  --warning: oklch(0.7 0.13 75);
  --chart-1: oklch(0.35 0.13 20);
  --chart-2: oklch(0.62 0.17 40);
  --chart-3: oklch(0.55 0.13 15);
  --chart-4: oklch(0.8 0.07 45);
  --chart-5: oklch(0.45 0.1 350);
  --sidebar: oklch(0.955 0.013 55);
  --sidebar-foreground: oklch(0.24 0.05 22);
  --sidebar-primary: oklch(0.35 0.13 20);
  --sidebar-primary-foreground: oklch(0.97 0.015 75);
  --sidebar-accent: oklch(0.91 0.025 45);
  --sidebar-accent-foreground: oklch(0.32 0.08 22);
  --sidebar-border: oklch(0.88 0.02 45);
  --sidebar-ring: oklch(0.62 0.16 40);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.95 0.016 50);
  --surface-hover:   color-mix(in srgb, var(--foreground) 5%,  var(--background));
  --surface-active:  color-mix(in srgb, var(--foreground) 9%, var(--background));
  --surface-elevated: oklch(0.995 0.006 75);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.935 0.015 50);
  --border-muted: oklch(0.91 0.018 48);
  --border-strong: oklch(0.78 0.03 40);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.4 0.045 24);

  /* ── editorial band + accent surfaces (Spicy Margarita rhythm) ── */
  --ink: oklch(0.26 0.09 20);
  --ink-secondary: oklch(0.31 0.09 20);
  --ink-foreground: oklch(0.95 0.02 70);
  --ink-muted-foreground: oklch(0.82 0.03 55);
  --ink-border: oklch(1 0 0 / 14%);
  --blush: oklch(0.85 0.055 35);
  --blush-foreground: oklch(0.3 0.08 22);
  --sage: oklch(0.9 0.075 118);
  --sage-foreground: oklch(0.28 0.05 20);
  --powder: oklch(0.83 0.035 222);
  --powder-foreground: oklch(0.28 0.05 20);

  /* ── primary depth (hover/tint states for brand colour) ─────── */
  --primary-hover: color-mix(in srgb, var(--primary) 88%, var(--foreground));
  --primary-muted: color-mix(in srgb, var(--primary) 14%, var(--background));
  --primary-soft:  color-mix(in srgb, var(--primary) 8%,  var(--background));
  --primary-tint:  color-mix(in srgb, var(--primary) 5%,  var(--background));

  /* ── focus ring (alpha-blended, for soft ring style) ────────── */
  --focus-ring: oklch(0.62 0.16 40 / 0.4);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.52 0.19 25);
  --error-foreground: oklch(0.98 0.01 80);

  /* ── 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: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 500;
  --line-height-display: 1.08;
  --tracking-display: -0.005em;
  --font-weight-body: 400;
  --line-height-body: 1.55;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px oklch(0.3 0.05 325 / 0.06);
  --shadow-md: 0 4px 14px oklch(0.3 0.05 325 / 0.08);
  --shadow-lg: 0 14px 36px oklch(0.3 0.05 325 / 0.12);

  /* ── 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.19 0.035 20);
  --foreground: oklch(0.95 0.015 65);
  --card: oklch(0.235 0.04 20);
  --card-foreground: oklch(0.95 0.015 65);
  --popover: oklch(0.235 0.04 20);
  --popover-foreground: oklch(0.95 0.015 65);
  --primary: oklch(0.72 0.13 38);
  --primary-foreground: oklch(0.2 0.04 22);
  --secondary: oklch(0.29 0.04 20);
  --secondary-foreground: oklch(0.95 0.015 65);
  --muted: oklch(0.29 0.04 20);
  --muted-foreground: oklch(0.72 0.03 45);
  --accent: oklch(0.29 0.04 20);
  --accent-foreground: oklch(0.95 0.015 65);
  --destructive: oklch(0.68 0.18 25);
  --destructive-foreground: oklch(0.98 0.01 80);
  --border: oklch(1 0 0 / 11%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.72 0.13 38);
  --success: oklch(0.7 0.12 150);
  --warning: oklch(0.8 0.13 75);
  --chart-1: oklch(0.72 0.13 38);
  --chart-2: oklch(0.72 0.14 40);
  --chart-3: oklch(0.6 0.13 15);
  --chart-4: oklch(0.82 0.07 45);
  --chart-5: oklch(0.6 0.1 350);
  --sidebar: oklch(0.165 0.03 20);
  --sidebar-foreground: oklch(0.95 0.015 65);
  --sidebar-primary: oklch(0.72 0.13 38);
  --sidebar-primary-foreground: oklch(0.2 0.04 22);
  --sidebar-accent: oklch(0.26 0.04 20);
  --sidebar-accent-foreground: oklch(0.95 0.015 65);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.72 0.13 38);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.22 0.035 20);
  --surface-elevated: oklch(0.29 0.04 20);

  /* ── editorial band + accent surfaces ─────────────────────────── */
  --ink: oklch(0.17 0.03 20);
  --ink-secondary: oklch(0.23 0.04 20);
  --ink-foreground: oklch(0.95 0.015 65);
  --ink-muted-foreground: oklch(0.78 0.03 50);
  --ink-border: oklch(1 0 0 / 12%);
  --blush: oklch(0.72 0.09 32);
  --blush-foreground: oklch(0.2 0.04 22);
  --sage: oklch(0.78 0.07 118);
  --sage-foreground: oklch(0.2 0.04 20);
  --powder: oklch(0.74 0.03 222);
  --powder-foreground: oklch(0.2 0.04 20);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(1 0 0 / 6%);
  --border-muted: oklch(1 0 0 / 8%);
  --border-strong: oklch(1 0 0 / 22%);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.8 0.015 75);

  /* ── primary depth ────────────────────────────────────────────── */
  --primary-tint: color-mix(in srgb, var(--primary) 8%, var(--background));

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.72 0.13 38 / 0.5);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.68 0.18 25);
  --error-foreground: oklch(0.98 0.01 80);
}
