/* ===== INTERACTIVE LINE-BASED HERO DOODLES ===== */

/* Container for interactive doodles */
.hero-doodle .colorful-doodles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Enable pointer events only for interactive doodles */
.hero-doodle .colorful-doodles svg {
  pointer-events: auto;
  cursor: pointer;
}

/* ===== INTERACTIVE ANIMATED LINES ===== */

/* Spiral Line Doodle - Top Right Corner (Empty Space) */
.doodle-spiral {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 120px;
  height: 120px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.doodle-spiral:hover {
  transform: scale(1.15) rotate(15deg);
}

.doodle-spiral path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: draw-spiral 3s ease-in-out infinite;
}

@keyframes draw-spiral {
  0% {
    stroke-dashoffset: 300;
  }

  50% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -300;
  }
}

/* Wavy Lines - Left Side Empty Space */
.doodle-waves {
  position: absolute;
  top: 40%;
  left: 8%;
  width: 100px;
  height: 80px;
  transition: all 0.3s ease;
}

.doodle-waves:hover {
  transform: translateX(-10px) scale(1.1);
}

.doodle-waves path {
  stroke-dasharray: 200;
  animation: wave-flow 2.5s ease-in-out infinite;
}

.doodle-waves path:nth-child(1) {
  animation-delay: 0s;
}

.doodle-waves path:nth-child(2) {
  animation-delay: 0.3s;
}

.doodle-waves path:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes wave-flow {

  0%,
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  50% {
    stroke-dashoffset: 200;
    opacity: 0.5;
  }
}

/* Connected Dots Pattern - Bottom Left Empty Space */
.doodle-constellation {
  position: absolute;
  bottom: 12%;
  left: 5%;
  width: 110px;
  height: 110px;
  transition: all 0.5s ease;
}

.doodle-constellation:hover {
  transform: rotate(20deg) scale(1.2);
}

.doodle-constellation circle {
  animation: pulse-dot 2s ease-in-out infinite;
}

.doodle-constellation circle:nth-child(1) {
  animation-delay: 0s;
}

.doodle-constellation circle:nth-child(2) {
  animation-delay: 0.2s;
}

.doodle-constellation circle:nth-child(3) {
  animation-delay: 0.4s;
}

.doodle-constellation circle:nth-child(4) {
  animation-delay: 0.6s;
}

.doodle-constellation circle:nth-child(5) {
  animation-delay: 0.8s;
}

@keyframes pulse-dot {

  0%,
  100% {
    r: 4;
    opacity: 1;
  }

  50% {
    r: 6;
    opacity: 0.6;
  }
}

.doodle-constellation line {
  stroke-dasharray: 100;
  animation: connect-dots 3s ease-in-out infinite;
}

@keyframes connect-dots {
  0% {
    stroke-dashoffset: 100;
    opacity: 0;
  }

  50% {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  100% {
    stroke-dashoffset: -100;
    opacity: 0;
  }
}

/* Zigzag Pattern - Top Left */
.doodle-zigzag {
  position: absolute;
  top: 20%;
  left: 2%;
  width: 80px;
  height: 100px;
  transition: all 0.3s ease;
}

.doodle-zigzag:hover {
  transform: scaleY(1.2);
}

.doodle-zigzag path {
  stroke-dasharray: 250;
  animation: zigzag-draw 2s ease-in-out infinite;
}

@keyframes zigzag-draw {

  0%,
  100% {
    stroke-dashoffset: 250;
  }

  50% {
    stroke-dashoffset: 0;
  }
}

/* Circular Motion Lines - Bottom Right */
.doodle-orbit {
  position: absolute;
  bottom: 18%;
  right: 8%;
  width: 90px;
  height: 90px;
  transition: all 0.4s ease;
}

.doodle-orbit:hover {
  transform: rotate(360deg);
}

.doodle-orbit circle {
  stroke-dasharray: 200;
  animation: orbit-spin 4s linear infinite;
  transform-origin: center;
}

.doodle-orbit circle:nth-child(1) {
  animation-duration: 3s;
}

.doodle-orbit circle:nth-child(2) {
  animation-duration: 4s;
  animation-direction: reverse;
}

@keyframes orbit-spin {
  0% {
    stroke-dashoffset: 0;
    transform: rotate(0deg);
  }

  100% {
    stroke-dashoffset: 200;
    transform: rotate(360deg);
  }
}

/* Responsive: Simplify on mobile */
@media (max-width: 768px) {

  .doodle-spiral,
  .doodle-constellation,
  .doodle-orbit {
    display: none;
  }

  .doodle-waves {
    left: 2%;
    width: 70px;
    height: 60px;
  }

  .doodle-zigzag {
    width: 60px;
    height: 80px;
  }
}

/* Click animation effect */
@keyframes doodle-click {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

.colorful-doodles svg:active {
  animation: doodle-click 0.3s ease;
}