/*
 * What we do (prototype index.html "what-we-do", cmc.css §8d + §8e2). Pattern cmc/what-we-do:
 *   backing (white) > section (white, py 40) > .what-we-do__grid: eyebrow | .what-we-do__body
 *     .what-we-do__body: the type-on statement (text-3, line height 1.2, max 960) + .what-we-do__plate
 *     .what-we-do__plate: core/video style "Loop" (860 max, 599:337, rounded) + the "Play video" button, which
 *     overhangs the clip's right edge from 1024px (plate 929 = 860 + 69). The plate grows from 599/860 to full size
 *     as it scrolls in (scroll-driven animation, no JS; reduced motion and older browsers: full size).
 */
.what-we-do__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 30px;
}

@media (width >= 1024px) {
	.what-we-do__grid {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 100px;
	}
}

.what-we-do__grid > .is-style-eyebrow-rule {
	align-self: start;
}

.what-we-do__body {
	display: flex;
	flex-direction: column;
	gap: 30px;
	min-width: 0;
}

.what-we-do__body > .is-style-type-on {
	max-width: 960px;
}

.what-we-do__plate {
	position: relative;
	max-width: 929px;
	transform-origin: left center;
}

.what-we-do__plate .wp-block-video {
	max-width: 860px;
	margin: 0;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--card);
}

.what-we-do__plate .wp-block-video video {
	display: block;
	width: 100%;
	aspect-ratio: 599 / 337;
	object-fit: cover;
}

.what-we-do__plate > .what-we-do__play {
	margin-top: 16px;
}

@media (width >= 1024px) {
	.what-we-do__plate > .what-we-do__play {
		position: absolute;
		right: 0;
		bottom: 30px;
		margin-top: 0;
	}
}

@keyframes cmc-plate-grow {
	from { transform: scale(0.6965); }
	to   { transform: scale(1); }
}

@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.section-what-we-do .what-we-do__plate {
			animation: cmc-plate-grow linear both;
			animation-timeline: view();
			animation-range: entry 15% cover 40%;
		}
	}
}

/* the editor shows the plate at its finished size */
.editor-styles-wrapper .what-we-do__plate {
	animation: none !important;
}
