/**
 * Layout: Text + Image (left / right).
 *
 * Two columns from 1024px; image shapes: rounded, bleed (square on the outer
 * side, runs to the page edge) and circle (large round top corner).
 *
 * @package GagaMuller
 */

.gm-textimg {
	overflow-x: clip;
}

.gm-textimg__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--gm-space-40);
	align-items: center;
}

.gm-textimg__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--gm-space-20);
}

.gm-textimg__title {
	margin: var(--gm-space-12) 0 0;
	color: var(--gm-text);
}

.gm-textimg__intro {
	max-width: 30rem;
	margin: 0;
	color: var(--gm-text-secondary);
	font-size: var(--gm-text-intro);
	line-height: var(--gm-leading-intro);
}

.gm-textimg__body {
	display: grid;
	gap: var(--gm-space-14);
	max-width: 33rem;
	color: var(--gm-text-secondary);
	font-size: var(--gm-text-body-lg);
	line-height: 1.55;
}

.gm-textimg__body p {
	margin: 0;
}

.gm-surface--inverse .gm-textimg__body {
	color: var(--gm-color-on-dark-strong);
}

.gm-textimg__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gm-space-12);
	margin: var(--gm-space-8) 0 0;
}

/* ---- Media ----------------------------------------------------------- */

.gm-textimg__media {
	position: relative;
	aspect-ratio: 4 / 3.4;
	overflow: hidden;
	border-radius: var(--gm-radius-feature);
	background: var(--gm-color-surface-muted);
}

.gm-textimg__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 900ms var(--gm-ease), filter 900ms var(--gm-ease);
}

/* Purple wash that is always there on "circle", and on hover otherwise. */
.gm-textimg__media::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgb(114 21 244 / 0) 50%, rgb(114 21 244 / 0.55) 100%);
	content: "";
	pointer-events: none;
}

/* "circle" = half pill running to the page edge (same family as the Full
 * Width CTA "Open roles" photo): fully round on the inner side, square on
 * the outer side. Phones keep the standard rounded card. */
@media (min-width: 1024px) {
	.gm-textimg--circle .gm-textimg__media {
		height: clamp(24rem, 36vw, 34rem);
	}

	.gm-textimg--circle.gm-textimg--right .gm-textimg__media {
		margin-inline-end: calc(-1 * max(var(--gm-gutter), (100vw - var(--gm-container)) / 2));
		border-radius: 999px 0 0 999px;
	}

	.gm-textimg--circle.gm-textimg--left .gm-textimg__media {
		margin-inline-start: calc(-1 * max(var(--gm-gutter), (100vw - var(--gm-container)) / 2));
		border-radius: 0 999px 999px 0;
	}
}

@media (hover: hover) {
	.gm-textimg__media:hover .gm-textimg__image {
		filter: saturate(1.1) brightness(1.05);
		transform: scale(1.04);
	}
}

@media (min-width: 1024px) {
	.gm-textimg__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: clamp(2.5rem, 6vw, 5.5rem);
	}

	.gm-textimg--left .gm-textimg__media {
		order: -1;
	}

	.gm-textimg__media {
		aspect-ratio: auto;
		height: clamp(22rem, 33vw, 31rem);
	}

	.gm-textimg--bleed.gm-textimg--right .gm-textimg__media {
		margin-inline-end: calc(-1 * max(var(--gm-gutter), (100vw - var(--gm-container)) / 2));
		border-radius: var(--gm-radius-feature) 0 0 var(--gm-radius-feature);
	}

	.gm-textimg--bleed.gm-textimg--left .gm-textimg__media {
		margin-inline-start: calc(-1 * max(var(--gm-gutter), (100vw - var(--gm-container)) / 2));
		border-radius: 0 var(--gm-radius-feature) var(--gm-radius-feature) 0;
	}
}

/* ---- Points ---------------------------------------------------------- */

.gm-points {
	display: grid;
	gap: var(--gm-space-16);
	width: 100%;
	max-width: 33rem;
	margin: var(--gm-space-8) 0 0;
	padding: 0;
	list-style: none;
}

.gm-points__item {
	display: grid;
	gap: var(--gm-space-4);
}

.gm-points__title {
	font-family: var(--gm-font-heading);
	font-weight: var(--gm-weight-bold);
}

.gm-points__text {
	color: var(--gm-text-secondary);
	font-size: var(--gm-text-body);
	line-height: var(--gm-leading-body);
}

/* labelled: purple title + rule on the left. */
.gm-points--labelled .gm-points__item {
	padding-left: var(--gm-space-16);
	border-left: 3px solid var(--gm-accent);
}

.gm-points--labelled .gm-points__title {
	color: var(--gm-accent);
	font-size: var(--gm-text-body-lg);
}

/* tagged: dark pill label, statement below. */
.gm-points--tagged {
	gap: var(--gm-space-24);
}

.gm-points--tagged .gm-points__title {
	justify-self: start;
	padding: 4px 12px;
	border-radius: var(--gm-radius-pill);
	background: var(--gm-color-black);
	color: var(--gm-color-white);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.gm-surface--inverse .gm-points--tagged .gm-points__title {
	background: var(--gm-color-white);
	color: var(--gm-color-black);
}

.gm-points--tagged .gm-points__text {
	color: var(--gm-text);
	font-family: var(--gm-font-heading);
	font-size: var(--gm-text-lead);
	font-weight: var(--gm-weight-bold);
	line-height: 1.1;
}

.gm-points--tagged .gm-points__item:first-child .gm-points__text {
	color: var(--gm-highlight);
}

/* numbered: 01 / 02 / 03 beside the text. */
.gm-points--numbered {
	gap: var(--gm-space-12);
}

.gm-points--numbered .gm-points__item {
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: var(--gm-space-14);
}

.gm-points--numbered .gm-points__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	border-radius: var(--gm-radius-pill);
	background: var(--gm-color-surface-muted);
	color: var(--gm-accent);
	font-size: 0.75rem;
	font-weight: var(--gm-weight-bold);
}

.gm-points--numbered .gm-points__title {
	font-weight: var(--gm-weight-regular);
	font-family: var(--gm-font-body);
	font-size: var(--gm-text-body);
}

.gm-points--numbered .gm-points__text {
	grid-column: 2;
}

@media (prefers-reduced-motion: reduce) {
	.gm-textimg__image {
		transition: none;
	}

	.gm-textimg__media:hover .gm-textimg__image {
		transform: none;
	}
}
