/* Locus site-wide theme tokens -- card #680 (site retrofit to the ratified Locus kit).

   One custom-property set on :root. Every themed surface (Home.razor, NavMenu, MainLayout,
   app.css) reads these tokens via var() and never the media query or [data-theme] selector
   directly -- that discipline is what lets a future light/dark toggle just set an attribute
   with no other file changing (architect ruling, 2026-08-06).

   Precedence, by CSS specificity (not source order):
     1. :root[data-theme="dark"] / :root[data-theme="light"]  -- an attribute selector on :root
        is more specific than the bare :root selector below, so an explicit toggle always wins,
        in both directions, over whatever the OS preference says.
     2. @media (prefers-color-scheme: dark) { :root { ... } }  -- same specificity as the base
        :root block (media queries don't add specificity), so it only wins because it is the
        later, conditionally-active rule -- exactly the "auto-swap with the OS" behavior wanted
        when no [data-theme] override is present.
     3. :root { ... } -- the light default.

   Locus-parent tokens (--locus-navy, --locus-cream, --locus-glacier-*, --locus-dawn,
   --locus-font-*) come from /brand/brand.css and are only ever read here via var(), never
   redefined -- this file adds no product-kit token and changes no product-kit file.

   Exhibit/specimen surfaces -- product front-door lockups (Allele.razor.css,
   StravonDashboard.razor.css, AlleleDashboard.razor.css) and their own kit dashboards -- keep
   their own fixed light ground and do not consume these --lc-* tokens; see
   LockupHeaderContrastTests.cs (card #537) for why those specific files must never gain a
   prefers-color-scheme block of their own. */

:root {
  --lc-ground: var(--locus-cream, #faf9f5);
  --lc-ground-alt: #eef2f7;
  --lc-ground-card: #ffffff;
  --lc-ink: var(--locus-navy, #12395b);
  --lc-ink-muted: #556b85;
  --lc-border: #dce4ef;

  /* Fixed dark chrome band (hero/nav/footer/CTA banner) -- "dusk" is unchanged by theme, per the
     architect's dark reference ("hero keeps navy and converges"): these bands are already dark
     in light mode, so there is nothing to swap. */
  --lc-dusk: #0a1628;
  --lc-on-dusk: #ffffff;
  --lc-on-dusk-muted: #b0c8e4;

  --lc-accent-deep: var(--locus-glacier-deep, #2E6E96);
  --lc-accent-light: var(--locus-glacier-light, #7FB6D9);
  --lc-accent-resolve: var(--locus-dawn, #E0A458);

  /* Home.razor's Product Family row: each member's own kit accent (from /brand/brand.css, read
     via var() only -- no product-kit token is redefined here), swapped to the -light variant on
     dark grounds per the architect's "marks re-ink ... with each kit's light accent" ruling. For
     Stravon specifically this resolves to the EXISTING --stravon-teal-light #4fd1b3 already
     ratified in card #499, used as-is. Card #696 adds Variorum/Chirograph the same way (their own
     -deep/-light token pairs already exist in /brand/brand.css); Mixer4AI carries no such pair
     (own-brand ruling, no Locus-family light/dark split for it -- wwwroot/brand/mixer4ai/README.md),
     so its token is the single hardcoded rust accent from the vendored mark, identical in every
     block below rather than swapping -- SiteThemeTokenTests.cs's
     "SiteThemeCss_EveryBlockRedefinesTheExactSameTokenSet" only requires the same *token names*
     across all four blocks, not that every token's value differs between them. */
  --lc-family-allele-accent: var(--allele-gold-deep, #b8842a);
  --lc-family-stravon-accent: var(--stravon-teal-deep, #1c7d6c);
  --lc-family-variorum-accent: var(--variorum-crimson-deep, #9c3b3b);
  --lc-family-chirograph-accent: var(--chirograph-graphite-deep, #52606d);
  --lc-family-mixer4ai-accent: #a3542a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lc-ground: #0D1620;
    --lc-ground-alt: #101c28;
    --lc-ground-card: #14283B;
    --lc-ink: var(--locus-cream, #faf9f5);
    --lc-ink-muted: #b0c8e4;
    --lc-border: rgba(250, 249, 245, 0.14);

    --lc-dusk: #0a1628;
    --lc-on-dusk: #ffffff;
    --lc-on-dusk-muted: #b0c8e4;

    --lc-accent-deep: var(--locus-glacier-light, #7FB6D9);
    --lc-accent-light: var(--locus-glacier-light, #7FB6D9);
    --lc-accent-resolve: var(--locus-dawn, #E0A458);

    --lc-family-allele-accent: var(--allele-gold-light, #e6b24d);
    --lc-family-stravon-accent: var(--stravon-teal-light, #4fd1b3);
    --lc-family-variorum-accent: var(--variorum-crimson-light, #dd9a9a);
    --lc-family-chirograph-accent: var(--chirograph-graphite-light, #aebbc7);
    --lc-family-mixer4ai-accent: #a3542a;
  }
}

:root[data-theme="dark"] {
  --lc-ground: #0D1620;
  --lc-ground-alt: #101c28;
  --lc-ground-card: #14283B;
  --lc-ink: var(--locus-cream, #faf9f5);
  --lc-ink-muted: #b0c8e4;
  --lc-border: rgba(250, 249, 245, 0.14);

  --lc-dusk: #0a1628;
  --lc-on-dusk: #ffffff;
  --lc-on-dusk-muted: #b0c8e4;

  --lc-accent-deep: var(--locus-glacier-light, #7FB6D9);
  --lc-accent-light: var(--locus-glacier-light, #7FB6D9);
  --lc-accent-resolve: var(--locus-dawn, #E0A458);

  --lc-family-allele-accent: var(--allele-gold-light, #e6b24d);
  --lc-family-stravon-accent: var(--stravon-teal-light, #4fd1b3);
  --lc-family-variorum-accent: var(--variorum-crimson-light, #dd9a9a);
  --lc-family-chirograph-accent: var(--chirograph-graphite-light, #aebbc7);
  --lc-family-mixer4ai-accent: #a3542a;
}

:root[data-theme="light"] {
  --lc-ground: var(--locus-cream, #faf9f5);
  --lc-ground-alt: #eef2f7;
  --lc-ground-card: #ffffff;
  --lc-ink: var(--locus-navy, #12395b);
  --lc-ink-muted: #556b85;
  --lc-border: #dce4ef;

  --lc-dusk: #0a1628;
  --lc-on-dusk: #ffffff;
  --lc-on-dusk-muted: #b0c8e4;

  --lc-accent-deep: var(--locus-glacier-deep, #2E6E96);
  --lc-accent-light: var(--locus-glacier-light, #7FB6D9);
  --lc-accent-resolve: var(--locus-dawn, #E0A458);

  --lc-family-allele-accent: var(--allele-gold-deep, #b8842a);
  --lc-family-stravon-accent: var(--stravon-teal-deep, #1c7d6c);
  --lc-family-variorum-accent: var(--variorum-crimson-deep, #9c3b3b);
  --lc-family-chirograph-accent: var(--chirograph-graphite-deep, #52606d);
  --lc-family-mixer4ai-accent: #a3542a;
}
