/*
 * tokens.css
 * Design system foundation — all CSS custom properties.
 * Brand-facing values are semantic so child themes can safely override them.
 */

:root {
  /* ─── Semantic brand tokens ──────────────────────────────────────────── */

  --color-background: #F7F3EE;
  --color-surface: #ECE3D7;
  --color-surface-alt: #FFFDFC;
  --color-text: #2D2723;
  --color-text-muted: #6C625A;
  --color-accent: #8C6A4D;
  --color-border: #D8CDC1;
  --color-contrast: #171412;

  /* ─── Backwards-compatible aliases used by existing block CSS ───────── */

  --color-primary: var(--color-contrast);
  --color-beige: var(--color-background);
  --color-ivory: var(--color-surface-alt);
  --color-wine: #5E4A3E;
  --color-olive: #7A816C;
  --color-gold: #B89B78;
  --color-dark: var(--color-contrast);
  --color-text-soft: var(--color-text-muted);
  --color-white: #FFFFFF;
  --color-muted: #908377;

  /* ─── Spacing ───────────────────────────────────────────────────────── */

  --space-xs: 0.25rem;
  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 6rem;
  --space-2xl: 10rem;
  --space-section: 7.5rem;
  --space-gallery: 5rem;

  /* ─── Layout ────────────────────────────────────────────────────────── */

  --container-width: 1280px;
  --container-padding: var(--space-md);
  --container-width-narrow: 800px;
  --container-width-wide: 1440px;
  --measure-copy: 34rem;

  /* ─── Typography — font families ───────────────────────────────────── */

  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: var(--font-display);
  --font-sans: var(--font-body);

  /* ─── Typography — scale ────────────────────────────────────────────── */

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.75rem;
  --text-6xl: 5rem;

  /* ─── Typography — leading & tracking ──────────────────────────────── */

  --leading-tight: 1.1;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-loose: 1.8;

  --tracking-tight: -0.03em;
  --tracking-normal: 0em;
  --tracking-wide: 0.08em;
  --tracking-widest: 0.18em;

  /* ─── Border radius ─────────────────────────────────────────────────── */

  --radius-sm: 2px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* ─── Transitions ───────────────────────────────────────────────────── */

  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 450ms;

  /* ─── Shadows ───────────────────────────────────────────────────────── */

  --shadow-sm: 0 1px 3px rgba(23, 20, 18, 0.08);
  --shadow-md: 0 4px 16px rgba(23, 20, 18, 0.12);
  --shadow-lg: 0 12px 40px rgba(23, 20, 18, 0.18);

  /* ─── Z-index layers ───────────────────────────────────────────────── */

  --z-base: 0;
  --z-above: 10;
  --z-overlay: 100;
  --z-modal: 200;
  --z-header: 300;
  --z-toast: 400;
}
