/* ==========================================================================
   Confidence InSites: design tokens (Phase 2, locked 2026-10-22)
   The only place a colour, size, radius, shadow or easing value is written.
   Budgets (PLAYBOOK/design-constraints.md): 2 font families, 8 type steps,
   1 accent, 3 radii, 3 shadows, 3 easings. If a value is not here, a page
   cannot use it. Source of the choices: work/BRAND.md and work/DIRECTION.md.
   ========================================================================== */
:root {
  /* Surfaces and text (warm neutrals; never pure black or white) */
  --color-bg: #F5F1EA;            /* paper */
  --color-surface: #FBF9F5;       /* raised panel on paper */
  --color-surface-dark: #171311;  /* ink plate */
  --color-text: #1B1715;
  --color-text-2: #4B4440;
  --color-text-muted: #6B635C;    /* 5.2:1 on paper */
  --color-text-on-dark: #F5F1EA;
  --color-text-on-dark-2: #B8B0A6;
  --color-border: #E2DBD0;
  --color-border-dark: #2E2825;

  /* The one accent, with one job: the next action and the key */
  --color-accent: #C9190A;        /* 5.1:1 on paper as text */
  --color-accent-hover: #B5160A;
  --color-accent-on: #FFFFFF;
  --color-accent-soft: #FBF0EE;   /* the only tint: a highlighted ledger row */
  --color-key: #C9190A;           /* the logo key on paper */
  --color-key-on-dark: #F60000;   /* the logo's own red on ink */

  /* Scoped exceptions (design-constraints.md): checks and stars only */
  --color-green: #1F6E43;
  --color-gold: #B8860B;

  /* Type */
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Arial, system-ui, sans-serif;

  /* Type scale: one fluid ratio, eight steps */
  --text-h1-hero: clamp(2.75rem, 1.9rem + 3.9vw, 5.5rem);   /* 44 to 88 */
  --text-h1: clamp(2.25rem, 1.65rem + 2.7vw, 4rem);         /* 36 to 64 */
  --text-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.875rem);     /* 28 to 46 */
  --text-h3: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);      /* 20 to 24 */
  --text-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);/* 18 to 21 */
  --text-body: 1.0625rem;                                   /* 17 */
  --text-small: 0.9375rem;                                  /* 15 */
  --text-eyebrow: 0.8125rem;                                /* 13, tracked caps */
  --text-stat: var(--text-h1);                              /* the ledger figures share the h1 step */

  --leading-tight: 1.02;
  --leading-snug: 1.15;
  --leading-body: 1.55;
  --tracking-display: -0.022em;
  --tracking-eyebrow: 0.12em;

  /* Spacing: 4px base, a full run so sections share a rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --section-pad: clamp(4rem, 3rem + 4vw, 7rem);

  /* Layout */
  --container-max: 1180px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --frame-inset: 14px;            /* the Front Door frame's inner reveal */

  /* Radii (3) */
  --radius-base: 10px;
  --radius-large: 18px;
  --radius-pill: 999px;

  /* Shadows (3) */
  --shadow-card: 0 1px 2px rgba(23, 19, 17, 0.06), 0 12px 32px -20px rgba(23, 19, 17, 0.25);
  --shadow-raised: 0 2px 4px rgba(23, 19, 17, 0.08), 0 24px 48px -24px rgba(23, 19, 17, 0.35);
  --shadow-door: 0 2px 0 rgba(23, 19, 17, 0.08), 0 40px 80px -40px rgba(23, 19, 17, 0.55);

  /* Motion (3 easings, prescribed in PLAYBOOK/motion-design.md) */
  --ease-brand: cubic-bezier(0.2, 0.7, 0.2, 1);        /* every entrance and hover */
  --ease-draw: cubic-bezier(0.65, 0, 0.35, 1);         /* decorative hairline draws */
  --ease-overshoot: cubic-bezier(0.34, 1.56, 0.64, 1); /* the key turning: one small click past, then home */
  --duration-base: 240ms;
  --dur-entrance: 600ms;
  --stagger-step: 70ms;
  --dur-key: 600ms;
  --dur-door: 900ms;
}
