/**
 * Ambient mesh + grain — decorative layer only
 */
.mesh-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--color-bg);
}

.mesh-backdrop__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  animation: mesh-float 22s var(--ease-out) infinite alternate;
}

.mesh-backdrop__blob--a {
  width: min(52vw, 620px);
  height: min(52vw, 620px);
  top: -12%;
  left: -8%;
  background: radial-gradient(circle at 30% 30%, var(--color-mesh-1), transparent 65%);
}

.mesh-backdrop__blob--b {
  width: min(48vw, 520px);
  height: min(48vw, 520px);
  top: 18%;
  right: -14%;
  background: radial-gradient(circle at 70% 40%, var(--color-mesh-2), transparent 68%);
  animation-duration: 26s;
  animation-delay: -4s;
}

.mesh-backdrop__blob--c {
  width: min(42vw, 480px);
  height: min(42vw, 480px);
  bottom: -8%;
  left: 22%;
  background: radial-gradient(circle at 50% 60%, var(--color-mesh-3), transparent 70%);
  animation-duration: 24s;
  animation-delay: -8s;
}

.mesh-backdrop__grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

@keyframes mesh-float {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, -3%, 0) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mesh-backdrop__blob {
    animation: none;
    opacity: 0.35;
  }
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.85s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
