/* Vidco Motion 1.0 – chi chay khi nguoi dung KHONG bat "giam chuyen dong". Chi dung transform/opacity (khong CLS). */
@media (prefers-reduced-motion: no-preference) {

	/* 1. AI Lab – trang thai cho: con tro nhap nhay, khung skeleton shimmer, spinner tren nut. */
	#aivOut > .t-qry:first-child::after { content: "▍"; margin-left: 2px; color: #1DB528; animation: vgmBlink 1s steps(1) infinite; }
	#aivOut .aiv-row > .t-qry:only-child { position: relative; }
	#aivOut .aiv-row > .t-qry:only-child::after {
		content: ""; display: block; height: 34px; margin-top: 10px; border-radius: 6px;
		background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(29,181,40,.16) 50%, rgba(255,255,255,.04) 100%);
		background-size: 220% 100%; animation: vgmShimmer 1.2s linear infinite;
	}
	#aivGo:disabled { position: relative; }
	#aivGo:disabled::after {
		content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px;
		border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: vgmSpin .7s linear infinite;
	}
	#aivOut .vgm-pop { animation: vgmPop .45s cubic-bezier(.2,.8,.2,1) both; }
	#aivOut .aiv-sum.vgm-pop { animation-duration: .6s; }

	/* 2. Dai logo khach hang chay ngang (JS nhan doi noi dung vao .vgm-track). */
	#trust .tr-logos.vgm-mq { display: block; overflow: hidden; flex-wrap: nowrap;
		-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
		mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
	#trust .vgm-track { display: flex; gap: 10px; width: max-content; animation: vgmMarquee var(--vgm-dur, 40s) linear infinite; }
	#trust .tr-logos.vgm-mq:hover .vgm-track { animation-play-state: paused; }

	/* 3. Cot + thanh so lieu moc dan khi cuon toi (cung luc voi so dem). */
	.vgm-js #impact .bar { transform: scaleY(0); transform-origin: bottom; transition: transform .9s cubic-bezier(.2,.8,.2,1); }
	.vgm-js #impact .prog-fill, .vgm-js #impact .vgm-fill { transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
	.vgm-js #impact .vgm-in .bar, .vgm-js #impact .vgm-in .prog-fill, .vgm-js #impact .vgm-in .vgm-fill { transform: none; }
	#impact .bar:nth-child(2), #impact .prog-item:nth-child(2) .prog-fill { transition-delay: .08s; }
	#impact .bar:nth-child(3), #impact .prog-item:nth-child(3) .prog-fill { transition-delay: .16s; }
	#impact .bar:nth-child(4) { transition-delay: .24s; }
	#impact .bar:nth-child(5) { transition-delay: .32s; }
	#impact .bar:nth-child(6) { transition-delay: .40s; }

	/* 4. The du an: anh phong nhe + chu truot len khi hover. */
	#portfolio .po-c { overflow: hidden; }
	#portfolio .po-c .po-img { transition: transform .8s cubic-bezier(.2,.8,.2,1); will-change: transform; }
	#portfolio .po-c:hover .po-img { transform: scale(1.05); }
	#portfolio .po-c .po-ov { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
	#portfolio .po-c:hover .po-ov { transform: translateY(-6px); }

	/* 5. "AI nhac den." – gradient chay cham. */
	#cta .ag {
		background: linear-gradient(90deg, #1DB528 0%, #7CF08A 30%, #F5A623 50%, #7CF08A 70%, #1DB528 100%);
		background-size: 250% 100%; -webkit-background-clip: text; background-clip: text;
		-webkit-text-fill-color: transparent; color: transparent; animation: vgmFlow 6s ease-in-out infinite;
	}

	/* 6. Goi Growth: vien sang 2 nhip khi cuon toi. */
	#pricing .pr-featured.vgm-in { animation: vgmGlow 1.6s ease-in-out .3s 2; }
}

@keyframes vgmBlink { 50% { opacity: 0; } }
@keyframes vgmShimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes vgmSpin { to { transform: rotate(360deg); } }
@keyframes vgmPop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vgmMarquee { to { transform: translateX(calc(-50% - 5px)); } }
@keyframes vgmFlow { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
@keyframes vgmGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(29,181,40,0); } 50% { box-shadow: 0 0 0 6px rgba(29,181,40,.18), 0 18px 50px rgba(29,181,40,.22); } }

/* Con tro tuy bien: an tren thiet bi cam ung (main.js cung khong khoi tao). */
@media (hover: none), (pointer: coarse) { #cDot, #cRing { display: none !important; } }

/* Dom sang .o1-.o3 (con truc tiep cua body, animation oFloat co san) troi lo mep phai ~15px tren mobile -> tran ngang.
   clip (khong phai hidden): khong tao vung cuon -> van cuon + header dinh binh thuong (da A/B 04/10). */
html, body { overflow-x: clip; }
