.hpc-collage,
.hpc-collage * {
	box-sizing: border-box;
}

.hpc-collage {
	--hpc-block-gap: 40px;
	--hpc-shadow: rgba(31, 29, 26, .3);
	--hpc-float-duration: 8s;
	display: flex;
	flex-direction: column;
	gap: var(--hpc-block-gap);
	width: 100%;
}

.hpc-collage__block {
	position: relative;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	grid-template-rows: repeat(8, minmax(0, 1fr));
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: visible;
	isolation: isolate;
}

.hpc-collage__tile {
	position: relative;
	width: auto;
	max-width: none;
	height: auto;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	background: #f7f4ef;
	border: 1px solid rgba(31, 29, 26, .05);
	box-shadow:
		0 22px 45px -22px var(--hpc-shadow),
		0 8px 18px -12px rgba(31, 29, 26, .18);
	transform-origin: center;
	backface-visibility: hidden;
	will-change: transform;
	animation: hpc-float var(--hpc-float-duration) ease-in-out var(--hpc-delay, 0s) infinite;
}

.hpc-collage__tile > a {
	display: block;
	width: 100%;
	height: 100%;
}

.hpc-collage__image {
	display: block;
	visibility: visible !important;
	opacity: 1 !important;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	object-fit: cover;
	object-position: center;
	transform: scale(1.005);
}

/* Fallback for utility/lazy-load plugins that add this class after render. */
.hpc-collage__image.invisible,
.hpc-collage .invisible {
	visibility: visible !important;
	opacity: 1 !important;
}

.hpc-collage__tile--1 {
	grid-column: 1 / span 5;
	grid-row: 1 / span 4;
	z-index: 2;
	--hpc-x: 0px;
	--hpc-y: 0px;
	--hpc-r: -2deg;
}

.hpc-collage__tile--2 {
	grid-column: 5 / span 5;
	grid-row: 2 / span 4;
	z-index: 4;
	--hpc-x: -12px;
	--hpc-y: 10px;
	--hpc-r: 2deg;
}

.hpc-collage__tile--3 {
	grid-column: 9 / span 4;
	grid-row: 1 / span 3;
	z-index: 3;
	--hpc-x: 0px;
	--hpc-y: -6px;
	--hpc-r: 3deg;
}

.hpc-collage__tile--4 {
	grid-column: 2 / span 5;
	grid-row: 5 / span 4;
	z-index: 5;
	--hpc-x: 8px;
	--hpc-y: -14px;
	--hpc-r: 1deg;
}

.hpc-collage__tile--5 {
	grid-column: 7 / span 6;
	grid-row: 4 / span 5;
	z-index: 3;
	--hpc-x: -6px;
	--hpc-y: 6px;
	--hpc-r: -3deg;
}

@keyframes hpc-float {
	0%,
	100% {
		transform: translate3d(var(--hpc-x, 0), var(--hpc-y, 0), 0) rotate(var(--hpc-r, 0deg));
	}
	50% {
		transform:
			translate3d(
				calc(var(--hpc-x, 0px) + 6px),
				calc(var(--hpc-y, 0px) - 8px),
				0
			)
			rotate(calc(var(--hpc-r, 0deg) + .6deg));
	}
}

.hpc-collage--still .hpc-collage__tile {
	animation: none;
	transform: translate3d(var(--hpc-x, 0), var(--hpc-y, 0), 0) rotate(var(--hpc-r, 0deg));
	will-change: auto;
}

.hpc-empty {
	padding: 24px;
	color: #646970;
	background: #f6f7f7;
	border: 1px dashed #c3c4c7;
	text-align: center;
}

@media (max-width: 767px) {
	.hpc-collage {
		--hpc-block-gap: 28px;
	}

	.hpc-collage__block {
		aspect-ratio: 1 / 1.1;
	}

	.hpc-collage__tile--1 {
		grid-column: 1 / span 7;
		grid-row: 1 / span 3;
	}

	.hpc-collage__tile--2 {
		grid-column: 5 / span 8;
		grid-row: 3 / span 3;
	}

	.hpc-collage__tile--3 {
		grid-column: 8 / span 5;
		grid-row: 1 / span 2;
	}

	.hpc-collage__tile--4 {
		grid-column: 1 / span 7;
		grid-row: 6 / span 3;
	}

	.hpc-collage__tile--5 {
		grid-column: 6 / span 7;
		grid-row: 5 / span 4;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hpc-collage__tile {
		animation: none;
		transform: translate3d(var(--hpc-x, 0), var(--hpc-y, 0), 0) rotate(var(--hpc-r, 0deg));
		will-change: auto;
	}
}
