/* ======================================================
   AiPrank.ru — Interactive Effects CSS
   Glitch, Glow, Neon borders, Particles
   ====================================================== */

/* ─── 1. GLITCH EFFECT on Hero headline ─── */
.hero__headline {
  position: relative;
}
.hero__headline[data-glitch] {
  animation: glitchShake 6s ease-in-out infinite;
}
.hero__headline[data-glitch]::before,
.hero__headline[data-glitch]::after {
  content: attr(data-glitch);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.hero__headline[data-glitch]::before {
  color: var(--red);
  z-index: -1;
  animation: glitchLeft 3s cubic-bezier(.25,.46,.45,.94) infinite both;
}
.hero__headline[data-glitch]::after {
  color: var(--blue);
  z-index: -2;
  animation: glitchRight 2.5s cubic-bezier(.25,.46,.45,.94) .3s infinite both;
}

@keyframes glitchShake {
  0%, 90%, 100% { transform: none; }
  92% { transform: translate(-2px, 1px); }
  94% { transform: translate(3px, -1px); }
  96% { transform: translate(-1px, 2px); }
  98% { transform: translate(2px, -2px); }
}
@keyframes glitchLeft {
  0%, 85%, 100%  { clip-path: inset(0 0 100% 0); }
  87%            { clip-path: inset(20% 0 60% 0); transform: translate(-4px, 0); }
  89%            { clip-path: inset(50% 0 30% 0); transform: translate(3px, 0); }
  91%            { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 0); }
  93%            { clip-path: inset(0 0 100% 0); }
}
@keyframes glitchRight {
  0%, 88%, 100%  { clip-path: inset(0 0 100% 0); }
  90%            { clip-path: inset(60% 0 10% 0); transform: translate(4px, 0); }
  92%            { clip-path: inset(30% 0 50% 0); transform: translate(-3px, 0); }
  94%            { clip-path: inset(70% 0 15% 0); transform: translate(2px, 0); }
  96%            { clip-path: inset(0 0 100% 0); }
}

/* ─── 2. CURSOR GLOW (follows mouse) ─── */
.cursor-glow {
  position: fixed;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,215,0,.08) 0%, rgba(232,34,42,.04) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity .35s;
  mix-blend-mode: screen;
  will-change: left, top;
  opacity: 0;
}
.cursor-glow.visible { opacity: 1; }

/* ─── 3. NEON PULSE BORDERS on service cards ─── */
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(
    from var(--neon-angle, 0deg),
    transparent 0%,
    var(--red) 10%,
    transparent 20%,
    var(--blue) 35%,
    transparent 45%,
    var(--yellow) 55%,
    transparent 65%,
    var(--red) 80%,
    transparent 90%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity .45s ease;
  animation: neonSpin 4s linear infinite;
}
.service-card:hover::before {
  opacity: 1;
}
.service-card::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--dark2);
  z-index: -1;
}

@keyframes neonSpin {
  0%   { --neon-angle: 0deg;   }
  100% { --neon-angle: 360deg; }
}
/* Regester custom property for animation */
@property --neon-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ─── 4. TILT on example cards ─── */
.ex-card {
  transform-style: preserve-3d;
  transition: transform .35s ease, box-shadow .35s ease;
}
.ex-card.tilting {
  transition: none;
}

/* ─── 5. Scan-line overlay on Hero ─── */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,.03) 2px,
    rgba(0,0,0,.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ─── 6. Interactive dot grid canvas (placed by JS) ─── */
#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── 7. Typing cursor on hero tag ─── */
.hero__tag::after {
  content: '▌';
  display: inline-block;
  margin-left: 4px;
  color: var(--red);
  font-weight: 400;
  animation: typingBlink 1s step-end infinite;
}
@keyframes typingBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── 8. Glow-on-hover for How-steps ─── */
.how__step {
  position: relative;
  overflow: hidden;
}
.how__step::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--yellow) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity .4s;
  z-index: 0;
  filter: blur(60px);
}
.how__step:hover::before {
  opacity: .07;
}
.how__step > * { position: relative; z-index: 1; }

/* ─── 9. Pulse on floating buttons ─── */
.float-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid currentColor;
  opacity: 0;
  animation: floatPulse 2s ease-out infinite;
}
@keyframes floatPulse {
  0%   { transform: scale(1); opacity: .6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ─── 10. Marquee items glow effect ─── */
.marquee-item {
  position: relative;
  transition: text-shadow .3s;
}
.marquee-track:hover .marquee-item {
  text-shadow: 0 0 20px rgba(232,34,42,.3), 0 0 40px rgba(232,34,42,.15);
}
