/**
 * Eleventin — لایه حرکت و تصویر (Motion & Media)
 * -------------------------------------------------------------------------
 *  • ظاهر شدن تدریجی بخش‌ها با اسکرول (IntersectionObserver + CSS)
 *  • قاب تصویر با زوم نرم روی هاور و اسکریم گرادیانی
 *  • اسلایدر قبل/بعد برای نشان دادن حذف لوگو و روتوش
 *  • نوار متحرک (marquee) برای چرخه سرویس‌ها
 *  • شناوری نرم کارت‌ها و هاله‌های رنگی پس‌زمینه
 *
 * همه انیمیشن‌ها با `prefers-reduced-motion` خاموش می‌شوند.
 *
 * @package Eleventin
 */

:root {
	--elv-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* -------------------------------------------------------------------------
   01. ظاهر شدن تدریجی با اسکرول
   ---------------------------------------------------------------------- */

.elv-js [data-elv-reveal] {
	opacity: 0;
	transform: translate3d(0, 20px, 0);
	transition:
		opacity 0.7s var(--elv-ease),
		transform 0.7s var(--elv-ease);
	transition-delay: calc(var(--elv-delay, 0) * 80ms);
	will-change: opacity, transform;
}

.elv-js [data-elv-reveal].is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

/* حالت جایگزین برای مرورگرهای بدون IntersectionObserver */
html.elv-no-motion [data-elv-reveal],
.no-js [data-elv-reveal] {
	opacity: 1;
	transform: none;
	transition: none;
}

/* -------------------------------------------------------------------------
   02. قاب تصویر
   ---------------------------------------------------------------------- */

.elv-media-frame {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--elv-radius);
	background:
		linear-gradient(135deg, rgba(56, 37, 92, 0.12), rgba(251, 101, 150, 0.12));
	isolation: isolate;
}

.elv-media-frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.9s var(--elv-ease), filter 0.6s var(--elv-ease);
}

.elv-media-frame::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(to top, rgba(34, 14, 70, 0.35), rgba(34, 14, 70, 0) 55%);
	opacity: 0;
	transition: opacity 0.5s var(--elv-ease);
}

.elv-media-frame:hover img,
.elv-media-frame:focus-within img {
	transform: scale(1.045);
}

.elv-media-frame:hover::after {
	opacity: 1;
}

.elv-media-frame--tall {
	aspect-ratio: 4 / 5;
}

.elv-media-frame--square {
	aspect-ratio: 1 / 1;
}

.elv-media-frame--widish {
	aspect-ratio: 16 / 10;
}

.elv-media-frame--band {
	aspect-ratio: 21 / 9;
	max-height: 340px;
}

.elv-media-frame__chip {
	position: absolute;
	inset-inline-start: 0.75rem;
	inset-block-start: 0.75rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	background: rgba(253, 247, 255, 0.92);
	backdrop-filter: blur(6px);
	color: var(--elv-purple);
	font-size: 12px;
	font-weight: 700;
}

.elv-media-frame__caption {
	position: absolute;
	inset-inline: 0.9rem;
	inset-block-end: 0.9rem;
	z-index: 2;
	color: #fff;
	font-size: 13px;
	line-height: 1.7;
	text-shadow: 0 1px 12px rgba(34, 14, 70, 0.55);
}

/* تصویر با fade بعد از لود کامل */
.elv-js .elv-img-fade {
	opacity: 0;
	transition: opacity 0.6s var(--elv-ease);
}

.elv-js .elv-img-fade.is-loaded {
	opacity: 1;
}

/* -------------------------------------------------------------------------
   03. اسلایدر قبل/بعد
   ---------------------------------------------------------------------- */

.elv-compare {
	--elv-split: 52%;
	aspect-ratio: 4 / 5;
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--elv-radius);
	background: var(--elv-surface-container-high, #ece2f5);
	touch-action: pan-y;
	isolation: isolate;
}

.elv-compare__layer,
.elv-compare img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.elv-compare__after {
	position: absolute;
	inset: 0;
	clip-path: inset(0 calc(100% - var(--elv-split)) 0 0);
}

.elv-compare__handle {
	position: absolute;
	inset-block: 0;
	left: var(--elv-split);
	width: 2px;
	margin-left: -1px;
	background: rgba(253, 247, 255, 0.9);
	box-shadow: 0 0 0 1px rgba(34, 14, 70, 0.15);
	pointer-events: none;
	z-index: 3;
}

