/* MCM Stack Cards – pinned section, cards stack over each other on scroll */

.mcm-sc {
	--mcm-top: 150px;      /* space above the active card (header + stacked edges) */
	--mcm-bottom: 24px;    /* space below the active card */
	--mcm-stagger: 40px;   /* visible edge of each stacked card */
	--mcm-scroll: 100vh;   /* scroll distance per card */
	--mcm-hold: 30vh;      /* extra pinned scroll after the last card */
	--mcm-gap: 24px;       /* gap when not pinned */
	--mcm-height: 480px;   /* card height when not pinned */
	--mcm-radius: 24px;
	--mcm-count: 1;

	position: relative;
}

/* ---------- Default (not pinned / no JS): simple list ---------- */
.mcm-sc__stage {
	display: flex;
	flex-direction: column;
	gap: var(--mcm-gap);
}

/* ---------- Pinned mode (added by JS) ---------- */
.mcm-sc.is-pinned {
	height: calc(100vh + (var(--mcm-count) - 1) * var(--mcm-scroll) + var(--mcm-hold));
	height: calc(100svh + (var(--mcm-count) - 1) * var(--mcm-scroll) + var(--mcm-hold));
}

.mcm-sc.is-pinned .mcm-sc__pin {
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
}

/* Fallback: script pins the section (sticky blocked by the page) */
.mcm-sc.is-pinned.is-jspin .mcm-sc__pin {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1;
}

.mcm-sc.is-pinned .mcm-sc__stage {
	position: absolute;
	top: var(--mcm-top);
	bottom: var(--mcm-bottom);
	left: 0;
	right: 0;
	display: block;
}

.mcm-sc.is-pinned .mcm-sc__item {
	position: absolute;
	inset: 0;
	transform-origin: 50% 0;
	will-change: transform;
}

.mcm-sc.is-pinned .mcm-sc__item + .mcm-sc__item {
	transform: translate3d(0, 110vh, 0); /* off-screen until JS positions it */
}

.mcm-sc.is-pinned .mcm-sc__card {
	height: 100%;
	min-height: 0;
}

/* ---------- Card ---------- */
.mcm-sc__card {
	--mcm-card-bg: #0b0d12;
	--mcm-card-text: #ffffff;

	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 32px;
	min-height: var(--mcm-height);
	padding: clamp(24px, 3.4vw, 64px);
	border-radius: var(--mcm-radius);
	background-color: var(--mcm-card-bg);
	color: var(--mcm-card-text);
	text-decoration: none;
	overflow: hidden;
}

a.mcm-sc__card:focus-visible {
	outline: 2px solid var(--mcm-card-text);
	outline-offset: 4px;
}

/* Title: two lines, second one muted */
.mcm-sc .mcm-sc__title {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	font-size: clamp(2.25rem, 5vw, 5.5rem);
	font-weight: 500;
	line-height: 1.04;
	letter-spacing: -0.03em;
	color: inherit;
}

.mcm-sc__title-muted {
	color: var(--mcm-card-muted, color-mix(in srgb, var(--mcm-card-text) 55%, transparent));
}

/* Bottom block */
.mcm-sc__bottom {
	display: flex;
	flex-direction: column;
	gap: clamp(16px, 2vw, 32px);
}

/* Tags as pills */
.mcm-sc .mcm-sc__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcm-sc .mcm-sc__tag {
	margin: 0;
	padding: 0.55em 1.4em;
	border-radius: 999px;
	font-size: clamp(12px, 0.9vw, 16px);
	font-weight: 400;
	line-height: 1.2;
	white-space: nowrap;
	color: var(--mcm-tag-text, var(--mcm-card-text));
	background: var(--mcm-tag-bg, color-mix(in srgb, var(--mcm-card-text) 7%, transparent));
}

/* Description */
.mcm-sc .mcm-sc__desc {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	max-width: 62ch;
	margin: 0;
	font-size: clamp(14px, 1.3vw, 24px);
	line-height: 1.4;
	color: inherit;
}

.mcm-sc__icon {
	flex: 0 0 auto;
	width: 1.3em;
	height: 1.3em;
	margin-top: 0.05em;
}

@media (max-width: 767px) {
	.mcm-sc .mcm-sc__tags {
		gap: 6px;
	}
}
