/* ==========================================================================
   HustleX Design Tokens
   --------------------------------------------------------------------------
   Companion to "HustleX — Full Design Palette". Every value below is taken
   directly from that document; nothing here is invented.

   Contrast ratios in the comments are computed with the WCAG 2.1 relative
   luminance formula and are verified by `npm run tokens:check`, which fails
   the build if a documented pairing ever regresses.

   USAGE RULES (from §5 of the palette — these are accessibility requirements,
   not stylistic preferences):

   1. NEVER put white text on Bidding Orange (2.34:1) or Reputation Gold
      (1.40:1). Both fail WCAG AA badly. Always pair those two with
      --hx-text-primary (#333333): 5.40:1 on orange, 9.01:1 on gold.
   2. Bidding Orange and Reputation Gold are NOT body-text colours on light
      backgrounds (orange-600 on white = 3.13:1, gold-700 on white = 3.40:1).
      They pass only for large text and UI elements. Use Hustle Blue or
      Platform Blue for links and body-text accents.
   3. Success base (#1F8A63) fails as body copy with white text (4.31:1) but
      passes for large text, icons and buttons.
   4. Warning base (#C96A12) must NOT carry text at all — white is 3.78:1 and
      dark is 3.34:1. Use it only as a border or icon accent. For a readable
      banner use warning-light background with warning-dark text (6.11:1).
   5. Every light/dark semantic pair passes AA comfortably (6.1–7.4:1). That
      is the safe pattern for status banners and badges app-wide.
   ========================================================================== */

