/* Keep the existing page gradients and both case-study ring pseudo-elements.
   The transparent first image is replaced by the interactive field on hover. */
:root {
  --ps-dither-size: clamp(280px, 36vw, 540px);
  --ps-dither-blue-art: url("./dither-blue.svg");
  --ps-dither-pale-art: url("./dither-pale.svg");
  --ps-dither-strength: .77;
}
#brx-content > section:is(.ps-gradient, .ps-ip-hero, .ps-ip-services-hero, .ps-ar-hero, .ps-case-hero, .ps-contact-hero):first-child:not(.ps-hero) {
  position: relative;
  isolation: isolate;
  background-image: var(--ps-dither-rest, var(--ps-dither-blue-art)), var(--ps-brand-gradient);
  background-size: var(--ps-dither-size) auto, auto, auto;
  background-position: right top, center, center;
  background-repeat: no-repeat;
}
:is(.ps-article-header, .bricks-archive-title-wrapper, .bricks-404-wrapper > h1.title)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--ps-dither-rest, var(--ps-dither-blue-art)) right top / var(--ps-dither-size) auto no-repeat;
}
:is(.ps-article-header, .bricks-archive-title-wrapper, .bricks-404-wrapper > h1.title) {
  position: relative;
  isolation: isolate;
  --ps-dither-size: min(35%, 290px);
  --ps-dither-ink: #4286ae;
}
:is(.ps-article-header, .bricks-archive-title-wrapper, .bricks-404-wrapper > h1.title)::before {
  background-image: var(--ps-dither-rest, var(--ps-dither-pale-art));
  z-index: -1;
}
.ps-dither-ready { --ps-dither-rest: linear-gradient(transparent, transparent); }
.ps-dither-atmosphere { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.ps-dither-field {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  width: var(--ps-dither-size);
  height: auto;
  aspect-ratio: 5 / 3;
  opacity: var(--ps-dither-strength);
  overflow: visible;
  transform: scaleY(-1);
  mask-image: linear-gradient(to bottom, transparent, black 30%);
  pointer-events: none;
}
.ps-dither-field rect { transition: transform 390ms cubic-bezier(.18,.68,.24,1); }
.ps-dither-speck {
  position: absolute;
  display: block;
  pointer-events: none;
  background: var(--ps-dither-ink, #bceaff);
  opacity: 0;
}
@media (max-width: 760px) {
  :root {
    --ps-dither-size: clamp(158px, 41vw, 235px);
    --ps-dither-blue-art: url("./dither-blue.svg#compact");
    --ps-dither-pale-art: url("./dither-pale.svg#compact");
    --ps-dither-strength: .58;
  }
  :is(.ps-article-header, .bricks-archive-title-wrapper, .bricks-404-wrapper > h1.title) {
    --ps-dither-size: min(38%, 158px);
  }
}
@media (prefers-reduced-motion: reduce), (hover: none), print {
  .ps-dither-field rect { transition: none; transform: none !important; }
  .ps-dither-speck { display: none; }
}
