/* ==========================================================================
   Cortex — design tokens

   Ground: DARK (#0a0a0c). Chosen at stage 2 over the light "lab bench"
   alternative. The dark ground carries the existing brand assets and holds up
   against Instagram and TikTok feeds, which is where acquisition comes from.

   Carried forward from the previous build, refined. Every colour and type
   decision in the theme reads from here; nothing hard-codes a hex value.
   ========================================================================== */

:root {
  /* --- ground ------------------------------------------------------------ */
  --cx-bg:          #0a0a0c;
  --cx-bg-alt:      #17191f;
  --cx-panel:       #1f2128;
  --cx-card:        #22252c;

  /* --- rules -------------------------------------------------------------
     Two weights only. A hairline for structure, a softer one for grouping.
     Rules do the work that cards do on most competitor sites.              */
  --cx-line:        #3a3d46;
  --cx-line-soft:   #2e3139;

  /* --- accent ------------------------------------------------------------
     The gold is the brand equity — it comes from the molecular-chain mark.
     Three tiers so it can carry text, edges and fills without flattening.  */
  --cx-gold:        #c9a24b;
  --cx-gold-bright: #e6c477;
  --cx-gold-dim:    #8a7332;
  --cx-gold-wash:   rgba(201, 162, 75, 0.10);

  /* --- text --------------------------------------------------------------- */
  --cx-text:        #f4f4f5;
  --cx-text-mut:    #a5a6ac;
  --cx-text-dim:    #7d7e86;

  /* --- semantic ----------------------------------------------------------
     Separate from the accent. Stock state, COA status, shipping warnings.  */
  --cx-danger:      #c0603f;
  --cx-warn:        #b8893f;
  --cx-ok:          #5f9b73;

  /* --- type --------------------------------------------------------------- */
  --cx-sans: "Archivo", "Inter", "Helvetica Neue", Arial, sans-serif;
  --cx-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --cx-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Courier New", monospace;

  /* Type scale — 1.25 minor third, held to these steps. */
  --cx-t-xs:   0.75rem;
  --cx-t-sm:   0.875rem;
  --cx-t-base: 1rem;
  --cx-t-md:   1.125rem;
  --cx-t-lg:   1.406rem;
  --cx-t-xl:   1.758rem;
  --cx-t-2xl:  2.197rem;
  --cx-t-3xl:  2.746rem;

  /* Wide tracking on uppercase labels — carried from the old build, where
     it was the most consistent and most "instrument panel" decision made. */
  --cx-track-label: 0.18em;
  --cx-track-eyebrow: 0.26em;

  /* --- space / measure ---------------------------------------------------- */
  --cx-wrap:   1280px;
  --cx-measure: 68ch;
  --cx-radius: 3px;

  --cx-s1: 0.25rem;
  --cx-s2: 0.5rem;
  --cx-s3: 0.75rem;
  --cx-s4: 1rem;
  --cx-s5: 1.5rem;
  --cx-s6: 2rem;
  --cx-s7: 3rem;
  --cx-s8: 4.5rem;
}

/* ==========================================================================
   Light surface — utility, not the site ground

   The dark ground won at stage 2, so this is no longer an alternative
   direction. It is kept for surfaces that genuinely need to be light:
   printed COA views, invoices, and anything intended to be read on paper.

   Not an inversion. The gold is darkened to #8a6d22 for text because
   #c9a24b on white measures 2.40:1 and fails WCAG AA; the original survives
   here only for large type, rules and fills.

   Apply with class="cx-light" on <body> or on a wrapping element.
   ========================================================================== */

body.cx-light {
  --cx-bg:          #fbfbf9;
  --cx-bg-alt:      #f2f2ee;
  --cx-panel:       #ffffff;
  --cx-card:        #ffffff;

  --cx-line:        #dcdbd3;
  --cx-line-soft:   #ebeae4;

  --cx-gold:        #8a6d22;
  --cx-gold-bright: #c9a24b;
  --cx-gold-dim:    #b4a077;
  --cx-gold-wash:   rgba(201, 162, 75, 0.12);

  --cx-text:        #16171a;
  --cx-text-mut:    #55575e;
  --cx-text-dim:    #7c7e85;

  --cx-danger:      #9b3d25;
  --cx-warn:        #8a6209;
  --cx-ok:          #2f6a47;
}