.elv-compare__handle::after {
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	width: 46px;
	height: 46px;
	transform: translate(-50%, -50%);
	border-radius: 999px;
	background: rgba(253, 247, 255, 0.95) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2338255C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-4 6 4 6M15 6l4 6-4 6'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
	box-shadow: 0 8px 22px rgba(34, 14, 70, 0.28);
}

.elv-compare__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	direction: ltr;
	cursor: ew-resize;
	z-index: 4;
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
}

.elv-compare__range:focus-visible + .elv-compare__handle::after {
	outline: 3px solid var(--elv-pink-deep, #ae285b);
	outline-offset: 2px;
}

.elv-compare__tag {
	position: absolute;
	z-index: 2;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	background: rgba(34, 14, 70, 0.72);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	backdrop-filter: blur(4px);
}

.elv-compare__tag--before {
	right: 0.85rem;
	bottom: 0.85rem;
}

.elv-compare__tag--after {
	left: 0.85rem;
	bottom: 0.85rem;
}

/* -------------------------------------------------------------------------
   04. نوار متحرک سرویس‌ها
   ---------------------------------------------------------------------- */

.elv-marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.elv-marquee__track {
	display: flex;
	width: max-content;
	gap: var(--elv-space-md, 1.5rem);
	animation: elv-marquee 38s linear infinite;
}

.elv-marquee:hover .elv-marquee__track,
.elv-marquee:focus-within .elv-marquee__track {
	animation-play-state: paused;
}

.elv-marquee__item {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	white-space: nowrap;
	font-weight: 700;
	color: var(--elv-purple);
}

@keyframes elv-marquee {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(50%);
	}
}

/* -------------------------------------------------------------------------
   05. حرکت‌های تزئینی
   ---------------------------------------------------------------------- */

@keyframes elv-float {
	0%,
	100% {
		transform: translate3d(0, 0, 0);
	}

	50% {
		transform: translate3d(0, -10px, 0);
	}
}

@keyframes elv-drift {
	0% {
		transform: translate3d(0, 0, 0) scale(1);
	}

	50% {
		transform: translate3d(18px, -22px, 0) scale(1.06);
	}

	100% {
		transform: translate3d(0, 0, 0) scale(1);
	}
}

