/**
 * HK International — homepage hero.
 *
 * Layers, back to front: background (image, video or the theme's pattern),
 * shade, content (text and activity tiles), slogan rail. The hero is dark in
 * every variant: text sits on at least 74% ink, whatever the image.
 *
 * Movement is slow and pausable. Looping animations stop when the visitor
 * presses Pause (.is-paused), when the hero is off screen or the tab is
 * hidden (.is-idle), and never run for prefers-reduced-motion.
 */

.hk-hero {
	--hk-px: 0;
	--hk-py: 0;
	--hk-shade: 0.82;
	--hk-shade-far: 0.5;
	--hk-hero-line: rgb(255 255 255 / 0.18);
	--hk-hero-muted: #e6ebee;
	--hk-hero-ease: cubic-bezier(0.2, 0.7, 0, 1);
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

.hk-hero--overlay-light {
	--hk-shade: 0.74;
	--hk-shade-far: 0.3;
}

.hk-hero--overlay-strong {
	--hk-shade: 0.9;
	--hk-shade-far: 0.72;
}

/* Brand overlay: the logo gradient over the photo, dark enough behind the text. */
.hk-hero--overlay-brand .hk-hero__shade {
	background:
		linear-gradient(0deg, rgb(13 41 66 / 0.92) 0, rgb(13 41 66 / 0) 10rem),
		linear-gradient(115deg, rgb(13 41 66 / 0.94) 0, rgb(18 63 104 / 0.86) 45%, rgb(84 72 106 / 0.72) 75%, rgb(150 59 75 / 0.62) 100%);
}

.hk-hero :focus-visible {
	outline-color: var(--wp--preset--color--red);
}

/* ---------- Background ---------- */

.hk-hero__backdrop {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}

/* Oversized so the pointer lean never shows an edge. */
.hk-hero__layer {
	position: absolute;
	inset: -3%;
	transform: translate3d(calc(var(--hk-px) * -18px), calc(var(--hk-py) * -12px), 0);
	transition: transform 900ms var(--hk-hero-ease);
}

.hk-hero__image,
.hk-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 60% 50%;
}

.hk-hero__video {
	opacity: 0;
	transition: opacity 1200ms var(--wp--custom--motion--ease);
}

.hk-hero.has-video .hk-hero__video {
	opacity: 1;
}

/* No image or video: the placeholder grid, set as a deep field with soft brand-colour glows. */
.hk-hero__field {
	position: absolute;
	inset: -96px;
	background-image:
		linear-gradient(rgb(255 255 255 / 0.055) 1px, transparent 1px),
		linear-gradient(90deg, rgb(255 255 255 / 0.055) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 65% 80% at 70% 45%, #000 0%, transparent 78%);
}

.hk-hero__glow {
	position: absolute;
	inset-block-start: -20vmax;
	inset-inline-end: -14vmax;
	width: 64vmax;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgb(84 72 106 / 0.55), rgb(18 63 104 / 0));
}

/* A second, warmer glow low on the right: the logo gradient, kept faint. */
.hk-hero__glow::after {
	content: "";
	position: absolute;
	inset-block-start: 62%;
	inset-inline-start: 18%;
	width: 70%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgb(150 59 75 / 0.5), rgb(150 59 75 / 0));
}

/* The globe mark from the logo as a faint watermark behind the tiles. */
.hk-hero__motif {
	position: absolute;
	inset-block: 8% -12%;
	inset-inline: 46% -8%;
	background: #fff;
	opacity: 0.045;
	mask: url("../brand/hk-motif.svg") no-repeat right center / contain;
}

/* Phones: the watermark is skipped (faint, and costly as the first large paint). */
@media (max-width: 59.99em) {
	.hk-hero__motif {
		display: none;
	}
}

.hk-hero__motif:dir(rtl) {
	transform: scaleX(-1);
}

.hk-hero__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(0deg, rgb(13 41 66 / 0.92) 0, rgb(13 41 66 / 0) 10rem),
		linear-gradient(rgb(13 41 66 / var(--hk-shade)), rgb(13 41 66 / var(--hk-shade)));
}

