/* =========================================================
   Shade boxes — linked square tiles
   ========================================================= */

.shade-boxes {
	margin-bottom: var(--section-space);
}

.shade-boxes__header {
	margin: 0 auto var(--section-space);
	max-width: 40rem;
	text-align: center;
}

.shade-boxes__heading {
	margin: 0;
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #4c4d4f;
}

.shade-boxes__subheading {
	margin: 0.35rem 0 0;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: #4c4d4f;
}

.shade-boxes__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	width: 100%;
	max-width: min(100%, calc(5 * 9.375rem + 4 * 1rem));
	margin-inline: auto;
	box-sizing: border-box;
}

.shade-boxes__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	box-sizing: border-box;
	flex: 0 0 8.75rem;
	width: 8.75rem;
	text-decoration: none;
	color: inherit;
}

.shade-boxes__item--link {
	cursor: pointer;
}

.shade-boxes__item--link:focus-visible {
	outline: 2px solid var(--color-text, #1a1a1a);
	outline-offset: 4px;
}

.shade-boxes__media {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #e8e8e8;
}

.shade-boxes__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
	pointer-events: none;
}

.shade-boxes__title {
	display: block;
	margin-top: 0.25rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	color: #4c4d4f;
	cursor: inherit;
}

@media (hover: hover) {
	.shade-boxes__item--link:hover .shade-boxes__image {
		transform: scale(1.04);
	}
}

@media (min-width: 640px) {
	.shade-boxes__item {
		flex: 0 0 calc((100% - 1.5rem) / 3);
		width: calc((100% - 1.5rem) / 3);
	}
}

@media (min-width: 900px) {
	.shade-boxes__grid {
		gap: 1rem;
	}

	.shade-boxes__item {
		flex: 0 0 calc((100% - 4rem) / 5);
		width: calc((100% - 4rem) / 5);
	}
}
