/**
 * IMS Category Hero
 *
 * Desktop: two-column grid — copy left (~62%),
 * circular image + right-aligned CTA right (~38%).
 * Tablet/mobile: single column — headline, body, image, CTA.
 */

.ims-category-hero {
	--ims-ch-accent: #f9b115;
	--ims-ch-highlight: #fce49c;
	--ims-ch-text: #000000;
	--ims-ch-muted: #333333;

	width: 100%;
	box-sizing: border-box;
	padding-block: clamp( 24px, 4vw, 48px );
	padding-inline: clamp( 16px, 3vw, 40px );
	background: #ffffff;
	color: var( --ims-ch-text );
}

.ims-category-hero *,
.ims-category-hero *::before,
.ims-category-hero *::after {
	box-sizing: border-box;
}

/* Main grid */
.ims-category-hero__grid {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) minmax( 220px, 36% );
	align-items: start;
	column-gap: clamp( 32px, 6vw, 80px );
	row-gap: 28px;
}

.ims-category-hero__copy {
	min-width: 0;
	max-width: 54rem;
}

/* Headline */
.ims-category-hero__title {
	margin: 0 0 clamp( 18px, 2.5vw, 28px );
	font-size: clamp( 28px, 3.9vw, 52px );
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var( --ims-ch-text );
}

.ims-category-hero__title-line {
	display: block;
}

.ims-category-hero__mark {
	background: var( --ims-ch-highlight );
	color: var( --ims-ch-text );
	font-weight: inherit;
	padding: 0.04em 0.08em 0.06em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/* Body */
.ims-category-hero__body {
	margin: 0;
	font-size: clamp( 14px, 1.05vw, 16px );
	line-height: 1.55;
	font-weight: 400;
	color: var( --ims-ch-muted );
	max-width: 52ch;
}

.ims-category-hero__body p {
	margin: 0 0 0.75em;
}

.ims-category-hero__body p:last-child {
	margin-bottom: 0;
}

/* Aside: circle + CTA */
.ims-category-hero__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: clamp( 16px, 2vw, 28px );
	min-width: 0;
	justify-self: end;
	width: 100%;
	max-width: 380px;
}

.ims-category-hero__figure {
	margin: 0;
	padding: 0;
	width: min( 100%, 340px );
	aspect-ratio: 1;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid var( --ims-ch-accent );
	box-shadow: 0 18px 40px rgba( 0, 0, 0, 0.09 ), 0 6px 14px rgba( 0, 0, 0, 0.06 );
	flex-shrink: 0;
}

.ims-category-hero__figure--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 16px;
	font-size: 13px;
	font-weight: 600;
	color: #9ca3af;
	background: #f9fafb;
	border: 2px dashed #e5e7eb;
	box-shadow: none;
}

.ims-category-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* CTA */
.ims-category-hero__cta {
	margin: 0;
	width: 100%;
	text-align: right;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.01em;
}

.ims-category-hero__cta-link {
	display: inline;
	text-decoration: none;
	color: var( --ims-ch-text );
	border-bottom: 2px solid var( --ims-ch-accent );
	padding-bottom: 2px;
	transition: opacity 0.15s ease;
}

.ims-category-hero__cta-link:hover,
.ims-category-hero__cta-link:focus-visible {
	opacity: 0.82;
}

.ims-category-hero__cta-link:focus-visible {
	outline: 2px solid var( --ims-ch-accent );
	outline-offset: 4px;
}

.ims-category-hero__cta-link--text {
	border-bottom: 2px solid var( --ims-ch-accent );
	padding-bottom: 2px;
}

/* Tablet */
@media ( max-width: 900px ) {
	.ims-category-hero__grid {
		grid-template-columns: minmax( 0, 1fr ) minmax( 180px, 42% );
		column-gap: clamp( 24px, 4vw, 40px );
	}

	.ims-category-hero__figure {
		width: min( 100%, 280px );
	}

	.ims-category-hero__aside {
		max-width: 320px;
	}
}

/* Mobile stack */
@media ( max-width: 640px ) {
	.ims-category-hero__grid {
		grid-template-columns: 1fr;
	}

	.ims-category-hero__aside {
		align-items: center;
		justify-self: center;
		max-width: none;
		order: 1;
	}

	.ims-category-hero__copy {
		order: 0;
	}

	.ims-category-hero__cta {
		text-align: center;
	}

	.ims-category-hero__figure {
		width: min( 100%, 260px );
	}
}

/* Editor */
.ims-category-hero--editor .ims-category-hero__title,
.ims-category-hero--editor .ims-category-hero__body,
.ims-category-hero--editor .ims-category-hero__cta {
	cursor: text;
}