.hk-hero:not(.hk-hero--has-media) .hk-hero__shade {
	background: linear-gradient(0deg, rgb(13 41 66 / 0.7) 0, rgb(13 41 66 / 0) 10rem);
}

@media (min-width: 60em) {
	/* Side by side: full shade behind the text, lighter behind the tiles. */
	.hk-hero__shade {
		background:
			linear-gradient(0deg, rgb(13 41 66 / 0.92) 0, rgb(13 41 66 / 0) 10rem),
			linear-gradient(90deg, rgb(13 41 66 / var(--hk-shade)) 0, rgb(13 41 66 / var(--hk-shade)) 52%, rgb(13 41 66 / var(--hk-shade-far)) 100%);
	}

	.hk-hero__shade:dir(rtl) {
		background:
			linear-gradient(0deg, rgb(13 41 66 / 0.92) 0, rgb(13 41 66 / 0) 10rem),
			linear-gradient(270deg, rgb(13 41 66 / var(--hk-shade)) 0, rgb(13 41 66 / var(--hk-shade)) 52%, rgb(13 41 66 / var(--hk-shade-far)) 100%);
	}
}

/* ---------- Layout ---------- */

.hk-hero__inner {
	display: flex;
	flex-direction: column;
	max-width: var(--wp--style--global--wide-size);
	min-height: inherit;
	margin-inline: auto;
	padding-block-start: var(--wp--preset--spacing--80);
	padding-inline: max(var(--wp--preset--spacing--gutter), env(safe-area-inset-left)) max(var(--wp--preset--spacing--gutter), env(safe-area-inset-right));
}

.hk-hero__grid {
	flex: 1;
	display: grid;
	gap: var(--wp--preset--spacing--70);
	align-items: center;
}

.hk-hero__grid:last-child {
	padding-block-end: var(--wp--preset--spacing--80);
}

.hk-hero__inner > *,
.hk-hero__text > * {
	margin-block-start: 0;
}

@media (min-width: 60em) {
	.hk-hero {
		min-height: clamp(38rem, calc(100svh - 7.25rem), 54rem);
	}

	.hk-hero__grid {
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}

	.hk-hero__text {
		grid-column: 1 / span 7;
	}

	.hk-hero__visual {
		grid-column: 8 / -1;
	}

	.hk-hero--text-only .hk-hero__text {
		grid-column: 1 / span 11;
	}
}

/* ---------- Text ---------- */

.hk-hero__title {
	margin: 0;
	max-width: 15ch;
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--display);
	font-stretch: var(--wp--custom--stretch--display);
	font-weight: 700;
	line-height: 0.96;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.hk-hero--text-only .hk-hero__title {
	max-width: 18ch;
}

.hk-hero__lead {
	margin: var(--wp--preset--spacing--60) 0 0;
	max-width: 44ch;
	color: var(--hk-hero-muted);
	font-size: var(--wp--preset--font-size--body-lg);
}

.hk-hero .hk-actions {
	margin-block-start: var(--wp--preset--spacing--60);
}

/* ---------- Activity tiles ---------- */

.hk-hero__visual {
	display: grid;
	justify-items: center;
	gap: var(--wp--preset--spacing--50);
	perspective: 1600px;
}

.hk-tiles {
	--hk-tile: clamp(3rem, 13vw, 4.5rem);
	--hk-depth: 0.4;
	--hk-gap: clamp(0.5rem, 1.2vw, 1rem);
	display: grid;
	grid-template-columns: repeat(5, var(--hk-tile));
	gap: var(--hk-gap);
	padding-block-end: calc(var(--hk-tile) * 0.5);
	transform-style: preserve-3d;
	transform: rotateX(calc(18deg - var(--hk-py) * 6deg)) rotateY(calc(var(--hk-px) * 8deg)) rotateZ(-4deg);
	transition: transform 900ms var(--hk-hero-ease);
}

