/*
 * Hero "wedding" (child layout, inc/hero-wedding.php): copy left, video right.
 * From 960px the video sits right of the copy in a 3:2 box (a little taller than the
 * 16:9 video, so only the faded outer columns are cropped); its white background is multiplied into the cream and all
 * four edges fade out, so there is no visible frame. Below 960px it sits
 * under the copy in a 16:9 frame. Selectors start with .hero--wedding-split
 * to outrank the parent's .hero--wedding rules in studio.css and home-demos.css.
 */
.hero--wedding-split {
	--hw-wine: #9e1f3a;
	--hw-gold: #a0742e;
	--hw-plum: #6b1a2c;
	--hw-rose: #c92c55;
	--hw-rose-hover: #b0244a;
	--hw-blush: #fbe3e8;
	--hw-line: #e8a3b2;
	--hw-ink: #4a3a3e;
	--hw-ink-strong: #3a2a2e;
	--hw-bg: #fdf8f4;
	--hw-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--hw-title: clamp(48px, 5.8vw, 84px);
	--hw-script: clamp(36px, 3.5vw, 50px);

	background: var(--hw-bg);
	color: var(--hw-ink);
	font-family: var(--font, "Be Vietnam Pro", system-ui, sans-serif);
}

.hero--wedding-split .hero-wedding__panel {
	display: grid;
	grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
	align-items: center;
	gap: 48px;
	max-width: 1440px;
	min-height: 0;
	margin: 0 auto;
	padding: 40px 32px 48px 56px;
	overflow: visible;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.hero--wedding-split .hero-wedding__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: auto;
	min-width: 0;
	padding: 0;
}

/* Copy ------------------------------------------------------------------ */

/* Ornament, eyebrow, title and tagline: one lockup centred on its own axis. */
.hero--wedding-split .hero-wedding__heading {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
	text-align: center;
}

.hero--wedding-split .hero-wedding__ornament {
	margin: 0 0 12px;
	color: var(--hw-gold);
}

.hero--wedding-split .hero-wedding__eyebrow {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 16px;
	color: var(--hw-ink);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.34em;
	text-transform: uppercase;
}

.hero--wedding-split .hero-wedding__eyebrow::before,
.hero--wedding-split .hero-wedding__eyebrow::after {
	content: "";
	flex: 0 1 80px;
	width: 80px;
	min-width: 20px;
	height: 1px;
	background: currentColor;
}

.hero--wedding-split .hero-wedding__title {
	margin: 0;
	font-family: var(--font-serif, "Playfair Display", Georgia, serif);
	font-size: var(--hw-title);
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.hero--wedding-split .hero-wedding__title-main,
.hero--wedding-split .hero-wedding__title-accent {
	display: block;
}

.hero--wedding-split .hero-wedding__title-main {
	color: var(--hw-wine);
}

.hero--wedding-split .hero-wedding__title-accent {
	/* Room for the dot under Ệ above the stacked marks of Ầ/Â on the next line. */
	--hw-accent-gap: 0.24em;
	margin: var(--hw-accent-gap) 0 0;
	color: var(--hw-gold);
}

.hero--wedding-split .hero-wedding__tagline {
	margin: 14px 0 0;
	color: var(--hw-plum);
	font-family: "Great Vibes", var(--font-script, cursive);
	font-size: var(--hw-script);
	line-height: 1.15;
}

.hero--wedding-split .hero-wedding__tagline::after {
	content: "";
	display: block;
	width: 150px;
	height: 3px;
	margin: 4px auto 0;
	border-radius: 3px;
	background: var(--hw-line);
}

.hero--wedding-split .hero-wedding__lead {
	max-width: 540px;
	margin: 22px 0 0;
	color: var(--hw-ink);
	font-size: 17px;
	line-height: 1.65;
}

.hero--wedding-split .hero-wedding__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 18px;
	margin: 22px 0 0;
	padding: 0;
	color: var(--hw-ink-strong);
	font-size: 15px;
	list-style: none;
}

