/*
 * Khối hero – media-panel kiểu mist-fade và framed (kiểu overlap-card của Mini Gọn nằm ở hero.css, không đổi).
 * framed cũng là chế độ dự phòng của fullbleed khi ảnh nhỏ / quá sáng. Chữ luôn nằm trên nền đặc.
 * Mobile trước, mốc 768px / 1024px.
 */

/* ---------- mist-fade ---------- */
/* width 100%: có aspect-ratio + max-height mà không có width thì trình duyệt co bề ngang theo tỷ lệ (hở mép phải). */
.vh-hero-mist__media {
	position: relative;
	width: 100%;
	aspect-ratio: var(--vh-ratio-hero-mobile, 16 / 10);
	overflow: hidden;
	background: var(--vh-color-surface);
}

.vh-hero-mist__media > .vh-img,
.vh-hero-mist__media > picture,
.vh-hero-mist__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
}

.vh-hero-mist__media img,
.vh-hero-mist__video {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: var(--vh-focal, 50% 50%);
	border-radius: 0;
}

.vh-hero-mist__video {
	opacity: 0;
	transition: opacity 0.6s;
}

.vh-hero-mist.is-video .vh-hero-mist__video {
	opacity: 1;
}

/* 30% dưới của ảnh tan vào màu nền trang; chữ nằm hẳn dưới vùng tan. */
.vh-hero-mist__media::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	z-index: 1;
	height: 30%;
	background: linear-gradient(to bottom, transparent, var(--vh-color-bg));
	pointer-events: none;
}

.vh-hero-mist__ctrl {
	position: absolute;
	top: 16px;
	right: var(--vh-page-pad);
	z-index: 2;
}

.vh-hero-mist__body {
	display: grid;
	justify-items: start;
	gap: 12px;
	padding-top: 8px;
}

.vh-hero-mist--center .vh-hero-mist__body {
	justify-items: center;
	text-align: center;
}

.vh-hero-mist--center .vh-hero-btns {
	justify-content: center;
}

.vh-hero-mist__notes {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 16px;
	margin-bottom: 8px;
	color: var(--vh-color-muted);
	font-size: var(--vh-fs-small);
}

.vh-hero-mist__caption {
	margin: 0;
	font-style: italic;
}

.vh-hero-mist__title {
	max-width: 22ch;
	margin: 0;
	font-size: var(--vh-fs-display, var(--vh-fs-h1));
	font-variation-settings: var(--vh-heading-variation, normal);
}

.vh-hero-mist__sub {
	max-width: 42rem;
	margin: 0;
	color: var(--vh-color-muted);
}

@media (min-width: 1024px) {
	.vh-hero-mist__media {
		aspect-ratio: var(--vh-ratio-hero-desktop, 21 / 9);
		max-height: 72vh;
		max-height: 72svh;
	}
}

/* ---------- framed ---------- */
.vh-hero-fr {
	padding-top: clamp(16px, 4vw, 40px);
}

.vh-hero-fr__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--vh-radius-media);
	background: var(--vh-color-surface);
}

.vh-hero-fr__media .vh-img,
.vh-hero-fr__media img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: var(--vh-focal, 50% 50%);
	border-radius: 0;
}

.vh-hero-fr__frame {
	position: absolute;
	inset: var(--vh-media-frame-inset, 12px);
	border: 1px solid var(--vh-media-frame-color, color-mix(in srgb, var(--vh-white) 70%, transparent));
	pointer-events: none;
}

.vh-hero-fr__sticker {
	position: absolute;
	top: 12px;
	right: 12px;
}

.vh-hero-fr__caption {
	margin: 8px 0 0;
	color: var(--vh-color-muted);
	font-size: var(--vh-fs-small);
	font-style: italic;
}

.vh-hero-fr__body {
	display: grid;
	justify-items: start;
	gap: 12px;
	max-width: 46rem;
	padding-top: clamp(20px, 4vw, 40px);
}

.vh-hero-fr--center .vh-hero-fr__body {
	justify-items: center;
	margin-inline: auto;
	text-align: center;
}

.vh-hero-fr--center .vh-hero-btns {
	justify-content: center;
}

.vh-hero-fr__title {
	max-width: 22ch;
	margin: 0;
	font-size: var(--vh-fs-display, var(--vh-fs-h1));
	font-variation-settings: var(--vh-heading-variation, normal);
}

.vh-hero-fr__sub {
	margin: 0;
	color: var(--vh-color-muted);
}

@media (min-width: 1024px) {
	.vh-hero-fr__media .vh-img,
	.vh-hero-fr__media img {
		aspect-ratio: 2 / 1;
		max-height: 68vh;
		max-height: 68svh;
	}

	.vh-hero-fr__sticker {
		top: 24px;
		right: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vh-hero-mist__video {
		transition: none;
	}
}
