/**
 * Własne animacje pomocnicze dla sekcji projekty i fal.
 * Wariant: szybsze, subtelniejsze, mniej „gęste”.
 *
 * @package Kejmilweb
 */

/* Spadanie linii — krócej i szybciej */
@keyframes fall {
	0% {
		transform: translateY(-95vh);
		opacity: 0;
	}
	18% {
		opacity: 0.65;
	}
	62% {
		opacity: 0.55;
		transform: translateY(0);
	}
	100% {
		transform: translateY(5vh);
		opacity: 0;
	}
}

/* Iskry w lewo — krótszy skok */
@keyframes jumpLeft {
	0%,
	52% {
		transform: translate(0, 0) scale(0.18);
		opacity: 0;
	}
	66% {
		transform: translate(-24px, -40px) scale(0.85);
		opacity: 0.55;
	}
	100% {
		transform: translate(-46px, -10px) scale(0.12);
		opacity: 0;
	}
}

/* Iskry w prawo — krótszy skok */
@keyframes jumpRight {
	0%,
	52% {
		transform: translate(0, 0) scale(0.18);
		opacity: 0;
	}
	66% {
		transform: translate(24px, -38px) scale(0.85);
		opacity: 0.55;
	}
	100% {
		transform: translate(44px, -8px) scale(0.12);
		opacity: 0;
	}
}

.animate-fall {
	animation-name: fall;
	animation-duration: var(--duration, 1.85s);
	animation-timing-function: cubic-bezier(0.22, 0.72, 0.2, 1);
	animation-iteration-count: infinite;
	animation-delay: var(--delay, 0s);
	animation-fill-mode: both;
}

.animate-jump-left {
	animation-name: jumpLeft;
	animation-duration: var(--duration, 1.85s);
	animation-timing-function: cubic-bezier(0.26, 0.86, 0.24, 1);
	animation-iteration-count: infinite;
	animation-delay: var(--delay, 0s);
	animation-fill-mode: both;
}

.animate-jump-right {
	animation-name: jumpRight;
	animation-duration: var(--duration, 1.85s);
	animation-timing-function: cubic-bezier(0.26, 0.86, 0.24, 1);
	animation-iteration-count: infinite;
	animation-delay: var(--delay, 0s);
	animation-fill-mode: both;
}

/* Fale SVG — szybsze, ale subtelne */
@keyframes wave-drift {
	0% {
		transform: translateX(-52px);
	}
	100% {
		transform: translateX(50px);
	}
}

.wave-parallax path {
	animation-name: wave-drift;
	animation-timing-function: cubic-bezier(0.42, 0.14, 0.26, 1);
	animation-iteration-count: infinite;
	animation-duration: 12s;
}

.wave-parallax path:nth-child(1) {
	animation-duration: 6s;
	animation-delay: -0.9s;
}

.wave-parallax path:nth-child(2) {
	animation-duration: 8.5s;
	animation-delay: -1.6s;
}

.wave-parallax path:nth-child(3) {
	animation-duration: 11s;
	animation-delay: -2.4s;
}

.wave-parallax path:nth-child(4) {
	animation-duration: 15s;
	animation-delay: -3s;
}

@media (prefers-reduced-motion: reduce) {
	.animate-fall,
	.animate-jump-left,
	.animate-jump-right,
	.wave-parallax path {
		animation: none !important;
	}
}