/* ===========================
   Klikkipaja — Effects
   Particle canvas + cursor trail styling.
   =========================== */

/* ── Hero particle canvas ─────────────────
   Fills the cover block, sits behind content
   but above the background overlay.
   ──────────────────────────────────────── */
.has-hero-particles {
  position: relative;
}

.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none; /* clicks pass through to buttons */
}

/* Ensure hero text content stays above the canvas */
.has-hero-particles .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
}

/* Animated grid overlay via CSS — sits behind particles */
.has-hero-particles::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(84,132,228,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84,132,228,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: klikkipaja-grid-slide 20s linear infinite;
  pointer-events: none;
}

/* Ambient glow orb — adds depth to the hero */
.has-hero-particles::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(20,204,204,0.12) 0%, transparent 70%);
  top: 20%;
  right: -100px;
  border-radius: 50%;
  z-index: 0;
  animation: klikkipaja-orb-float 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes klikkipaja-grid-slide {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

@keyframes klikkipaja-orb-float {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(1.1); }
}

/* ── Cursor trail canvas ──────────────────
   Fixed fullscreen overlay. pointer-events: none
   ensures all page interaction works normally.
   ──────────────────────────────────────── */
#klikkipaja-cursor-trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

/* Hide cursor trail on mobile — no mouse to trail */
@media (pointer: coarse) {
  #klikkipaja-cursor-trail {
    display: none;
  }
}
