/* Stencil Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&display=swap');
/* /Stencil Fonts */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&family=Source+Sans+3:ital,wght@0,400..700;1,400..700&display=swap');

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(1 0 0);
  --foreground: #000000;
  --card: oklch(1 0 0);
  --card-foreground: #000000;
  --popover: oklch(1 0 0);
  --popover-foreground: #000000;
  --primary: #000000;
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.975 0 0);
  --secondary-foreground: #000000;
  --muted: oklch(0.965 0 0);
  --muted-foreground: oklch(0.48 0 0);
  --accent: oklch(0.965 0 0);
  --accent-foreground: #000000;
  --destructive: oklch(0.5 0.19 27);
  --destructive-foreground: oklch(1 0 0);
  --border: #000000;
  --input: #000000;
  --ring: #000000;
  --success: oklch(0.5 0.12 150);
  --warning: oklch(0.66 0.14 70);
  --chart-1: #000000;
  --chart-2: oklch(0.42 0 0);
  --chart-3: oklch(0.6 0 0);
  --chart-4: oklch(0.78 0 0);
  --chart-5: oklch(0.9 0 0);
  --sidebar: oklch(1 0 0);
  --sidebar-foreground: #000000;
  --sidebar-primary: #000000;
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.965 0 0);
  --sidebar-accent-foreground: #000000;
  --sidebar-border: #000000;
  --sidebar-ring: #000000;

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.975 0 0);
  --surface-hover:   color-mix(in srgb, var(--foreground) 4%,  var(--background));
  --surface-active:  color-mix(in srgb, var(--foreground) 8%, var(--background));
  --surface-elevated: oklch(1 0 0);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.92 0 0);
  --border-muted: oklch(0.86 0 0);
  --border-strong: #000000;

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.38 0 0);

  /* ── primary depth (hover/tint states for brand colour) ─────── */
  --primary-hover: color-mix(in srgb, var(--primary) 85%, black);
  --primary-muted: color-mix(in srgb, var(--primary) 12%, var(--background));
  --primary-soft:  color-mix(in srgb, var(--primary) 6%,  var(--background));
  --primary-tint:  color-mix(in srgb, var(--primary) 4%,  var(--background));

  /* ── focus ring (alpha-blended, for soft ring style) ────────── */
  --focus-ring: rgb(0 0 0 / 0.35);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.5 0.19 27);
  --error-foreground: oklch(1 0 0);

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

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: 'BRSonoma', sans-serif;
  --font-sans: 'Cormorant Garamond', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-weight-display: 800;
  --line-height-display: 1.1;
  --tracking-display: -0.01em;
  --font-weight-body: 400;
  --line-height-body: 1.55;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 100ms;
  --duration-normal: 180ms;
  --duration-slow: 280ms;
  --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.2rem;
}

.dark {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  /* Pure black page, cards and sheets with pure white ink. Deep Charcoal is
     the writer's opt-in, overriding these in app.css
     (html.dark[data-dark-bg="charcoal"]). */
  --background: #000000;
  --foreground: #ffffff;
  --card: #000000;
  --card-foreground: #ffffff;
  --popover: #0a0a0a;
  --popover-foreground: #ffffff;
  /* Monochrome — the dark-mode accent is reserved for the media hero
     overlay card alone (--hero-accent below); nothing else carries it. */
  --primary: #ffffff;
  --primary-foreground: #000000;
  --secondary: #111111;
  --secondary-foreground: #ffffff;
  --muted: #111111;
  --muted-foreground: #f0f0f0;
  --accent: #1a1a1a;
  --accent-foreground: #ffffff;
  --destructive: oklch(0.66 0.18 25);
  --destructive-foreground: #ffffff;
  --border: #262626;
  --input: var(--border);
  --ring: #ffffff;
  --success: oklch(0.72 0.12 150);
  --warning: oklch(0.8 0.14 70);
  --chart-1: #ffffff;
  --chart-2: oklch(0.78 0 0);
  --chart-3: oklch(0.6 0 0);
  --chart-4: oklch(0.45 0 0);
  --chart-5: oklch(0.32 0 0);
  --sidebar: #000000;
  --sidebar-foreground: #ffffff;
  --sidebar-primary: #ffffff;
  --sidebar-primary-foreground: #000000;
  --sidebar-accent: #1a1a1a;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: #262626;
  --sidebar-ring: #ffffff;

  /* The one exception: the media hero overlay card (title/label card on
     source and draft headers). Reuses the app's one established blue —
     pillar-navy (app.css) — rather than introducing a new shade; nothing
     else reads this token. */
  --hero-accent: var(--pillar-navy);
  --hero-accent-foreground: #ffffff;

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: #0a0a0a;
  --surface-elevated: #0a0a0a;

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: #1a1a1a;
  --border-muted: #262626;
  --border-strong: #4d4d4d;

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: #f0f0f0;

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

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: rgb(255 255 255 / 0.35);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.7 0.18 25);
  --error-foreground: #ffffff;
}

/* Stencil Tweaks */
@font-face {
  font-family: 'BRSonoma';
  src: url('/assets/fonts/BRSonomaLight.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BRSonoma';
  src: url('/assets/fonts/BRSonomaSemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BRSonoma';
  src: url('/assets/fonts/BRSonomaBlack.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@layer base {
  h1, h2, h3, h4 { font-weight: var(--font-weight-display); }
}
/* /Stencil Tweaks */