/**
 * Case study template (.raph-case--study).
 * 50/50 header like DeLibra; Link stays in the right column,
 * aligned to the Roles row (not the title).
 */

.raph-case--study .raph-case__header-inner {
	max-width: none;
	width: 100%;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: start;
	column-gap: 0;
}

.raph-case--study .raph-case__header-copy,
.raph-case--study .raph-case__header-aside {
	min-width: 0;
}

.raph-case--study .raph-case__header-aside {
	align-self: end;
	justify-self: end;
	box-sizing: border-box;
	text-align: right;
}

.raph-case--study .raph-case__roles,
.raph-case--study .raph-case__product {
	margin: 12px 0 0;
	font-size: 16px;
	line-height: 24px;
	color: #808080;
}

.raph-case--study .raph-case__header-aside .raph-case__product {
	margin: 0;
}

.raph-case--study .raph-case__meta-label {
	color: #808080;
}

.raph-case--study .raph-case__product-link {
	color: var(--raph-ink);
	text-decoration: none;
}

.raph-case--study .raph-case__product-link:hover,
.raph-case--study .raph-case__product-link:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.raph-case--study .raph-case__product--foot {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
	color: #808080;
}

@media (min-width: 768px) {
	.raph-case--study .raph-case__text {
		margin-left: auto;
		margin-right: auto;
		align-self: center;
	}
}

/* Enrichment UI shot stays in the text column (800px), not full-bleed. */
.raph-case--study .raph-case__figure:has(img[src*="casestudy-irm-enrichment"]) {
	max-width: 800px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	align-self: center;
}

/* Image → caption: 16px (body gap is 32 / 24 on mobile). */
.raph-case--study .raph-case__figure + .raph-case__text:has(.o11y__caption),
.raph-case--study .raph-case__figure + .raph-case__text:has(.gw-bp__caption),
.raph-case--study .raph-case__figure + .raph-case__text:has(.am-notes__caption) {
	margin-top: -16px;
}

@media (max-width: 767px) {
	.raph-case--study .raph-case__figure + .raph-case__text:has(.o11y__caption),
	.raph-case--study .raph-case__figure + .raph-case__text:has(.gw-bp__caption),
	.raph-case--study .raph-case__figure + .raph-case__text:has(.am-notes__caption) {
		margin-top: -8px;
	}
}

@media (max-width: 767px) {
	.raph-case--study .raph-case__header-inner {
		grid-template-columns: 1fr;
		align-items: start;
		row-gap: 12px;
	}

	.raph-case--study .raph-case__header-aside {
		justify-self: start;
		padding-left: 0;
		text-align: left;
	}
}
