Mix-Blend-Mode Overlay – prevent images in lower stacking context to be effected

This might be a pretty specific question.
I have this running text marquee animation. On hover the animation pauses and shows a gradient as “text color”. The mouse is being tracked to pin the black gradient center to the mouse movement.

Goal:
The gradient on the text should span across the whole width. Images inside of the text should not be effected. The center of the gradient should always be the black color. The gradient should ideally be on the level of .marquee (wrapper) to not be effected by the animation. (.marqueeConetent is being animated)

Challenge:
Different stacking contexts are created therefore it is hard to place the images above a gradient overlay. Because of the text animation the content gets duplicated and replaced at some point -> leads to anomalies with the gradient not hitting every text block.

What I tried:

mix-blend-mode overlay approach – hard to overcome different stacking contexts therefore the images are always effected.

background-clip text approach – either the gradient center changes or the effect is applied to each text block individually.

Is there any way to achieve what I am looking for? Is there any way to prevent images in a lower stacking context to be effected by an overlay with mix-blend-mode in a higher stacking context?

const marquees = document.querySelectorAll(".marquee");

// If recuded motion isn't activated we add the animation
if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
  addMarqueeAnimation();
}

function addMarqueeAnimation() {
  marquees.forEach((marquee) => {
    // add data-animated="true" to every `.marquee` on the page
    marquee.setAttribute("data-animated", true);

    // Make an array from the elements within .marquee
    const scrollerContent = Array.from(marquee.children);

    // For each item in the array, clone it
    // add aria-hidden to it
    // add it into the .marquee
    scrollerContent.forEach((item) => {
      const duplicatedItem = item.cloneNode(true);
      duplicatedItem.setAttribute("aria-hidden", true);
      marquee.appendChild(duplicatedItem);
    });
  });
}

//track mouse for gradient hover
const button = document.querySelectorAll(".marquee");

for (let i = 0; i < button.length; i++) {
  button[i].addEventListener("mousemove", (e) => {
    const { x, y } = button[i].getBoundingClientRect();
    button[i].style.setProperty("--x", e.clientX - x + "px");
    button[i].style.setProperty("--y", e.clientY - y + "px");
  });
}
body {
  margin: 0;
  font-family: system-ui;
  font-size: 2.5rem;
  background: white;
  color: black;
}
section {
  position: relative;
}


.imgEmoji {
  height: 2.5rem;
  width: 2.5rem;
  margin-bottom: -6px;

  position: relative;
  z-index: 999;
  mix-blend-mode: unset;
}

.marquee {
  --gap: 1.5rem;
  display: flex;
  gap: var(--gap);
  overflow-x: clip;
  background: white;
}

.marqueeContent {
  display: flex;
  gap: calc(var(--gap));
  flex-shrink: 0;
  align-items: center;
  justify-content: space-around;
  min-width: 100%;
  padding-block: 0.75rem;
  background: inherit;
}


/* Animation */
  .marquee[data-animated="true"] .marqueeContent {
    animation: scroll var(--marquee-duration, 15.5s)
      var(--marquee-direction, forwards) linear infinite;
  }
  .marquee[data-animated="true"]:hover .marqueeContent {
    animation-play-state: paused;
  }

  @keyframes scroll {
    to {
      transform: translate(
        calc(-50% - calc(var(--gap) / 2))
      );
    }
  }

  /* Direction */
  .marquee[data-direction="left"] {
    --marquee-direction: forwards;
  }
  /* Speed */
  .marquee[data-speed="faster"] {
    --marquee-duration: 5s;
  }


/* IDEA 1 */
/* pseudo element on non animated wrapper
+ it stays the same and is not animated 
- images get effected since different stacking context
*/
.marquee:hover::after {
  content: "";
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(
      circle at var(--x, 0) var(--y, 0),
      black 0vw,
      red 21vw,
      green 34vw,
      yellow 51vw
  );
  mix-blend-mode: screen;
  position: absolute;
  z-index: 2;
}



/* IDEA 2 */
/* pseudo element on animated content
+ images are not effected
- since the pseudo element is also animated the gradient center changes
- when parts of both content groups are shown the gradient isn't the same on all elements

.marqueeContent:hover::after {
  content: "";
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(
      circle at var(--x, 0) var(--y, 0),
      black 0vw,
      red 21vw,
      green 34vw,
      yellow 51vw
  );
  mix-blend-mode: screen;
  position: absolute;
  z-index: 2;
}
*/


/* IDEA 3 */
/* background clip on all spans and a with text 
+ images are not effected
- gradient is different and limited to each text element

span:not(:has(img)), .marqueeContent a {
  background: radial-gradient(
      circle at var(--x, 0) var(--y, 0),
      black 0vw,
      red 21vw,
      green 34vw,
      yellow 51vw
    );
  background-clip: text;
  color: transparent;  
}
*/


/* IDEA 4 */
/* background clip on wraper 
+ images are not effected
- gradient is wierd the center is moving

.marquee:hover {
  background: radial-gradient(
      circle at var(--x, 0) var(--y, 0),
      black 0vw,
      red 21vw,
      green 34vw,
      yellow 51vw
    );
  background-clip: text;
  color: transparent;
}
*/
<section>

  <div class="marquee" data-speed="faster">

    <div class="marqueeContent">
      <a target="blank">Happy Holidays</a>
      <span>
        <img class="imgEmoji" src="https://shorturl.at/kzntl" />
        <img class="imgEmoji" src="https://shorturl.at/kzntl" />
      </span>
      <span aria-hidden="true">Happy Holidays</span>
      <span aria-hidden="true">
        <img class="imgEmoji" src="https://shorturl.at/kzntl" />
        <img class="imgEmoji" src="https://shorturl.at/kzntl" />
      </span>
      <span aria-hidden="true">Happy Holidays</span>
      <span aria-hidden="true">
        <img class="imgEmoji" src="https://shorturl.at/kzntl" />
        <img class="imgEmoji" src="https://shorturl.at/kzntl" />
      </span>
      <span aria-hidden="true">Happy Holidays</span>
      <span aria-hidden="true">
        <img class="imgEmoji" src="https://shorturl.at/kzntl" />
        <img class="imgEmoji" src="https://shorturl.at/kzntl" />
      </span>
    </div>
    
  </div>

</section>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật