/**
 * Homepage Why PrecisionMart — scoped to .pm-why.
 */

.pm-why {
	background: var(--pm-color-surface);
	padding: 3.5rem 0;
	scroll-margin-top: calc(var(--pm-header-height) + 0.75rem);
}

.pm-why__anchor {
	display: block;
	scroll-margin-top: calc(var(--pm-header-height) + 0.75rem);
}

.pm-why__layout {
	display: grid;
	gap: 2rem;
}

.pm-why__title {
	margin: 1rem 0 0;
	font-family: var(--pm-font-heading);
	font-size: clamp(1.7rem, 5.4vw, 2.45rem);
	font-weight: 700;
	line-height: 1.16;
	color: var(--pm-color-text);
}

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

.pm-why__list {
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--pm-color-border);
}

.pm-why__list li {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 1rem;
	padding: 1.15rem 0;
	border-bottom: 1px solid var(--pm-color-border);
}

.pm-why__num {
	font-family: var(--pm-font-heading);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--pm-color-primary);
	padding-top: 0.15rem;
}

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

.pm-why__copy p {
	margin: 0.35rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--pm-color-text-muted);
}

.pm-why__actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 1.75rem;
}

.pm-why__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-why__visual {
	min-width: 0;
}

.pm-why__figure {
	position: relative;
	margin: 0;
	overflow: hidden;
	background: var(--pm-color-surface-subtle);
	border: 1px solid var(--pm-color-border);
	border-radius: var(--pm-radius-md);
	box-shadow: var(--pm-shadow-md);
}

.pm-why__image,
.pm-why__placeholder,
.pm-why__placeholder-svg {
	display: block;
	width: 100%;
	height: auto;
}

.pm-why__image {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center;
}

.pm-why__placeholder {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--pm-color-surface-subtle);
}

.pm-why__placeholder-svg {
	height: 100%;
	object-fit: cover;
}

.pm-why--animate .pm-why__image,
.pm-why--animate .pm-why__placeholder-svg {
	transform: scale(1.035);
	transform-origin: center;
	transition: transform 0.9s var(--pm-ease);
}

.pm-why--animate.is-inview .pm-why__image,
.pm-why--animate.is-inview .pm-why__placeholder-svg {
	transform: scale(1);
}

.pm-why__overlay {
	position: absolute;
	left: 1rem;
	right: 1rem;
	bottom: 1rem;
	max-width: 18rem;
	margin: 0;
	padding: 1rem 1.1rem;
	background: color-mix(in srgb, var(--pm-color-surface) 96%, transparent);
	border-left: 3px solid var(--pm-color-primary);
	box-shadow: var(--pm-shadow-sm);
}

.pm-why__overlay-label {
	margin: 0;
	font-family: var(--pm-font-heading);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--pm-color-primary);
}

.pm-why__overlay-text {
	margin: 0.4rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--pm-color-text-muted);
}

.pm-why__content,
.pm-why__visual {
	opacity: 1;
}

.pm-why--animate .pm-why__content,
.pm-why--animate .pm-why__visual {
	opacity: 0;
	transform: translateY(16px);
}

.pm-why--animate.is-inview .pm-why__content,
.pm-why--animate.is-inview .pm-why__visual {
	animation: pm-why-reveal 0.6s ease forwards;
}

.pm-why--animate.is-inview .pm-why__visual {
	animation-delay: 90ms;
}

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

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

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

	.pm-why__overlay {
		left: 1.5rem;
		right: auto;
		bottom: 1.5rem;
	}

	.pm-why__actions {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

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

	.pm-why__layout {
		grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
		align-items: stretch;
		gap: 3.5rem;
	}

	.pm-why__figure,
	.pm-why__image,
	.pm-why__placeholder,
	.pm-why__placeholder-svg {
		height: 100%;
		min-height: 36rem;
	}

	.pm-why__image,
	.pm-why__placeholder {
		aspect-ratio: auto;
	}
}

@media (max-width: 639px) {
	.pm-why__actions .pm-button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pm-why__content,
	.pm-why__visual,
	.pm-why--animate .pm-why__content,
	.pm-why--animate .pm-why__visual,
	.pm-why--animate.is-inview .pm-why__content,
	.pm-why--animate.is-inview .pm-why__visual,
	.pm-why--animate .pm-why__image,
	.pm-why--animate .pm-why__placeholder-svg,
	.pm-why--animate.is-inview .pm-why__image,
	.pm-why--animate.is-inview .pm-why__placeholder-svg {
		opacity: 1;
		transform: none;
		animation: none;
		transition: none;
	}
}
