/* ==========================================================================
   TeachCPA Premium — motion, reveals and reduced-motion support
   ========================================================================== */

@keyframes tcp-float-soft {
	0%, 100% { transform: translate3d(0, 0, 0); }
	50% { transform: translate3d(0, -10px, 0); }
}

@keyframes tcp-pulse-ring {
	0% { box-shadow: 0 0 0 0 rgba(34, 201, 139, 0.55); }
	70% { box-shadow: 0 0 0 8px rgba(34, 201, 139, 0); }
	100% { box-shadow: 0 0 0 0 rgba(34, 201, 139, 0); }
}

@keyframes tcp-ping {
	0% { transform: scale(1); opacity: 0.7; }
	70%, 100% { transform: scale(1.45); opacity: 0; }
}

@keyframes tcp-gradient-slide {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

@keyframes tcp-streak {
	0% { transform: translateX(0); opacity: 0; }
	12% { opacity: 1; }
	70% { opacity: 0.7; }
	100% { transform: translateX(120vw); opacity: 0; }
}

@keyframes tcp-streak-rev {
	0% { transform: translateX(0); opacity: 0; }
	12% { opacity: 1; }
	70% { opacity: 0.7; }
	100% { transform: translateX(-120vw); opacity: 0; }
}

@keyframes tcp-spin {
	to { transform: rotate(360deg); }
}

@keyframes tcp-travel {
	0% { left: 0; opacity: 0; }
	8% { opacity: 1; }
	92% { opacity: 1; }
	100% { left: 100%; opacity: 0; }
}

@keyframes tcp-scroll-dot {
	0% { transform: translate(-50%, 0); opacity: 0; }
	30% { opacity: 1; }
	70% { transform: translate(-50%, 10px); opacity: 0; }
	100% { opacity: 0; }
}

@keyframes tcp-lang-countdown {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

@keyframes tcp-fade-up {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: translateY(0); }
}

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

@keyframes tcp-pop-in {
	0% { opacity: 0; transform: translateY(18px) scale(0.97); }
	100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Scroll reveals — only when JavaScript is present. */
html.tcp-js [data-reveal] {
	opacity: 0;
	transform: translateY(26px);
	transition:
		opacity 0.75s var(--ease) var(--reveal-delay, 0ms),
		transform 0.75s var(--ease-spring) var(--reveal-delay, 0ms);
	will-change: opacity, transform;
}

html.tcp-js [data-reveal].is-revealed {
	opacity: 1;
	transform: translateY(0);
}

html.tcp-js .hero-copy[data-reveal],
html.tcp-js .hero-visual[data-reveal] {
	transform: translateY(34px) scale(0.99);
}

html.tcp-js .hero-copy[data-reveal].is-revealed,
html.tcp-js .hero-visual[data-reveal].is-revealed {
	transform: translateY(0) scale(1);
}

/* Subtle hover tilt for cards. */
@media (hover: hover) and (pointer: fine) {
	.class-card,
	.resource-card,
	.blog-card,
	.journey-step {
		transform-style: preserve-3d;
	}
}

/* Language popup entrance. */
.tcp-lang-dialog {
	animation: tcp-pop-in 0.5s var(--ease-spring) both;
}

.tcp-lang-choice {
	animation: tcp-fade-up 0.5s var(--ease) both;
}

.tcp-lang-choice:nth-child(1) { animation-delay: 0.08s; }
.tcp-lang-choice:nth-child(2) { animation-delay: 0.16s; }

/* Respect the visitor's motion preference. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	html.tcp-js [data-reveal] {
		opacity: 1;
		transform: none;
	}

	.hero-canvas,
	.hero-streaks,
	.hero-orbit,
	.hero-grid-plane {
		display: none;
	}

	.hero-title em.tcp-grad {
		background-position: 50% 50%;
	}

	.hero-float,
	.hero-chip,
	.hero-player,
	.hero-player-float,
	.about-badge {
		animation: none;
	}
}

/* Soft devices: lighten the heaviest effects. */
@media (max-width: 1023px) {
	.hero-streaks i:nth-child(5),
	.hero-streaks i:nth-child(6) {
		display: none;
	}
}