.hero--wedding-split .hero-wedding__badges li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.hero--wedding-split .hero-wedding__badge-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--hw-blush);
	color: var(--hw-wine);
}

/* Buttons ---------------------------------------------------------------- */

.hero--wedding-split .hero-wedding__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	margin-top: 30px;
}

.hero--wedding-split .hero-wedding__actions .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 60px;
	border-radius: 999px;
	font-size: 18px;
	font-weight: 600;
	text-decoration: none;
	transition: transform 200ms var(--hw-ease), box-shadow 200ms ease, background-color 200ms ease, color 200ms ease;
}

.hero--wedding-split .hero-wedding__actions .hero-wedding__cta {
	gap: 16px;
	padding: 0 10px 0 34px;
	border: 0;
	background: var(--hw-rose);
	color: #fff;
	box-shadow: 0 12px 28px -12px rgba(201, 44, 85, 0.55);
}

.hero--wedding-split .hero-wedding__actions .hero-wedding__cta:hover {
	transform: translateY(-2px);
	background: var(--hw-rose-hover);
	color: #fff;
	box-shadow: 0 18px 36px -12px rgba(201, 44, 85, 0.6);
}

.hero--wedding-split .hero-wedding__actions .hero-wedding__cta:active {
	transform: translateY(0) scale(0.98);
}

.hero--wedding-split .hero-wedding__cta-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #fff;
	color: var(--hw-rose);
	transition: transform 200ms var(--hw-ease);
}

.hero--wedding-split .hero-wedding__cta:hover .hero-wedding__cta-icon {
	transform: translateX(2px);
}

.hero--wedding-split .hero-wedding__actions .hero-wedding__ghost {
	padding: 0 34px;
	border: 1.5px solid var(--hw-wine);
	background: #fff;
	color: var(--hw-wine);
	box-shadow: none;
}

.hero--wedding-split .hero-wedding__actions .hero-wedding__ghost:hover {
	background: var(--hw-wine);
	color: #fff;
}

.hero--wedding-split .hero-wedding__actions .btn:focus-visible,
.hero--wedding-split .dtc-video-toggle:focus-visible {
	outline: 3px solid var(--hw-gold);
	outline-offset: 3px;
}

/* Media: frameless; 16:9 when stacked, full-bleed beside the copy ----------- */

