/* CoreA11y blog listing. Brand: charcoal #222, off-white #f4f4ef, lime #dce85d, olive #3d4119.
   Outfit for headings, Atkinson Hyperlegible for text (both loaded by the theme). All text pairs meet WCAG 2.2 AA. */

.c11y-blog {
	max-width: 1180px;
	margin: 0 auto;
	padding: 48px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px));
	display: grid;
	gap: 48px;
}

.c11y-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #ffffff;
	color: #222222;
	border-radius: 20px;
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}
.c11y-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(34, 34, 34, .45); }
.c11y-card__media { aspect-ratio: 1200 / 630; background: #222222; overflow: hidden; }
.c11y-card__img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; }
.c11y-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; flex: 1; }
.c11y-card__cat {
	margin: 0;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #3d4119;
}
.c11y-card__title {
	margin: 0;
	font-family: Outfit, "Segoe UI", system-ui, sans-serif;
	font-weight: 700;
	font-size: 1.3rem;
	line-height: 1.25;
	letter-spacing: -.01em;
	text-wrap: balance;
}
.c11y-card__title a { color: #222222; text-decoration: none; }
/* The title link covers the whole card, so the card is one click target. */
.c11y-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.c11y-card:hover .c11y-card__title a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.c11y-card__title a:focus-visible { outline: none; }
.c11y-card__title a:focus-visible::after { outline: 3px solid #222222; outline-offset: 3px; box-shadow: 0 0 0 7px #dce85d; }
.c11y-card__excerpt { margin: 0; font-size: 1rem; line-height: 1.6; color: #222222; }
.c11y-card__meta { margin: auto 0 0; padding-top: 6px; font-size: .88rem; color: #555555; }

.c11y-card--lead { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) {
	.c11y-card--lead { grid-template-columns: 1.35fr 1fr; align-items: stretch; }
	/* The whole image shows, centred on charcoal (the images' own background), so nothing is cropped. */
	.c11y-card--lead .c11y-card__media { aspect-ratio: auto; display: flex; align-items: center; }
	.c11y-card--lead .c11y-card__img { height: auto; aspect-ratio: 1200 / 630; }
	.c11y-card--lead .c11y-card__body { padding: 36px 40px; justify-content: center; }
	.c11y-card--lead .c11y-card__title { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
}

.c11y-blog__heading {
	margin: 0 0 20px;
	font-family: Outfit, "Segoe UI", system-ui, sans-serif;
	font-weight: 700;
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	color: #222222;
}
.c11y-blog__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: 24px;
}
.c11y-blog__grid > li { min-width: 0; }

.c11y-blog__pages .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.c11y-blog__pages .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; min-height: 44px; padding: 0 14px;
	border-radius: 999px; background: #ffffff; color: #222222;
	font-weight: 700; text-decoration: none;
}
.c11y-blog__pages .page-numbers.current { background: #222222; color: #ffffff; }
.c11y-blog__pages .page-numbers:focus-visible { outline: 3px solid #222222; outline-offset: 3px; box-shadow: 0 0 0 7px #dce85d; }
.c11y-blog__empty { font-size: 1.1rem; color: #222222; }

@media (prefers-reduced-motion: reduce) {
	.c11y-card { transition: none; }
	.c11y-card:hover { transform: none; }
}
