/* Ambient background
   A calm, abstract mesh gradient that replaces the old hero video.
   Everything here is plain CSS: oversized blurred color blobs drifting slowly
   over an ink base, finished with a fine grain overlay drawn from an inline SVG
   filter. No image files, no video, no scripts, no network requests.

   The colors come from the logo mark (media/logo.svg): the brand blue #335DD4
   and the brand magenta #FF007A, plus two blends of those, violet #8538B0 and
   plum #AD259E. The ink base #0a0a0b keeps the hero as dark as the video it
   replaces, so the existing scrim and text colors still apply unchanged. */

.ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: #0a0a0b;
}

/* One drifting blob. Only transform is animated, so the blurred layer stays
   cached on the GPU and the motion costs nothing to paint. */
.ambient-blob {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--blob-color) 0%, transparent 34%),
    radial-gradient(circle at 50% 50%, var(--blob-color) 0%, transparent 72%);
  filter: blur(var(--blob-blur, 64px));
  will-change: transform;
  transform: translate3d(0, 0, 0) scale(1);
  animation: var(--blob-motion, ambient-drift-a) var(--blob-duration, 32s) ease-in-out infinite alternate;
}

/* Brand blue, the largest field, anchored to the top right. */
.ambient-blob--one {
  --blob-color: #335DD49a;
  --blob-duration: 32s;
  --blob-motion: ambient-drift-a;
  top: -24%;
  right: -16%;
  width: 66vmax;
  height: 66vmax;
}

/* Brand magenta, the warm counterweight on the right hand side. */
.ambient-blob--two {
  --blob-color: #ff007a5c;
  --blob-duration: 41s;
  --blob-motion: ambient-drift-b;
  top: 34%;
  right: -20%;
  width: 58vmax;
  height: 58vmax;
}

/* Blue and magenta blended into violet, sitting low and to the left. */
.ambient-blob--three {
  --blob-color: #8538b061;
  --blob-duration: 47s;
  --blob-motion: ambient-drift-c;
  bottom: -28%;
  left: -18%;
  width: 54vmax;
  height: 54vmax;
}

/* Magenta and blue blended into plum, closing the lower right corner. */
.ambient-blob--four {
  --blob-color: #ad259e4d;
  --blob-duration: 29s;
  --blob-motion: ambient-drift-d;
  bottom: -10%;
  right: 12%;
  width: 46vmax;
  height: 46vmax;
}

/* Fine grain. Drawn from an inline SVG turbulence filter, so it costs no
   request and stays a single composited layer. */
.ambient-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.08;
}

/* Drift paths. Each blob has its own duration, so the composition never
   repeats on a loop. */
@keyframes ambient-drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(6%, -4%, 0) scale(1.1);
  }
}

@keyframes ambient-drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.06);
  }

  to {
    transform: translate3d(-7%, 5%, 0) scale(0.97);
  }
}

@keyframes ambient-drift-c {
  from {
    transform: translate3d(0, 0, 0) scale(0.98);
  }

  to {
    transform: translate3d(5%, 6%, 0) scale(1.08);
  }
}

@keyframes ambient-drift-d {
  from {
    transform: translate3d(0, 0, 0) scale(1.03);
  }

  to {
    transform: translate3d(-5%, -6%, 0) scale(0.98);
  }
}

/* Phones: two blobs and a tighter blur, which keeps the layer smooth on
   smaller GPUs. The blobs are sized against the card instead of the
   viewport, and the brand blue field is held back from the top left corner
   so the logo mark keeps its contrast against the dark base. */
@media (max-width: 639px) {
  .ambient-blob {
    --blob-blur: 34px;
  }

  .ambient-blob--one {
    top: -4%;
    right: -28%;
    width: 98%;
    height: 60%;
  }

  .ambient-blob--two {
    top: 36%;
    right: -26%;
    width: 96%;
    height: 56%;
  }

  .ambient-blob--three,
  .ambient-blob--four {
    display: none;
  }
}
