/*
 * EVE AI Core — Public Light Mode: shared "hero-dark, content-light" layer
 * ------------------------------------------------------------------------
 * Loaded LAST on every public marketing page (via the header partial + the
 * public-theme-toggle.js loader). Every rule is scoped under
 * html[data-theme="light"] so the file is completely inert in the default dark
 * theme — it only does anything once a visitor opts into light.
 *
 * Purpose: the previous per-page light themes flipped the HERO to a flat light
 * band (hid the photo/galaxy background, whitened the glass, darkened the hero
 * text). Product direction is: LEAVE THE HERO ALONE (keep the branded dark hero)
 * and only flip the content BELOW it to light. This sheet restores the dark hero
 * on top of whatever a page's own [data-theme="light"] block did.
 *
 * Specificity note: page rules are written `[data-theme="light"] .hero…`.
 * Prefixing every rule here with `html` raises specificity one notch
 * (html + attr + class > attr + class), so these win the cascade even against
 * the pages' own `!important` hero-flips — and being loaded last is a second
 * layer of insurance.
 */

/* ─────────────────────────────────────────────────────────────────────────
   1. RESTORE the hero's background layers.
   Pages hide the photo / galaxy / grid via `.hero-bg{display:none}` (and a few
   scope it under a page-specific wrapper). Bring them all back.
   ───────────────────────────────────────────────────────────────────────── */
