/*
 * Article card (components/article-card/): picture (or the brand's scene),
 * category · date · reading time, title, short excerpt. The whole card is
 * one link (stretched from the title); the focus ring is on the card.
 * No translate on hover: translate belongs to the appear-on-scroll reveal.
 */

.gb-article-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
	gap: var(--gb-space-l) var(--gb-space-m);
	margin: 0;
	padding: 0;
	list-style: none;
}

.gb-article-cards > li {
	display: grid;
}

.gb-article-card {
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr;
	overflow: hidden;
	border: 1px solid var(--gb-border);
	border-radius: var(--gb-radius-l);
	background-color: var(--gb-bg);
	color: var(--gb-text);
	transition: border-color var(--gb-duration-base) linear, box-shadow var(--gb-duration-base) var(--gb-ease-out);
}

.gb-article-card:hover {
	border-color: var(--gb-color-turquoise-a60);
	box-shadow: 0 1.75rem 3rem -2.25rem rgb(12 35 66 / 0.5);
}

.gb-article-card:has(.gb-article-card__link:focus-visible) {
	outline: 3px solid var(--gb-focus);
	outline-offset: 3px;
}

.gb-article-card__link:focus-visible {
	outline: none;
}

.gb-article-card__picture {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: var(--gb-color-navy);
	background-image:
		radial-gradient(70% 70% at 60% 40%, var(--gb-color-turquoise-a20), transparent 70%),
		linear-gradient(160deg, #10284a, var(--gb-color-navy) 60%);
}

.gb-article-card__image {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	transition: scale var(--gb-duration-slow) var(--gb-ease-out);
}

.gb-article-card:hover .gb-article-card__image {
	scale: 1.04;
}

/* No picture: the open diamond and the seed, faint. */
.gb-article-card__art {
	position: absolute;
	inset: 0;
	inline-size: 100%;
	block-size: 100%;
}

.gb-article-card__art path {
	fill: none;
	stroke: var(--gb-color-turquoise-a35);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gb-article-card__art circle {
	fill: var(--gb-seed);
}

.gb-article-card__body {
	display: grid;
	align-content: start;
	gap: var(--gb-space-2xs);
	padding: var(--gb-space-m);
}

.gb-article-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em 0.9em;
	margin: 0;
	font-size: var(--gb-step--1);
	color: var(--gb-text-muted);
}

.gb-article-card__cat {
	font-weight: var(--gb-weight-bold);
	color: #00857D;
}

.gb-article-card__title {
	margin: 0;
	font-family: var(--gb-font-display);
	font-size: var(--gb-step-2);
	line-height: 1.4;
	text-wrap: balance;
}

.gb-article-card__link {
	color: inherit;
	text-decoration: none;
}

.gb-article-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.gb-article-card__excerpt {
	margin: 0;
	color: var(--gb-text-muted);
	text-wrap: pretty;
}

.gb-article-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin-block-start: var(--gb-space-3xs);
	font-size: var(--gb-step--1);
	font-weight: var(--gb-weight-bold);
	color: var(--gb-color-navy);
}

.gb-article-card__more svg {
	inline-size: 1em;
	block-size: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: translate var(--gb-duration-base) var(--gb-ease-out);
}

.gb-article-card:hover .gb-article-card__more svg {
	translate: calc(var(--gb-dir) * 0.25em) 0;
}

[dir="ltr"] .gb-article-card__more svg {
	scale: -1 1;
}

/* The newest article on /articles/: picture beside the text on wide screens. */
@media (min-width: 64rem) {
	.gb-article-card--large {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		grid-template-rows: none;
	}

	.gb-article-card--large .gb-article-card__picture {
		aspect-ratio: auto;
		min-block-size: 20rem;
	}

	.gb-article-card--large .gb-article-card__body {
		align-content: center;
		padding: var(--gb-space-xl);
	}

	.gb-article-card--large .gb-article-card__title {
		font-size: var(--gb-step-4);
	}
}
