/**
 * Homepage featured industrial products — scoped to .pm-feat.
 */

.pm-feat {
	background: var(--pm-color-surface-subtle);
	padding: 3.5rem 0;
}

.pm-feat__intro {
	max-width: 42rem;
	margin-bottom: 2.5rem;
}

.pm-feat__title {
	margin: 1rem 0 0;
	font-family: var(--pm-font-heading);
	font-size: clamp(1.7rem, 6vw, 2.6rem);
	font-weight: 700;
	line-height: 1.14;
	color: var(--pm-color-text);
}

.pm-feat__text {
	margin: 1rem 0 0;
	line-height: 1.75;
	color: var(--pm-color-text-muted);
}

.pm-feat__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pm-feat-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: var(--pm-color-surface);
	border: 1px solid var(--pm-color-border);
	border-radius: var(--pm-radius-md);
	box-shadow: var(--pm-shadow-sm);
	transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.pm-feat-card:hover,
.pm-feat-card:focus-within {
	border-color: color-mix(in srgb, var(--pm-gold) 50%, var(--pm-color-border));
	box-shadow: var(--pm-shadow-md);
	transform: translateY(-3px);
}

.pm-feat-card__media {
	position: relative;
	display: grid;
	place-items: center;
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: color-mix(in srgb, var(--pm-color-surface-subtle) 70%, var(--pm-color-surface));
	border-bottom: 1px solid var(--pm-color-border);
	padding: 1.5rem;
}

.pm-feat-card__media::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 2.25rem;
	height: 2.25rem;
	border-top: 2px solid transparent;
	border-left: 2px solid transparent;
	transition: border-color 0.28s ease;
}

.pm-feat-card:hover .pm-feat-card__media::before,
.pm-feat-card:focus-within .pm-feat-card__media::before {
	border-color: color-mix(in srgb, var(--pm-gold) 70%, transparent);
}

.pm-feat-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	transition: transform 0.4s ease;
}

.pm-feat-card:hover .pm-feat-card__image,
.pm-feat-card:focus-within .pm-feat-card__image {
	transform: scale(1.02);
}

.pm-feat-card__placeholder {
	display: grid;
	place-items: center;
	width: 5.5rem;
	height: 5.5rem;
	color: var(--pm-color-primary);
	background: color-mix(in srgb, var(--pm-gold) 10%, var(--pm-color-surface-subtle));
	border: 1px solid color-mix(in srgb, var(--pm-gold) 28%, transparent);
}

.pm-feat-card__placeholder svg {
	display: block;
}

.pm-feat-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 1.5rem 1.5rem 1.6rem;
}

.pm-feat-card__label {
	margin: 0;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--pm-color-primary);
}

.pm-feat-card__title {
	margin: 0.6rem 0 0;
	font-family: var(--pm-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--pm-color-text);
}

.pm-feat-card__text {
	margin: 0.65rem 0 0;
	flex: 1 1 auto;
	font-size: 0.95rem;
	line-height: 1.65;
	color: var(--pm-color-text-muted);
}

.pm-feat-card__cta {
	width: 100%;
	margin-top: 1.5rem;
	gap: 0.45rem;
}

.pm-feat-card__cta-arrow {
	display: inline-block;
	width: 0.45rem;
	height: 0.45rem;
	border-right: 1.5px solid currentColor;
	border-top: 1.5px solid currentColor;
	transform: rotate(45deg);
}

.pm-feat__intro,
.pm-feat-card {
	opacity: 1;
}

.pm-feat--animate .pm-feat__intro,
.pm-feat--animate .pm-feat-card {
	opacity: 0;
	transform: translateY(16px);
}

.pm-feat--animate.is-inview .pm-feat__intro,
.pm-feat--animate.is-inview .pm-feat-card {
	animation: pm-feat-reveal 0.5s ease forwards;
}

.pm-feat--animate.is-inview .pm-feat__grid > li:nth-child(1) .pm-feat-card { animation-delay: 0ms; }
.pm-feat--animate.is-inview .pm-feat__grid > li:nth-child(2) .pm-feat-card { animation-delay: 70ms; }
.pm-feat--animate.is-inview .pm-feat__grid > li:nth-child(3) .pm-feat-card { animation-delay: 140ms; }
.pm-feat--animate.is-inview .pm-feat__grid > li:nth-child(4) .pm-feat-card { animation-delay: 210ms; }
.pm-feat--animate.is-inview .pm-feat__grid > li:nth-child(5) .pm-feat-card { animation-delay: 280ms; }
.pm-feat--animate.is-inview .pm-feat__grid > li:nth-child(6) .pm-feat-card { animation-delay: 350ms; }

@keyframes pm-feat-reveal {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (min-width: 640px) {
	.pm-feat {
		padding: 5rem 0;
	}

	.pm-feat__title {
		margin-top: 1.25rem;
	}

	.pm-feat__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem;
	}

	.pm-feat-card__body {
		padding: 1.6rem 1.75rem 1.75rem;
	}
}

@media (min-width: 1024px) {
	.pm-feat {
		padding: 7rem 0;
	}

	.pm-feat__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.pm-feat__intro,
	.pm-feat-card,
	.pm-feat--animate .pm-feat__intro,
	.pm-feat--animate .pm-feat-card,
	.pm-feat--animate.is-inview .pm-feat__intro,
	.pm-feat--animate.is-inview .pm-feat-card {
		opacity: 1;
		transform: none;
		animation: none;
	}

	.pm-feat-card,
	.pm-feat-card__image,
	.pm-feat-card__media::before {
		transition: none;
	}

	.pm-feat-card:hover,
	.pm-feat-card:focus-within,
	.pm-feat-card:hover .pm-feat-card__image,
	.pm-feat-card:focus-within .pm-feat-card__image {
		transform: none;
	}
}
