/*
 * Section 9 — "The View".
 *
 * Nothing here is responsive type: the design sets the kicker at 14/18.9 and the cards at 18/24.75 at
 * all four widths. What changes with the window is how much room the three cards have, and that is
 * where this section needs one deliberate departure from the design.
 *
 * The departure: the design's cards are a third of the row each, so they are 411 wide at 1440 and 363
 * at 1200 — and 233 at 810 and 93 at 390, while the text boxes inside them stay pinned at 352. Below
 * 1200 the three cards' words therefore print on top of each other, which is a fault rather than a
 * decision. The evidence is on the same page: "News & Insight" draws the same card component and
 * there the cards hold 352 and the row scrolls instead.
 *
 * So `flex: 1 0 352px` does both. Above 1200 there is room for three 352s plus the gaps, so they grow
 * to the design's 411 and 363 exactly; below it they stop at their natural width and the row scrolls,
 * which is what its `overflow: auto` was always for. Raised with the designer.
 */

.as-view {
	display: flex;
	flex-direction: column;
	gap: 26px;
	align-items: center;
	padding: 80px 32px;
	background: var(--as-navy-deep);
}

.as-view__masthead {
	display: flex;
	flex-direction: column;
	gap: 21px;
	align-items: center;
	width: 100%;
	max-width: var(--as-container);
}

/* 207 wide at every width, which is smaller than the header's copy of the same file. */
.as-view__logo {
	display: block;
	width: 207px;
	height: auto;
	aspect-ratio: 2002 / 256;
}

/*
 * The intrinsic ratio of the file, which reproduces the design's height at all four widths: 350 at
 * 1280 wide, 311 at 1136, 204 at 746 and 89 at 326.
 */
.as-view__wordmark {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2536 / 694;
}

.as-view__kicker {
	width: 100%;
	max-width: var(--as-container);
	color: var(--as-white);
	font-size: 14px;
	font-weight: 400;
	line-height: var(--as-lh-body);
	letter-spacing: 0.2em;
	text-align: center;
	text-transform: uppercase;
}

/*
 * 8 above and 16 below are the design's, and they are not symmetry gone wrong: the row scrolls, and
 * the extra below is the room a scrollbar needs without it covering the cards.
 */
.as-view__row {
	display: flex;
	flex-direction: row;
	gap: 24px;
	align-items: flex-start;
	width: 100%;
	max-width: var(--as-container);
	padding: 8px 0 16px;
	overflow-x: auto;
}

.as-view__row .as-article {
	flex: 1 0 352px;
}

.as-view__cta {
	width: 200px;
	height: 48px;
}

/*
 * The phone stacks the three cards 65 apart instead of scrolling them, each the full column wide,
 * and gives the button the full column too — the one place its width is not 200.
 */
@media (max-width: 809px) {
	.as-view__row {
		flex-direction: column;
		gap: 65px;
		overflow-x: visible;
	}

	/*
	 * 417, though the card's contents run to 433: the design fixes the box and lets "Read article"
	 * hang 16px into the gap below it. Letting the box grow would push every card after it 16 down.
	 */
	.as-view__row .as-article {
		flex: 0 0 auto;
		width: 100%;
		height: 417px;
	}

	.as-view__cta {
		width: 100%;
	}
}
