/**
 * tokens.css — design tokens (WCAG 2.2 AA–oriented)
 * Palette: live-site–inspired deep navy + cool neutrals + brand gold (see docs/brand-system.md).
 * All paired text/background combinations are chosen to meet ≥ 4.5:1 for body copy
 * and ≥ 3:1 for large UI text and graphical objects where applicable.
 */
:root {
  /* —— Brand & surfaces —— */
  --color-bg: #f7f9fc;
  --color-bg-elevated: #ffffff;
  --color-surface-subtle: #eef2f7;
  --color-surface-muted: #e2e8f0;
  --color-border: #c8d4e4;
  --color-border-strong: #94a3b8;

  --color-text: #15202b;
  --color-text-muted: #3d4f5f;
  --color-text-inverse: #ffffff;

  /* Primary actions: navy fill, white label (high contrast) */
  /* Deeper brand navy (live-site inspired); white UI text on these meets AA for large type in hero */
  --color-primary: #0a3d66;
  --color-primary-hover: #072f51;
  --color-primary-active: #052238;
  --color-primary-disabled: #4a6a80;

  /* Links: saturated but dark enough for 4.5:1 on light surfaces */
  --color-link: #0a5689;
  --color-link-hover: #074470;
  --color-link-active: #05365a;
  --color-link-visited: #3d2d68;

  /* Gold / yellow accent (legacy hero feel) — bars, rules, ampersand; not for long body copy on white */
  --color-brand-gold: #d4a017;
  --color-brand-gold-bright: #e8c547;
  --color-brand-gold-text: #6b5200;
  --color-accent: #a67c00;
  --color-accent-subtle: #f7efd9;

  /* Storefront photo scrim (homepage #locations strips + office-page band). Directive #26: transparent so
     JPEGs read cleanly; raise alpha slightly only if a future photo needs a hairline tie-in to the panel below. */
  --location-photo-scrim-top: transparent;
  --location-photo-scrim-bottom: transparent;

  /* Semantic surfaces (text on these uses --color-text or inverse as noted) */
  --color-info-bg: #e8f2fc;
  --color-info-border: #7eb8e8;
  --color-success-bg: #e6f4ea;
  --color-success-border: #5bae6f;
  --color-warning-bg: #fff8e6;
  --color-warning-border: #e5a524;
  --color-danger-text: #7a1212;
  --color-danger-bg: #fce8e8;
  --color-danger-border: #c53030;

  /* Focus ring: high visibility on both light and navy controls */
  --color-focus-ring: #e8b200;
  --color-focus-ring-inner: #15202b;
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;
  --shadow-focus: 0 0 0 var(--focus-ring-offset) var(--color-bg-elevated),
    0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--color-focus-ring);

  /* —— Typography ——
   * Fluid scale keeps comfortable reading without zoom-only layouts.
   */
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-sans);
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  --text-step--1: clamp(0.875rem, 0.82rem + 0.2vw, 0.9375rem);
  --text-step-0: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --text-step-2: clamp(1.35rem, 1.2rem + 0.5vw, 1.5rem);
  --text-step-3: clamp(1.65rem, 1.4rem + 0.85vw, 2rem);
  --text-step-4: clamp(2rem, 1.65rem + 1.25vw, 2.5rem);
  --text-step-5: clamp(2.35rem, 1.85rem + 1.75vw, 3rem);

  --font-weight-normal: 400;
  --font-weight-medium: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-body: 1.55;
  --line-height-list: 1.45;

  /* —— Spacing (4px base) —— */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3rem;
  --space-10: 4rem;
  --section-space-y: clamp(2.5rem, 5vw, 4rem);

  /* —— Radius & elevation —— */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --shadow-sm: 0 1px 2px rgba(21, 32, 43, 0.06);
  --shadow-md: 0 4px 12px rgba(21, 32, 43, 0.08);
  --shadow-lg: 0 12px 32px rgba(21, 32, 43, 0.1);

  /* —— Layout —— */
  --max-width: 72rem;
  --max-width-prose: 40rem;
  --max-width-narrow: 52rem;
  --bp-sm: 30rem;
  --bp-md: 48rem;
  --bp-lg: 64rem;
  --bp-xl: 80rem;

  /* —— Motion (respect reduced-motion in tokens block below) —— */
  --duration-fast: 120ms;
  --ease-standard: ease-out;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
