/* ============================================
   Animations & Motion Effects
   ============================================ */

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes float-reverse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.2); }
  50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.4); }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal-left {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes reveal-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Cursor Glow – dezent, klein */
.cursor-glow {
  position: fixed;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

body:hover .cursor-glow {
  opacity: 1;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Service card image – scroll reveal + hover shine */
.service-card--with-image .service-card-image img {
  opacity: 0;
  transform: scale(1.18);
}

.service-card--with-image.visible .service-card-image img {
  opacity: 1;
  transform: scale(1.12);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s ease;
}

.service-card--with-image.visible:hover .service-card-image img {
  transform: scale(1.02);
}

.service-card--with-image .service-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(10, 132, 255, 0.22) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  z-index: 2;
  pointer-events: none;
}

.service-card--with-image.visible:hover .service-card-image::before {
  animation: service-shine 0.75s ease forwards;
}

@keyframes service-shine {
  to {
    transform: translateX(120%);
  }
}

@keyframes mockup-shimmer {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

@keyframes mockup-speed-fill {
  0%, 100% { width: 72%; }
  50% { width: 96%; }
}

/* Floating elements */
.float {
  animation: float 4s ease-in-out infinite;
}

.float-delay {
  animation: float 4s ease-in-out 1s infinite;
}

.float-reverse {
  animation: float-reverse 5s ease-in-out infinite;
}

/* Featured pricing card – Gradient via ::after in style.css */
.pricing-card.featured {
  position: relative;
}

/* Hero card glow */
.hero-card {
  animation: glow-pulse 4s ease-in-out infinite;
}

/* Tilt effect (applied via JS) */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
}

/* Counter animation */
.counter {
  display: inline-block;
}

/* Hero entrance animations */
.hero-badge {
  animation: reveal-up 0.8s ease forwards;
}

.hero h1 {
  animation: reveal-up 0.8s ease 0.1s forwards;
  opacity: 0;
}

.hero-description {
  animation: reveal-up 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-actions {
  animation: reveal-up 0.8s ease 0.3s forwards;
  opacity: 0;
}

.hero-stats {
  animation: reveal-up 0.8s ease 0.4s forwards;
  opacity: 0;
}

.hero-visual {
  animation: reveal-right 1s ease 0.2s forwards;
  opacity: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .hero-badge,
  .hero h1,
  .hero-description,
  .hero-actions,
  .hero-stats,
  .hero-visual {
    opacity: 1;
    animation: none;
  }

  .cursor-glow {
    display: none;
  }

  .float,
  .float-delay,
  .float-reverse {
    animation: none;
  }

  .pricing-card::before {
    transition: none;
  }

  .pricing-card:hover::before {
    clip-path: inset(0 0 0 0 round calc(var(--radius-lg) + 2px));
  }

  .service-card--with-image .service-card-image img {
    opacity: 1;
    transform: scale(1.02);
    transition: none;
  }

  .service-card--with-image .service-card-image::before {
    animation: none !important;
  }

  .mockup-shimmer,
  .mockup-speed-bar span {
    animation: none !important;
    opacity: 0.75;
  }

  .service-card-more {
    opacity: 1;
    transform: none;
  }

  .service-card-link:hover .laptop-mockup {
    transform: none;
  }

  .section-neon-border rect {
    transition: none !important;
    stroke-dashoffset: 0 !important;
  }

  section:not(.section-hovered) .section-neon-border {
    opacity: 0 !important;
  }
}

/* ========================================
   SECTION NEON BORDER – dynamisch
   SVG-Stroke: startet an einer Ecke, läuft
   die Kontur entlang und schließt sich
   ======================================== */

section {
  position: relative;
  isolation: isolate;
}

.section-neon-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.35s ease;
  filter:
    drop-shadow(0 0 4px rgba(180, 220, 255, 1))
    drop-shadow(0 0 16px rgba(10, 132, 255, 0.95))
    drop-shadow(0 0 40px rgba(10, 132, 255, 0.65))
    drop-shadow(0 0 80px rgba(10, 132, 255, 0.38))
    drop-shadow(0 0 140px rgba(10, 132, 255, 0.18));
}

section.section-hovered .section-neon-border {
  opacity: 1;
}

.section-neon-border rect {
  fill: none;
  stroke: rgba(130, 200, 255, 1);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

section.section-hovered .section-neon-border rect {
  stroke-dashoffset: 0;
}

/* Tablet: etwas dezenter */
@media (max-width: 1024px) {
  .section-neon-border {
    filter:
      drop-shadow(0 0 10px rgba(10, 132, 255, 0.75))
      drop-shadow(0 0 28px rgba(10, 132, 255, 0.48))
      drop-shadow(0 0 56px rgba(10, 132, 255, 0.22));
  }

  .section-neon-border rect {
    stroke-width: 3;
    stroke: rgba(10, 132, 255, 1);
    transition-duration: 1.25s;
  }
}

/* Handy / enger Viewport: aus */
@media (max-width: 768px) {
  .section-neon-border {
    display: none !important;
  }
}
