/* ============================================================
   CHINISE SOFTWARE — UNIFIED DESIGN TOKENS
   Single source of truth. Link this on every page, then opt into
   a surface scale with class="theme-dark" or class="theme-light"
   on <html> or any container. Both share one accent + type system,
   so marketing pages and product screens read as one family.
   ============================================================ */

:root {
  /* ---- BRAND CONSTANTS (identical on every surface) ---- */

  /* Accent — Signal Blue is the product primary; Seal Red is the
     brand-heritage accent. Both belong to the one palette. Swap the
     four --ac-* tokens to switch a whole page between them. */
  --signal:      #2e90ff;
  --signal-ink:  #04111f;
  --seal:        #d8402f;
  --seal-ink:    #1a0608;

  /* default accent = Signal Blue */
  --ac:        var(--signal);
  --ac-soft:   color-mix(in srgb, var(--ac) 14%, transparent);
  --ac-line:   color-mix(in srgb, var(--ac) 40%, transparent);
  --ac-glow:   color-mix(in srgb, var(--ac) 55%, transparent);
  --ac-ink:    var(--signal-ink);

  /* status — shared across light & dark */
  --ok:    #3fb950;
  --warn:  #d29922;
  --crit:  #f85149;

  /* ---- TYPE (shared brand type system) ---- */
  --font-disp: 'Space Grotesk', system-ui, sans-serif;   /* display / headings / wordmark */
  --font-ui:   'Hanken Grotesk', system-ui, -apple-system, sans-serif; /* body / UI */
  --font-mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace; /* data / code */

  /* ---- RADII ---- */
  --r-sm: 6px;
  --r:    8px;
  --r-lg: 12px;

  /* ---- SPACING SCALE ---- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  /* default to dark surfaces (product is the primary context) */
}

/* ================= DARK SURFACE (product / app) ================= */
:root, .theme-dark {
  --bg:        #0b0a0c;   /* warm-tinted near-black */
  --surface:   #131216;
  --surface-2: #18171c;
  --surface-3: #1e1d23;
  --border:    #262531;
  --border-2:  #312f3d;
  --text:      #eceaf0;
  --text-dim:  #a8acb8;
  --text-mute: #7e8593;
}

/* ================= LIGHT SURFACE (marketing / docs) ============= */
.theme-light {
  --bg:        #f4f1ea;   /* warm paper */
  --surface:   #faf8f3;
  --surface-2: #efece3;
  --surface-3: #e8e4d9;
  --border:    #ddd7c9;
  --border-2:  #cfc8b7;
  --text:      #17140f;   /* ink */
  --text-dim:  #5c5648;
  --text-mute: #8a8478;   /* stone */
}

/* ---- accent override helpers: add to <html>/container ---- */
.accent-seal {
  --ac:      var(--seal);
  --ac-ink:  var(--seal-ink);
}
.accent-signal {
  --ac:      var(--signal);
  --ac-ink:  var(--signal-ink);
}
