/* ==========================================================================
   Kami — Animations
   Scroll reveals, parallax wrappers, keyframes. All motion is slow & calm.
   prefers-reduced-motion disables everything.
   ========================================================================== */

/* --- Scroll reveal ------------------------------------------------------- */
.reveal {
	opacity: 0;
	transform: translateY(var(--reveal-shift));
	transition: opacity var(--dur-slow) var(--ease-out),
		transform var(--dur-slow) var(--ease-out);
	will-change: opacity, transform;
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Stagger children of a revealed container */
.reveal-group > * {
	opacity: 0;
	transform: translateY(var(--reveal-shift));
	transition: opacity var(--dur-slow) var(--ease-out),
		transform var(--dur-slow) var(--ease-out);
}

.reveal-group.is-visible > * {
	opacity: 1;
	transform: translateY(0);
}

.reveal-group.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-group.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-group.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-group.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-group.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-group.is-visible > *:nth-child(6) { transition-delay: 0.55s; }

/* --- Parallax ------------------------------------------------------------ */
.parallax {
	position: relative;
	overflow: hidden;
}

.parallax__inner {
	position: absolute;
	inset: -12% 0;
	will-change: transform;
}

.parallax__inner .kami-img,
.parallax__inner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --- Keyframes ----------------------------------------------------------- */
@keyframes kami-cue {
	0% { transform: scaleY(0); opacity: 0; }
	30% { opacity: 0.6; }
	60% { transform: scaleY(1); opacity: 0.6; }
	100% { transform: scaleY(1); opacity: 0; transform-origin: bottom; }
}

@keyframes kami-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.kami-fade-in {
	animation: kami-fade-in var(--dur-slow) var(--ease-out) both;
}

/* --- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.reveal,
	.reveal-group > * {
		opacity: 1 !important;
		transform: none !important;
	}

	.parallax__inner {
		position: static;
		inset: auto;
		transform: none !important;
	}

	.kami-scroll-cue__line {
		animation: none;
		opacity: 0.4;
	}
}
