/*
 * The article card, drawn twice on this page: on the navy "The View" band and on the off-white
 * "News & Insight" band.
 *
 * It sits here with button.css rather than in either section's sheet for the same reason the button
 * does — two sections need it, and neither should have to depend on the other to get it.
 *
 * Every number below is identical at 1440, 1200, 810 and 390. The design has no responsive type in
 * this component at all: 18/24.75 titles and 16/20.75 excerpts at every width. What changes between
 * the two bands is only colour, and what changes between widths is only how many cards fit.
 */

.as-article {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/*
 * 224 at every width, so the three photographs line up across a row whatever the row is doing. The
 * image covers rather than contains: these are photographs, not logos.
 */
.as-article__figure {
	height: 224px;
	overflow: clip;
}

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

.as-article__meta {
	display: flex;
	flex-direction: row;
	gap: 12px;
	align-items: center;
	padding-top: 8px;
}

.as-article__tag {
	padding: 4px 8px;
	color: var(--as-navy-text);
	font-size: 11px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	background: var(--as-sand);
}

.as-article__date {
	font-size: 11px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.as-article__head {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/*
 * The words are 352 wide even when the card is not.
 *
 * Section 9 draws this card 411 wide at 1440 and 363 at 1200, and at both widths the design holds the
 * title and the excerpt at 352 and leaves the rest of the card empty to their right. The photograph
 * above them does fill the card, which is why the cap belongs on these two blocks and not on a
 * wrapper. In section 11 the card is exactly 352, so the cap costs nothing there and the two bands
 * keep sharing one component.
 */
.as-article__title,
.as-article__excerpt {
	max-width: 352px;
}

/*
 * Two lines for the title and three for the excerpt, clamped with an ellipsis — which is the design's
 * own behaviour, not a decision made here: its third card reads "Strategic Considerations for…" and
 * its first excerpt ends "Now a new era …".
 *
 * The min-height is what keeps a row of cards aligned. The design gives these boxes fixed heights of
 * 50 and 62, which are exactly two and three lines; stating them as lines rather than pixels means a
 * one-line title still reserves two lines' worth, so the "Read article" rows across a band stay level.
 */
.as-article__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	min-height: calc(2 * 1.375 * 18px);
	overflow: hidden;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.375;
	/*
	 * Stated in pixels, not em, because the design applies the same -0.36px to the 18px title and the
	 * 16px excerpt. As an em value that would be two different numbers.
	 */
	letter-spacing: -0.36px;
}

.as-article__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	min-height: calc(3 * 1.296875 * 16px);
	overflow: hidden;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.296875;
	letter-spacing: -0.36px;
}

.as-article__more {
	display: flex;
	flex-direction: row;
	gap: 8px;
	align-items: center;
	padding-top: 3.75px;
	color: var(--as-red-deep);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4286; /* 20 ÷ 14 */
	text-decoration: none;
}

/* The two tones. The tag keeps its sand background and navy text on both, which the design does too. */
.as-article--dark .as-article__title {
	color: var(--as-grey);
}

.as-article--dark .as-article__excerpt,
.as-article--dark .as-article__date {
	color: var(--as-white-50);
}

.as-article--light .as-article__title {
	color: var(--as-navy-text);
}

.as-article--light .as-article__excerpt {
	color: var(--as-ink-50);
}

.as-article--light .as-article__date {
	color: var(--as-slate);
}