.hero--wedding-split .hero-wedding__media {
	position: relative;
	isolation: isolate;
	min-width: 0;
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

/* Undo the parent's absolute, masked, faded collage at every breakpoint. */
.hero--wedding-split .hero-wedding__media .hero-collage {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: auto;
	height: auto;
	padding: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	align-content: start;
	opacity: 1;
	transform: none;
	-webkit-mask-image: none;
	mask-image: none;
}

.hero--wedding-split .hero-wedding__media .hero-collage__item {
	--thumb-h: 260px;
	height: 260px;
	border-radius: 10px;
	box-shadow: none;
}

.hero--wedding-split .hero-wedding__media .dtc-section__video {
	object-fit: cover;
	background: none;
}

@media (min-width: 960px) {
	.hero--wedding-split .hero-wedding__media {
		--hw-media-fade: linear-gradient(to bottom, transparent 0, #000 5%, #000 95%, transparent 100%), linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%);

		/* Taller than 16:9 and out to the panel edge: crops only the faded outer columns. */
		margin-right: -32px;
		aspect-ratio: 3 / 2;
		background: var(--hw-bg);
		-webkit-mask-image: var(--hw-media-fade);
		-webkit-mask-composite: source-in;
		mask-image: var(--hw-media-fade);
		mask-composite: intersect;
	}

	/* White video background takes the cream of the section. */
	.hero--wedding-split .hero-wedding__media .dtc-section__video {
		mix-blend-mode: multiply;
	}

	/* Inside the box, clear of the faded edges. */
	.hero--wedding-split .hero-wedding__media .dtc-video-toggle {
		top: 10%;
		right: calc(5% + 8px);
		bottom: auto;
	}
}

/*
 * Title motion: the lockup rises in line by line (clip-path + transform only), then a
 * gold light sweeps across the accent line every few seconds. The reveal fills only
 * backwards, so once it ends no clip-path is left to cut the Vietnamese diacritics.
 * Short and early, because the title is the LCP element on desktop.
 */
@keyframes hw-rise {
	from {
		clip-path: inset(-0.5em -0.5em 100% -0.5em);
		transform: translateY(0.4em);
	}

	to {
		clip-path: inset(-0.5em);
		transform: none;
	}
}

@keyframes hw-rule {
	from {
		transform: scaleX(0);
	}
}

@keyframes hw-shine {
	0% {
		background-position: 100% 0;
	}

	30%,
	100% {
		background-position: 0 0;
	}
}

.hero--wedding-split .hero-wedding__heading > *,
.hero--wedding-split .hero-wedding__title-main,
.hero--wedding-split .hero-wedding__title-accent {
	animation: hw-rise 0.7s var(--hw-ease) backwards;
}

.hero--wedding-split .hero-wedding__title {
	animation: none;
}

.hero--wedding-split .hero-wedding__eyebrow {
	animation-delay: 0.06s;
}

.hero--wedding-split .hero-wedding__title-main {
	animation-delay: 0.12s;
}

.hero--wedding-split .hero-wedding__title-accent {
	animation-delay: 0.24s;
}

.hero--wedding-split .hero-wedding__tagline {
	animation-delay: 0.38s;
}

/* The eyebrow rules draw outwards from the text. */
.hero--wedding-split .hero-wedding__eyebrow::before,
.hero--wedding-split .hero-wedding__eyebrow::after {
	animation: hw-rule 0.8s var(--hw-ease) 0.3s backwards;
}

.hero--wedding-split .hero-wedding__eyebrow::before {
	transform-origin: right center;
}

.hero--wedding-split .hero-wedding__eyebrow::after {
	transform-origin: left center;
}

/* Without background-clip: text the accent keeps its plain gold colour. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.hero--wedding-split .hero-wedding__title-accent {
		background: linear-gradient(110deg, var(--hw-gold) 0%, var(--hw-gold) 40%, #f4dfae 50%, var(--hw-gold) 60%, var(--hw-gold) 100%) 100% 0 / 250% 100%;
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
		/* The fill only exists inside the box; stacked marks (Ấ, Ầ) sit above a 0.95 line box. */
		margin-top: calc(var(--hw-accent-gap) - 0.25em);
		padding-top: 0.25em;
		animation:
			hw-rise 0.7s var(--hw-ease) 0.24s backwards,
			hw-shine 6s ease-in-out 1.2s infinite;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero--wedding-split .hero-wedding__actions .btn,
	.hero--wedding-split .hero-wedding__cta-icon {
		transition: none;
	}

	.hero--wedding-split .hero-wedding__actions .hero-wedding__cta:hover,
	.hero--wedding-split .hero-wedding__cta:hover .hero-wedding__cta-icon {
		transform: none;
	}

	.hero--wedding-split .hero-wedding__heading > *,
	.hero--wedding-split .hero-wedding__title-main,
	.hero--wedding-split .hero-wedding__title-accent,
	.hero--wedding-split .hero-wedding__eyebrow::before,
	.hero--wedding-split .hero-wedding__eyebrow::after {
		animation: none !important;
	}
}

/* Narrow desktop / tablet landscape -------------------------------------- */

@media (max-width: 1180px) {
	.hero--wedding-split .hero-wedding__panel {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
		gap: 36px;
		padding: 32px 16px 40px 24px;
	}

	.hero--wedding-split .hero-wedding__lead {
		font-size: 16px;
	}

	.hero--wedding-split .hero-wedding__actions .btn {
		min-height: 54px;
		font-size: 16px;
	}

	.hero--wedding-split .hero-wedding__media .hero-collage__item {
		--thumb-h: 180px;
		height: 180px;
	}
}

/* Stacked: centred copy on top, video below ------------------------------ */

@media (max-width: 959px) {
	.hero--wedding-split {
		--hw-title: clamp(38px, 12.5vw, 64px);
		--hw-script: clamp(30px, 9.5vw, 44px);
	}

	.hero--wedding-split .hero-wedding__panel {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		max-width: 720px;
		padding: 0;
		overflow: visible;
		border-radius: 0;
		background: var(--hw-bg);
	}

	/* Edge to edge across the screen; the section's overflow: hidden clips any scrollbar gap. */
	.hero--wedding-split .hero-wedding__media {
		grid-row: 2;
		width: 100vw;
		margin-left: calc(50% - 50vw);
	}

	.hero--wedding-split .hero-wedding__copy {
		align-items: center;
		padding: 32px 20px 40px;
		text-align: center;
	}

	.hero--wedding-split .hero-wedding__ornament {
		margin: 0 0 10px;
	}

	.hero--wedding-split .hero-wedding__eyebrow {
		gap: 12px;
		margin-bottom: 14px;
		font-size: 12px;
		letter-spacing: 0.3em;
	}

	.hero--wedding-split .hero-wedding__eyebrow::before,
	.hero--wedding-split .hero-wedding__eyebrow::after {
		flex-basis: 40px;
		width: 40px;
	}

	.hero--wedding-split .hero-wedding__title {
		line-height: 1;
	}

	.hero--wedding-split .hero-wedding__title-accent {
		--hw-accent-gap: 0.2em;
	}

	.hero--wedding-split .hero-wedding__tagline {
		margin: 10px 0 0;
	}

	.hero--wedding-split .hero-wedding__tagline::after {
		width: 110px;
		margin: 6px auto 0;
	}

	.hero--wedding-split .hero-wedding__lead {
		margin-top: 20px;
	}

	.hero--wedding-split .hero-wedding__badges {
		display: grid;
		gap: 12px;
		width: 100%;
		max-width: 420px;
		margin-top: 24px;
		text-align: left;
	}

	.hero--wedding-split .hero-wedding__badges li {
		gap: 12px;
		padding: 10px 14px;
		border-radius: 14px;
		background: rgba(255, 255, 255, 0.7);
	}

	.hero--wedding-split .hero-wedding__actions {
		display: grid;
		gap: 12px;
		width: 100%;
		max-width: 420px;
		margin-top: 28px;
	}

	.hero--wedding-split .hero-wedding__actions .btn {
		width: 100%;
		min-height: 56px;
		font-size: 17px;
	}

	.hero--wedding-split .hero-wedding__actions .hero-wedding__cta {
		gap: 14px;
		padding: 0 10px;
	}

	.hero--wedding-split .hero-wedding__cta-icon {
		width: 32px;
		height: 32px;
	}

	.hero--wedding-split .hero-wedding__media .hero-collage {
		gap: 8px;
		padding: 8px;
	}

	.hero--wedding-split .hero-wedding__media .hero-collage__item {
		--thumb-h: 160px;
		height: 160px;
	}
}

/*
 * Phones: the top header is hidden on every page (style.css, which also zeroes
 * --header-h). Left here: the hero's hardcoded 100px top padding (studio.css, !important)
 * and the 12px scroll-padding, so #templates lands flush at the top.
 */
@media (max-width: 767px) {
	html:has(.hero--wedding-split) {
		scroll-padding-top: 0;
	}

	.hero--wedding-split.hero--wedding {
		padding-top: 0 !important;
	}
}

/* Narrowest phones (320): keep the eyebrow on one line between its rules. */
@media (max-width: 359px) {
	.hero--wedding-split .hero-wedding__eyebrow {
		gap: 10px;
		font-size: 11px;
		letter-spacing: 0.22em;
		white-space: nowrap;
	}

	.hero--wedding-split .hero-wedding__eyebrow::before,
	.hero--wedding-split .hero-wedding__eyebrow::after {
		flex-basis: 28px;
		width: 28px;
		min-width: 12px;
	}
}

/*
 * Phones: "Tạo thiệp ngay" and "Mua key" share one row as raised 3D buttons. A solid
 * bottom edge gives the depth; pressing sinks the face onto it. A light sweep crosses
 * each face in turn so both read as tappable. Any third button keeps its own row.
 */
@media (max-width: 767px) {
	.hero--wedding-split .hero-wedding__actions {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
		padding-bottom: 6px;
	}

	.hero--wedding-split .hero-wedding__actions .btn:nth-child(n + 3) {
		grid-column: 1 / -1;
	}

	.hero--wedding-split .hero-wedding__actions .btn:nth-child(-n + 2) {
		position: relative;
		overflow: hidden;
		min-height: 52px;
		padding: 0 10px;
		gap: 8px;
		font-size: 15px;
		white-space: nowrap;
		isolation: isolate;
		transition: transform 120ms ease, box-shadow 120ms ease;
		animation: hw-btn-float 3.2s ease-in-out infinite;
	}

	.hero--wedding-split .hero-wedding__actions .hero-wedding__cta:nth-child(-n + 2) {
		box-shadow:
			0 5px 0 var(--hw-plum),
			0 12px 18px -8px rgba(107, 26, 44, 0.55);
	}

	.hero--wedding-split .hero-wedding__actions .hero-wedding__ghost:nth-child(-n + 2) {
		border-width: 2px;
		box-shadow:
			0 5px 0 var(--hw-wine),
			0 12px 18px -8px rgba(158, 31, 58, 0.45);
		animation-delay: 1.6s;
	}

	.hero--wedding-split .hero-wedding__actions .btn:nth-child(-n + 2)::after {
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
		background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
		transform: translateX(-120%);
		animation: hw-btn-sweep 3.2s ease-in-out infinite;
		pointer-events: none;
	}

	.hero--wedding-split .hero-wedding__actions .hero-wedding__ghost:nth-child(-n + 2)::after {
		background: linear-gradient(105deg, transparent 35%, rgba(201, 44, 85, 0.16) 50%, transparent 65%);
		animation-delay: 1.6s;
	}

	.hero--wedding-split .hero-wedding__actions .hero-wedding__cta:nth-child(-n + 2) .hero-wedding__cta-icon {
		width: 26px;
		height: 26px;
	}

	.hero--wedding-split .hero-wedding__actions .btn:nth-child(-n + 2):active {
		animation: none;
		transform: translateY(5px);
	}

	.hero--wedding-split .hero-wedding__actions .hero-wedding__cta:nth-child(-n + 2):active {
		box-shadow: 0 0 0 var(--hw-plum), 0 4px 8px -6px rgba(107, 26, 44, 0.5);
	}

	.hero--wedding-split .hero-wedding__actions .hero-wedding__ghost:nth-child(-n + 2):active {
		background: #fff;
		color: var(--hw-wine);
		box-shadow: 0 0 0 var(--hw-wine), 0 4px 8px -6px rgba(158, 31, 58, 0.4);
	}
}

@media (max-width: 359px) {
	.hero--wedding-split .hero-wedding__actions .btn:nth-child(-n + 2) {
		font-size: 13.5px;
	}

	.hero--wedding-split .hero-wedding__actions .hero-wedding__cta:nth-child(-n + 2) .hero-wedding__cta-icon {
		display: none;
	}
}

@keyframes hw-btn-float {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-2px);
	}
}

@keyframes hw-btn-sweep {
	0%,
	55% {
		transform: translateX(-120%);
	}

	85%,
	100% {
		transform: translateX(120%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero--wedding-split .hero-wedding__actions .btn:nth-child(-n + 2),
	.hero--wedding-split .hero-wedding__actions .btn:nth-child(-n + 2)::after {
		animation: none;
	}

	.hero--wedding-split .hero-wedding__actions .btn:nth-child(-n + 2)::after {
		display: none;
	}
}
