/* Native Gutenberg blocks, styled identically on the site and in the editor. */
.tl-hero {
	--hero-unit: min(calc((100vw - 72px) / 1364), 1px);
	position: relative;
	display: grid;
	grid-template-columns: calc(318 * var(--hero-unit)) minmax(0, 1fr) calc(166 * var(--hero-unit));
	align-items: center;
	gap: calc(32 * var(--hero-unit));
	width: min(calc(100% - 72px), 1364px);
	min-height: calc(825 * var(--hero-unit));
	margin: 0 auto;
	font-family: Roboto, Arial, sans-serif;
}

/* Use the actual page canvas width, including when a scrollbar is present. */
@supports (width: 1cqw) {
	.home-stage {
		container-type: inline-size;
	}

	.tl-hero {
		--hero-unit: min(calc((100cqw - 72px) / 1364), 1px);
	}
}

.tl-hero > *,
.tl-hero > .wp-block-group__inner-container > *,
.tl-hero__copy > *,
.tl-hero__visual > * {
	min-width: 0;
	margin: 0;
}

/* Classic themes receive these wrappers on the front end, unlike the editor. */
.tl-hero > .wp-block-group__inner-container,
.tl-hero__copy > .wp-block-group__inner-container,
.tl-hero__visual > .wp-block-group__inner-container {
	display: contents;
}

.tl-hero__copy {
	position: relative;
	z-index: 2;
}

.tl-hero__heading.wp-block-heading {
	margin: 0;
	padding-block: 0.16em;
	color: #ecdc78;
	font-size: calc(50 * var(--hero-unit));
	font-weight: 300;
	line-height: 1;
	letter-spacing: 0.05em;
}

.tl-hero__heading strong,
.tl-hero__copy p strong {
	font-weight: 900;
}

.tl-hero__copy p {
	margin: 16px 0 0;
	color: #e3e3e3;
	font-size: clamp(16px, calc(18 * var(--hero-unit)), 18px);
	font-weight: 300;
	line-height: 1.222222;
}

.tl-hero__copy p + p {
	margin-top: 22px;
	color: #fff;
}

.tl-hero__visual {
	position: relative;
	width: 100%;
	height: calc(808 * var(--hero-unit));
	isolation: isolate;
}

.tl-hero__visual .wp-block-image {
	position: absolute;
	max-width: none;
	margin: 0;
}

.tl-hero__visual .wp-block-image img {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
}

.tl-hero__ring {
	z-index: 0;
	top: calc(100 * var(--hero-unit));
	left: calc(48 * var(--hero-unit));
	width: calc(604 * var(--hero-unit));
	/* The transparent corners of the rotating image must not widen the page. */
	overflow: hidden;
}

.tl-hero__energy {
	z-index: 1;
	top: calc(87 * var(--hero-unit));
	left: calc(-140 * var(--hero-unit));
	width: calc(682 * var(--hero-unit));
}

.tl-hero__vodka {
	z-index: 2;
	top: calc(-14.5 * var(--hero-unit));
	left: calc(103 * var(--hero-unit));
	width: calc(567 * var(--hero-unit));
}

.tl-hero__awards {
	width: calc(166 * var(--hero-unit));
	transform: translate(calc(16 * var(--hero-unit)), calc(-4 * var(--hero-unit)));
}

/* Cropped WebP renders: align their silhouettes with the original XD products. */
.tl-product-cycle {
	--float-x: calc(4 * var(--hero-unit));
	--float-y: calc(-12 * var(--hero-unit));
	--float-tilt: 1deg;
	position: absolute;
	margin: 0;
	transform-origin: center;
}
.tl-product-cycle > .wp-block-group__inner-container { display: contents; }
.tl-product-cycle--energy {
	--product-angle: -26deg;
	z-index: 1;
	left: calc(53 * var(--hero-unit));
	top: calc(212 * var(--hero-unit));
	width: calc(296 * var(--hero-unit));
	aspect-ratio: 823 / 1200;
	transform: rotate(-26deg);
}
.tl-product-cycle--vodka {
	--product-angle: 13deg;
	--float-x: calc(-3 * var(--hero-unit));
	--float-tilt: -0.8deg;
	z-index: 2;
	left: calc(152 * var(--hero-unit));
	top: calc(99 * var(--hero-unit));
	width: calc(497 * var(--hero-unit));
	aspect-ratio: 956 / 1200;
	transform: rotate(13deg);
}
.tl-product-cycle .tl-product-frame {
	inset: 0;
	width: 100%;
	opacity: 0;
	visibility: hidden;
}
.tl-product-frame:first-child { opacity: 1; visibility: visible; }
.tl-product-cycle.is-ready .tl-product-frame { opacity: 0; visibility: hidden; }
.tl-product-cycle.is-ready .is-current { z-index: 1; opacity: 1; visibility: visible; }
.tl-product-cycle.is-ready .is-entering {
	z-index: 2;
	opacity: 1;
	visibility: visible;
	transition: opacity 1.2s ease-in-out;
}