@keyframes elv-sheen {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

.elv-float {
	animation: elv-float 9s ease-in-out infinite;
}

.elv-float--slow {
	animation-duration: 13s;
}

.elv-orb {
	animation: elv-drift 22s ease-in-out infinite;
	will-change: transform;
}

.elv-orb--delay {
	animation-delay: -8s;
}

.elv-sheen {
	background-image: linear-gradient(
		100deg,
		rgba(255, 255, 255, 0) 30%,
		rgba(255, 255, 255, 0.55) 50%,
		rgba(255, 255, 255, 0) 70%
	);
	background-size: 200% 100%;
	animation: elv-sheen 3.4s linear infinite;
}

/* -------------------------------------------------------------------------
   06. احترام به تنظیم کاهش حرکت
   ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.elv-js [data-elv-reveal],
	.elv-js [data-elv-reveal].is-visible,
	.elv-js .elv-img-fade {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.elv-float,
	.elv-orb,
	.elv-sheen,
	.elv-marquee__track {
		animation: none !important;
	}

	.elv-media-frame img,
	.elv-img-fade {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
   07. نمایش تعاملی پرو مجازی
   ---------------------------------------------------------------------- */

.elv-showcase__panel[hidden] {
	display: none;
}

.elv-showcase__panel.is-active {
	animation: elv-fade-up 0.45s var(--elv-ease) both;
}

.elv-showcase__step {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.elv-showcase__step figcaption {
	font-size: 13px;
	line-height: 1.7;
	text-align: center;
	color: var(--elv-slate, #516c82);
}

.elv-showcase__step--result .elv-media-frame {
	box-shadow: 0 18px 48px rgba(34, 14, 70, 0.24);
	outline: 2px solid rgba(251, 101, 150, 0.55);
	outline-offset: -2px;
}

@keyframes elv-fade-up {
	from {
		opacity: 0;
		transform: translate3d(0, 14px, 0);
	}

	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

/* -------------------------------------------------------------------------
   08. گالری خروجی‌ها
   ---------------------------------------------------------------------- */

.elv-gallery {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.elv-gallery__item {
	position: relative;
	display: block;
	overflow: hidden;
	padding: 0;
	border: 0;
	background: none;
	border-radius: var(--elv-radius);
	cursor: zoom-in;
	aspect-ratio: 1 / 1;
	box-shadow: 0 10px 26px rgba(34, 14, 70, 0.10);
}

.elv-gallery__item.is-wide {
	grid-column: span 2;
	aspect-ratio: 2 / 1;
}

.elv-gallery__item.is-tall {
	grid-row: span 2;
	aspect-ratio: auto;
}

.elv-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.9s var(--elv-ease);
}

.elv-gallery__item:hover img,
.elv-gallery__item:focus-visible img {
	transform: scale(1.06);
}

.elv-gallery__cap {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	padding: 1.6rem 0.9rem 0.8rem;
	color: #fff;
	text-align: start;
	background: linear-gradient(to top, rgba(34, 14, 70, 0.82), rgba(34, 14, 70, 0));
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.35s var(--elv-ease), transform 0.35s var(--elv-ease);
}

.elv-gallery__item:hover .elv-gallery__cap,
.elv-gallery__item:focus-visible .elv-gallery__cap {
	opacity: 1;
	transform: translateY(0);
}

.elv-gallery__tag {
	font-size: 11px;
	letter-spacing: 0.02em;
	opacity: 0.9;
}

.elv-gallery__title {
	font-size: 14px;
	font-weight: 700;
}

@media (min-width: 768px) {
	.elv-gallery {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-auto-rows: 200px;
	}

	.elv-gallery__item {
		aspect-ratio: auto;
		height: 100%;
	}

	.elv-gallery__item.is-wide {
		grid-column: span 2;
	}

	.elv-gallery__item.is-tall {
		grid-row: span 2;
	}
}

/* -------------------------------------------------------------------------
   09. لایت‌باکس
   ---------------------------------------------------------------------- */

.elv-lightbox {
	position: relative;
	width: min(1080px, 92vw);
	max-width: none;
	padding: 0;
	border: 0;
	border-radius: 18px;
	overflow: hidden;
	background: #0e0618;
	box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}

.elv-lightbox::backdrop {
	background: rgba(14, 6, 24, 0.84);
	backdrop-filter: blur(4px);
}

.elv-lightbox img {
	display: block;
	width: 100%;
	max-height: 80vh;
	object-fit: contain;
	background: #120a20;
}

.elv-lightbox__cap {
	margin: 0;
	padding: 0.85rem 3.5rem;
	color: #f6eeff;
	font-size: 14px;
	text-align: center;
}

.elv-lightbox__close {
	position: absolute;
	top: 0.6rem;
	inset-inline-end: 0.6rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 999px;
	background: rgba(253, 247, 255, 0.92);
	color: #38255c;
	cursor: pointer;
	transition: background 0.2s var(--elv-ease);
}

.elv-lightbox__close:hover {
	background: #fff;
}

/* -------------------------------------------------------------------------
   10. ماکت پنل الونتین (خالص CSS)
   ---------------------------------------------------------------------- */

.elv-panel-mock {
	overflow: hidden;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(34, 14, 70, 0.18);
}

.elv-panel-mock__top {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.6rem 0.85rem;
	background: #f6f0fb;
	border-bottom: 1px solid rgba(34, 14, 70, 0.08);
}

.elv-panel-mock__dots {
	display: inline-flex;
	gap: 4px;
}

.elv-panel-mock__dots i {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d9c9ea;
}

.elv-panel-mock__title {
	font-size: 12px;
	color: #5c4b7a;
}

.elv-panel-mock__live {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-inline-start: auto;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	background: #def5e7;
	color: #0f7b52;
	font-size: 11px;
}

.elv-panel-mock__live::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #1aa06a;
}

.elv-panel-mock__body {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
}

.elv-panel-mock__side {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.6rem 0.5rem;
	background: #fbf7ff;
}

.elv-panel-mock__side > span {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.5rem;
	border-radius: 8px;
	font-size: 12px;
	color: #6b5a86;
}

.elv-panel-mock__side .material-symbols-outlined {
	font-size: 16px;
}

.elv-panel-mock__side .is-active {
	background: #fff;
	color: #38255c;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(34, 14, 70, 0.08);
}

.elv-panel-mock__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
	padding: 0.75rem;
}

.elv-panel-mock__thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 10px;
	background: #f1e9f9;
}

.elv-panel-mock__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.elv-panel-mock__thumb > span {
	position: absolute;
	inset-block-end: 0.3rem;
	inset-inline-start: 0.3rem;
	padding: 0.05rem 0.4rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: #38255c;
	font-size: 10px;
}

.elv-panel-mock__task {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0 0.75rem 0.75rem;
	color: #6b5a86;
	font-size: 11px;
}

.elv-panel-mock__bar {
	flex: 1;
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: #eee6f7;
}

.elv-panel-mock__bar i {
	display: block;
	height: 100%;
	width: 64%;
	border-radius: 999px;
	background: linear-gradient(90deg, #fb6596, #8b5cf6);
	animation: elv-panel-bar 3.4s var(--elv-ease) infinite alternate;
}

@keyframes elv-panel-bar {
	from {
		width: 34%;
	}

	to {
		width: 88%;
	}
}

@media (max-width: 640px) {
	.elv-panel-mock__body {
		grid-template-columns: minmax(0, 1fr);
	}

	.elv-panel-mock__side {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elv-panel-mock__bar i {
		animation: none;
	}
}

/* -------------------------------------------------------------------------
   11. پشت صحنه: قاب در حال پردازش + فهرست مراحل
   ---------------------------------------------------------------------- */

.elv-backstage {
	display: grid;
	gap: 1.25rem;
	align-items: start;
}

@media (min-width: 1024px) {
	.elv-backstage {
		grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
		gap: 1.75rem;
	}

	.elv-backstage--wide,
	.elv-backstage--flow-only {
		grid-template-columns: minmax(0, 1fr);
	}
}

.elv-stage {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	border-radius: 22px;
	background: #0e0618;
	box-shadow: 0 24px 60px rgba(34, 14, 70, 0.22);
}

.elv-stage__frame {
	position: absolute;
	inset: 0;
	opacity: 0;
	animation: elv-stage-cycle calc(var(--elv-stage-total, 3) * 4s) linear infinite;
	animation-delay: calc(var(--elv-stage-i, 0) * 4s);
}

.elv-stage__frame:first-child {
	opacity: 1;
}

.elv-stage__frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.elv-stage__label {
	position: absolute;
	inset-block-end: 0.9rem;
	inset-inline-start: 0.9rem;
	padding: 0.25rem 0.7rem;
	border-radius: 999px;
	background: rgba(253, 247, 255, 0.94);
	color: #38255c;
	font-size: 12px;
	font-weight: 700;
	box-shadow: 0 6px 16px rgba(14, 6, 24, 0.25);
}

@keyframes elv-stage-cycle {
	0% {
		opacity: 0;
	}

	2% {
		opacity: 1;
	}

	30% {
		opacity: 1;
	}

	33.33% {
		opacity: 0;
	}

	100% {
		opacity: 0;
	}
}

.elv-stage__scan {
	position: absolute;
	inset-inline: 0;
	top: -18%;
	height: 18%;
	background: linear-gradient(
		to bottom,
		rgba(251, 101, 150, 0) 0%,
		rgba(251, 101, 150, 0.35) 55%,
		rgba(255, 255, 255, 0.85) 100%
	);
	mix-blend-mode: screen;
	animation: elv-stage-scan 4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
	pointer-events: none;
}

@keyframes elv-stage-scan {
	0% {
		top: -18%;
		opacity: 0;
	}

	10% {
		opacity: 1;
	}

	90% {
		opacity: 1;
	}

	100% {
		top: 100%;
		opacity: 0;
	}
}

.elv-stage__hud {
	position: absolute;
	inset-block-start: 0.7rem;
	inset-inline: 0.7rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.6rem;
	border-radius: 999px;
	background: rgba(14, 6, 24, 0.55);
	backdrop-filter: blur(6px);
	color: #f6eeff;
	font-size: 11px;
}

.elv-stage__dots {
	display: inline-flex;
	gap: 3px;
}

.elv-stage__dots i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(253, 247, 255, 0.5);
}

.elv-stage__dots i:first-child {
	background: #fb6596;
	animation: elv-hud-blink 1.4s ease-in-out infinite;
}

@keyframes elv-hud-blink {
	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.35;
	}
}

.elv-flow {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.elv-flow__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.7rem 0.9rem;
	border: 1px solid transparent;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(34, 14, 70, 0.07);
	animation: elv-flow-glow calc(var(--elv-flow-total, 4) * 3s) linear infinite;
	animation-delay: calc(var(--elv-flow-i, 0) * 3s);
}

@keyframes elv-flow-glow {
	0% {
		border-color: rgba(251, 101, 150, 0.55);
		box-shadow: 0 12px 28px rgba(251, 101, 150, 0.25);
	}

	20%,
	100% {
		border-color: transparent;
		box-shadow: 0 6px 18px rgba(34, 14, 70, 0.07);
	}
}

.elv-flow__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: #f3ecfb;
	color: #6d3fa8;
	font-size: 20px;
	flex-shrink: 0;
}

