/* ==========================================================================
   qurmy-tokens.css  —  the single source of truth for Qurmy design tokens
   Phase 0 of the design unification (7 Nov 2026).

   LOAD THIS FILE LAST on every page (after every other stylesheet), on both
   the WordPress site and the dashboard SPA. Loading it last is what lets the
   legacy aliases below win over the five older :root blocks that still exist
   in frontend.css, signup.css, design-system.css, site-detail.css and
   dashboard.css. Do not edit those blocks in Phase 0; they are retired file
   by file in Phase 2.

   Rules:
   - New CSS uses --q-* tokens only.
   - Never add a hex value to a component file. Add a token here instead.
   - Legacy aliases exist so nothing breaks today. They are deprecated.
   ========================================================================== */

:root {
  /* ---- Brand --------------------------------------------------------- */
  --q-brand:        #059669;   /* Qurmy green: brand, "you", primary actions, spine */
  --q-brand-deep:   #047857;   /* hover on brand */
  --q-brand-bright: #34d399;   /* on Ink only: italic phrase, spine glow, active node */
  --q-brand-50:     #ecfdf5;
  --q-brand-100:    #d1fae5;
  --q-brand-200:    #a7f3d0;
  --q-brand-glow:   rgba(5, 150, 105, 0.12);
  --q-brand-faint:  rgba(5, 150, 105, 0.08);

  /* ---- Ink and surfaces --------------------------------------------- */
  --q-ink:          #0b1120;   /* dark surface, headings on light */
  --q-ink-2:        #111827;   /* body text, Ink gradient end */
  --q-canvas:       #f6f8f6;   /* page background */
  --q-card:         #ffffff;
  --q-nav-bg:       #eef5f0;   /* sidebar background */

  /* ---- Greys (unchanged ramp, one name) ----------------------------- */
  --q-grey-50:  #f9fafb;
  --q-grey-100: #f3f4f6;
  --q-grey-200: #e5e7eb;
  --q-grey-300: #d1d5db;
  --q-grey-400: #9ca3af;
  --q-grey-500: #6b7280;
  --q-grey-600: #4b5563;
  --q-grey-700: #374151;
  --q-grey-800: #1f2937;

  /* ---- Semantic text and borders ------------------------------------ */
  --q-text:         var(--q-ink-2);
  --q-text-muted:   var(--q-grey-500);
  --q-text-subtle:  var(--q-grey-400);
  --q-text-label:   var(--q-grey-700);
  --q-border:       var(--q-grey-200);
  --q-border-strong:var(--q-grey-300);
  --q-border-subtle:var(--q-grey-100);

  /* ---- Status ------------------------------------------------------- */
  --q-ok:           #0d9488;   /* success chips only; brand green is not "good" */
  --q-ok-bg:        #ccfbf1;
  --q-ok-text:      #0f766e;
  --q-warn:         #d97706;
  --q-warn-bg:      #fef3c7;
  --q-warn-text:    #92400e;
  --q-danger:       #dc2626;
  --q-danger-bg:    #fef2f2;
  --q-danger-text:  #b91c1c;
  --q-danger-border:#fecaca;
  --q-info:         #2563eb;
  --q-info-bg:      #dbeafe;
  --q-info-text:    #1e40af;

  /* ---- Accent set: competitor and platform series, fixed order ------ */
  --q-accent-1: #f97316;   /* coral   — Claude, competitor 1 */
  --q-accent-2: #7c3aed;   /* purple  — Perplexity, competitor 2 */
  --q-accent-3: #0d9488;   /* teal    — ChatGPT, competitor 3 */
  --q-accent-4: #2563eb;   /* blue    — Gemini, competitor 4 */
  --q-accent-5: #ec4899;   /* pink    — competitor 5 */
  --q-accent-6: #ca8a04;   /* gold    — competitor 6 */
  --q-platform-chatgpt:    var(--q-accent-3);
  --q-platform-claude:     var(--q-accent-1);
  --q-platform-gemini:     var(--q-accent-4);
  --q-platform-perplexity: var(--q-accent-2);
  --q-platform-google:     var(--q-grey-700);

  /* ---- Type --------------------------------------------------------- */
  --q-font-display: 'DM Serif Display', Georgia, serif;
  --q-font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --q-font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --q-fs-display: 34px;  --q-lh-display: 1.1;   /* page finding sentence */
  --q-fs-number:  28px;  --q-lh-number:  1;     /* headline numbers */
  --q-fs-h2:      20px;  --q-lh-h2:      1.3;
  --q-fs-h3:      16px;  --q-lh-h3:      1.4;
  --q-fs-body:    14px;  --q-lh-body:    1.6;
  --q-fs-small:   13px;  --q-lh-small:   1.5;
  --q-fs-caption: 12px;  --q-lh-caption: 1.4;
  --q-fs-eyebrow: 11px;  --q-lh-eyebrow: 1;     /* + uppercase, +0.08em */
  --q-track-tight:  -0.02em;
  --q-track-eyebrow: 0.08em;
  --q-weight-regular: 400;
  --q-weight-medium:  500;
  --q-weight-semibold:600;

  /* ---- Space, radius, shadow, motion --------------------------------- */
  --q-space-1: 4px;  --q-space-2: 8px;  --q-space-3: 12px; --q-space-4: 16px;
  --q-space-5: 24px; --q-space-6: 32px; --q-space-7: 48px; --q-space-8: 64px;

  --q-radius-sm:   6px;    /* inputs, in-table chips */
  --q-radius-md:   14px;   /* cards */
  --q-radius-lg:   20px;   /* Ink block, modals */
  --q-radius-pill: 999px;  /* buttons, labels, status chips */

  --q-shadow-card:   0 1px 2px rgba(0, 0, 0, 0.04);
  --q-shadow-raised: 0 4px 24px rgba(0, 0, 0, 0.06);
  --q-shadow-ink:    0 30px 80px rgba(0, 0, 0, 0.14);
  --q-shadow-brand:  0 4px 16px rgba(5, 150, 105, 0.25);
  --q-focus-ring:    0 0 0 3px var(--q-brand-100);
  --q-shadow-tab:    0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(5, 150, 105, 0.14);   /* active Level 2 sub-tab */
  --q-tab-hover:     rgba(255, 255, 255, 0.65);   /* Level 2 sub-tab hover, on brand-50 */
  --q-tab-chip:      rgba(255, 255, 255, 0.75);   /* Level 2 count chip */

  --q-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --q-dur:  120ms;

  /* ---- Layout ------------------------------------------------------- */
  --q-sidebar:     248px;
  --q-header:      56px;
  --q-content-max: 1280px;

  /* ======================================================================
     LEGACY ALIASES  (deprecated — retire file by file in Phase 2)
     Each legacy name now resolves to exactly one --q-* value. Where files
     disagreed before, the value chosen is the one in the review doc.
     ====================================================================== */

  /* greens */
  --green:                 var(--q-brand);
  --green-light:           var(--q-brand-bright);   /* was #10b981 in frontend.css */
  --green-glow:            rgba(5, 150, 105, 0.3);
  --green-faint:           var(--q-brand-faint);
  --sr-green:              var(--q-brand);
  --sr-green-600:          var(--q-brand-deep);
  --sr-green-light:        var(--q-brand-bright);
  --sr-green-50:           var(--q-brand-50);
  --sr-green-100:          var(--q-brand-100);
  --sr-green-800:          #065f46;
  --sr-cream:              var(--q-brand-50);
  --siterooster-green:     var(--q-brand);
  --siterooster-green-light: var(--q-brand-bright);
  --siterooster-cream:     var(--q-brand-50);
  --siterooster-orange:    var(--q-brand);          /* pre-rebrand name */
  --siterooster-coral:     var(--q-brand-bright);   /* pre-rebrand name */

  /* darks — three different colours collapse to Ink */
  --dark:                  var(--q-ink);
  --dark-2:                var(--q-ink-2);
  --dark-3:                #1a2535;
  --sr-dark:               var(--q-ink);
  --siterooster-dark:      var(--q-ink);
  --siterooster-navy:      var(--q-ink);
  --siterooster-light:     var(--q-canvas);
  --light:                 var(--q-canvas);
  --white:                 var(--q-card);

  /* surfaces and text */
  --sr-bg:                 var(--q-canvas);
  --sr-card-bg:            var(--q-card);
  --sr-surface-alt:        var(--q-grey-50);
  --sr-border:             var(--q-border);
  --sr-border-strong:      var(--q-border-strong);
  --sr-border-subtle:      var(--q-border-subtle);
  --sr-text:               var(--q-text);
  --sr-text-primary:       var(--q-text);
  --sr-text-muted:         var(--q-text-muted);
  --sr-text-subtle:        var(--q-text-subtle);
  --sr-text-label:         var(--q-text-label);
  --sr-text-secondary:     var(--q-grey-600);

  /* greys — both legacy names */
  --gray-50:  var(--q-grey-50);  --sr-gray-50:  var(--q-grey-50);
  --gray-100: var(--q-grey-100); --sr-gray-100: var(--q-grey-100);
  --gray-200: var(--q-grey-200); --sr-gray-200: var(--q-grey-200);
  --gray-300: var(--q-grey-300); --sr-gray-300: var(--q-grey-300);
  --gray-400: var(--q-grey-400); --sr-gray-400: var(--q-grey-400);
  --gray-500: var(--q-grey-500); --sr-gray-500: var(--q-grey-500);
  --gray-600: var(--q-grey-600); --sr-gray-600: var(--q-grey-600);
  --gray-700: var(--q-grey-700); --sr-gray-700: var(--q-grey-700);
  --gray-800: var(--q-grey-800);
  --gray-900: var(--q-ink-2);

  /* status */
  --status-green:          var(--q-ok);
  --status-green-light:    var(--q-brand-bright);
  --status-green-bg:       var(--q-brand-50);
  --status-red:            var(--q-danger);
  --status-red-light:      #f87171;
  --status-red-bg:         var(--q-danger-bg);
  --status-orange:         var(--q-warn);
  --status-orange-light:   #fbbf24;
  --status-orange-bg:      var(--q-warn-bg);
  --status-blue:           var(--q-info);          /* was #3b82f6 or #6366f1 */
  --status-blue-bg:        var(--q-info-bg);
  --sr-yellow:             var(--q-warn);
  --sr-red:                var(--q-danger);
  --sr-blue:               var(--q-info);
  --sr-danger:             var(--q-danger);
  --sr-danger-bg:          var(--q-danger-bg);
  --sr-danger-bg-100:      #fee2e2;
  --sr-danger-border:      var(--q-danger-border);
  --sr-warning:            var(--q-warn);
  --sr-warning-bg:         var(--q-warn-bg);
  --sr-warning-text:       var(--q-warn-text);
  --sr-info:               var(--q-info);
  --sr-info-bg:            var(--q-info-bg);
  --sr-purple:             var(--q-accent-2);
  --sr-purple-bg:          #ede9fe;
  --sr-purple-800:         #5b21b6;
  --sr-teal:               var(--q-accent-3);
  --sr-teal-bg:            var(--q-ok-bg);
  --red-600:               var(--q-danger);
  --stripe-purple:         #635bff;

  /* type */
  --font-display:          var(--q-font-display);
  --font-body:             var(--q-font-body);

  /* radius — the collision (6 / 8 / 10 / 12 / 16 / 24 / 28) becomes one scale */
  --radius-sm:             var(--q-radius-sm);
  --radius-md:             var(--q-radius-md);
  --radius-lg:             var(--q-radius-lg);
  --radius-xl:             var(--q-radius-lg);
  --sr-radius-sm:          var(--q-radius-sm);
  --sr-radius-md:          var(--q-radius-md);
  --sr-radius-lg:          var(--q-radius-lg);

  /* space, shadow, motion */
  --sr-space-xs: var(--q-space-2);  --sr-space-sm: var(--q-space-3);
  --sr-space-md: var(--q-space-4);  --sr-space-lg: 20px;
  --sr-space-xl: var(--q-space-5);  --sr-space-2xl: var(--q-space-6);
  --shadow-sm:             var(--q-shadow-card);
  --shadow-md:             var(--q-shadow-raised);
  --shadow-lg:             0 10px 40px rgba(0, 0, 0, 0.06);
  --sr-shadow-sm:          var(--q-shadow-card);
  --sr-shadow-md:          var(--q-shadow-raised);
  --sr-shadow-lg:          0 10px 40px rgba(0, 0, 0, 0.06);
  --sr-shadow-xl:          0 24px 64px rgba(0, 0, 0, 0.25);
  --shadow-green:          0 20px 60px rgba(5, 150, 105, 0.2);
  --shadow-orange:         0 20px 60px rgba(5, 150, 105, 0.15);
  --sr-overlay:            rgba(11, 17, 32, 0.6);
  --sr-focus-ring:         var(--q-focus-ring);
  --sr-transition:         0.12s;

  /* layout — dashboard.css declared 220px and 260px; one value */
  --sr-sidebar-width:      var(--q-sidebar);
  --sr-header-height:      var(--q-header);
}

/* ==========================================================================
   Phase 0 shell fixes (dashboard SPA only; harmless on the WP site)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
