/* ==========================================================================
   Elysian Estates — Audience Mode CSS Variables
   Overrides tokens when data-audience="corporate" is set on <body>.
   The default (public) tokens live in global.css :root.
   ========================================================================== */

/* Corporate mode — applied when ANY ancestor (html or body) carries
   data-audience="corporate".  The <html> variant is set by the inline
   blocking head script before the first paint; the <body> variant is set
   by audience-switcher.js after it runs.  Both selectors are needed so
   there is zero flash of public colours on page load.
   The .ee-audience-corporate class is added server-side on /corporate/ URLs. */
html[data-audience="corporate"],
body[data-audience="corporate"],
body.ee-audience-corporate {
  --ee-primary:        #1e3a5f;
  --ee-primary-light:  #2d4a73;
  --ee-primary-dark:   #152c4a;
  --ee-secondary:      #5a7fa8;
  --ee-secondary-light:#7a9bc0;
  --ee-accent:         #a8c4d9;
  --ee-bg:             #fafbfc;
  --ee-bg-alt:         #f4f6f8;
  --ee-surface:        #ffffff;
  --ee-text:           #1a2632;
  --ee-text-light:     #4a5968;
  --ee-text-muted:     #8a95a3;
  --ee-border:         #e1e5ea;
  --ee-border-light:   #edf0f3;
  --ee-cta:            #1e3a5f;
  --ee-cta-hover:      #152c4a;
  --ee-overlay:        rgba(30, 58, 95, 0.85);
}

/* --------------------------------------------------------------------------
   Audience-conditional content visibility
   -------------------------------------------------------------------------- */

/* Show/hide audience-specific text snippets.
   Elements with [data-audience-text] are managed by audience-switcher.js,
   but we also ensure CSS handles the initial state on server-rendered pages.
   The html[data-audience] selectors mirror the body ones so that the anti-FOUC
   inline script (which sets data-audience on <html> before first paint) also
   hides/shows audience-specific content — including logos — without a flash. */

html:not([data-audience="corporate"]) [data-audience-text="corporate"],
body:not([data-audience="corporate"]) [data-audience-text="corporate"] { display: none; }

html[data-audience="corporate"] [data-audience-text="public"],
body[data-audience="corporate"] [data-audience-text="public"]           { display: none; }

html:not([data-audience="corporate"]) [data-audience-content="corporate"],
body:not([data-audience="corporate"]) [data-audience-content="corporate"] { display: none; }

html[data-audience="corporate"] [data-audience-content="public"],
body[data-audience="corporate"] [data-audience-content="public"]           { display: none; }

/* Filter groups: show audience-relevant filter sections */
html:not([data-audience="corporate"]) [data-audience-filter="corporate"],
body:not([data-audience="corporate"]) [data-audience-filter="corporate"] { display: none; }

html[data-audience="corporate"] [data-audience-filter="public"],
body[data-audience="corporate"] [data-audience-filter="public"]           { display: none; }

/* --------------------------------------------------------------------------
   Transition hint for colour changes
   -------------------------------------------------------------------------- */
body {
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