/* List view selects each ordinary Image block; show it on the editor canvas. */
.editor-styles-wrapper .tl-product-cycle .tl-product-frame.is-selected {
	z-index: 3;
	opacity: 1;
	visibility: visible;
}

.tl-hero__awards img {
	display: block;
	width: 100%;
	height: auto;
}

.tl-hero-actions.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	width: min(calc(100% - 72px), 1364px);
	margin: 0 auto;
	padding: 0 0 95px;
}

.tl-hero-actions > .wp-block-button {
	margin: 0;
}

@keyframes tl-hero-ring {
	to { transform: rotate(360deg); }
}

/* Move the whole stack so incoming and outgoing variants remain aligned. */
@keyframes tl-product-float {
	0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--product-angle)); }
	50% { transform: translate3d(var(--float-x), var(--float-y), 0) rotate(calc(var(--product-angle) + var(--float-tilt))); }
}

@media (prefers-reduced-motion: no-preference) {
	.tl-hero__ring img {
		animation: tl-hero-ring 60s linear infinite;
	}
	.tl-product-cycle--energy { animation: tl-product-float 7.2s ease-in-out infinite; }
	.tl-product-cycle--vodka { animation: tl-product-float 9.5s -3s ease-in-out infinite; }
}

.editor-styles-wrapper .tl-product-cycle { animation: none; }
html.menu-open .tl-product-cycle { animation-play-state: paused; }

html.menu-open .tl-hero__ring img,
.editor-styles-wrapper .tl-hero__ring img {
	animation-play-state: paused;
}

@media (max-width: 1023px) {
	.tl-hero {
		--hero-unit: min(calc(100vw / 390), 1.4px);
		display: flex;
		flex-direction: column;
		gap: 0;
		width: min(100%, 546px);
		min-height: 0;
	}

	@supports (width: 1cqw) {
		.tl-hero {
			--hero-unit: min(calc(100cqw / 390), 1.4px);
		}
	}

	.tl-hero__visual {
		order: -1;
		width: calc(390 * var(--hero-unit));
		height: calc(368 * var(--hero-unit));
	}

	.tl-hero__ring {
		top: calc(48 * var(--hero-unit));
		left: calc(51 * var(--hero-unit));
		width: calc(306 * var(--hero-unit));
	}

	.tl-hero__energy {
		top: calc(40 * var(--hero-unit));
		left: calc(-42 * var(--hero-unit));
		width: calc(346 * var(--hero-unit));
	}

	.tl-hero__vodka {
		top: calc(-8 * var(--hero-unit));
		left: calc(77 * var(--hero-unit));
		width: calc(287 * var(--hero-unit));
	}

	.tl-hero__awards {
		position: absolute;
		top: calc(9 * var(--hero-unit));
		right: calc(22 * var(--hero-unit));
		width: calc(53.2 * var(--hero-unit));
		transform: none;
	}
	.tl-product-cycle--energy {
		left: calc(56 * var(--hero-unit));
		top: calc(104 * var(--hero-unit));
		width: calc(150 * var(--hero-unit));
	}
	.tl-product-cycle { --float-y: calc(-6 * var(--hero-unit)); }
	.tl-product-cycle--vodka {
		left: calc(102 * var(--hero-unit));
		top: calc(49 * var(--hero-unit));
		width: calc(251.5 * var(--hero-unit));
	}

	.tl-hero__copy {
		width: calc(100% - 72px);
	}

	.tl-hero__heading.wp-block-heading {
		font-size: clamp(32px, calc(40 * var(--hero-unit)), 40px);
	}

	.tl-hero__copy p {
		font-size: 16px;
		line-height: 20px;
	}

	.tl-hero__copy p + p {
		margin-top: 20px;
	}

	.tl-hero-actions.wp-block-buttons {
		--button-width: 154px;
		--button-height: 43px;
		--button-font-size: 15px;
		--button-padding-y: 10px;
		--button-padding-x: 10px;
		gap: 10px;
		width: min(calc(100% - 72px), 474px);
		margin-top: 30px;
		padding-bottom: 55px;
	}

	.tl-hero-actions > .wp-block-button {
		--button-width: 100%;
		flex: 0 1 calc((100% - 10px) / 2);
		min-width: 0;
		max-width: 154px;
	}
}

@media (max-width: 359px) {
	.tl-hero__copy,
	.tl-hero-actions.wp-block-buttons {
		width: calc(100% - 40px);
	}

	.tl-hero-actions.wp-block-buttons {
		--button-font-size: 13px;
	}
}
