/* ===================================================
   RunEasy — Footsteps Scroll Animation
   =================================================== */

/* Section wrapper — tall to allow scroll pinning */
.footsteps-section {
  position: relative;
  height: 400vh; /* tall scroll area for 3 steps + release */
  background: transparent;
}

/* Pinned inner container — stays visible while scrolling through section */
.footsteps-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Vertical trail line — hidden */
.footsteps-trail {
  display: none;
}

/* Footsteps container */
.footsteps-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  z-index: 2;
}

/* Individual footstep */
.footstep {
  position: relative;
  opacity: 0;
  transform: translateY(50px) scale(0.7);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.footstep.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Left foot offset */
.footstep-left {
  margin-right: 120px;
}

/* Right foot offset */
.footstep-right {
  margin-left: 120px;
}

/* Right foot SVG is mirrored in the HTML via different ellipse positions */

/* Footprint SVG — rotated to point downward */
.footprint-svg {
  width: 60px;
  height: 105px;
  color: var(--cyan, #00d4ff);
  transform: rotate(180deg);
  filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.5))
          drop-shadow(0 0 30px rgba(0, 212, 255, 0.2));
  transition: filter 0.5s, color 0.5s;
}

.footstep.visible .footprint-svg {
  animation: footprintPulse 2s ease-in-out infinite;
}

/* Glow behind each footprint */
.footstep-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 212, 255, 0.2), transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.8s;
  pointer-events: none;
  filter: blur(20px);
}

.footstep.visible .footstep-glow {
  opacity: 1;
  animation: glowPulse 2.5s ease-in-out infinite;
}

/* Step label number — hidden */
.footstep-label {
  display: none;
}

/* Scroll hint */
.footsteps-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white-40, rgba(240, 242, 248, 0.4));
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.6s;
  animation: hintBounce 2s ease-in-out infinite;
}

.footsteps-section.hint-visible .footsteps-hint {
  opacity: 1;
}

.footsteps-section.hint-hidden .footsteps-hint {
  opacity: 0;
}

/* ---- Animations ---- */
@keyframes footprintPulse {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.5))
            drop-shadow(0 0 30px rgba(0, 212, 255, 0.2));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.7))
            drop-shadow(0 0 45px rgba(0, 212, 255, 0.35));
  }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes hintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Impact ripple when footstep appears */
.footstep.visible::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  animation: ripple 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .footsteps-section {
    height: 350vh;
  }

  .footstep-left {
    margin-right: 60px;
  }

  .footstep-right {
    margin-left: 60px;
  }

  .footprint-svg {
    width: 48px;
    height: 84px;
  }

  .footsteps-container {
    gap: 36px;
  }

  .footstep-glow {
    width: 90px;
    height: 90px;
  }
}

@media (max-width: 480px) {
  .footsteps-section {
    height: 320vh;
  }

  .footstep-left {
    margin-right: 40px;
  }

  .footstep-right {
    margin-left: 40px;
  }

  .footprint-svg {
    width: 40px;
    height: 70px;
  }

  .footsteps-container {
    gap: 28px;
  }
}
