/*
 * Section 10 — "Strategy first. Then the campaign."
 *
 * The one section on the page whose height is a viewport height at desktop and a plain number on the
 * phone, so it is written that way rather than averaged into one rule.
 *
 * Two things here are the design's own and are reproduced rather than corrected, both noted for the
 * designer:
 *
 * - The phone band is 981 tall while its content is 729. The remaining 252 is empty space above and
 *   below, which reads as a frame someone dragged taller rather than as a decision. Measured at two
 *   window heights to be sure it is not a viewport unit: 981 at both.
 * - The button is 357 wide in a 350 column on the phone, so its right edge is clipped by 7 pixels.
 *   The design clips it too — its phone section sets overflow: hidden, which is why this one does.
 */

.as-strategy {
	display: flex;
	flex-direction: column;
	gap: 32px;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 124px 32px;
	background: var(--as-cream);
	overflow: hidden;
}

.as-strategy__inner {
	display: flex;
	flex-direction: row;
	gap: 16px;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: var(--as-container-narrow);
}

/*
 * Both halves take an equal share of the row: 547 each of 1110 once the 16 gap is taken out, which is
 * the design's number at both desktop widths.
 */
.as-strategy__copy {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 32px;
	align-items: flex-start;
	justify-content: center;
}

.as-strategy__title {
	color: var(--as-ink);
	font-size: 36px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
}

.as-strategy__cta {
	/* Not a padded label: the design fixes this one at 357, three times the width of its text. */
	width: 357px;
	height: 48px;
	background: var(--as-ink);
}

.as-strategy__figure {
	flex: 1 1 0;
	/*
	 * The box's own ratio, not the photograph's. The file is 1448x936 and the design draws it in a
	 * box of 1.21039 at all three layouts, so the image covers and the box decides the shape.
	 */
	aspect-ratio: 1.21039;
	overflow: hidden;
}

.as-strategy__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Below the design's 1200 the two halves stack, and the band stops following the window: at 810 its
 * height is exactly its content plus its padding, 124 + 920 + 124.
 */
@media (max-width: 1199px) {
	.as-strategy {
		min-height: 0;
	}

	.as-strategy__inner {
		flex-direction: column;
		align-items: center;
		/*
		 * The gap doubles when the column stacks, which is easy to miss because the design keeps 16
		 * for the side-by-side layout. At 16 the band came out 1152 instead of 1168 and 553 instead
		 * of 569 — the same 16px short at both widths, which is what pointed at the gap rather than
		 * at anything inside the two children.
		 */
		gap: 32px;
	}

	.as-strategy__copy,
	.as-strategy__figure {
		flex: 0 0 auto;
		width: 100%;
	}

	.as-strategy__title {
		font-size: 32px;
	}
}

@media (max-width: 809px) {
	.as-strategy {
		/* The design's own number, and larger than its content needs — see the note at the top. */
		min-height: 981px;
		gap: 60px;
		padding: 80px 20px;
	}

	.as-strategy__title {
		font-size: 20px;
	}
}