.hk-tiles__tile {
	position: relative;
	aspect-ratio: 1;
	transform-style: preserve-3d;
	translate: 0 var(--hk-y, 0) calc(var(--hk-z, 0px) + var(--hk-lift, 0px));
	transition: translate 700ms var(--hk-hero-ease);
}

/* Staggered columns (five across when stacked, four beside the text). */
.hk-tiles__tile:nth-child(5n + 2),
.hk-tiles__tile:nth-child(5n + 4) {
	--hk-y: 40%;
}

.hk-tiles__tile:nth-child(3n + 2) {
	--hk-z: calc(22px * var(--hk-depth));
}

.hk-tiles__tile:nth-child(3n) {
	--hk-z: calc(44px * var(--hk-depth));
}

/* The tile's body: a darker slab set back behind the face gives it depth. */
.hk-tiles__tile::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--wp--custom--radius--media);
	background: rgb(5 18 32 / 0.6);
	transform: translateZ(-14px);
	transition: background-color 500ms var(--wp--custom--motion--ease);
}

.hk-tiles__face {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	border: 1px solid rgb(255 255 255 / 0.2);
	border-radius: var(--wp--custom--radius--media);
	background: linear-gradient(150deg, rgb(255 255 255 / 0.17), rgb(255 255 255 / 0.05));
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14);
	color: var(--hk-hero-muted);
	transition:
		background-color 500ms var(--wp--custom--motion--ease),
		color 500ms var(--wp--custom--motion--ease),
		border-color 500ms var(--wp--custom--motion--ease);
}

.hk-tiles__icon {
	width: 42%;
	height: 42%;
	stroke-width: 1.3;
}

/* Highlighted tile: lifts forward, turns white, its body shows the red marker. */
.hk-tiles__tile.is-lit {
	--hk-lift: calc(40px * var(--hk-depth));
}

.hk-tiles__tile.is-lit .hk-tiles__face {
	border-color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

.hk-tiles__tile.is-lit::before {
	background: var(--wp--preset--color--red);
}

.hk-tiles__caption {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	min-height: 1.6em;
	margin: 0;
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--body);
	font-stretch: var(--wp--custom--stretch--heading);
	font-weight: 600;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 300ms var(--wp--custom--motion--ease), transform 300ms var(--wp--custom--motion--ease);
}

.hk-tiles__caption::before {
	content: "";
	flex: none;
	width: 1.5rem;
	height: 2px;
	background: var(--wp--preset--color--red);
}

.hk-tiles__caption.is-shown {
	opacity: 1;
	transform: none;
}

@media (min-width: 60em) {
	.hk-tiles {
		--hk-tile: clamp(4.5rem, 7.2vw, 6.5rem);
		--hk-depth: 1;
		grid-template-columns: repeat(4, var(--hk-tile));
		transform: rotateX(calc(14deg - var(--hk-py) * 8deg)) rotateY(calc(-26deg + var(--hk-px) * 12deg)) rotateZ(4deg);
	}

	.hk-tiles__tile:nth-child(5n + 2),
	.hk-tiles__tile:nth-child(5n + 4) {
		--hk-y: 0;
	}

	.hk-tiles__tile:nth-child(4n + 2),
	.hk-tiles__tile:nth-child(4n + 4) {
		--hk-y: 40%;
	}

	.hk-hero__visual {
		justify-items: start;
		padding-inline-start: var(--wp--preset--spacing--60);
	}
}

/* ---------- Slogan rail ---------- */

.hk-hero__rail {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	margin-block-start: var(--wp--preset--spacing--80);
	padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
	border-block-start: 1px solid var(--hk-hero-line);
}

/* The timer: fills along the rail's top edge while a slogan is shown. */
.hk-hero__progress {
	position: absolute;
	inset-block-start: -1px;
	inset-inline: 0;
	height: 2px;
	background: var(--wp--preset--color--red);
	transform: scaleX(0);
	transform-origin: left center;
}

.hk-hero__progress:dir(rtl) {
	transform-origin: right center;
}