:root {
  /* --- Brand anchors (§1) ------------------------------------------------ */
  --hx-hustle-blue: #1f3b7a;      /* Primary — trust, professionalism */
  --hx-platform-blue: #4169e1;    /* Primary — action, energy */
  --hx-bidding-orange: #f98f1e;   /* Accent — CTAs, bidding buttons */
  --hx-reputation-gold: #ffd700;  /* Secondary — ratings, verified users */
  --hx-light-bg: #f7fafd;         /* Background — main surface */
  --hx-text-dark: #333333;        /* Neutral — body text */

  /* --- Hustle Blue ramp (§2) --------------------------------------------- */
  --hx-hustle-50:  #f3f5fa;
  --hx-hustle-100: #dee4f1;
  --hx-hustle-200: #b1c0e1;
  --hx-hustle-300: #7a95d2;
  --hx-hustle-400: #3861bd;
  --hx-hustle-500: #1f3b7a;  /* brand anchor */
  --hx-hustle-600: #1b3266;
  --hx-hustle-700: #172a53;
  --hx-hustle-800: #132140;
  --hx-hustle-900: #0f192f;

  /* --- Platform Blue ramp (§2) ------------------------------------------- */
  --hx-platform-50:  #f7f8fc;
  --hx-platform-100: #e9edf8;
  --hx-platform-200: #ccd5f0;
  --hx-platform-300: #a7b7e9;
  --hx-platform-400: #7893e3;
  --hx-platform-500: #4169e1;  /* brand anchor */
  --hx-platform-600: #234dcc;
  --hx-platform-700: #1e3e9e;
  --hx-platform-800: #172e72;
  --hx-platform-900: #101f4b;

  /* --- Bidding Orange ramp (§2) ------------------------------------------ */
  --hx-orange-50:  #fdf9f6;
  --hx-orange-100: #faf0e6;
  --hx-orange-200: #f5ddc4;
  --hx-orange-300: #f2c798;
  --hx-orange-400: #f3ac60;
  --hx-orange-500: #f98f1e;  /* brand anchor */
  --hx-orange-600: #dd7709;
  --hx-orange-700: #ac5d0a;
  --hx-orange-800: #7c4409;
  --hx-orange-900: #522e07;

  /* --- Reputation Gold ramp (§2) ----------------------------------------- */
  --hx-gold-50:  #fdfcf4;
  --hx-gold-100: #faf6e3;
  --hx-gold-200: #f6edbc;
  --hx-gold-300: #f4e38b;
  --hx-gold-400: #f6dc4b;
  --hx-gold-500: #ffd700;  /* brand anchor */
  --hx-gold-600: #d0b003;
  --hx-gold-700: #a28a05;
  --hx-gold-800: #766406;
  --hx-gold-900: #4f4305;

  /* --- Neutral scale (§3) ------------------------------------------------
     Derived from Platform Blue's hue at 2–3.5% saturation, so greys read as
     part of this system rather than a generic flat grey. */
  --hx-neutral-0:   #ffffff;
  --hx-neutral-50:  #fbfbfb;
  --hx-neutral-100: #f2f2f3;
  --hx-neutral-200: #dfe0e1;
  --hx-neutral-300: #c0c1c4;
  --hx-neutral-400: #9b9ca1;
  --hx-neutral-500: #717379;
  --hx-neutral-600: #515357;
  --hx-neutral-700: #323234;
  --hx-neutral-800: #202122;
  --hx-neutral-900: #141415;
  --hx-neutral-950: #0a0a0a;

  /* --- Semantic colours (§4) ---------------------------------------------
     Deliberately inside the existing blue/orange/gold hue family rather than
     stock Bootstrap red/green. */
  --hx-success:      #1f8a63;  /* jade, blue-leaning */
  --hx-success-light: #e3f3ec;
  --hx-success-dark:  #155e45;

  --hx-danger:       #c4453a;  /* brick-red, warm like the orange */
  --hx-danger-light:  #fbe9e7;
  --hx-danger-dark:   #8f3129;

  --hx-warning:       #c96a12; /* deep amber, darker than Bidding Orange so it
                                  doesn't compete with the CTA accent */
  --hx-warning-light: #fdf0e1;
  --hx-warning-dark:  #8a4a0c;

  --hx-info:       #4169e1;    /* reuses Platform Blue */
  --hx-info-light: #e8edfb;
  --hx-info-dark:  #28459e;

  /* --- Text hierarchy (§6) ----------------------------------------------- */
  --hx-text-primary:   #333333;  /* on light surfaces */
  --hx-text-secondary: #515357;
  --hx-text-tertiary:  #9b9ca1;
  --hx-text-disabled:  #c0c1c4;
  --hx-text-inverted:  #ffffff;  /* 10.7:1 on Hustle Blue */

  /* --- Surfaces ---------------------------------------------------------- */
  --hx-bg:          #f7fafd;
  --hx-surface:     #ffffff;
  --hx-surface-alt: #fbfbfb;
  --hx-border:      #dfe0e1;
  --hx-border-strong: #c0c1c4;

  /* --- Typography (§7) ---------------------------------------------------
     One family; hierarchy is carried by weight, not a second typeface. */
  --hx-font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                    Roboto, 'Helvetica Neue', Arial, sans-serif;
  --hx-font-weight-regular: 400;
  --hx-font-weight-semibold: 600;
  --hx-font-weight-bold: 700;

  --hx-text-xs:  0.75rem;   /* 12px */
  --hx-text-sm:  0.875rem;  /* 14px */
  --hx-text-base: 1rem;     /* 16px */
  --hx-text-lg:  1.125rem;  /* 18px */
  --hx-text-xl:  1.25rem;   /* 20px */
  --hx-text-2xl: 1.5rem;    /* 24px */
  --hx-text-3xl: 1.875rem;  /* 30px */
  --hx-text-4xl: 2.25rem;   /* 36px */

  --hx-leading-tight: 1.2;
  --hx-leading-normal: 1.5;
  --hx-leading-relaxed: 1.7;

  /* --- Spacing (4px base) ------------------------------------------------ */
  --hx-space-1: 0.25rem;
  --hx-space-2: 0.5rem;
  --hx-space-3: 0.75rem;
  --hx-space-4: 1rem;
  --hx-space-5: 1.25rem;
  --hx-space-6: 1.5rem;
  --hx-space-8: 2rem;
  --hx-space-10: 2.5rem;
  --hx-space-12: 3rem;
  --hx-space-16: 4rem;

  /* --- Radii ------------------------------------------------------------- */
  --hx-radius-sm: 4px;
  --hx-radius: 8px;
  --hx-radius-lg: 12px;
  --hx-radius-xl: 16px;
  --hx-radius-full: 9999px;

  /* --- Elevation --------------------------------------------------------- */
  --hx-shadow-xs: 0 1px 2px rgba(20, 32, 64, 0.06);
  --hx-shadow-sm: 0 1px 3px rgba(20, 32, 64, 0.08), 0 1px 2px rgba(20, 32, 64, 0.04);
  --hx-shadow:    0 4px 12px rgba(20, 32, 64, 0.08), 0 1px 3px rgba(20, 32, 64, 0.05);
  --hx-shadow-lg: 0 12px 28px rgba(20, 32, 64, 0.12), 0 4px 8px rgba(20, 32, 64, 0.06);

  /* --- Layout ------------------------------------------------------------ */
  --hx-container: 1120px;
  --hx-header-height: 64px;

  /* --- Motion ------------------------------------------------------------ */
  --hx-transition: 150ms ease-in-out;
}

/* Honour reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  :root { --hx-transition: 0ms; }
}
