/**
 * Home page — expanding collection panels.
 */

.hm-collections {
	padding: clamp(42px, 4.5vw, 76px) 0 clamp(58px, 5vw, 90px);
	background: #fff;
	color: #282828;
}

.hm-collections__inner {
	width: min(1880px, calc(100% - 64px));
	margin-inline: auto;
}

.hm-collections__heading {
	margin: 0 0 clamp(26px, 2.4vw, 44px);
	font-family: "Inter", "Roboto Condensed", sans-serif;
	font-size: clamp(36px, 4vw, 40px);
	font-weight: 700;
	line-height: .98;
	letter-spacing: -.025em;
	text-transform: uppercase;
	color: #272727;
}

.hm-collections__list {
	display: flex;
	gap: 5px;
	width: 100%;
	height: clamp(560px, 43vw, 820px);
}

.hm-collection-card {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	flex: 1 1 0;
	min-width: 0;
	height: 100%;
	border-radius: 8px;
	background: #252525;
	cursor: pointer;
	outline: none;
	transition: flex-grow .62s cubic-bezier(.2, .75, .2, 1), box-shadow .3s ease;
}

.hm-collection-card.is-active,
.hm-collection-card:focus-within {
	flex-grow: 3.15;
	box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}

.hm-collection-card:focus-visible {
	box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px #282828, 0 14px 34px rgba(0, 0, 0, .16);
}

.hm-collection-card__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

.hm-collection-card.is-active .hm-collection-card__image,
.hm-collection-card:focus-within .hm-collection-card__image {
	transform: scale(1.025);
}

.hm-collection-card__shade {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(0deg, rgba(0, 0, 0, .4), rgba(0, 0, 0, .05) 68%);
	transition: background .4s ease;
}

.hm-collection-card.is-active .hm-collection-card__shade,
.hm-collection-card:focus-within .hm-collection-card__shade {
	background:
		linear-gradient(90deg, rgba(0, 0, 0, .54), rgba(0, 0, 0, .05) 68%),
		linear-gradient(0deg, rgba(0, 0, 0, .22), transparent 45%);
}

.hm-collection-card__rail-title {
	position: absolute;
	left: 50%;
	bottom: 30px;
	display: block;
	max-height: calc(100% - 60px);
	overflow: hidden;
	color: #fff;
	font-size: clamp(22px, 2.2vw, 42px);
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .015em;
	text-transform: uppercase;
	white-space: nowrap;
	writing-mode: vertical-rl;
	transform: translateX(-50%) rotate(180deg);
	transition: opacity .2s ease, visibility .2s ease;
}

.hm-collection-card.is-active .hm-collection-card__rail-title,
.hm-collection-card:focus-within .hm-collection-card__rail-title,
.hm-collections--single .hm-collection-card__rail-title {
	opacity: 0;
	visibility: hidden;
}

.hm-collection-card__content {
	position: absolute;
	inset: clamp(24px, 2vw, 38px) clamp(22px, 2vw, 36px);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	color: #fff;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(-16px);
	transition: opacity .25s ease, transform .42s ease, visibility 0s linear .3s;
}

.hm-collection-card.is-active .hm-collection-card__content,
.hm-collection-card:focus-within .hm-collection-card__content,
.hm-collections--single .hm-collection-card__content {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(0);
	transition-delay: .18s, .12s, 0s;
}

.hm-collection-card__title {
	width: 100%;
	margin: 0 0 14px;
	padding-bottom: 12px;
	border-bottom: 2px solid rgba(255, 255, 255, .9);
	color: #fff;
	font-size: clamp(28px, 2.5vw, 46px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: .01em;
	text-transform: uppercase;
}

.hm-collection-card__description {
	max-width: 620px;
	margin: 0;
	font-size: clamp(15px, 1.05vw, 19px);
	font-weight: 500;
	line-height: 1.55;
}

.hm-collection-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 132px;
	min-height: 42px;
	margin-top: auto;
	padding: 10px 22px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 5px 14px rgba(0, 0, 0, .2);
	color: #111;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.hm-collection-card__button:hover,
.hm-collection-card__button:focus-visible {
	background: #111;
	color: #fff;
	outline: 2px solid #fff;
	outline-offset: 2px;
	transform: translateY(-2px);
}

.hm-collections--single .hm-collection-card {
	flex-grow: 1;
}

.hm-collections--empty .hm-collections__inner {
	padding: 24px;
	border: 1px dashed #b6b6b6;
	border-radius: 10px;
	background: #f8f8f8;
	text-align: center;
}

.hm-collections--empty p {
	margin: 0;
}

@media (max-width: 1180px) {
	.hm-collections__inner {
		width: min(100% - 32px, 1880px);
	}

	.hm-collections__list {
		height: clamp(500px, 55vw, 650px);
	}

	.hm-collection-card.is-active,
	.hm-collection-card:focus-within {
		flex-grow: 3.5;
	}

	.hm-collection-card__rail-title {
		font-size: clamp(20px, 2.5vw, 30px);
	}
}

@media (max-width: 767px) {
	.hm-collections {
		padding: 42px 0 58px;
	}

	.hm-collections__inner {
		width: min(100% - 24px, 1880px);
	}

	.hm-collections__heading {
		margin-bottom: 24px;
		font-size: clamp(36px, 12vw, 32px);
	}

	.hm-collections__list {
		flex-direction: column;
		gap: 6px;
		height: auto;
	}

	.hm-collection-card {
		flex: none;
		width: 100%;
		height: 112px;
		transition: height .5s cubic-bezier(.2, .75, .2, 1), box-shadow .3s ease;
	}

	.hm-collection-card.is-active,
	.hm-collection-card:focus-within {
		flex-grow: 0;
		height: min(520px, 74vh);
	}

	.hm-collection-card__rail-title {
		left: 20px;
		bottom: 16px;
		max-width: calc(100% - 40px);
		max-height: none;
		font-size: 22px;
		white-space: nowrap;
		writing-mode: horizontal-tb;
		transform: none;
	}

	.hm-collection-card__content {
		inset: 22px 20px 20px;
		transform: translateY(12px);
	}

	.hm-collection-card.is-active .hm-collection-card__content,
	.hm-collection-card:focus-within .hm-collection-card__content,
	.hm-collections--single .hm-collection-card__content {
		transform: translateY(0);
	}

	.hm-collection-card__title {
		margin-bottom: 12px;
		padding-bottom: 10px;
		font-size: clamp(25px, 8vw, 34px);
	}

	.hm-collection-card__description {
		display: -webkit-box;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 5;
		font-size: 14px;
	}

	.hm-collection-card__button {
		min-height: 40px;
		padding: 9px 19px;
		font-size: 13px;
	}

	.hm-collections--single .hm-collection-card {
		height: min(520px, 74vh);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hm-collection-card,
	.hm-collection-card__image,
	.hm-collection-card__shade,
	.hm-collection-card__rail-title,
	.hm-collection-card__content,
	.hm-collection-card__button {
		transition: none;
	}
}