.hk-slogans {
	min-width: 0;
}

.hk-slogans__list {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hk-slogans__item {
	grid-area: 1 / 1;
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--heading-3);
	font-stretch: var(--wp--custom--stretch--display);
	font-weight: 650;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* Stacked in one cell, so the rail never changes height between slogans. */
.hk-slogans__item:not(:first-child),
.hk-hero.is-enhanced .hk-slogans__item {
	visibility: hidden;
}

.hk-hero.is-enhanced .hk-slogans__item.is-active,
.hk-hero.is-enhanced .hk-slogans__item.is-leaving {
	visibility: visible;
}

.hk-slogans__item a {
	color: inherit;
	text-decoration: none;
	background: linear-gradient(var(--wp--preset--color--red), var(--wp--preset--color--red)) no-repeat 0 100% / 100% 2px;
}

.hk-slogans__item a:hover {
	color: var(--hk-hero-muted);
}

/* Each word rises out of its own mask, one after another. */
.hk-word {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	padding-block-end: 0.14em;
	margin-block-end: -0.14em;
}

.hk-word > span {
	display: inline-block;
	transform: translateY(110%);
}

.hk-slogans__item.is-active .hk-word > span {
	transform: none;
	transition: transform 800ms var(--hk-hero-ease) calc(var(--hk-word, 0) * 55ms + 150ms);
}

.hk-slogans__item.is-leaving .hk-word > span {
	transform: translateY(-110%);
	transition: transform 450ms cubic-bezier(0.5, 0, 0.75, 0) calc(var(--hk-word, 0) * 25ms);
}

.hk-hero__controls {
	grid-column: 2;
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
}

.hk-hero__controls[hidden] {
	display: none;
}

.hk-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 0.3);
	border-radius: var(--wp--custom--radius--control);
	background: transparent;
	color: var(--wp--preset--color--white);
	cursor: pointer;
	transition:
		background-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease),
		border-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease);
}

.hk-hero__btn:hover {
	border-color: var(--wp--preset--color--red);
	background: rgb(255 255 255 / 0.08);
}

.hk-hero__btn[data-hk-pause] {
	margin-inline-end: var(--wp--preset--spacing--30);
}

.hk-hero__play,
.hk-hero.is-paused .hk-hero__pause {
	display: none;
}

.hk-hero.is-paused .hk-hero__play {
	display: block;
}

.hk-hero__count {
	min-width: 3.25rem;
	color: var(--wp--preset--color--rule);
	font-size: var(--wp--preset--font-size--small);
	font-variant-numeric: tabular-nums;
	text-align: center;
}

@media (max-width: 47.99em) {
	/* Phones: keep the hero close to one screen tall. */
	.hk-hero__inner {
		padding-block-start: var(--wp--preset--spacing--70);
	}

	.hk-hero__grid {
		gap: var(--wp--preset--spacing--60);
	}

	.hk-hero__visual {
		gap: var(--wp--preset--spacing--40);
	}

	.hk-hero__rail {
		grid-template-columns: minmax(0, 1fr);
		margin-block-start: var(--wp--preset--spacing--60);
	}

	.hk-hero__controls {
		grid-column: 1;
	}

	.hk-slogans__item {
		font-size: var(--wp--preset--font-size--heading-4);
	}
}

/* ---------- Licensed activities strip (optional) ---------- */

.hk-hero__strip {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--70);
	border-block-start: 1px solid var(--hk-hero-line);
}

.hk-hero__strip-label {
	margin: 0;
	color: var(--wp--preset--color--rule);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.hk-hero__strip ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--wp--preset--spacing--50);
	margin: 0;
	padding: 0;
	list-style: none;
}

.hk-hero__strip a {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	min-height: 44px;
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--body);
	font-stretch: var(--wp--custom--stretch--heading);
	font-weight: 600;
	text-decoration: none;
	background-image: linear-gradient(var(--wp--preset--color--red), var(--wp--preset--color--red));
	background-repeat: no-repeat;
	background-position: 0 85%;
	background-size: 0 2px;
	transition: background-size var(--wp--custom--motion--base) var(--wp--custom--motion--ease);
}

