/* ---------------------------------------------------------------------------
   DESIGN TOKENS — FROZEN  ·  AONE Safety  ·  2026-10-29
   ---------------------------------------------------------------------------
   Written once by /design-direction. Immutable thereafter. The build consumes
   these values; it may not add a colour, typeface, radius, shadow or spacing step.
   Changing them means re-running the direction stage.

   Typography: technical-precision (Cabinet Grotesk + Switzer).
   Colour: client brand (AONE green) on the clinical-light structure: true white
   canvas, cool graphite neutrals, one accent.
   Validate:  node scripts/validate-tokens.mjs tokens.css
--------------------------------------------------------------------------- */

/* Fonts are self-hosted (Fontshare ITF Free Font Licence) so the site loads without any outside service,
   which matters in mainland China. Files live in /fonts and are copied to assets/fonts by the build. */
@font-face { font-family: 'Cabinet Grotesk'; src: url('../fonts/cabinet-grotesk-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cabinet Grotesk'; src: url('../fonts/cabinet-grotesk-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cabinet Grotesk'; src: url('../fonts/cabinet-grotesk-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('../fonts/switzer-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('../fonts/switzer-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('../fonts/switzer-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* --- Colour ------------------------------------------------------------
     Cool graphite neutrals with a slight green cast, held throughout.
     Accent = AONE green, darkened from the logo's #00A652 (3.19:1 with white)
     to #00843F (4.80:1) so it can carry text. At most 3 uses per page.     */
  --color-canvas: #FFFFFF;
  --color-surface: #F4F6F5;
  --color-text: #22302A;          /* 13.78:1 on canvas */
  --color-text-muted: #5E6A64;    /* 5.64:1 on canvas, 5.20:1 on surface */
  --color-accent: #00843F;        /* 4.80:1 with white either way */
  --color-accent-wash: #E6F2EB;
  /* Green for text highlights (owner, 2026-10-29: "highlight with the corporate green").
     #00843F is 4.43:1 on surface, so text uses this slightly deeper step:
     5.46:1 on canvas, 5.03:1 on surface, 4.75:1 on accent-wash.          */
  --color-accent-on-light: #007A3A;
  /* The logo green, for the bar and labels on the dark photo banner: 5.07:1 on ink. */
  --color-accent-on-ink: #00A652;
  --color-hairline: rgba(34, 48, 42, 0.12);
  --color-hairline-strong: rgba(34, 48, 42, 0.28);
  /* Inverted ground: the catalogue's black spec bar, and the one closing band. */
  --color-ink: #18231E;
  --color-on-ink: #F4F6F5;        /* 14.91:1 on ink */
  --color-on-ink-muted: #9FB0A7;  /* 7.12:1 on ink */

  /* --- Typography --------------------------------------------------------
     Two families. No monospace: SKUs and EN codes use Switzer's tabular
     figures, which is where the precision should show.                    */
  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Switzer', 'Helvetica Neue', Arial, sans-serif;

  /* --- Type scale (largest / smallest = 7.4x) ----------------------------- */
  --step--1: 0.875rem;   /* 14px  labels, captions                          */
  --step-0:  1.0625rem;  /* 17px  body                                      */
  --step-1:  1.375rem;   /* 22px  lead, item titles                         */
  --step-2:  min(2.5rem, max(1.875rem, 3vw));    /* 30–40px  section heading   */
  --step-3:  min(3rem, max(2.25rem, 3.8vw));     /* 36–48px  major heading     */
  --step-4:  min(5.25rem, max(2.75rem, 6vw));    /* 44–84px  display           */
  /* Revised 2026-10-29 at the owner's request ("more corporate"): display
     reduced from 104px to 84px; ratio stays at 6.0x.                       */

  /* --- Spacing ------------------------------------------------------------ */
  --space-section: clamp(4rem, 8vw, 7rem);        /* 64–112px; tightened 2026-11-01 ("refine the design") */
  --space-block: clamp(2.5rem, 5vw, 4.5rem);
  --space-gutter: clamp(1rem, 4vw, 3rem);
  --space-row: 1.75rem;
  --wrap: 1320px;

  /* --- Form --------------------------------------------------------------- */
  --radius-sm: 2px;
  --radius-md: 4px;
  /* Brand shape: the rounded diamond from AONE's certificate-wall signage (owner, 2026-11-01:
     "add more branding elements"). Used only for that motif, never on cards or buttons. */
  --radius-brand: 18%;
  /* Softly rounded photographs and cards (owner reference, 2026-11-04). */
  --radius-lg: 12px;

  /* --- Motion -------------------------------------------------------------
     T2: page-load entrance, scroll reveals, count-up figures, plus the earlier mask
     reveal, stagger-rise and rating bars. Hover states are chrome.         */
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --duration-fast: 200ms;
  --duration-base: 400ms;
  --duration-slow: 900ms;
  --motion-tier: 2;  /* raised 2026-11-07 at the owner's request ("add more animation") */
}

@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;
  }
}
