/*
 * All Things Equine — the blog page, its archives and the article.
 *
 * Loaded by inc/blog.php on blog views only. Built from tokens.css; nothing
 * here introduces a colour or size of its own.
 */

/* Banner extras ------------------------------------------------------ */

/* The trail back to the blog sits on the navy banner. The global eyebrow
   colour is the teal ink, ~3.3:1 on navy, so it is restated in the band's own
   ink here (see the note on :where(.eqx-eyebrow) in base.css). */
.eqx-post-archive__eyebrow,
.eqx-post-archive__eyebrow a { color: var(--eqx-warm-white); }

/* Card grid ----------------------------------------------------------- */

.eqx-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: var(--spacing-md);
}

.eqx-post-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--eqx-warm-white);
	border: 1px solid var(--eqx-border);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	overflow: hidden;
	transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.eqx-post-card:hover,
.eqx-post-card:focus-within { box-shadow: var(--shadow-overlay); }

.eqx-post-card__media {
	aspect-ratio: 4 / 3;
	background: var(--eqx-brand-light);
}
.eqx-post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.eqx-post-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: var(--spacing-md);
}
.eqx-post-card__title {
	font-size: var(--font-h3);
	margin: 0 0 var(--spacing-xs);
	text-wrap: balance;
}
.eqx-post-card__title a {
	color: var(--eqx-brand-dark);
	text-decoration: none;
}
/* One link per card, stretched over the whole card. */
.eqx-post-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.eqx-post-card__title a:focus-visible { outline: none; }
.eqx-post-card:has(.eqx-post-card__title a:focus-visible) {
	outline: 3px solid var(--eqx-focus-ring);
	outline-offset: 2px;
}
.eqx-post-card__excerpt { color: var(--eqx-text-primary); }
.eqx-post-card__meta { margin-top: auto; }
.eqx-post-card__more {
	font-weight: 600;
	color: var(--eqx-brand-dark);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Paging */
.eqx-post-grid + .navigation.pagination { margin-top: var(--spacing-lg); }
.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--spacing-xs);
}
.navigation.pagination .page-numbers {
	min-width: 44px;
	padding: 10px 14px;
	text-align: center;
	border: 1px solid var(--eqx-border-ui);
	border-radius: var(--radius-button);
	text-decoration: none;
}
.navigation.pagination .page-numbers.current {
	background: var(--eqx-brand-dark);
	border-color: var(--eqx-brand-dark);
	color: var(--eqx-warm-white);
}

/* The article ---------------------------------------------------------- */

.eqx-post__header { margin-bottom: var(--spacing-md); }
.eqx-post__trail {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-bottom: var(--spacing-sm);
}
.eqx-post__trail a { color: var(--eqx-text-muted); }
.eqx-post__header .eqx-h1 { text-wrap: balance; margin-bottom: var(--spacing-xs); }

/* The artwork is square and carries its own title; at the full reading width
   it would fill the screen before a word of the article shows. */
.eqx-post__thumb { margin: 0 0 var(--spacing-lg); }
.eqx-post__thumb img {
	width: 100%;
	max-width: 480px;
	border-radius: var(--radius-image);
}

/* Prose — the same values as the rich-text block's .eqx-content rules,
   which do not load here. */
.eqx-post__content { font-size: 1.0625rem; line-height: 1.7; }
.eqx-post__content > :first-child { margin-top: 0; }
.eqx-post__content p { margin: 0 0 var(--spacing-sm); }
.eqx-post__content h2 { font-size: var(--font-h2); margin-top: var(--spacing-lg); }
.eqx-post__content h3 { font-size: var(--font-h3); margin-top: var(--spacing-md); }
.eqx-post__content ul,
.eqx-post__content ol { margin: 0 0 var(--spacing-sm); padding-left: 1.4em; }
.eqx-post__content li { margin-bottom: 0.4em; }
.eqx-post__content blockquote {
	border-left: 3px solid var(--eqx-brand-accent);
	padding: var(--spacing-xs) var(--spacing-md);
	margin: var(--spacing-md) 0;
	font-style: italic;
	color: var(--eqx-text-muted);
}
.eqx-post__content figure { margin: var(--spacing-md) 0; }
.eqx-post__content img { border-radius: var(--radius-image); }
.eqx-post__content .eqx-post__references {
	font-size: var(--font-small);
	color: var(--eqx-text-muted);
	line-height: 1.6;
}

.eqx-post__cta { margin: var(--spacing-lg) 0 0; }

/* About the writer */
.eqx-post__writer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--spacing-md);
	margin-top: var(--spacing-lg);
	padding: var(--spacing-md);
	background: var(--eqx-brand-light);
	border-radius: var(--radius-card);
}
.eqx-post__writer-logo { flex: 0 1 240px; }
.eqx-post__writer-logo img { width: 100%; height: auto; mix-blend-mode: multiply; }
.eqx-post__writer-text { flex: 1 1 240px; min-width: 0; }
.eqx-post__writer-text p { margin: 0; }
.eqx-post__writer-text .eqx-eyebrow { margin-bottom: 4px; }
.eqx-post__writer-name {
	font-family: var(--ff-display);
	font-size: var(--font-h3);
	font-weight: 700;
	color: var(--eqx-brand-dark);
}

.eqx-post__back { margin: var(--spacing-lg) 0 0; }

@media (prefers-reduced-motion: reduce) {
	.eqx-post-card { transition: none; }
}
