body.page-the-realm .hero-the-realm {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

body.page-the-realm .hero-the-realm::after {
  z-index: 1;
}

body.page-the-realm .hero-the-realm .hero-content {
  position: relative;
  z-index: 4;
}

.realm-fracture-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.realm-fracture-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.realm-fracture-piece {
  position: absolute;
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: transform, opacity, filter;
  filter: saturate(1.2) brightness(1.05);
  mix-blend-mode: screen;
  mask-image:
    radial-gradient(circle at var(--mask-x, 50%) var(--mask-y, 50%),
      rgba(0, 0, 0, 1) 0,
      rgba(0, 0, 0, 1) var(--mask-core, 26%),
      rgba(0, 0, 0, 0.78) calc(var(--mask-core, 26%) + 12%),
      rgba(0, 0, 0, 0.14) var(--mask-fade, 78%),
      transparent 100%),
    linear-gradient(rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.92));
  -webkit-mask-image:
    radial-gradient(circle at var(--mask-x, 50%) var(--mask-y, 50%),
      rgba(0, 0, 0, 1) 0,
      rgba(0, 0, 0, 1) var(--mask-core, 26%),
      rgba(0, 0, 0, 0.78) calc(var(--mask-core, 26%) + 12%),
      rgba(0, 0, 0, 0.14) var(--mask-fade, 78%),
      transparent 100%),
    linear-gradient(rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.92));
}

.realm-fracture-piece::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(235, 210, 120, 0.34), transparent 58%),
    radial-gradient(circle at 30% 30%, rgba(128, 255, 176, 0.18), transparent 48%),
    radial-gradient(circle, rgba(244, 222, 145, 0.95) 0 0.7px, transparent 0.8px);
  background-size: 100% 100%, 100% 100%, 7px 7px;
  background-position: center, center, var(--dither-x, 0px) var(--dither-y, 0px);
  opacity: calc(var(--fracture-alpha, 0) * 0.7);
  mix-blend-mode: screen;
}

.realm-fracture-layer--deep .realm-fracture-piece {
  mix-blend-mode: lighten;
  filter: blur(0.4px) saturate(1.08);
}

.realm-fracture-layer--mid .realm-fracture-piece {
  filter: saturate(1.18) brightness(1.08);
}

.realm-fracture-layer--near .realm-fracture-piece {
  filter: saturate(1.26) brightness(1.14);
}

.realm-fracture-piece__inner,
.realm-fracture-source {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.realm-fracture-piece__inner::before,
.realm-fracture-source::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 7, 14, 0.18), rgba(4, 7, 14, 0.02) 24%, rgba(4, 7, 14, 0.36) 100%),
    radial-gradient(circle at center, rgba(230, 208, 145, 0.08), transparent 58%);
}

.realm-fracture-source__content {
  position: absolute;
  inset: 0;
}

.realm-fracture-source__content .hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.realm-fracture-source__content .hero-content > * {
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce), (max-width: 900px) {
  .realm-fracture-stage {
    display: none !important;
  }
}