.elv-flow__text {
	display: flex;
	flex-direction: column;
	line-height: 1.5;
	min-width: 0;
}

.elv-flow__text strong {
	font-size: 14px;
	color: #38255c;
}

.elv-flow__text em {
	font-style: normal;
	font-size: 12px;
	color: #7b6a95;
}

.elv-flow__pulse {
	display: none;
}

.elv-flow--h {
	gap: 0.55rem;
}

@media (min-width: 768px) {
	.elv-flow--h {
		flex-direction: row;
		align-items: stretch;
	}

	.elv-flow--h .elv-flow__item {
		flex: 1;
		flex-direction: column;
		text-align: center;
		gap: 0.45rem;
		padding: 0.85rem 0.5rem;
	}

	.elv-flow--h .elv-flow__item:not(:first-child)::before {
		content: "";
		position: absolute;
		inset-inline-end: 100%;
		top: 2rem;
		width: 0.55rem;
		height: 2px;
		background: linear-gradient(to left, #fb6596, #efe4fb);
	}

	.elv-flow--h .elv-flow__text {
		align-items: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elv-stage__frame {
		animation: none;
		opacity: 0;
	}

	.elv-stage__frame:first-child {
		opacity: 1;
	}

	.elv-stage__scan,
	.elv-flow__item,
	.elv-stage__dots i:first-child {
		animation: none;
	}

	.elv-stage__scan {
		display: none;
	}
}

/* -------------------------------------------------------------------------
   12. دموی تعاملی پشت صحنه (عکس کاربر در مرورگر)
   ---------------------------------------------------------------------- */

.elv-demo {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.elv-demo__main {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 1024px) {
	.elv-demo__main {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		align-items: stretch;
		gap: 1.5rem;
	}
}

.elv-demo__stage {
	aspect-ratio: 4 / 5;
}

.elv-demo__frames {
	position: absolute;
	inset: 0;
}

.elv-demo.has-photo .elv-demo__frames {
	display: none;
}

.elv-demo__photo {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.elv-demo__photo[hidden] {
	display: none;
}

.elv-demo__mesh {
	position: absolute;
	inset: 0;
	opacity: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
	background-size: 32px 32px;
	transition: opacity 0.4s var(--elv-ease);
	pointer-events: none;
}

.elv-demo.is-running .elv-demo__mesh {
	opacity: 0.75;
}

.elv-demo__box {
	position: absolute;
	border: 2px solid #fb6596;
	border-radius: 12px;
	opacity: 0;
	background: rgba(251, 101, 150, 0.06);
	transition: opacity 0.3s var(--elv-ease);
	pointer-events: none;
}

.elv-demo__box--a {
	inset: 16% 20% 44% 26%;
}

.elv-demo__box--b {
	inset: 54% 28% 16% 32%;
	border-color: #8b5cf6;
	background: rgba(139, 92, 246, 0.07);
}

.elv-demo.is-running .elv-demo__box {
	opacity: 1;
	animation: elv-demo-box 2s ease-in-out infinite;
}

.elv-demo.is-running .elv-demo__box--b {
	animation-delay: 0.6s;
}

@keyframes elv-demo-box {
	0%,
	100% {
		border-color: rgba(251, 101, 150, 0.55);
	}

	50% {
		border-color: rgba(251, 101, 150, 1);
	}
}

.elv-demo__hud {
	position: absolute;
	inset-block-start: 0.7rem;
	inset-inline: 0.7rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.6rem;
	border-radius: 999px;
	background: rgba(14, 6, 24, 0.55);
	backdrop-filter: blur(6px);
	color: #f6eeff;
	font-size: 11px;
}

.elv-demo__hud b {
	font-weight: 700;
}

.elv-demo__percent {
	margin-inline-start: auto;
	font-variant-numeric: tabular-nums;
	opacity: 0.9;
}

.elv-demo__meter {
	position: absolute;
	inset-inline: 0.7rem;
	inset-block-end: 0.7rem;
	height: 5px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(253, 247, 255, 0.28);
}

.elv-demo__meter i {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #fb6596, #8b5cf6);
	transition: width 0.5s var(--elv-ease);
}

.elv-demo__panel {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 16px 40px rgba(34, 14, 70, 0.1);
}

.elv-demo__drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	padding: 1.5rem 1rem;
	border: 2px dashed #d9c9ea;
	border-radius: 16px;
	background: #fdfaff;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.2s var(--elv-ease), background 0.2s var(--elv-ease);
}

.elv-demo__drop:hover,
.elv-demo__drop:focus-within {
	border-color: #fb6596;
	background: #fdf7ff;
}

.elv-demo__drop strong {
	font-size: 15px;
	color: #38255c;
}

.elv-demo__drop em {
	font-style: normal;
	font-size: 12px;
	color: #7b6a95;
}

.elv-demo__drop-icon {
	font-size: 30px;
	color: #8b5cf6;
}

.elv-demo__file {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.elv-demo__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.elv-demo__actions .elv-btn[hidden] {
	display: none;
}

.elv-demo__actions .elv-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.elv-demo__error {
	margin: 0;
	padding: 0.5rem 0.7rem;
	border-radius: 10px;
	background: #fdeaea;
	color: #9b1c1c;
	font-size: 12px;
}

.elv-demo__note {
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	margin: 0;
	color: #7b6a95;
	font-size: 12px;
	line-height: 1.7;
}

.elv-demo__note .material-symbols-outlined {
	font-size: 16px;
	color: #1aa06a;
	margin-top: 0.1rem;
}

.elv-demo__cta {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: auto;
	padding: 0.7rem 0.9rem;
	border-radius: 12px;
	background: #f4ecfb;
	color: #5c2fa0;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s var(--elv-ease);
}

.elv-demo__cta:hover {
	background: #ebdffa;
}

.elv-demo.has-photo .elv-flow__item {
	animation: none;
}

.elv-flow__item.is-active {
	border-color: rgba(251, 101, 150, 0.7);
	box-shadow: 0 12px 28px rgba(251, 101, 150, 0.22);
}

.elv-flow__item.is-done .elv-flow__icon {
	background: #fb6596;
	color: #fff;
}

.elv-demo.is-done .elv-stage__scan {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.elv-demo.is-running .elv-demo__box,
	.elv-demo.is-running .elv-demo__mesh {
		animation: none;
	}

	.elv-demo__meter i {
		transition: none;
	}
}

/* --- نمونه‌های آماده و نتیجه دمو --- */

.elv-demo__samples {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.elv-demo__samples-title {
	font-size: 12px;
	color: #7b6a95;
}

.elv-demo__samples-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.elv-demo__sample {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.25rem 0.6rem 0.25rem 0.3rem;
	border: 1px solid #eadff6;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s var(--elv-ease), background 0.2s var(--elv-ease), box-shadow 0.2s var(--elv-ease);
}

.elv-demo__sample:hover,
.elv-demo__sample:focus-visible {
	border-color: #fb6596;
	background: #fdf7ff;
}

.elv-demo__sample.is-active {
	border-color: #fb6596;
	background: #fdf1f7;
	box-shadow: 0 0 0 2px rgba(251, 101, 150, 0.18);
}

.elv-demo__sample-thumb {
	display: block;
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	overflow: hidden;
	border-radius: 999px;
	background: #f1e9f9;
}

.elv-demo__sample-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.elv-demo__sample-label {
	font-size: 12px;
	color: #38255c;
	white-space: nowrap;
}

.elv-demo__or {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: #a596ba;
	font-size: 11px;
}

.elv-demo__or::before,
.elv-demo__or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #efe4fb;
}

.elv-demo__result[hidden] {
	display: none;
}

.elv-demo.is-result .elv-demo__stage {
	display: none;
}

.elv-demo__compare {
	box-shadow: 0 20px 50px rgba(34, 14, 70, 0.22);
}

.elv-demo__result-cap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	margin: 0.6rem 0 0;
	font-size: 12px;
	color: #7b6a95;
}

.elv-demo__result-cap .material-symbols-outlined {
	font-size: 16px;
	color: #fb6596;
}

/* -------------------------------------------------------------------------
 * ویترین زنده هیرو (فاز ۱۵ — بازطراحی تصویرمحور)
 * یک قاب بزرگ مقایسه «قبل/بعد» با حرکت خودکار، اسکن نور، کن‌برنز و
 * چرخش سه‌بعدی ملایم؛ انتخاب سرویس با سه بندانگشتی تصویری.
 * ---------------------------------------------------------------------- */

.elv-hw {
	position: relative;
	border-radius: var(--elv-radius-xl, 1.25rem);
	background: var(--elv-surface-container-lowest, #fdf7ff);
	border: 1px solid var(--elv-outline-variant, #d9cbe9);
	box-shadow: var(--elv-shadow-lg, 0 24px 60px rgba(34, 14, 70, 0.12));
	overflow: hidden;
	perspective: 1200px;
}

.elv-hw__bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.9rem;
	background: var(--elv-surface-container-low, #f7f0fd);
	border-block-end: 1px solid var(--elv-outline-variant, #d9cbe9);
	font-family: var(--elv-font-mono, ui-monospace, SFMono-Regular, monospace);
	font-size: 0.7rem;
	color: var(--elv-on-surface-variant, #6b5a86);
}

.elv-hw__dots {
	display: inline-flex;
	gap: 0.25rem;
	flex: none;
}

.elv-hw__dots i {
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 999px;
	background: var(--elv-outline, #b9a6d4);
}

.elv-hw__dots i:nth-child(1) {
	background: var(--elv-pink, #e94e8a);
}

.elv-hw__dots i:nth-child(2) {
	background: var(--elv-pink-fixed, #f6c9dd);
}

.elv-hw__dots i:nth-child(3) {
	background: var(--elv-purple, #6b46c1);
}

.elv-hw__url {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	direction: ltr;
	text-align: left;
}

.elv-hw__live {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	flex: none;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	background: var(--elv-surface-container, #efe4fa);
	font-family: var(--elv-font-family, sans-serif);
	font-size: 0.68rem;
	color: var(--elv-on-surface, #241338);
}

.elv-hw__live i {
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 999px;
	background: #2e9e5b;
	box-shadow: 0 0 0 3px rgba(46, 158, 91, 0.18);
	animation: elv-hw-pulse 2.4s ease-in-out infinite;
}

@keyframes elv-hw-pulse {
	0%,
	100% {
		box-shadow: 0 0 0 3px rgba(46, 158, 91, 0.18);
	}

	50% {
		box-shadow: 0 0 0 6px rgba(46, 158, 91, 0.06);
	}
}

.elv-hw__stage {
	padding: 0.9rem 0.9rem 0;
}

.elv-hw__frame {
	position: relative;
	border-radius: 1rem;
	overflow: hidden;
	background: var(--elv-surface-container-high, #e4d6f4);
	box-shadow: inset 0 0 0 1px rgba(34, 14, 70, 0.08), 0 18px 40px rgba(34, 14, 70, 0.14);
	transform:
		rotateY(calc(var(--elv-mx, 0) * 4deg))
		rotateX(calc(var(--elv-my, 0) * -3deg))
		translate3d(calc(var(--elv-mx, 0) * -6px), calc(var(--elv-my, 0) * -6px), 0);
	transform-style: preserve-3d;
	transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}

.elv-hw__scenes {
	position: relative;
	aspect-ratio: 4 / 5;
	max-height: 540px;
}

.elv-hw__scene {
	position: absolute;
	inset: 0;
}

.elv-hw__scene[hidden] {
	display: none;
}

.elv-hw__scene.is-active {
	animation: elv-hw-scene-in 0.75s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes elv-hw-scene-in {
	from {
		opacity: 0;
		transform: scale(1.06);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.elv-hw__compare {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	border-radius: 0;
}

.elv-hw__compare img {
	object-position: 50% 42%;
	animation: elv-hw-ken 24s ease-in-out infinite alternate;
}

@keyframes elv-hw-ken {
	from {
		transform: scale(1);
	}

	to {
		transform: scale(1.07);
	}
}

/* هاله نرم روی تصویر تا متن‌ها و برچسب‌ها خوانا بمانند */
.elv-hw__glow {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		radial-gradient(120% 80% at 85% 4%, rgba(20, 8, 40, 0.34), transparent 55%),
		linear-gradient(to top, rgba(20, 8, 40, 0.44), transparent 42%);
}

/* خط اسکن نورانی */
.elv-hw__scan {
	position: absolute;
	inset-inline: 0;
	top: -32%;
	height: 32%;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		rgba(233, 78, 138, 0),
		rgba(233, 78, 138, 0.28) 45%,
		rgba(255, 255, 255, 0.55) 62%,
		rgba(233, 78, 138, 0) 100%
	);
	filter: blur(1px);
	animation: elv-hw-scan 5.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes elv-hw-scan {
	0% {
		transform: translateY(0);
		opacity: 0;
	}

	12% {
		opacity: 1;
	}

	88% {
		opacity: 1;
	}

	100% {
		transform: translateY(420%);
		opacity: 0;
	}
}

/* چیپ وضعیت روی تصویر */
.elv-hw__hud {
	position: absolute;
	z-index: 3;
	inset-block-start: 0.65rem;
	inset-inline-start: 0.65rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.22rem 0.6rem;
	border-radius: 999px;
	background: rgba(20, 8, 40, 0.58);
	color: #fff;
	font-family: var(--elv-font-family, sans-serif);
	font-size: 0.7rem;
	font-weight: 700;
	backdrop-filter: blur(6px);
	box-shadow: 0 6px 16px rgba(20, 8, 40, 0.25);
	pointer-events: none;
}

.elv-hw__hud i {
	width: 0.42rem;
	height: 0.42rem;
	border-radius: 999px;
	background: var(--elv-pink, #e94e8a);
	box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.25);
	animation: elv-hw-pulse 2.4s ease-in-out infinite;
}

/* برچسب‌های قبل/بعد — راست = قبل (سمت تصویر ورودی) و چپ = بعد */
.elv-hw .elv-compare__tag {
	inset-block-end: 0.65rem;
	background: rgba(20, 8, 40, 0.55);
	backdrop-filter: blur(6px);
	pointer-events: none;
}

.elv-hw .elv-compare__tag--after {
	background: var(--elv-pink, #e94e8a);
}

/* ---------- ریل بندانگشتی تصویری ---------- */

.elv-hw__rail {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.85rem 0.9rem 0;
}

.elv-hw__thumb {
	flex: 0 0 auto;
	width: 78px;
	min-width: 0;
	animation: elv-hw-thumb-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.35rem;
	border: 1px solid var(--elv-outline-variant, #d9cbe9);
	border-radius: 0.85rem;
	background: var(--elv-surface-container-lowest, #fff);
	color: var(--elv-on-surface, #241338);
	font: inherit;
	cursor: pointer;
	transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.elv-hw__thumb:nth-child(2) {
	animation-delay: 0.08s;
}

.elv-hw__thumb:nth-child(3) {
	animation-delay: 0.16s;
}

@keyframes elv-hw-thumb-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.elv-hw__thumb:hover {
	transform: translateY(-2px);
	border-color: var(--elv-purple, #6b46c1);
}

.elv-hw__thumb:focus-visible {
	outline: 2px solid var(--elv-purple, #6b46c1);
	outline-offset: 2px;
}

.elv-hw__thumb.is-active {
	border-color: var(--elv-pink, #e94e8a);
	box-shadow: 0 0 0 2px var(--elv-pink, #e94e8a) inset, var(--elv-shadow-sm, 0 6px 14px rgba(34, 14, 70, 0.12));
	transform: translateY(-2px);
}

.elv-hw__thumb-img {
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: 0.6rem;
	overflow: hidden;
	background: var(--elv-surface-container-high, #e4d6f4);
}

.elv-hw__thumb-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.elv-hw__thumb:hover .elv-hw__thumb-img img {
	transform: scale(1.08);
}

.elv-hw__thumb-label {
	font-size: 0.68rem;
	line-height: 1.7;
	text-align: center;
	color: var(--elv-on-surface-variant, #6b5a86);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.elv-hw__thumb.is-active .elv-hw__thumb-label {
	color: var(--elv-pink-deep, #ae285b);
	font-weight: 700;
}

/* ---------- متن و پانویس ---------- */

.elv-hw__caption {
	margin: 0.75rem 0.9rem 0;
	min-height: 2.9em;
	font-size: 0.8rem;
	line-height: 1.6;
	color: var(--elv-on-surface-variant, #6b5a86);
	animation: elv-hw-caption-in 0.5s ease both;
}

@keyframes elv-hw-caption-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.elv-hw__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.4rem;
	margin-block-start: 0.6rem;
	padding: 0.55rem 0.9rem 0.7rem;
	border-block-start: 1px solid var(--elv-outline-variant, #d9cbe9);
	background: var(--elv-surface-container-low, #f7f0fd);
}

.elv-hw__link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--elv-purple, #6b46c1);
	text-decoration: none;
}

.elv-hw__link:hover,
.elv-hw__link:focus-visible {
	color: var(--elv-pink, #e94e8a);
}

.elv-hw__link .material-symbols-outlined {
	font-size: 0.95rem;
	transition: transform 0.25s ease;
}

.elv-hw__link:hover .material-symbols-outlined {
	transform: translateX(-3px);
}

.elv-hw__note {
	font-size: 0.68rem;
	color: var(--elv-on-surface-variant, #6b5a86);
}

@media (max-width: 480px) {
	.elv-hw__scenes {
		aspect-ratio: 1 / 1;
	}

	.elv-hw__thumb {
		width: 70px;
	}

	.elv-hw__thumb-label {
		font-size: 0.62rem;
	}

	.elv-hw__caption {
		min-height: 0;
		font-size: 0.76rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elv-hw__frame {
		transform: none;
		transition: none;
	}

	.elv-hw__scene.is-active,
	.elv-hw__compare img,
	.elv-hw__scan,
	.elv-hw__hud i,
	.elv-hw__live i,
	.elv-hw__caption {
		animation: none;
	}

	.elv-hw__thumb,
	.elv-hw__thumb-img img,
	.elv-hw__link .material-symbols-outlined {
		transition: none;
	}

	.elv-hw__thumb {
		animation: none;
	}
}
