/* ============================================================================
   brand-themes.css — Central per-site brand palette for the dashboard header.

   ONE file holds every site's LOGO + TITLE colors. The shell sets
   data-site="<sitecode>" on <html> (injected server-side per site for a
   flash-free first paint, with a JS fallback from the nav payload's
   site_code), and each site keys its brand off that attribute:

     --dash-brand-grad-start / --dash-brand-grad-end
         The logo-mark gradient (consumed by .header-brand-icon in
         dashboard-shell.css) AND the wordmark gradient (the per-site
         .header-brand-name rule below).

   The :root defaults reproduce the neutral shell look, so a site with no
   entry here AND no seeded hub branding row is visually unchanged (no fleet
   regression).

   HUB-SERVED TIER: a site whose hub public.site_branding row is seeded gets
   its stops from the served theme.css (--site-grad-*), resolved first by the
   :root bridge below. Such sites carry no value block here — only a wordmark
   opt-in rule (see NoidNoggin + IndianShopping + IndianMarriage; retired
   2026-07-26 after proving hub row == served pair == the old literals, i.e.
   the generator's AA nudge is a no-op for all three). While such a site's
   theme.css serves the stub (pre-seeding, or hub outage), it renders the
   neutral gradient.

   LITERAL TIER: blocks stay when retirement would NOT be pixel-identical —
   aichums/tuberaker's hub rows match these literals but the generator's AA
   nudge shifts their SERVED stops (verified 2026-07-26: aichums
   #6366f1/#8b5cf6 -> served #6164ec/#8558ec; tuberaker end #8b5cf6 ->
   #9266f7). Migrating either is a deliberate visual decision, not hygiene.
   ============================================================================ */

:root {
  /* Bridged to the generated theme's AA-nudged brand pair; the fallbacks keep
     the neutral look for unopted sites. Per-site blocks below, where present,
     still win (html[data-site] outranks :root). */
  --dash-brand-grad-start: var(--site-grad-start, var(--dash-accent));
  --dash-brand-grad-end: var(--site-grad-end, var(--icon-purple));
}

/* --- AICHUMS — AI indigo → violet (source: AICHUMS/frontend/css/aichums.css
       :root --ai-primary #6366f1 L10 / --ai-secondary #8b5cf6 L13; the same
       pair drives the site's .gradient-text-primary wordmark) --- */
html[data-site="aichums"] {
  --dash-brand-grad-start: #6366f1;
  --dash-brand-grad-end: #8b5cf6;
}
html[data-site="aichums"] .header-brand-name {
  background: linear-gradient(135deg, var(--dash-brand-grad-start), var(--dash-brand-grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --- TubeRaker — brand blue → violet (source: TUBERAKER/frontend/static/css/
       landing.css L34 --gradient-brand: linear-gradient(135deg,#3b82f6,#8b5cf6);
       also variables.css --color-brand-primary #3b82f6 / -secondary #8b5cf6) --- */
html[data-site="tuberaker"] {
  --dash-brand-grad-start: #3b82f6;
  --dash-brand-grad-end: #8b5cf6;
}
html[data-site="tuberaker"] .header-brand-name {
  background: linear-gradient(135deg, var(--dash-brand-grad-start), var(--dash-brand-grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --- NoidNoggin + IndianShopping + IndianMarriage — hub-served tier (value
       blocks retired 2026-07-26). Their stops come from hub
       public.site_branding via the served --site-grad-* pair, resolved first
       by the :root bridge above. Live parity proof at retirement: hub rows
       and served tokens match the old literals (noidnoggin #3b82f6/#06b6d4,
       indianshopping #ff9933/#ea580c, indianmarriage #ec4899/#d4af37 — the
       generator's AA nudge leaves all three pairs untouched; IM's old block
       spelled its pair uppercase). IM retired only after the owner-gated
       secondary_color=#D4AF37 hub write landed (brand_version
       2026-07-26T00:00:00Z); that write also flipped its served
       --site-on-grad to dark #16181d, clearing the M4 finding of white icon
       ink on the gold stop (2.1:1) — now 5.0:1 / 8.4:1 on the two stops.
       No value literals here by design: this rule only opts the WORDMARK
       into the gradient treatment; the brand-mark icon and logout page
       already consume --dash-brand-grad-*. --- */
html[data-site="noidnoggin"] .header-brand-name,
html[data-site="indianshopping"] .header-brand-name,
html[data-site="indianmarriage"] .header-brand-name {
  background: linear-gradient(135deg, var(--dash-brand-grad-start), var(--dash-brand-grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ----------------------------------------------------------------------------
   TEMPLATE — PREFERRED PATH for a new site: seed its hub
   public.site_branding row and add ONLY a wordmark opt-in rule (see the
   NoidNoggin + IndianShopping rule above) — the :root bridge serves the
   stops. Use a literal block ONLY when the rendered stops must differ from
   what the hub would serve (compare against the generator's AA-nudged
   output, not the raw row). To do that, copy this block, replace "yoursite"
   with the site_code, and set the two brand colors. The logo mark picks up
   the gradient automatically via --dash-brand-grad-*; the second rule paints
   the wordmark to match.

   html[data-site="yoursite"] {
     --dash-brand-grad-start: #RRGGBB;
     --dash-brand-grad-end:   #RRGGBB;
   }
   html[data-site="yoursite"] .header-brand-name {
     background: linear-gradient(135deg, var(--dash-brand-grad-start), var(--dash-brand-grad-end));
     -webkit-background-clip: text;
     background-clip: text;
     -webkit-text-fill-color: transparent;
     color: transparent;
   }
   ---------------------------------------------------------------------------- */
