/* Scroll-reveal engine: JS toggles .is-visible when [data-reveal] enters the viewport */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="scale"] {
  transform: translateY(16px) scale(0.94);
}
[data-reveal="scale"].is-visible {
  transform: translateY(0) scale(1);
}
[data-reveal="left"] {
  transform: translateX(-32px);
}
[data-reveal="left"].is-visible {
  transform: translateX(0);
}
[data-reveal="right"] {
  transform: translateX(32px);
}
[data-reveal="right"].is-visible {
  transform: translateX(0);
}

/* Background blobs — slow ambient drift */
@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4%, -6%, 0) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-6%, 5%, 0) scale(1.1); }
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}
@keyframes sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(220%); }
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.5;
  will-change: transform;
}
.blob--a { animation: drift-a 16s var(--ease) infinite; }
.blob--b { animation: drift-b 20s var(--ease) infinite; }

.spin-slow { animation: spin-slow 40s linear infinite; }
.pulse-soft { animation: pulse-soft 3.4s var(--ease) infinite; }
.float-y { animation: float-y 5s var(--ease) infinite; }

.draw-path {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw-line 2.4s var(--ease) 0.3s forwards;
}

.sweep-bar {
  transform-box: fill-box;
  animation: sweep 3.2s var(--ease) infinite;
}

@keyframes dot-fire {
  0%, 100% { opacity: 0.22; transform: scale(0.68); }
  50% { opacity: 1; transform: scale(1); }
}
.print-dot {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: dot-fire 2.6s var(--ease) infinite;
}

/* Process connector line draws in as it enters view */
.process__line path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.4s var(--ease);
}
.process.is-visible .process__line path {
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .draw-path {
    stroke-dashoffset: 0;
  }
  .print-dot {
    animation: none;
    opacity: 0.8;
    transform: scale(1);
  }
  .sweep-bar {
    animation: none;
    opacity: 0;
  }
}
