/* Homepage Hero only. Opaque base isolates the older fixed site decoration. */
.hero {
  isolation: isolate;
  background-color: var(--bg-page);
  background-image:
    linear-gradient(rgba(74, 47, 217, .016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 47, 217, .016) 1px, transparent 1px);
  background-size: 44px 44px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 43%, rgba(74, 47, 217, .085), transparent 65%);
}

.hero-light {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  /* Also present before JS, without WebGL, or after context loss. */
  background: url('../img/hero-liquid.svg') center / 100% 100% no-repeat;
  mask-image: linear-gradient(transparent, #000 5%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 5%, #000 88%, transparent);
}

.hero-light[data-renderer='webgl'] { background-image: none; }
.hero-light-canvas { display: block; width: 100%; height: 100%; opacity: 0; }
.hero-light[data-renderer='webgl'] .hero-light-canvas { opacity: 1; }

/* Tiny compositor movement only in the no-WebGL fallback. No JS is needed. */
@media (prefers-reduced-motion: no-preference) {
  .hero-light:not([data-renderer='webgl']) {
    animation: hero-liquid-fallback 23s ease-in-out infinite alternate;
    transform-origin: 50% 55%;
  }
  .hero-light[data-paused='true'] { animation-play-state: paused; }
}
@keyframes hero-liquid-fallback {
  from { transform: scale(1.04) skewY(-2deg); }
  to { transform: scale(1.12) skewY(2deg) translateY(-1%); }
}