.hk-hero__strip a:hover {
	background-size: 100% 2px;
}

.hk-hero__strip-icon {
	width: 1.125rem;
	height: 1.125rem;
	color: var(--wp--preset--color--rule);
}

@media (min-width: 60em) {
	.hk-hero__strip {
		grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
		align-items: start;
		column-gap: var(--wp--preset--spacing--60);
	}

	.hk-hero__strip-label {
		padding-block-start: 0.75rem;
	}
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
	/* The one orchestrated entrance: text rises, tiles assemble, rail settles. */
	.hk-hero__title,
	.hk-hero__lead,
	.hk-hero .hk-actions {
		animation: hk-hero-rise 800ms var(--hk-hero-ease) both;
	}

	.hk-hero__lead {
		animation-delay: 90ms;
	}

	.hk-hero .hk-actions {
		animation-delay: 180ms;
	}

	.hk-tiles__face {
		animation: hk-hero-fade 700ms var(--wp--custom--motion--ease) both;
		animation-delay: calc(200ms + var(--hk-order, 0) * 60ms);
	}

	.hk-hero__rail {
		animation: hk-hero-fade 900ms var(--wp--custom--motion--ease) 450ms both;
	}

	/* Slow loops: only when the editor leaves movement on, and only once
	   view.js has added the Pause control (WCAG 2.2.2). */
	.hk-hero--motion.is-enhanced .hk-hero__image {
		animation: hk-hero-drift 40s ease-in-out infinite alternate;
	}

	.hk-hero--motion.is-enhanced .hk-hero__field {
		animation: hk-hero-pan 36s linear infinite;
	}

	.hk-hero--motion.is-enhanced .hk-hero__glow {
		animation: hk-hero-glow 26s ease-in-out infinite alternate;
	}

	.hk-hero--motion.is-enhanced .hk-tiles__tile {
		animation: hk-hero-float 9s ease-in-out infinite alternate;
		animation-delay: calc(var(--hk-order, 0) * -1.3s);
	}

	.hk-hero--motion.is-enhanced .hk-tiles__tile:nth-child(odd) {
		animation-duration: 11s;
	}

	.hk-hero.is-paused :is(.hk-hero__image, .hk-hero__field, .hk-hero__glow, .hk-tiles__tile, .hk-scene__layer, .hk-scene__img, .hk-scene__chip, .hk-scene__ring),
	.hk-hero.is-idle :is(.hk-hero__image, .hk-hero__field, .hk-hero__glow, .hk-tiles__tile, .hk-scene__layer, .hk-scene__img, .hk-scene__chip, .hk-scene__ring) {
		animation-play-state: paused;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hk-hero__layer,
	.hk-tiles,
	.hk-tiles__tile {
		transition: none;
	}

	/* Slogans change in place, without words moving. */
	.hk-hero .hk-slogans__item .hk-word > span {
		transform: none;
		transition: none;
	}
}

/* Order index for staggered timing (up to ten tiles). */
.hk-tiles__tile:nth-child(2) {
	--hk-order: 1;
}

.hk-tiles__tile:nth-child(3) {
	--hk-order: 2;
}

.hk-tiles__tile:nth-child(4) {
	--hk-order: 3;
}

.hk-tiles__tile:nth-child(5) {
	--hk-order: 4;
}

.hk-tiles__tile:nth-child(6) {
	--hk-order: 5;
}

.hk-tiles__tile:nth-child(7) {
	--hk-order: 6;
}

.hk-tiles__tile:nth-child(8) {
	--hk-order: 7;
}

.hk-tiles__tile:nth-child(9) {
	--hk-order: 8;
}

.hk-tiles__tile:nth-child(10) {
	--hk-order: 9;
}

@keyframes hk-hero-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
}

@keyframes hk-hero-fade {
	from {
		opacity: 0;
	}
}

