/*
 * Parts (version 3): cream page with one large "catalogue card":
 * graphite cover on the left (heading, intro, enquiry checklist, button),
 * white catalogue on the right (two equal parts groups and a hint).
 */

.mj-parts {
	position: relative;
	isolation: isolate;
	padding: clamp(4.5rem, 8vw, 7rem) 0;
	background: var(--mj-cream);
	color: var(--mj-graphite);
	scroll-margin-top: var(--mj-bar-h);

	/* Fade of the background drawing at the top and bottom edge */
	--mj-parts-fade: linear-gradient(to bottom, transparent 0, #000 6rem); /* no fade at the bottom: the sheet continues into the Process section */
}

/*
 * Background as in Services (same workshop language on the light sections):
 * millimetre paper (24 px cells, stronger line every 120 px), very faint.
 */
.mj-parts::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(22, 24, 29, 0.055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(22, 24, 29, 0.055) 1px, transparent 1px),
		linear-gradient(rgba(22, 24, 29, 0.028) 1px, transparent 1px),
		linear-gradient(90deg, rgba(22, 24, 29, 0.028) 1px, transparent 1px);
	background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
	background-position: center bottom; /* grid anchored at the bottom: lines continue into Process */
	-webkit-mask-image: var(--mj-parts-fade);
	mask-image: var(--mj-parts-fade);
	pointer-events: none;
}

/* Measuring scales in the side margins (wide screens only), as in Services */
.mj-parts::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	z-index: -1;
	display: none;
	width: calc(var(--mj-container) + 5rem);
	transform: translateX(-50%);
	background-image:
		linear-gradient(rgba(22, 24, 29, 0.32) 1px, transparent 1px),
		linear-gradient(rgba(22, 24, 29, 0.2) 1px, transparent 1px),
		linear-gradient(rgba(22, 24, 29, 0.32) 1px, transparent 1px),
		linear-gradient(rgba(22, 24, 29, 0.2) 1px, transparent 1px);
	background-size: 16px 40px, 8px 8px, 16px 40px, 8px 8px;
	background-position: left bottom, left bottom, right bottom, right bottom;
	background-repeat: repeat-y;
	-webkit-mask-image: var(--mj-parts-fade);
	mask-image: var(--mj-parts-fade);
	pointer-events: none;
}

@media (min-width: 1380px) {
	.mj-parts::after {
		display: block;
	}
}

.mj-parts__card {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
	background: #fff;
	box-shadow: 0 24px 48px -32px rgba(22, 24, 29, 0.35);
}

/* Cover (graphite) */
.mj-parts__cover {
	display: flex;
	flex-direction: column;
	padding: clamp(2.25rem, 4vw, 3.5rem);
	background: var(--mj-graphite);
	color: var(--mj-cream);

	--mj-btn-hover-bg: var(--mj-cream);
	--mj-btn-hover-fg: var(--mj-graphite);
}

.mj-parts__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.25rem;
	color: rgba(242, 240, 235, 0.8);
	font-size: 0.9375rem;
	font-weight: 500;
}

.mj-parts__eyebrow::before {
	content: '';
	flex: none;
	width: 2rem;
	height: 2px;
	background: var(--mj-orange);
}

.mj-parts__title {
	margin: 0 0 1.25rem;
	color: var(--mj-cream);
	font-size: clamp(2rem, 3.2vw, 2.75rem);
	letter-spacing: -0.015em;
}

/* Accent words stay together, orange bar under the text */
.mj-parts__accent {
	display: inline-block;
	background: linear-gradient(var(--mj-orange), var(--mj-orange)) 0 100% / 100% 0.12em no-repeat;
}

.mj-parts__intro {
	margin: 0 0 2rem;
	color: rgba(242, 240, 235, 0.74);
	font-size: 0.9375rem;
	line-height: 1.65;
}

.mj-parts__check {
	margin-bottom: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(242, 240, 235, 0.16);
}

.mj-parts__check-title {
	margin: 0 0 0.875rem;
	color: rgba(242, 240, 235, 0.58);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.mj-parts__check-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.625rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mj-parts__check-list li {
	position: relative;
	padding-left: 1.125rem;
	font-size: 0.9375rem;
	font-weight: 500;
}

.mj-parts__check-list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mj-orange);
}

.mj-parts__cta {
	align-self: flex-start;
	margin-top: auto;
}

/* Catalogue (white) */
.mj-parts__catalog {
	display: flex;
	flex-direction: column;
	/* Same bottom padding as the cover, so the hint ends on the line of the button */
	padding: clamp(2.25rem, 4vw, 3.5rem);
}

/* Groups fill the card height: rows share the space evenly, no empty area under the lists */
.mj-parts__groups {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 clamp(2rem, 4vw, 3.5rem);
}

.mj-parts__group {
	display: flex;
	flex-direction: column;
}

.mj-parts__group .mj-parts__list {
	flex: 1;
	display: grid;
	grid-auto-rows: 1fr;
}

/* Lists of different length (set by the widget): same rows in every list, lines stay aligned */
.mj-parts__groups[style] .mj-parts__list {
	grid-template-rows: repeat(var(--mj-parts-rows), 1fr);
}

/* No catalogue groups: the cover takes the whole card */
.mj-parts__card--solo {
	grid-template-columns: minmax(0, 1fr);
}

.mj-parts__group .mj-parts__list li {
	display: flex;
	align-items: center;
}

.mj-parts__group .mj-parts__list li::before {
	top: 50%;
	margin-top: -3px;
}

.mj-parts__group-title {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	margin: 0;
	padding-bottom: 1rem;
	border-bottom: 3px solid var(--mj-graphite);
	font-size: 1.375rem;
}

/* Short orange bar before the group title */
.mj-parts__group-title::before {
	content: '';
	flex: none;
	width: 1.25rem;
	height: 3px;
	background: var(--mj-orange);
}

.mj-parts__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mj-parts__list li {
	position: relative;
	padding: 0.8125rem 0 0.8125rem 1.125rem;
	border-bottom: 1px solid rgba(22, 24, 29, 0.1);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.45;
}

.mj-parts__list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: calc(0.8125rem + 0.5em);
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mj-orange);
}

.mj-parts__hint {
	margin: auto 0 0;
	padding-top: 1.5rem;
	color: rgba(22, 24, 29, 0.6);
	font-size: 0.875rem;
	line-height: 1.5;
}

/* Narrow cover (three-column desktop up to 1180 px, small phones): checklist in one column, every item on one line */
@media (min-width: 961px) and (max-width: 1180px), (max-width: 440px) {
	.mj-parts__check-list {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 960px) {
	.mj-parts__card {
		grid-template-columns: minmax(0, 1fr);
	}

	.mj-parts__cta {
		margin-top: 0;
	}
}

@media (max-width: 600px) {
	.mj-parts__groups {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 2rem;
	}

	.mj-parts__cta {
		align-self: stretch;
	}
}
