/* Brand tokens: the single source of truth for christophermpalmer.com.
   Values from BRAND_GUIDELINES.md section 6.1.

   Loaded only by portfolio pages. Hosted applications never load this file
   (its unprefixed names, such as --color-text, could collide with an
   app's own variables). The portfolio chrome injected into applications
   uses a --pf- prefixed copy that the build generates from this file;
   see scripts/lib/tokens.mjs. */

:root {
  /* ---- Colour: brand ---- */
  --color-navy: #284a63;          /* titles, selected/active, primary emphasis */
  --color-navy-hover: #345d7b;    /* hover on navy */
  --color-sky: #65b5e8;           /* accent rule, selected border. Never text */
  --color-white: #ffffff;

  /* ---- Colour: neutrals (slate) ---- */
  --color-slate-50:  #f8fafc;     /* subtle surfaces, code blocks */
  --color-slate-100: #f1f5f9;     /* hover fill, panel fill, neutral badge */
  --color-slate-200: #e2e8f0;     /* light rules */
  --color-slate-300: #cbd5e1;     /* borders and dividers */
  --color-slate-400: #94a3b8;     /* muted / not-applicable text */
  --color-slate-500: #64748b;     /* secondary text */
  --color-slate-600: #475569;     /* section titles / labels */
  --color-slate-700: #334155;     /* interface text */
  --color-slate-800: #1e293b;     /* long-form body text */
  --color-slate-900: #0f172a;     /* shadow / outline base */

  /* ---- Colour: semantic ---- */
  --color-bg: var(--color-white);
  --color-surface: var(--color-white);
  --color-surface-muted: var(--color-slate-100);
  --color-text: var(--color-slate-800);
  --color-text-ui: var(--color-slate-700);
  --color-text-secondary: var(--color-slate-500);
  --color-text-muted: var(--color-slate-400);
  --color-heading: var(--color-navy);
  --color-label: var(--color-slate-600);
  --color-border: var(--color-slate-300);
  --color-rule: var(--color-slate-200);
  --color-accent: var(--color-sky);
  --color-selected-bg: var(--color-navy);
  --color-selected-bg-hover: var(--color-navy-hover);
  --color-selected-border: var(--color-sky);
  --color-selected-text: var(--color-white);
  --color-hover-bg: var(--color-slate-100);
  --color-highlight-row: #eff6ff;
  --color-focus-halo: rgba(101, 181, 232, 0.45);

  --color-success-bg: #dcfce7;
  --color-success-text: #166534;
  --color-success-strong: #15803d;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #f59e0b;
  --color-warning-text: #92400e;

  /* ---- Typography ---- */
  --font-serif: "Times New Roman", Times, "Liberation Serif", "Nimbus Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --font-size-display: clamp(32px, 6vw, 48px);
  --font-size-title: clamp(22px, 4.5vw, 30px);
  --font-size-h2: 24px;
  --font-size-h3: 18px;
  --font-size-body: 17px;
  --font-size-ui: 16px;
  --font-size-small: 13px;
  --font-size-label: 12px;
  --font-size-micro: 11px;
  --font-size-caption: 9px;

  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --tracking-title: 0.08em;
  --tracking-section: 0.06em;
  --tracking-caption: 0.05em;

  --leading-tight: 1.15;
  --leading-ui: 1.35;
  --leading-body: 1.6;

  /* ---- Spacing ---- */
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* ---- Shape ---- */
  --radius-xs: 2px;
  --radius-inner: 4px;
  --radius-control: 6px;
  --radius-surface: 8px;
  --radius-pill: 999px;
  --border-width: 1px;
  --border: var(--border-width) solid var(--color-border);

  /* ---- Elevation ---- */
  --shadow-float: 0 8px 24px rgba(15, 23, 42, 0.18);
  --outline-swatch: 0 0 0 1px rgba(15, 23, 42, 0.55);
  --sliver-width: 4px;

  /* ---- Motion ---- */
  --transition-fast: 0.15s;

  /* ---- Layout ---- */
  --content-max: 1100px;
  --measure: 68ch;
  --title-rule-width: 56px;
  --title-rule-height: 3px;
  --z-dropdown: 20;
  --z-tooltip: 30;
  --z-chrome: 40;               /* portfolio bar and its menu: above app dropdowns and tooltips */

  /* ---- Component ---- */
  --btn-padding: var(--space-2) var(--space-3);
  --btn-padding-compact: var(--space-1) var(--space-2);
  --surface-padding: var(--space-2-5) var(--space-3);
  --touch-target: 44px;
}

/* Breakpoints (use literally in media queries):
   900px  collapse button groups / nav into dropdowns
   800px  stack side-by-side sections into one column
   700px  tighten page padding */