@keyframes hk-hero-drift {
	from {
		transform: scale(1.04);
	}

	to {
		transform: scale(1.12) translate3d(-1.5%, -1%, 0);
	}
}

@keyframes hk-hero-pan {
	to {
		transform: translate3d(48px, 48px, 0);
	}
}

@keyframes hk-hero-glow {
	to {
		transform: translate3d(-8vmax, 10vmax, 0) scale(1.12);
	}
}

@keyframes hk-hero-float {
	to {
		transform: translateZ(16px);
	}
}

/* ======================================================================
   Layered scene (hero visual "Layered image scene")
   Three images in depth: back (largest), middle and front. Each drifts on
   its own slow float (the `translate` property) and leans towards the
   pointer by a different amount (`transform`, from --hk-px / --hk-py), so the
   depth reads without anything moving fast.
   ====================================================================== */

@media (min-width: 60em) {
	.hk-hero--scene .hk-hero__text {
		grid-column: 1 / span 6;
	}

	.hk-hero--scene .hk-hero__visual {
		grid-column: 7 / -1;
		padding-inline-start: 0;
	}
}

.hk-scene {
	position: relative;
	width: 100%;
	justify-items: stretch;
}

.hk-scene__stage {
	position: relative;
	width: 100%;
	aspect-ratio: 6 / 5;
	max-height: 34rem;
}

.hk-scene__layer {
	position: absolute;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--card);
	box-shadow: 0 30px 60px -20px rgb(5 18 32 / 0.6), 0 0 0 1px rgb(255 255 255 / 0.12);
	transition: transform 900ms var(--hk-hero-ease);
}

.hk-scene__layer--back {
	inset-block-start: 4%;
	inset-inline-end: 0;
	width: 84%;
	aspect-ratio: 16 / 10;
	transform: translate3d(calc(var(--hk-px) * -14px), calc(var(--hk-py) * -10px), 0);
}

.hk-scene__layer--mid {
	inset-block-end: 6%;
	inset-inline-start: 0;
	z-index: 2;
	width: 46%;
	aspect-ratio: 4 / 3;
	border: 4px solid rgb(255 255 255 / 0.9);
	transform: translate3d(calc(var(--hk-px) * 22px), calc(var(--hk-py) * 16px), 0);
}

.hk-scene__layer--front {
	inset-block-end: 0;
	inset-inline-end: 8%;
	z-index: 3;
	width: 38%;
	aspect-ratio: 4 / 3;
	border: 4px solid rgb(255 255 255 / 0.9);
	transform: translate3d(calc(var(--hk-px) * 34px), calc(var(--hk-py) * 26px), 0);
}

.hk-scene__img,
.hk-scene__fallback {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hk-scene__fallback {
	position: relative;
	background: var(--wp--custom--gradient--deep);
}

.hk-scene__fallback::before {
	content: "";
	position: absolute;
	inset: 10% -10% -20% 30%;
	background: #fff;
	opacity: 0.1;
	mask: url("../brand/hk-motif.svg") no-repeat right center / contain;
}

/* A soft brand glow behind the composition. */
.hk-scene__ring {
	position: absolute;
	inset: 8% 4% 10% 16%;
	z-index: -1;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgb(150 59 75 / 0.45), rgb(84 72 106 / 0.2) 55%, rgb(13 41 66 / 0) 100%);
	filter: blur(10px);
}

