/* AJ Trades Co design tokens v0.2 (12 Oct 2026)
   Source of truth for colour, type, space and shape. See ../03-design-system.md for the rules.
   Every colour pairing marked "AA" has been contrast-checked (WCAG 2.2). */

:root {
  /* ---------- Brand: lifted straight from the logo files ---------- */
  --aj-blue-hi:   #0096E3; /* logo gradient top stop. Accent text + icons on dark (6.0:1 on ink-0) */
  --aj-blue:      #0379C5; /* logo gradient bottom stop. Primary button fill, white text 4.6:1 AA */
  --aj-blue-press:#0369AD; /* hover/pressed button, white text 5.8:1 */
  --aj-blue-deep: #0066B3; /* links + accents on light surfaces (5.3:1 on paper) */
  --aj-gradient:  linear-gradient(180deg, #0096E3 0%, #0379C5 100%); /* LOGO ONLY. Never on UI. */

  /* ---------- Trade icons: the brand. Colours exactly as in the logo ---------- */
  --trade-plumbing:   #017EDA; /* drop */
  --trade-electrical: #FCBE23; /* bolt */
  --trade-gas:        #FE570F; /* flame */
  --trade-hvac:       #FFFFFF; /* snowflake (ink on light) */

  /* Trade fields: ink tinted toward each trade. Flat, never gradients. */
  --field-plumbing:   #091E2F;  --field-plumbing-2:   #082943;
  --field-electrical: #252011;  --field-electrical-2: #352B13;
  --field-gas:        #2A160F;  --field-gas-2:        #3D1C0F;
  --field-hvac:       #1C242A;  --field-hvac-2:       #27323B;

  /* Accent text inside a chapter (prices, links, the trade word in a heading) */
  --accent-plumbing:   #4FAEF5; /* 7.0:1 on its field */
  --accent-electrical: #FCBE23; /* 9.7:1 */
  --accent-gas:        #FF7A3D; /* 6.6:1 */
  --accent-hvac:       #BFE4F8; /* 11.7:1 */

  /* ---------- Neutrals: cool charcoal to sit with the blue ---------- */
  --ink-0:  #0A0C0F; /* page background (dark) */
  --ink-1:  #12151A; /* raised band */
  --ink-2:  #1B1F25; /* card */
  --ink-3:  #262B33; /* card hover, input fill */
  --line-dark: #2B313A; /* 1px rules on dark */
  --steel:  #8A929C; /* muted text on dark (6.2:1 ink-0, 5.3:1 ink-2) */
  --steel-l:#AEB5BE; /* secondary text on dark (9.5:1) */
  --white:  #FFFFFF;
  --text-dark-bg: #F7F7F5; /* body text on dark: a touch off pure white to cut glare */

  --paper:   #F1F2F0; /* light section background (concrete) */
  --paper-2: #E4E6E3; /* light card / alt band */
  --line-light: #D3D7D2;
  --text-light-bg: #0A0C0F; /* 17.4:1 on paper */
  --muted-light-bg: #4B535C; /* 7.0:1 on paper */

  /* ---------- Signals ---------- */
  --hi-vis:   #FCBE23;  /* the pipe separator, stars, focus ring on dark */
  --focus-light: #0066B3; /* focus ring on light */
  --urgent:   #FE570F;  /* emergency labels on dark (gas leak, burst pipe) */
  --error-light: #C2410C; /* form errors on light (4.6:1) */
  --ok-dark:  #3DBE7A;  /* "open now", success on dark (8.3:1) */
  --ok-light: #146C40;

  /* ---------- Type ---------- */
  /* One variable family, three widths. Self-host Archivo (wdth 62-125, wght 100-900), latin subset. */
  --font: "Archivo", "Arial", "Helvetica Neue", sans-serif;
  --w-wide: 125;   /* short brand lines only, echoes the TRADES wordmark */
  --w-std: 100;    /* headings + body */
  --w-narrow: 82;  /* labels, nav, data, prices */

  --fs-display: clamp(2.75rem, 1.6rem + 5.2vw, 6rem);    /* 44 -> 96 */
  --fs-h1:      clamp(2.25rem, 1.5rem + 3.4vw, 4.25rem); /* 36 -> 68 */
  --fs-h2:      clamp(1.875rem, 1.35rem + 2.4vw, 3.25rem); /* 30 -> 52 */
  --fs-h3:      clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem); /* 20 -> 26 */
  --fs-lead:    clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem); /* 18 -> 22 */
  --fs-body:    1.125rem;  /* 18 */
  --fs-small:   0.9375rem; /* 15 */
  --fs-label:   0.8125rem; /* 13, uppercase, tracked */
  --fs-min:     0.875rem;  /* 14: nothing readable goes below this */

  --lh-tight: 0.95;
  --lh-head: 1.05;
  --lh-body: 1.55;
  --track-label: 0.12em;
  --track-head: -0.01em;

  /* ---------- Space (4px base) ---------- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section-y: clamp(64px, 9vw, 128px);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --measure: 66ch;

  /* ---------- Shape ---------- */
  --r-sm: 3px;   /* buttons and inputs only. Photos, sections, tables are square */
  --rule: 1px;
  --rule-color: rgba(255,255,255,.14); /* rules on dark */
  --rule-lockup: rgba(255,255,255,.28); /* the rule under a lockup heading */

  /* Icon scales */
  --icon-inline: 1.2em;
  --icon-marker: clamp(40px, 5vw, 64px);
  --icon-chapter: clamp(240px, 42vw, 620px);

  /* ---------- Motion ---------- */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 120ms;
  --t-med: 200ms;

  /* ---------- Hit targets ---------- */
  --tap: 48px; /* min height for anything tappable */
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; }
}
