/**
 * Image & Content section.
 *
 * Figma node 802:519 — About ACT Alloy Canopy Toolbox.
 * Mobile-first: image stacks above the copy. Desktop split at 64rem.
 * image_position left flips column order at desktop.
 *
 * Shell matches siblings via --content-shell; desktop cols track Figma
 * 608 / 565 ratio and grow with --layout-scale on ≥1800px.
 */

.image-content {
	/* Figma 608:565 text:media — keep ratio while filling --content-shell. */
	--image-content-gap: calc(4.4375rem * var(--layout-scale, 1)); /* 71px */

	width: var(--content-shell);
	margin-inline: auto;
	padding-block: var(--section-pad-block);
	padding-inline: 0;
	background: var(--color-bg);
	box-sizing: border-box;
}

.image-content__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-xl);
	width: 100%;
	min-width: 0;
}

.image-content__heading {
	margin: 0;
	width: 100%;
	max-width: var(--copy-max-lg);
	color: var(--color-neutral-950);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: var(--font-weight-bold);
	line-height: 0.9;
}

.image-content__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-xl);
	align-items: start;
	width: 100%;
	min-width: 0;
}

.image-content__text,
.image-content__figure {
	min-width: 0;
	width: 100%;
}

.image-content__text {
	color: var(--color-neutral-950);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
}

.image-content__text > :first-child {
	margin-top: 0;
}

.image-content__text > :last-child {
	margin-bottom: 0;
}

.image-content__text p {
	margin: 0 0 1em;
}

.image-content__text p:last-child {
	margin-bottom: 0;
}

.image-content__figure {
	margin: 0;
	border-radius: 1.5rem;
	overflow: hidden;
	order: -1;
	aspect-ratio: 565 / 377;
	background: var(--color-neutral-100, #f0f0f0);
}

.image-content__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

@media (min-width: 64rem) {
	.image-content__inner {
		gap: calc(3rem * var(--layout-scale, 1));
	}

	/* Figma 608:565 text:media — fills --content-shell on all desktop widths. */
	.image-content__body {
		grid-template-columns: minmax(0, 38fr) minmax(0, 35.3125fr);
		gap: var(--image-content-gap);
		align-items: center;
	}

	.image-content__figure {
		order: 0;
		border-radius: 2.9375rem;
	}

	.image-content--image-left .image-content__body {
		grid-template-columns: minmax(0, 35.3125fr) minmax(0, 38fr);
	}

	.image-content--image-left .image-content__figure {
		order: -1;
	}

	.image-content--image-left .image-content__text {
		order: 0;
	}
}

@media (max-width: 40rem) {
	.image-content__inner {
		gap: var(--space-lg);
	}

	.image-content__heading {
		max-width: none;
	}

	.image-content__figure {
		border-radius: 1rem;
	}
}
