/*
 * [lutheran_covers] (inc/covers.php): the latest cover in front, tilted, an
 * earlier one behind it, as on the About page. --tl-covers-width on the
 * element sets its size; it never grows wider than its column.
 */
.tl-covers {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: min(100%, var(--tl-covers-width, 26rem));
	aspect-ratio: 1 / 1.05;
	margin: 0 auto;
	text-decoration: none;
}

.tl-covers img {
	position: absolute;
	width: 68%;
	max-width: none;
	height: auto;
	border-radius: 3px;
	box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.55), 0 12px 24px -12px rgba(0, 0, 0, 0.35);
	transition: transform 250ms ease;
}

.tl-covers__back {
	top: 9%;
	left: 2%;
	transform: rotate(-6deg);
	filter: saturate(0.85) brightness(0.92);
}

.tl-covers__front {
	top: 0;
	right: 2%;
	transform: rotate(3deg);
}

/* One cover on its own: in the middle. */
.tl-covers--single {
	aspect-ratio: 1 / 1.05;
}

.tl-covers--single .tl-covers__front {
	right: 16%;
}

/*
 * Three: the earlier one behind to the left, a third lower down to the right,
 * the latest in front between them. A little taller, for the third's foot.
 */
.tl-covers--three {
	aspect-ratio: 1 / 1.12;
}

.tl-covers--three img {
	width: 62%;
}

.tl-covers--three .tl-covers__back {
	top: 8%;
	left: 0;
	transform: rotate(-7deg);
}

.tl-covers__third {
	top: 22%;
	right: 0;
	transform: rotate(7deg);
	filter: saturate(0.9) brightness(0.95);
}

.tl-covers--three .tl-covers__front {
	top: 0;
	right: auto;
	left: 19%;
	z-index: 1;
	transform: rotate(2deg);
}

/* As a link: the covers open a little on hover. */
.tl-covers--link:hover .tl-covers__front {
	transform: rotate(4deg) translateY(-6px);
}

.tl-covers--link:hover .tl-covers__back {
	transform: rotate(-7.5deg) translateX(-4px);
}

.tl-covers--three.tl-covers--link:hover .tl-covers__front {
	transform: rotate(3deg) translateY(-6px);
}

.tl-covers--three.tl-covers--link:hover .tl-covers__back {
	transform: rotate(-8.5deg) translateX(-4px);
}

.tl-covers--link:hover .tl-covers__third {
	transform: rotate(8.5deg) translateX(4px);
}

.tl-covers--link:focus-visible {
	outline: 3px solid var(--tl-edition, #348cbc);
	outline-offset: 6px;
	border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.tl-covers img {
		transition: none;
	}
}
