/*
 * pm-team — the About page's team section (WO-37).
 *
 * Source frame: docs/design/frames/37-about.json, node 90:4035 — a
 * Volcanic Ink row, gap 96, padding 96 block / 96 left / 0 right, items
 * centred vertically: the text column left (flex 1), the portrait right
 * (flex 1, 600 high, cover).
 *
 * Compiled to assets/css/components/team.css by src/build-tokens.mjs,
 * which substitutes the breakpoint markers (a comment holding `@bp <name>`)
 * with the pixel value from tokens/tokens.json. Never type a breakpoint
 * width here.
 *
 * Every colour, font family, weight, size, leading and tracking is a
 * --pm-* token. No hex value and no literal breakpoint width may appear in
 * this file. Values the token file does not hold (the 600px portrait
 * height, the 40px CTA gap, the 4/3 stacked ratio) are typed with a
 * comment citing the extract key — the same technique as the section
 * header's 702px title width.
 *
 * Mobile-first (MISTAKES.md §C7 — only the navigation is designed for
 * mobile): the base layout is the stacked one — image first, ratio 4/3,
 * per the work order's own below-laptop clause — and the row is the
 * min-width: laptop branch.
 */

/*
 * The section: a full-bleed band on Volcanic Ink (the intro's full-bleed
 * technique — the scaffold body constrains content to a centred 72rem
 * column). Base (below laptop): stacked, the portrait first, padding 64
 * block / 24 sides (the work order's below-laptop clause — 64 is
 * --pm-space-16, 24 is --pm-space-6), gap 32 — the text column's own
 * stack step.
 */
.pm-team {
	box-sizing: border-box;
	width: 100vw;
	margin-inline: calc(50% - 50vw);
	display: flex;
	flex-direction: column;
	gap: var(--pm-space-8);
	padding: var(--pm-space-16) var(--pm-space-6);
	background-color: var(--pm-color-ink);
}

/*
 * The portrait slot: surface-alt behind a slow-loading photo so the slot
 * never collapses invisibly (the GalleryCard's empty state, WO-12 AC 1).
 * Below laptop it leads the stack (order: -1 — "image first") and owns
 * its shape: the work order's 4/3 ratio, typed here like the gallery
 * grid's ratios.
 */
.pm-team__media {
	order: -1;
	box-sizing: border-box;
	min-width: 0;
	aspect-ratio: 4 / 3;
	background-color: var(--pm-color-surface-alt);
	overflow: hidden;
}

/*
 * The photo covers its slot (37-about.json#team.right.image — "cover").
 *
 * Two-class selector on purpose (MISTAKES.md §C15): Elementor's own
 * `.elementor img { height: auto; max-width: 100% }` is (0,1,1) and would
 * beat a lone `.pm-team__image` (0,1,0) — the portrait would render at
 * natural size. This selector is (0,2,1).
 */
.pm-team img.pm-team__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/*
 * The text column: its content stacked 32px apart (--pm-space-8).
 * min-width: 0 so a long Dutch heading wraps instead of stretching the
 * column (MISTAKES.md §E4).
 */
.pm-team__content {
	box-sizing: border-box;
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--pm-space-8);
}

/*
 * The H2 (37-about.json#team.left.heading): Roboto ExtraLight 40 / 1 / -2
 * — the WO-28 H2 tokens — in White (the on-accent role; B5: dark sections
 * use the same named tokens as light ones).
 */
.pm-team__heading {
	margin: 0;
	font-family: var(--pm-font-family-base);
	font-size: var(--pm-font-size-h2);
	font-weight: var(--pm-font-weight-200);
	line-height: var(--pm-leading-tight);
	letter-spacing: var(--pm-tracking-h2);
	color: var(--pm-color-on-accent);
	/* A long Dutch heading wraps rather than overflowing (MISTAKES.md §E4). */
	overflow-wrap: break-word;
}

/*
 * The team text (37-about.json#team.left.paragraphs): Body Roboto Light
 * 16 / 1.6 in Blush Linen — the surface role (B5). Paragraphs preserved:
 * the WYSIWYG's <p>s render as a stack, separated by one small token step
 * (the section-header body's pattern).
 */
.pm-team__text {
	font-family: var(--pm-font-family-base);
	font-size: 1rem;
	font-weight: var(--pm-font-weight-300);
	line-height: var(--pm-leading-body);
	color: var(--pm-color-surface);
}

.pm-team__text p {
	margin: 0;
}

.pm-team__text p + p {
	margin-top: var(--pm-space-4);
}

/*
 * The CTA row: two pm-buttons 40px apart (37-about.json#team.left.ctas —
 * "row gap 40"; no space token holds 40px, the product-intro.css
 * precedent). Wraps below the point where the two buttons plus the gap no
 * longer fit — the 375px judgement, since only the navigation is designed
 * for mobile (MISTAKES.md §C7); Dutch and French labels run 20–30% longer
 * (MISTAKES.md §E4).
 */
.pm-team__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
}

/*
 * ≥ laptop (37-about.json#team.layout): the row — gap 96 (--pm-space-24),
 * padding 96 block / 96 left / 0 right (the portrait touches the frame's
 * right edge), the two columns flex 1 and centred vertically ("items
 * centred vertically"), the portrait fixed at its measured 600px height.
 */
@media (min-width: 1024px) {
	.pm-team {
		flex-direction: row;
		align-items: center;
		gap: var(--pm-space-24);
		padding: var(--pm-space-24) 0 var(--pm-space-24) var(--pm-space-24);
	}

	.pm-team__media {
		order: 0;
		flex: 1 1 0;
		aspect-ratio: auto;
		height: 600px;
	}
}
