/* =====================================================================
 * BrainstormX customer-facing brand layer (2026-07-09).
 *
 * EVERY rule is gated by `body[data-imbas-customer-slug="bsx"]` so
 * Siderise, FundBank, and the unbranded engine surface are untouched.
 * Mirrors the Siderise brand-layer scoping convention (siderise-brand.css).
 *
 * Loaded via <link rel="stylesheet" href="/bsx-brand.css"> which is
 * bind-mounted from apps/ui/public/bsx-brand.css. On BSX-slug pages the
 * rules bite; on any other slug the selectors don't match, so this file
 * is a no-op elsewhere.
 *
 * Palette (from CUSTOMER_BRAND_* env in /etc/siderise/.env):
 *   red     #F0394A   primary
 *   ink     #0A0A0A   dark
 *   teal    #2EB8A3   indigo slot (link/hover)
 *   gold    #F3BD48   emerald slot (success + tagline accent)
 *   white   #F5F4F1
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 1. Logo sizing for the 1056x355 (3:1 banner) BSX logo.
 * The default Tailwind classes on layout.tsx (h-7 w-auto etc.) assumed
 * a roughly-square Siderise logo. For a wide banner logo we constrain
 * by height, keep width:auto, and force object-fit:contain so the
 * mark scales cleanly rather than being cropped by a parent container.
 * Adding max-width caps prevent the banner overwhelming header padding.
 * -------------------------------------------------------------------- */

/* Header customer-logo (Next.js layout header pill).
   The <span class="inline-flex ... bg-white/95 rounded-md px-2 py-1">
   is a small white pill; we let the banner run wider than the classic
   h-7 (28px) so the "BrainstormX / Safe AI" tagline reads. */
body[data-imbas-customer-slug="bsx"] header img[data-imbas-customer-logo] {
  height: 36px !important;   /* up from h-7 = 28px */
  width: auto !important;
  max-width: 240px;          /* cap so it doesn't overrun the pill */
  object-fit: contain;
  display: block;
}

/* Hero primary customer-logo (page.tsx line 72).
   The hero already SSR-picks customer.logo_url, so this only tunes size. */
body[data-imbas-customer-slug="bsx"] main img[data-imbas-customer-logo].h-12 {
  height: 64px !important;
  width: auto !important;
  max-width: 360px;
  object-fit: contain;
}

/* Footer customer-logo (layout.tsx footer "Built for X" line). */
body[data-imbas-customer-slug="bsx"] footer img[data-imbas-customer-logo] {
  height: 26px !important;
  width: auto !important;
  max-width: 180px;
  object-fit: contain;
  opacity: 0.9;
}

/* Static-page letter-head logo (wizard.html .lh-logo class).
   The letter export mocks a printed letterhead; the customer logo is the
   first thing the reader sees. */
body[data-imbas-customer-slug="bsx"] img.lh-logo {
  height: 44px !important;
  width: auto !important;
  max-width: 280px;
  object-fit: contain;
}

/* Static-page footer "Built for X" mini-mark (wizard.html .siderise-mark-footer). */
body[data-imbas-customer-slug="bsx"] img.siderise-mark-footer,
body[data-imbas-customer-slug="bsx"] img[data-imbas-customer-logo].siderise-img {
  height: 22px !important;
  width: auto !important;
  max-width: 160px;
  object-fit: contain;
}

/* Wizard.html static header .siderise-mark (line 2316 pattern).
   The <a class="siderise-mark"><img></a> wrapper. */
body[data-imbas-customer-slug="bsx"] .siderise-mark img {
  height: 34px !important;
  width: auto !important;
  max-width: 220px;
  object-fit: contain;
}

/* ---------------------------------------------------------------------
 * 2. Tagline styling — "Safe AI" in italic gold.
 * The header tagline uses <span data-imbas-tagline> in layout.tsx; static
 * pages use .header-tagline. Both selectors get the same treatment.
 * -------------------------------------------------------------------- */

body[data-imbas-customer-slug="bsx"] [data-imbas-tagline],
body[data-imbas-customer-slug="bsx"] .header-tagline {
  font-style: italic !important;
  color: #F3BD48 !important;   /* BSX gold */
  font-weight: 500 !important;
  font-size: 15px !important;
  letter-spacing: 0.01em;
}

/* On the dark-gradient Next.js header the gold on ink is fine; on any
   light background static page, keep the same gold but bump contrast. */
body[data-imbas-customer-slug="bsx"] .header-tagline {
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
}

/* ---------------------------------------------------------------------
 * 3. Hide the redundant "for [customer]" vendor lockup in the hero.
 *
 * Hero pattern (page.tsx line ~78-97):
 *   <span class="... border ... bg-white ...">
 *     <span class="... bsx-lockup">
 *       <span>Built by</span> <a><img brainstormx-logo.png /></a> <span>·</span>
 *     </span>
 *     <img alt="Imbas" ... />       <-- keep: engine mark
 *     <span>for</span>              <-- hide: redundant when customer=BSX
 *     <img data-imbas-customer-logo/> <-- hide: same
 *   </span>
 *
 * On BSX, "Built by BrainstormX · Imbas for BrainstormX" is a redundant
 * loop. Hide the trailing "for [customer logo]" fragment so the line
 * reads cleanly as "Built by BrainstormX · Imbas".
 * -------------------------------------------------------------------- */

body[data-imbas-customer-slug="bsx"] .bsx-lockup ~ span,
body[data-imbas-customer-slug="bsx"] .bsx-lockup ~ img[data-imbas-customer-logo] {
  display: none !important;
}

/* Also hide the equivalent in the Wizard.html static splash lockup:
   <span class="bsx-lockup">Built by <a><img brainstormx-logo.png /></a> ·</span>
   <img class="imbas-splash" src="/imbas-logo.png" />
   <span>for</span>
   <img class="siderise-img" data-imbas-customer-logo />
   Same rule as above catches it because .bsx-lockup ~ span / img matches. */

/* ---------------------------------------------------------------------
 * 4. Header pill background — swap from default white/95 to a warmer
 * near-white that harmonises with the BSX ink/red/gold palette on the
 * dark red header gradient.
 * -------------------------------------------------------------------- */

body[data-imbas-customer-slug="bsx"] header .bg-white\/95 {
  background-color: #F5F4F1 !important;  /* BSX cream */
}
