html::before,
body::before {
  content: "";
  position: fixed;
  inset: -8vmax;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}

html::before {
  background:
    radial-gradient(
      circle 46vmax at 20% 30%,
      color-mix(
        in srgb,
        color-mix(in oklch, var(--navy, oklch(17.95% 0.004 165)) 60%, oklch(19.95% 0.004 165)) 62%,
        transparent
      ),
      transparent 70%
    ),
    radial-gradient(
      circle 40vmax at 78% 64%,
      color-mix(
        in srgb,
        color-mix(in oklch, var(--navy, oklch(17.95% 0.004 165)) 66%, oklch(23.95% 0.004 165)) 58%,
        transparent
      ),
      transparent 70%
    );
  animation: amb-f1 118s ease-in-out infinite alternate;
}

body::before {
  background:
    radial-gradient(
      circle 34vmax at 72% 22%,
      color-mix(
        in srgb,
        color-mix(in oklch, var(--navy, oklch(17.95% 0.004 165)) 62%, oklch(27.95% 0.004 165)) 55%,
        transparent
      ),
      transparent 70%
    ),
    radial-gradient(
      circle 30vmax at 28% 76%,
      color-mix(
        in srgb,
        color-mix(in oklch, var(--navy, oklch(17.95% 0.004 165)) 60%, oklch(19.95% 0.004 165)) 38%,
        transparent
      ),
      transparent 70%
    );
  animation: amb-f2 86s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='120'%3E%3Cfilter%20id='d'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20color-interpolation-filters='sRGB'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='2'%20stitchTiles='stitch'%20seed='7'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR%20type='linear'%20slope='0.05'%20intercept='0.475'/%3E%3CfeFuncG%20type='linear'%20slope='0.05'%20intercept='0.475'/%3E%3CfeFuncB%20type='linear'%20slope='0.05'%20intercept='0.475'/%3E%3CfeFuncA%20type='discrete'%20tableValues='1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect%20width='120'%20height='120'%20filter='url(%23d)'/%3E%3C/svg%3E")
    left top / 120px 120px repeat;
  mix-blend-mode: soft-light;
}

@keyframes amb-f1 {
  from {
    transform: translate3d(-2.6vmax, -1.6vmax, 0) scale(1);
  }
  to {
    transform: translate3d(2.6vmax, 2vmax, 0) scale(1.045);
  }
}

@keyframes amb-f2 {
  from {
    transform: translate3d(2.8vmax, 1.4vmax, 0) scale(1.04);
  }
  to {
    transform: translate3d(-2.8vmax, -2vmax, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html::before,
  body::before {
    animation: none;
  }
}

@media print {
  html::before,
  body::before,
  body::after {
    display: none;
  }
}