html[data-theme="light"] .hero-bg,
html[data-theme="light"] .hero .hero-bg,
html[data-theme="light"] .il-hero .hero-bg,
html[data-theme="light"] .ct-wrap .hero-bg,
html[data-theme="light"] .ds-hero .hero-bg,
html[data-theme="light"] .appl-hero .hero-bg,
html[data-theme="light"] .changelog-hero .hero-bg,
html[data-theme="light"] .main-content .hero-bg {
  display: block !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   2. KEEP the hero surface DARK — pure BLACK, matching the dark theme.
   Undo `.hero{background:transparent}` / light-gradient flips. A solid black
   band sits behind any photo/glass and gives no-photo heroes their dark look.
   (#000, not the old #080b14 navy — the blue-tinted band was the main
   source of the "hero looks blue in light mode" complaints.)
   ───────────────────────────────────────────────────────────────────────── */
html[data-theme="light"] .hero,
html[data-theme="light"] .il-hero,
html[data-theme="light"] .ds-hero,
html[data-theme="light"] .appl-hero,
html[data-theme="light"] .changelog-hero,
html[data-theme="light"] .ct-hero,
html[data-theme="light"] section.hero,
html[data-theme="light"] header.hero {
  background: #000 !important;
  background-color: #000 !important;
  color: #c5cdda !important;
}

/* Photo heroes: the `.hero-bg` element carries the image, so the .hero itself
   should stay transparent to let it show. Re-transparent where a photo exists. */
html[data-theme="light"] .il-hero,
html[data-theme="light"] .ds-hero,
html[data-theme="light"] .appl-hero,
html[data-theme="light"] .changelog-hero {
  background: transparent !important;
  background-color: transparent !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   3. RE-DARKEN hero glass panels that pages whitened / stripped.
   Only the background + blur are re-asserted (no padding/border changes) to
   avoid layout shift; transparent-stripped panels stay transparent over dark.
   ───────────────────────────────────────────────────────────────────────── */
/* platform (.wrap.hero-inner) + proof (.hero-left.hero-glass) whiten their hero
   glass panel in light; re-darken just those (NOT the bare .hero-inner wrapper
   used by the home page, which has no background of its own). */
html[data-theme="light"] .wrap.hero-inner,
html[data-theme="light"] .hero-left.hero-glass {
  background: rgba(10, 14, 22, 0.55) !important;
  -webkit-backdrop-filter: blur(10px) saturate(115%) !important;
          backdrop-filter: blur(10px) saturate(115%) !important;
}

/* il-* photo-hero glass: fully restore the dark glass card (page strips it). */
html[data-theme="light"] .il-hero .il-wrap {
  background: rgba(8, 12, 20, 0.42) !important;
  -webkit-backdrop-filter: blur(11px) saturate(118%) !important;
          backdrop-filter: blur(11px) saturate(118%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34) !important;
  padding: 34px 32px !important;
}
@media (max-width: 640px) {
  html[data-theme="light"] .il-hero .il-wrap { padding: 24px 18px !important; }
}

/* Re-pin the il-* token scope to its DARK values *inside the hero only* so the
   heading/sub/eyebrow/chips render as light text on the dark photo. */
html[data-theme="light"] .il-hero {
  --il-ink: #eef2fb;
  --il-ink2: #aeb9cd;
  --il-mut: #7f8caa;
  --il-blue: #5b9ee8;
  --il-blue2: #7da6e8;
  --il-line2: #26324b;
  --il-chip-bg: rgba(127, 140, 170, 0.07);
  --il-chip-bd: rgba(127, 140, 170, 0.34);
}

/* ─────────────────────────────────────────────────────────────────────────
   4. RE-LIGHT hero text (undo the dark-text flips) so it stays legible on the
   dark hero. Accent gradients / em spans are left untouched.
   ───────────────────────────────────────────────────────────────────────── */
html[data-theme="light"] .hero h1,
html[data-theme="light"] .hero h2,
html[data-theme="light"] .hero h3,
html[data-theme="light"] .hero-headline,
html[data-theme="light"] .hero .stat-value,
html[data-theme="light"] .hero .stat-num {
  color: #f4f6fa !important;
}
html[data-theme="light"] .hero p,
html[data-theme="light"] .hero li,
html[data-theme="light"] .hero-sub,
html[data-theme="light"] .hero .hero-rule,
html[data-theme="light"] .hero .stat-label,
html[data-theme="light"] .hero .trust-row-lbl,
html[data-theme="light"] .hero small {
  color: #c5cdda !important;
}

/* Emphasis inside hero copy: page light themes remap strong/em ink tokens dark;
   inherit the pinned light color of the surrounding hero text instead. */
html[data-theme="light"] .hero strong,
html[data-theme="light"] .hero em,
html[data-theme="light"] .il-hero strong,
html[data-theme="light"] .ds-hero strong,
html[data-theme="light"] .appl-hero strong,
html[data-theme="light"] .pd-hero strong,
html[data-theme="light"] .eve-hero-glass strong,
html[data-theme="light"] .eve-hero-glass em {
  color: inherit !important;
}

/* Hero badge/eyebrow: keep the dark-theme translucent-blue chip. */
html[data-theme="light"] .hero-badge {
  color: #9ec1f2 !important;
  background: rgba(79, 142, 247, 0.08) !important;
  border-color: rgba(79, 142, 247, 0.24) !important;
}

/* Ghost buttons inside the hero: light outline (they sit on the dark band). */
html[data-theme="light"] .hero .btn-ghost,
html[data-theme="light"] .hero .hero-btns .btn-ghost {
  color: #eaf1ff !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   5. HERO nested widgets (home + any page reusing them).
   A page's inline light theme flips the compliance chips, data-flow nodes,
   stats strip and the Trust-Runtime-Status telemetry panel to flat white
   cards (background:#fff). Those all sit INSIDE the dark hero, so re-assert
   their dark, token-based styling. The --bg-*/--border/--accent/... tokens are
   NOT redefined in light mode, so these render identical to the dark theme.
   Selectors are `.hero <widget>` (specificity 0,2,2) so they beat the pages'
   own `[data-theme="light"] .widget` (0,2,1) flips even with !important, and
   they are strictly hero-scoped so the same widgets BELOW the fold stay light.
   ───────────────────────────────────────────────────────────────────────── */
html[data-theme="light"] .hero .trust-chip {
  background: var(--bg-panel) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="light"] .hero .flow-node {
  background: var(--bg-raised) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="light"] .hero .flow-node.flow-core {
  background: rgba(79, 142, 247, 0.07) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
html[data-theme="light"] .hero .flow-node.flow-block {
  background: rgba(239, 68, 68, 0.06) !important;
  border-color: var(--red) !important;
  color: var(--red) !important;
}
html[data-theme="light"] .hero .flow-node.flow-pass {
  background: rgba(34, 197, 94, 0.06) !important;
  border-color: var(--green) !important;
  color: var(--green) !important;
}
html[data-theme="light"] .hero .stats {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}
html[data-theme="light"] .hero .gov-panel {
  background: var(--bg-panel) !important;
  border-color: var(--border) !important;
}
html[data-theme="light"] .hero .gov-panel .gp-key {
  color: var(--text) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   6. PHOTO-HERO template (.main-content .hero-bg + .eve-hero-glass).
   Used by case-study, architecture, benchmark, investors, roadmap, sla,
   contact, changelog, proof-sheet, decision-scan, deployment, careers,
   customer-stories, procurement, governance-license, fair-lending-demo, blog.
   The hero photo band is already restored by rule 1 (.main-content .hero-bg →
   display:block). But those pages ALSO (a) strip the glass card to transparent
   and (b) darken the hero headline / lede to slate — which reads as invisible
   dark text on the dark photo. Restore the dark glass card + light hero text so
   the hero matches the dark theme exactly (same treatment as the .il-hero glass).
   ───────────────────────────────────────────────────────────────────────── */
html[data-theme="light"] .eve-hero-glass {
  background: rgba(8, 12, 20, 0.42) !important;
  -webkit-backdrop-filter: blur(11px) saturate(118%) !important;
          backdrop-filter: blur(11px) saturate(118%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34) !important;
  padding: 34px 32px !important;
}
@media (max-width: 640px) {
  html[data-theme="light"] .eve-hero-glass {
    padding: 24px 18px !important;
    border-radius: 16px !important;
  }
}
html[data-theme="light"] .eve-hero-glass h1,
html[data-theme="light"] .eve-hero-glass h2,
html[data-theme="light"] .eve-hero-glass h3,
html[data-theme="light"] .eve-hero-glass h4,
html[data-theme="light"] .main-content > .eve-hero-glass h1 {
  color: #f4f6fa !important;
}
html[data-theme="light"] .eve-hero-glass .updated,
html[data-theme="light"] .eve-hero-glass .lede,
html[data-theme="light"] .eve-hero-glass p,
html[data-theme="light"] .eve-hero-glass li {
  color: #c5cdda !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   7. (REMOVED 2026-07-14, audit) — an earlier "no frosted blur in light"
   rule dropped backdrop-filter on every hero glass panel. Product direction
   is now: the hero (photo, glass box AND its blur) renders identically in
   light mode; only the content below flips. The glass blur comes from the
   pages' own styles / sections 3 & 6 above.
   ───────────────────────────────────────────────────────────────────────── */

/* Hero image FADE-GUARD: the hero backdrop keeps its full natural color in
   light mode — exactly as in dark. No page-level light theme may desaturate,
   dim or fade the hero photo/galaxy (several per-page themes tried filters
   or opacity on these layers; this pins them to the dark-theme rendering). */
html[data-theme="light"] .hero::before,
html[data-theme="light"] .hero-bg,
html[data-theme="light"] .hero-bg img {
  -webkit-filter: none !important;
          filter: none !important;
  opacity: 1 !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   9. HERO SCRIM FADE-GUARD (the gradient the filter/opacity guard can't fix).
   ~47 pages composite their hero photo as
     background: linear-gradient(rgba(6,8,15,.2x) …, var(--bg) 100%), url(photo)
   — the scrim's FINAL STOP is the page background token so the photo blends
   into the page below. In light mode var(--bg) / var(--bg-primary) flips to
   near-white, so the photo visibly FADES TO WHITE inside the black hero band.
   Custom properties resolve on the element that uses them, so re-pinning the
   tokens on the image layers (and the hero containers, for ::before/::after
   scrims) restores the dark fade — the hero renders identical to dark. Inside
   the hero everything is meant to render dark anyway (product rule), so the
   container-level re-pin is safe; content below the hero is unaffected.
   ───────────────────────────────────────────────────────────────────────── */
html[data-theme="light"] .hero-bg,
html[data-theme="light"] .hero,
html[data-theme="light"] .il-hero,
html[data-theme="light"] .ds-hero,
html[data-theme="light"] .appl-hero,
html[data-theme="light"] .changelog-hero,
html[data-theme="light"] .ct-hero,
html[data-theme="light"] .pd-hero {
  --bg: #06080f;
  --bg-2: #0a0e18;
  --bg-primary: #06080f;
}

/* ─────────────────────────────────────────────────────────────────────────
   8. UNIVERSAL CONTENT-LIGHT BASELINE (so EVERY public page has a working
   light mode, not just the bespoke-themed ones).
   Most pages hardcode `body{background:#06080f!important;color:#aeb9cd!important}`
   inline — a dark pin that blocks the design-tokens.css light flip even though
   the rest of the page paints from var(--*) tokens (which DO flip in light).
   Overriding just that pin (specificity html+attr+body = 0,1,2 beats a bare
   `body{...!important}` = 0,0,1) unlocks the token-based light theme; verified
   across every previously-dark page with zero light-on-light text. Pages that
   already ship their own light theme set the same cool-slate bg, so this is a
   no-op for them. Hero text/surfaces stay dark via the higher-specificity hero
   rules above.
   ───────────────────────────────────────────────────────────────────────── */
html[data-theme="light"] body {
  background: #f8fafc !important;
  color: #334155 !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   9. CONTENT RE-INK (generated from the light-mode contrast audit).
   Pages that hardcode dark-theme ink colors on token-less content go
   unreadable once the universal light baseline flips the body. Re-ink
   those recurring patterns. Hero containers are excluded - the hero
   (and its glass) stays dark by design.
   ────────────────────────────────────────────────────────────────────── */
html[data-theme="light"] .block h2.block-title:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #0f172a !important; }
html[data-theme="light"] .block p.block-lede:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #334155 !important; }
html[data-theme="light"] .block-lede a:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #2563eb !important; }
html[data-theme="light"] .cmp-legend span.part:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #b45309 !important; }
html[data-theme="light"] .cmp-table span.part:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #b45309 !important; }
html[data-theme="light"] .col-cg span.part:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #b45309 !important; }
html[data-theme="light"] .roadmap-table td:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #0f172a !important; }
html[data-theme="light"] .roadmap-table th:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #475569 !important; }
html[data-theme="light"] a.btn.btn-secondary:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #2563eb !important; }
html[data-theme="light"] p.eve-reg-disclaimer:not(.hero *):not(.il-hero *):not(.appl-hero *):not(.ds-hero *):not(.pd-hero *):not(.changelog-hero *):not(.ct-hero *):not(.eve-hero-glass *):not(.ion-hero *):not(.hdr *) { color: #475569 !important; }

/* ────────────────────────────────────────────────────────────────────────
   10. MANUAL AUDIT FIXES (shared templates).
   a) #faq-seo: shared SEO-FAQ block inherits page ink; on some pages that is
      dark-theme-bright ink (invisible on light) and on others the section
      sits over a dark band with dark ink. Pin a light surface + dark ink.
   b) .hero .cta-secondary: proof-style hero ghost button colors from
      var(--ink), which flips dark in light mode on the black hero band.
   ──────────────────────────────────────────────────────────────────────── */
html[data-theme="light"] #faq-seo { background: #f8fafc !important; }
html[data-theme="light"] #faq-seo h2,
html[data-theme="light"] #faq-seo h3 { color: #0f172a !important; }
html[data-theme="light"] #faq-seo p { color: #334155 !important; }
html[data-theme="light"] .hero .cta-secondary {
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
}

/* c) Secondary/ghost CTA buttons inside ANY hero band: pages' light themes
      restyle .btn-secondary/.btn-ghost globally for the light body (dark ink
      and/or a WHITE background), which lands dark-on-black or white-on-white
      inside the always-dark hero. Force the full dark-hero treatment: light
      ink AND a translucent dark-glass fill. Audit 2026-07-15: 33 pages
      (ink), re-audit same day: white-bg variant (why-eve et al). */
html[data-theme="light"] .hero a.btn.btn-secondary,
html[data-theme="light"] .il-hero a.btn.btn-secondary,
html[data-theme="light"] .ds-hero a.btn.btn-secondary,
html[data-theme="light"] .appl-hero a.btn.btn-secondary,
html[data-theme="light"] .pd-hero a.btn.btn-secondary,
html[data-theme="light"] .ct-hero a.btn.btn-secondary,
html[data-theme="light"] .changelog-hero a.btn.btn-secondary,
html[data-theme="light"] .eve-hero-glass a.btn.btn-secondary,
html[data-theme="light"] .hero a.btn.btn-ghost,
html[data-theme="light"] .il-hero a.btn.btn-ghost,
html[data-theme="light"] .ds-hero a.btn.btn-ghost,
html[data-theme="light"] .appl-hero a.btn.btn-ghost,
html[data-theme="light"] .pd-hero a.btn.btn-ghost,
html[data-theme="light"] .ct-hero a.btn.btn-ghost,
html[data-theme="light"] .changelog-hero a.btn.btn-ghost,
html[data-theme="light"] .eve-hero-glass a.btn.btn-ghost {
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  background-image: none !important;
}

/* Dark shared footer (.eve-ftr--dark) on light-designed pages: pages' own
   light rules darken h3/h4/p globally, which lands dark-on-dark inside the
   footer. Pin the footer ink to its dark-variant tokens. */
html[data-theme="light"] .eve-ftr.eve-ftr--dark h3,
html[data-theme="light"] .eve-ftr.eve-ftr--dark h4 { color: #c5cede !important; }
html[data-theme="light"] .eve-ftr.eve-ftr--dark,
html[data-theme="light"] .eve-ftr.eve-ftr--dark p,
html[data-theme="light"] .eve-ftr.eve-ftr--dark li,
html[data-theme="light"] .eve-ftr.eve-ftr--dark a { color: #9aa6b8 !important; }

/* Wrapper variants missed by section 1: these pages hide their photo band in
   light via a 2-class rule that outranked the bare .hero-bg restore. */
html[data-theme="light"] .page .hero-bg,
html[data-theme="light"] .page-wrap .hero-bg,
html[data-theme="light"] .pd-hero .hero-bg { display: block !important; }

/* .page doc template (legal, trust-center): the intro is frosted via
   `.page .header`; pages strip it in light - restore glass + light ink. */
html[data-theme="light"] .page:has(> .hero-bg) > .header {
  background: rgba(8, 12, 20, 0.42) !important;
  -webkit-backdrop-filter: blur(11px) saturate(118%) !important;
          backdrop-filter: blur(11px) saturate(118%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34) !important;
  padding: 34px 32px !important;
}
html[data-theme="light"] .page:has(> .hero-bg) > .header h1,
html[data-theme="light"] .page:has(> .hero-bg) > .header h2 { color: #f4f6fa !important; }
html[data-theme="light"] .page:has(> .hero-bg) > .header p,
html[data-theme="light"] .page:has(> .hero-bg) > .header li,
html[data-theme="light"] .page:has(> .hero-bg) > .header .updated { color: #c5cdda !important; }

/* pd-hero (proof-of-demand): restore its frosted copy panel. */
html[data-theme="light"] .pd-hero .pd-wrap {
  background: rgba(8, 12, 20, 0.42) !important;
  -webkit-backdrop-filter: blur(11px) saturate(118%) !important;
          backdrop-filter: blur(11px) saturate(118%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34) !important;
}

/* CTA panel ("Ready to evaluate…") — keep it a dark/black slab in LIGHT theme
   so the light-on-dark copy stays legible (var(--panel) otherwise flips light).
   Applies sitewide to every .cta-section. */
html[data-theme="light"] .cta-section {
  background: radial-gradient(120% 140% at 50% 0%, rgba(91,158,232,.12), transparent 60%),
              linear-gradient(180deg, #0c1220, #05080f) !important;
  border-color: rgba(255,255,255,0.10) !important;
}
html[data-theme="light"] .cta-section h2 { color: #eef2fb !important; }
html[data-theme="light"] .cta-section p,
html[data-theme="light"] .cta-section .cta-contact { color: #aeb9cd !important; }