/* Floating information chips: glass labels around the scene. */
.hk-scene__chips {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hk-scene__chip {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	padding: 0.5rem 0.875rem 0.5rem 0.5rem;
	border: 1px solid rgb(255 255 255 / 0.28);
	border-radius: 999px;
	background: rgb(255 255 255 / 0.14);
	box-shadow: 0 10px 30px -10px rgb(5 18 32 / 0.6);
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	white-space: nowrap;
}

.hk-scene__chip-icon {
	box-sizing: content-box;
	flex: none;
	width: 1rem;
	height: 1rem;
	padding: 0.375rem;
	border-radius: 50%;
	background: var(--wp--custom--gradient--brand);
}

@media (min-width: 60em) {
	.hk-scene__chip {
		position: absolute;
		z-index: 4;
	}

	/* Placed on the edges of the images, never over their centres. */
	.hk-scene__chip--1 {
		inset-block-start: 0;
		inset-inline-start: 4%;
	}

	.hk-scene__chip--2 {
		inset-block-start: 44%;
		inset-inline-end: -3%;
	}

	.hk-scene__chip--3 {
		inset-block-end: 40%;
		inset-inline-start: -4%;
	}

	.hk-scene__chip--4 {
		inset-block-end: -2%;
		inset-inline-start: 42%;
	}
}

/* Phones and tablets: a lighter scene, chips as a row below it. */
@media (max-width: 59.99em) {
	.hk-scene__stage {
		aspect-ratio: 4 / 3;
		max-width: 34rem;
		margin-inline: auto;
	}

	.hk-scene__layer--mid {
		border-width: 3px;
	}

	.hk-scene__layer--front {
		border-width: 3px;
	}

	.hk-scene__chips {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: var(--wp--preset--spacing--20);
		margin-block-start: var(--wp--preset--spacing--40);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.hk-hero--motion.is-enhanced .hk-scene__layer--back {
		animation: hk-scene-float 14s ease-in-out infinite alternate;
	}

	.hk-hero--motion.is-enhanced .hk-scene__layer--mid {
		animation: hk-scene-float 11s ease-in-out -4s infinite alternate;
	}

	.hk-hero--motion.is-enhanced .hk-scene__layer--front {
		animation: hk-scene-float 9s ease-in-out -2s infinite alternate;
	}

	.hk-hero--motion.is-enhanced .hk-scene__layer--back .hk-scene__img {
		animation: hk-hero-drift 40s ease-in-out infinite alternate;
	}

	.hk-hero--motion.is-enhanced .hk-scene__ring {
		animation: hk-scene-breathe 12s ease-in-out infinite alternate;
	}

	/* Chips float only on wide screens, where they sit around the scene. */
	@media (min-width: 60em) {
		.hk-hero--motion.is-enhanced .hk-scene__chip {
			animation: hk-scene-chip 7s ease-in-out infinite alternate;
		}

		.hk-hero--motion.is-enhanced .hk-scene__chip--2 {
			animation-duration: 9s;
			animation-delay: -3s;
		}

		.hk-hero--motion.is-enhanced .hk-scene__chip--3 {
			animation-duration: 8s;
			animation-delay: -5s;
		}

		.hk-hero--motion.is-enhanced .hk-scene__chip--4 {
			animation-duration: 10s;
			animation-delay: -1s;
		}
	}

	/* Entrance: the layers assemble from the back. */
	.hk-scene__layer,
	.hk-scene__chip {
		opacity: 0;
		animation-fill-mode: both;
	}

	.hk-hero.is-enhanced .hk-scene__layer,
	.hk-hero.is-enhanced .hk-scene__chip {
		opacity: 1;
		transition: opacity 900ms var(--hk-hero-ease), transform 900ms var(--hk-hero-ease);
	}

	.hk-hero.is-enhanced .hk-scene__layer--mid {
		transition-delay: 150ms, 0ms;
	}

	.hk-hero.is-enhanced .hk-scene__layer--front {
		transition-delay: 300ms, 0ms;
	}

	.hk-hero.is-enhanced .hk-scene__chip {
		transition-delay: 600ms, 0ms;
	}

	/* The phones' simplified scene: no float on the middle and front layers. */
	@media (max-width: 59.99em) {
		.hk-hero--motion.is-enhanced :is(.hk-scene__layer--mid, .hk-scene__layer--front) {
			animation: none;
		}
	}
}

@keyframes hk-scene-float {
	from {
		translate: 0 -6px;
	}

	to {
		translate: 0 8px;
	}
}

@keyframes hk-scene-chip {
	from {
		translate: 0 -5px;
	}

	to {
		translate: 0 5px;
	}
}

@keyframes hk-scene-breathe {
	from {
		scale: 0.96;
		opacity: 0.8;
	}

	to {
		scale: 1.04;
		opacity: 1;
	}
}

/* ---------- Motion controls: out of sight, still reachable ----------
   The Pause/Play and slogan buttons stay in the page for keyboard and
   screen-reader users (WCAG 2.2.2) but are hidden until focused. The timer
   line is not shown. */

.hk-hero__controls:not(:focus-within) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.hk-hero__progress {
	opacity: 0;
}

/* ======================================================================
   Depth: the scene in perspective, a light that follows the pointer, and
   a gentle scroll parallax. Desktop with a fine pointer only; phones,
   touch and reduced motion keep the flat scene above. The pointer values
   (--hk-px / --hk-py, -0.5 to 0.5) come from view.js and stay 0 when the
   site owner switches parallax off, so the scene simply rests.
   ====================================================================== */

@media (min-width: 60em) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.hk-scene__stage {
		perspective: 1400px;
		transform-style: preserve-3d;
	}

	/* Each layer keeps its sideways drift and also turns a few degrees;
	   nearer layers turn and travel further, which reads as depth. */
	.hk-scene__layer--back {
		transform: translate3d(calc(var(--hk-px) * -14px), calc(var(--hk-py) * -10px), -20px) rotateY(calc(var(--hk-px) * 4deg)) rotateX(calc(var(--hk-py) * -3deg));
	}

	.hk-scene__layer--mid {
		transform: translate3d(calc(var(--hk-px) * 22px), calc(var(--hk-py) * 16px), 10px) rotateY(calc(var(--hk-px) * 6deg)) rotateX(calc(var(--hk-py) * -4deg));
	}

	.hk-scene__layer--front {
		transform: translate3d(calc(var(--hk-px) * 34px), calc(var(--hk-py) * 26px), 24px) rotateY(calc(var(--hk-px) * 7deg)) rotateX(calc(var(--hk-py) * -5deg));
	}

	/* Soft light across each image, moving opposite the pointer like a
	   reflection on glass. */
	.hk-scene__layer::after {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 1;
		border-radius: inherit;
		background: radial-gradient(120% 90% at calc(45% - var(--hk-px) * 70%) calc(20% - var(--hk-py) * 70%), rgb(255 255 255 / 0.14), rgb(255 255 255 / 0) 55%);
		pointer-events: none;
	}

	/* Deeper layered shadow on the nearer images. */
	.hk-scene__layer--mid,
	.hk-scene__layer--front {
		box-shadow:
			0 40px 70px -24px rgb(5 18 32 / 0.65),
			0 12px 24px -12px rgb(5 18 32 / 0.45),
			0 0 0 1px rgb(255 255 255 / 0.12);
	}
}

/* Scroll parallax: as the hero leaves the screen, its background falls
   behind and the scene rises a little faster than the text. Scroll-linked
   in CSS (no script); browsers without scroll timelines show the still
   hero. Off for reduced motion, when hero movement or parallax is off. */
@supports (animation-timeline: view()) {
	@media (min-width: 60em) and (prefers-reduced-motion: no-preference) {
		/* The hero clips its overflow, which makes it a scroll container of
		   its own; the timeline is therefore named on the hero (tracked
		   against the page) and used by the layers inside it. */
		body:not(.hk-no-parallax) .hk-hero--motion {
			view-timeline: --hk-hero block;
		}

		body:not(.hk-no-parallax) .hk-hero--motion .hk-hero__backdrop {
			animation: hk-depth-fall linear both;
			animation-timeline: --hk-hero;
			animation-range: exit 0% exit 100%;
		}

		body:not(.hk-no-parallax) .hk-hero--motion .hk-scene {
			animation: hk-depth-rise linear both;
			animation-timeline: --hk-hero;
			animation-range: exit 0% exit 100%;
		}
	}
}

@keyframes hk-depth-fall {
	to {
		translate: 0 12%;
	}
}

@keyframes hk-depth-rise {
	to {
		translate: 0 -8%;
	}
}
