/*
 * Витрина облака MediaVS.
 * Основные цвета и высота приходят из настроек плагина как CSS-переменные.
 */
.mvtag-cloud {
	--mvtag-accent: #39d7ff;
	--mvtag-bg: #07111f;
	--mvtag-text: #f5f8ff;
	--mvtag-height: 520px;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	box-sizing: border-box;
	width: 100%;
	padding: clamp(24px, 4vw, 56px);
	color: var(--mvtag-text);
	background:
		radial-gradient(circle at 18% 14%, rgba(57, 215, 255, .18), transparent 30%),
		radial-gradient(circle at 84% 78%, rgba(126, 87, 255, .14), transparent 32%),
		linear-gradient(145deg, var(--mvtag-bg), #02050a 84%);
	border: 1px solid rgba(255, 255, 255, .11);
	border-radius: clamp(18px, 3vw, 34px);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .26);
	font-family: inherit;
}

.mvtag-cloud *,
.mvtag-cloud *::before,
.mvtag-cloud *::after {
	box-sizing: border-box;
}

/* Тонкая техническая сетка связывает блок с темой видео и 3D-графики. */
.mvtag-cloud::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: .12;
	background-image:
		linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
	background-size: 44px 44px;
	-webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent 85%);
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent 85%);
}

.mvtag-cloud__intro {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}

.mvtag-cloud__title {
	margin: 0;
	max-width: 720px;
	color: inherit;
	font-size: clamp(26px, 4vw, 52px);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -.035em;
}

.mvtag-cloud__legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px 16px;
	margin: 0;
	color: rgba(245, 248, 255, .7);
	font-size: 12px;
	line-height: 1.4;
}

.mvtag-cloud__legend span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.mvtag-cloud__dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}

.mvtag-cloud__dot--request {
	background: var(--mvtag-accent);
	box-shadow: 0 0 12px var(--mvtag-accent);
}

/*
 * Без JavaScript теги остаются обычным читаемым списком.
 * JS добавляет is-ready и включает 3D-позиционирование.
 */
.mvtag-cloud__stage {
	position: relative;
	z-index: 2;
	display: flex;
	align-content: center;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px 16px;
	min-height: 330px;
	height: var(--mvtag-height);
	margin: 8px auto 0;
	perspective: 900px;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.mvtag-cloud__stage::before,
.mvtag-cloud__stage::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(74vw, 440px);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	pointer-events: none;
}

.mvtag-cloud__stage::before {
	z-index: -1;
	border: 1px solid rgba(255, 255, 255, .09);
	box-shadow:
		inset 28px 0 70px rgba(57, 215, 255, .04),
		inset -28px 0 70px rgba(126, 87, 255, .04);
}

.mvtag-cloud__stage::after {
	z-index: -2;
	background: radial-gradient(circle, rgba(57, 215, 255, .08), transparent 66%);
	filter: blur(20px);
}

.mvtag-cloud__tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 230px;
	padding: .42em .7em;
	color: var(--mvtag-text);
	font-size: calc(.72rem + var(--mvtag-weight, 3) * .18rem);
	font-weight: calc(430 + var(--mvtag-weight, 3) * 65);
	line-height: 1.12;
	text-align: center;
	text-decoration: none !important;
	text-wrap: balance;
	white-space: normal;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 999px;
	background: rgba(7, 17, 31, .64);
	box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.mvtag-cloud__stage.is-ready .mvtag-cloud__tag {
	position: absolute;
	left: 50%;
	top: 50%;
	margin: 0;
	will-change: transform, opacity;
}

.mvtag-cloud__tag:hover,
.mvtag-cloud__tag:focus-visible {
	color: #001018;
	border-color: var(--mvtag-accent);
	background: var(--mvtag-accent);
	box-shadow: 0 0 0 4px rgba(57, 215, 255, .15), 0 12px 34px rgba(0, 0, 0, .35);
	outline: none;
}

/* Пунктир и плюс означают: отдельной страницы нет, откроется заявка. */
.mvtag-cloud__tag--request {
	color: var(--mvtag-accent);
	border-color: rgba(57, 215, 255, .56);
	border-style: dashed;
}

.mvtag-cloud__tag--request::before {
	content: "+";
	margin-right: .38em;
	font-weight: 800;
}

.mvtag-cloud__hint {
	position: relative;
	z-index: 3;
	margin: -12px 0 0;
	color: rgba(245, 248, 255, .48);
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

@media (max-width: 720px) {
	.mvtag-cloud {
		padding: 24px 16px;
		border-radius: 20px;
	}

	.mvtag-cloud__intro {
		align-items: flex-start;
		flex-direction: column;
	}

	.mvtag-cloud__legend {
		justify-content: flex-start;
	}

	.mvtag-cloud__stage {
		height: clamp(380px, 118vw, var(--mvtag-height));
	}

	.mvtag-cloud__stage::before,
	.mvtag-cloud__stage::after {
		width: min(86vw, 410px);
	}

	.mvtag-cloud__tag {
		max-width: 170px;
		font-size: calc(.68rem + var(--mvtag-weight, 3) * .15rem);
	}
}

/* Доступность: при системном запрете анимации облако становится списком. */
@media (prefers-reduced-motion: reduce) {
	.mvtag-cloud__stage {
		height: auto;
		min-height: 0;
		padding: 38px 0 22px;
	}

	.mvtag-cloud__stage::before,
	.mvtag-cloud__stage::after,
	.mvtag-cloud__hint {
		display: none;
	}

	.mvtag-cloud__stage .mvtag-cloud__tag {
		position: static;
		transform: none !important;
		opacity: 1 !important;
	}
}

