/*
 * Mesurit design tokens (working version).
 *
 * Source: the website briefing of 11 November 2026, derived from the brand
 * presentation of 4 October 2026. Tokens marked "added" come from the brand
 * guide review and were approved on 11 November 2026.
 *
 * Fonts are loaded by the page (Figtree 400, 600 and 700). For production,
 * self-host Figtree (OFL licence) instead of calling Google Fonts.
 */

:root {
  /* Brand colours */
  --mesurit-navy: #1b2a41; /* Primary: headings, dark surfaces, text on yellow */
  --mesurit-yellow: #ffc533; /* Accent: mark, primary button, highlight surfaces */
  --mesurit-offwhite: #f7f7f4; /* Default page background */
  --mesurit-slate: #33435c; /* Body text */

  /* Print (proposed; verify against a physical Pantone guide and a press proof)
     Navy: PMS 533 C. Yellow: PMS 123 C. Off-white: no ink, the paper.
     Slate: screen only; print text in navy or black. */
  --print-navy-preview: #1f2a44; /* PMS 533 C as shown on screen, approximate */
  --print-yellow-preview: #ffc72c; /* PMS 123 C as shown on screen, approximate */

  /* Derived tints (from the briefing) */
  --mesurit-navy-90: #2a3a52; /* Cards on dark */
  --mesurit-line: #e4e4df; /* Decorative dividers on light */
  --mesurit-white: #ffffff; /* Cards on off-white */

  /* Functional colours (added) */
  --mesurit-yellow-soft: #ffe9a8; /* Highlight surfaces, rule notices */
  --mesurit-yellow-hover: #f0b21f; /* Hover and pressed state of yellow */
  --mesurit-text-muted: #5d6a7e; /* Meta text, captions, unavailable options */
  --mesurit-text-muted-inverse: #aeb6c4; /* Meta text on navy */
  --mesurit-border-input: #7f8a9c; /* Form controls on light (3:1) */
  --mesurit-border-inverse: #7889a2; /* Form controls and cards on navy (3:1) */
  --mesurit-error: #b3261e; /* Form errors */
  --mesurit-error-soft: #fdecea; /* Background of form error messages */
  --mesurit-success: #1d6e4a; /* Confirmations: a valid field, a sent form */
  --mesurit-success-soft: #e7f3ec; /* Background of confirmation messages */

  /* Semantic roles */
  --color-bg: var(--mesurit-offwhite);
  --color-surface: var(--mesurit-white);
  --color-text: var(--mesurit-slate);
  --color-text-muted: var(--mesurit-text-muted);
  --color-heading: var(--mesurit-navy);
  --color-accent: var(--mesurit-yellow);
  --color-accent-hover: var(--mesurit-yellow-hover);
  --color-on-accent: var(--mesurit-navy);
  --color-bg-inverse: var(--mesurit-navy);
  --color-surface-inverse: var(--mesurit-navy-90);
  --color-text-inverse: var(--mesurit-offwhite);
  --color-text-muted-inverse: var(--mesurit-text-muted-inverse);
  --color-line: var(--mesurit-line);
  --color-border-input: var(--mesurit-border-input);
  --color-border-inverse: var(--mesurit-border-inverse);
  --color-focus: var(--mesurit-navy); /* Yellow fails 3:1 on light */
  --color-focus-inverse: var(--mesurit-yellow);
  --color-error: var(--mesurit-error);
  --color-error-soft: var(--mesurit-error-soft);
  --color-success: var(--mesurit-success);
  --color-success-soft: var(--mesurit-success-soft);

  /* Typography */
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fw-regular: 400;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fs-small: 0.875rem; /* added */
  --fs-eyebrow: 0.8125rem; /* small caps, letter-spacing 0.08em */
  --fs-body: 1.0625rem;
  --fs-lead: 1.375rem;
  --fs-h4: 1.125rem; /* added */
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  --fs-h1: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  --lh-tight: 1.1;
  --lh-snug: 1.3; /* added, for h3 and h4 */
  --lh-body: 1.55;
  --ls-eyebrow: 0.08em;
  --ls-heading: -0.015em;
  --measure: 65ch; /* added: maximum line length */

  /* Shape */
  --radius-card: 14px;
  --radius-button: 10px;
  --radius-input: 10px; /* added */
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(27, 42, 65, 0.06), 0 8px 24px rgba(27, 42, 65, 0.06);
  --focus-ring: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-focus);

  /* Space and grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Brand angles: 90 degrees is precise, 19 degrees is relaxed */
  --angle-precise: 90deg;
  --angle-relaxed: 19deg;
}
