/* ============================================================
   حرکت و ریزتعامل‌ها
   همه با transform/opacity (بدون reflow) و کامل خاموش‌شدنی با reduced-motion.
   ============================================================ */

/* ورود عناصر: فاصله‌ی کم (۱۶px) تا مثل «محو شدن» خوانده شود نه پرش */
[data-anim] {
	opacity: 0;
	transform: translateY(16px);
}

[data-anim].in-view,
[data-anim].is-ready {
	opacity: 1;
	transform: none;
	transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms);
}

/* ورود از کنار در RTL: از راست به مرکز */
[data-anim="side"] {
	transform: translateX(28px);
}

/* خط برچسب سکشن با ورود عنصر کشیده می‌شود */
.kicker::after,
.sec__head--center .kicker::before,
.elementor-widget-heading.kicker .elementor-heading-title::after {
	transform-origin: right;
	transform: scaleX(0);
	transition: transform .7s var(--ease) .15s;
}

[data-anim].in-view .kicker::after,
[data-anim].in-view.kicker::after,
.in-view .kicker::after,
.in-view.elementor-widget-heading.kicker .elementor-heading-title::after,
.is-ready .kicker::after {
	transform: scaleX(1);
}

/* بدون جاوااسکریپت هیچ‌چیز نامرئی نمی‌ماند */
.no-js [data-anim],
.no-js figure,
.no-js .fig--ar {
	opacity: 1 !important;
	transform: none !important;
	clip-path: none !important;
}

/* تصاویر با پرده‌ی افقی باز می‌شوند (RTL: از راست) */
.fig--ar,
.hero__media figure,
.gal figure {
	clip-path: inset(0 0 0 100%);
	transition: clip-path .9s var(--ease);
}

.in-view .fig--ar,
.in-view.fig--ar,
.in-view figure,
.is-ready figure,
.is-reduced .fig--ar,
.is-reduced figure {
	clip-path: inset(0 0 0 0);
}

/* نوار پیشرفت اسکرول */
.scroll-progress {
	position: absolute;
	inset-block-end: -1px;
	inset-inline: 0;
	height: 2px;
	background: var(--brand);
	transform: scaleX(0);
	transform-origin: right;
	will-change: transform;
}

/* درخشش عبوری روی دکمه‌ی اصلی */
.btn--primary {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.btn--primary::after {
	content: '';
	position: absolute;
	inset-block: 0;
	inset-inline-start: -60%;
	width: 45%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
	transform: skewX(-18deg);
	transition: inset-inline-start .6s var(--ease);
	z-index: -1;
}

.btn--primary:hover::after {
	inset-inline-start: 120%;
}

/* آیکون کارت هنگام هاور کمی جلو می‌آید */
.card__icon {
	transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.card:hover .card__icon {
	transform: translateY(-2px);
}

/* زیرخط متحرک آیتم‌های منو */
.nav > ul > li > a {
	position: relative;
}

.nav > ul > li > a::before {
	content: '';
	position: absolute;
	inset-inline: 14px;
	bottom: 4px;
	height: 2px;
	border-radius: 2px;
	background: var(--brand);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform var(--dur) var(--ease);
}

.nav > ul > li > a:hover::before {
	transform: scaleX(1);
}

/* ستون‌های مگامنو پلکانی وارد می‌شوند */
.mega__col {
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.has-mega:hover .mega__col,
.has-mega:focus-within .mega__col,
.mega.is-open .mega__col {
	opacity: 1;
	transform: none;
}

.mega__col:nth-child(1) { transition-delay: 40ms; }
.mega__col:nth-child(2) { transition-delay: 80ms; }
.mega__col:nth-child(3) { transition-delay: 120ms; }
.mega__col:nth-child(4) { transition-delay: 160ms; }
.mega__col:nth-child(5) { transition-delay: 200ms; }

/* مارکی لوگوی مشتریان */
.marquee {
	display: flex;
	gap: var(--gap);
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee .logos {
	flex: none;
	display: flex;
	gap: var(--gap);
	min-width: max-content;
	animation: ant-marquee 38s linear infinite;
}

.marquee:hover .logos,
.marquee:focus-within .logos {
	animation-play-state: paused;
}

.marquee .logo {
	width: 190px;
	flex: none;
}

@keyframes ant-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(calc(100% + var(--gap))); }
}

/* پنل تب پس از تعویض، محو وارد می‌شود */
.tabs__panel.is-in {
	animation: ant-fade .35s var(--ease);
}

@keyframes ant-fade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

/* آکاردئون FAQ: چرخش فلش + باز شدن نرم محتوا */
.faq details[open] > *:not(summary) {
	animation: ant-fade .3s var(--ease);
}

/* بدنه هنگام باز بودن منوی موبایل اسکرول نکند */
body.nav-open {
	overflow: hidden;
}

/* گرادیان زنده‌ی پس‌زمینه‌ی هیرو تیره */
.hero--dark::after {
	content: '';
	position: absolute;
	inset-inline-end: -10%;
	inset-block-start: -30%;
	width: 60%;
	aspect-ratio: 1;
	background: radial-gradient(circle, rgba(241, 90, 41, .22), transparent 65%);
	pointer-events: none;
	animation: ant-float 14s ease-in-out infinite alternate;
}

@keyframes ant-float {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to { transform: translate3d(-4%, 6%, 0) scale(1.12); }
}

/* --------- احترام کامل به prefers-reduced-motion --------- */
@media (prefers-reduced-motion: reduce) {
	[data-anim],
	.fig--ar,
	.hero__media figure,
	.gal figure,
	.mega__col {
		opacity: 1 !important;
		transform: none !important;
		clip-path: none !important;
		transition: none !important;
	}

	.marquee .logos,
	.hero--dark::after,
	.tabs__panel.is-in,
	.faq details[open] > *:not(summary) {
		animation: none !important;
	}

	.kicker::after,
	.sec__head--center .kicker::before,
	.elementor-widget-heading.kicker .elementor-heading-title::after {
		transform: scaleX(1) !important;
	}
}
