/* MyAppAI V3 live backgrounds (2026-12-03) — per-route canvas layer + gradient fallbacks.
   Unlayered on purpose: wins over engine.css cascade layers for these targeted rules only.
   Zero layout impact: the canvas is absolutely positioned inside the existing .hero-scene. */

.bg-live {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 0; pointer-events: none;
}
.hero-scene { isolation: isolate; }
.hero-scene svg { position: relative; z-index: 1; opacity: 0.5; }
/* Scrim above the live layer, below hero text (hero-inner is z-index 2): keeps text >= 4.5:1. */
.hero-scene::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 11, 24, 0.42), rgba(7, 11, 24, 0.22) 45%, rgba(7, 11, 24, 0.55));
}

/* ---- Per-route gradient fallback (painted before JS / when JS is off) + page tint ---- */
body[data-bg="neural"]        { background: radial-gradient(1100px 620px at 25% -5%, #10275c, transparent 60%), linear-gradient(180deg, #070b18, #070b18); }
body[data-bg="neural"] .hero-scene        { background: radial-gradient(900px 480px at 30% 10%, #14306e, #070b18 75%); }
body[data-bg="cards"]         { background: radial-gradient(1100px 620px at 75% -5%, #2a1650, transparent 60%), linear-gradient(180deg, #080a1a, #080a1a); }
body[data-bg="cards"] .hero-scene         { background: radial-gradient(900px 480px at 70% 5%, #33196b, #080a1a 75%); }
body[data-bg="circuit"]       { background: radial-gradient(1100px 620px at 15% -5%, #0b3552, transparent 60%), linear-gradient(180deg, #060d18, #060d18); }
body[data-bg="circuit"] .hero-scene       { background: radial-gradient(900px 480px at 20% 0%, #0e4066, #060d18 75%); }
body[data-bg="knowledge"]     { background: radial-gradient(1100px 620px at 55% -5%, #0d3524, transparent 60%), linear-gradient(180deg, #071410, #071410); }
body[data-bg="knowledge"] .hero-scene     { background: radial-gradient(900px 480px at 50% 0%, #11402c, #071410 75%); }
body[data-bg="guide-biz"]     { background: radial-gradient(1100px 620px at 30% -5%, #3d2c07, transparent 60%), linear-gradient(180deg, #100d06, #100d06); }
body[data-bg="guide-biz"] .hero-scene     { background: radial-gradient(900px 480px at 30% 0%, #4a360a, #100d06 75%); }
body[data-bg="guide-pipeline"]{ background: radial-gradient(1100px 620px at 65% -5%, #241a4d, transparent 60%), linear-gradient(180deg, #0b0819, #0b0819); }
body[data-bg="guide-pipeline"] .hero-scene{ background: radial-gradient(900px 480px at 65% 0%, #2d2060, #0b0819 75%); }
body[data-bg="guide-check"]   { background: radial-gradient(1100px 620px at 40% -5%, #083a36, transparent 60%), linear-gradient(180deg, #061413, #061413); }
body[data-bg="guide-check"] .hero-scene   { background: radial-gradient(900px 480px at 40% 0%, #0a4741, #061413 75%); }
body[data-bg="starfield"]     { background: radial-gradient(1100px 620px at 80% -5%, #3b1152, transparent 60%), linear-gradient(180deg, #0d0716, #0d0716); }
body[data-bg="starfield"] .hero-scene     { background: radial-gradient(900px 480px at 78% 5%, #471763, #0d0716 75%); }
body[data-bg="constellation"] { background: radial-gradient(1100px 620px at 45% -5%, #1c2447, transparent 60%), linear-gradient(180deg, #080a16, #080a16); }
body[data-bg="constellation"] .hero-scene { background: radial-gradient(900px 480px at 45% 0%, #232d59, #080a16 75%); }
body[data-bg="signal"]        { background: radial-gradient(1100px 620px at 60% -5%, #122c52, transparent 60%), linear-gradient(180deg, #070c18, #070c18); }
body[data-bg="signal"] .hero-scene        { background: radial-gradient(900px 480px at 60% 0%, #173763, #070c18 75%); }
body[data-bg="grid-privacy"]  { background: linear-gradient(180deg, #0a0d1d, #0a0d1d); }
body[data-bg="grid-privacy"] .hero-scene  { background: radial-gradient(900px 480px at 50% 0%, #171d3d, #0a0d1d 78%); }
body[data-bg="grid-terms"]    { background: linear-gradient(180deg, #0b0e14, #0b0e14); }
body[data-bg="grid-terms"] .hero-scene    { background: radial-gradient(900px 480px at 50% 0%, #1a212e, #0b0e14 78%); }
body[data-bg="grid-disclosure"]{ background: linear-gradient(180deg, #081211, #081211); }
body[data-bg="grid-disclosure"] .hero-scene{ background: radial-gradient(900px 480px at 50% 0%, #122723, #081211 78%); }
body[data-bg="grid-refunds"]  { background: linear-gradient(180deg, #091209, #091209); }
body[data-bg="grid-refunds"] .hero-scene  { background: radial-gradient(900px 480px at 50% 0%, #14261a, #091209 78%); }
body[data-bg="lost"]          { background: radial-gradient(1100px 620px at 50% -5%, #2b2140, transparent 60%), linear-gradient(180deg, #0c0a14, #0c0a14); }
body[data-bg="lost"] .hero-scene          { background: radial-gradient(900px 480px at 50% 0%, #352a4f, #0c0a14 75%); }

@media (forced-colors: active) {
  .bg-live { display: none; }
  .hero-scene::after { background: none; }
}
