/*!
 * Sarv Catalyst — Insights and News
 *
 * Loaded on the insights index (WordPress's posts page) and on the news page, and
 * nowhere else. Like the Contact, catalogue, Industries, Services and company
 * stylesheets it is not part of the shared ladder: it loads after `utilities.css`
 * and therefore wins a tie against a rule there.
 *
 * The two pages share one file because they present the same thing — a list of
 * published articles drawn with this site's editorial language rather than a blog
 * theme's grid. Sharing it is what keeps them from diverging.
 *
 * Everything below reads the approved design tokens. No value is invented, no
 * colour is written as a literal, and every offset uses logical properties.
 *
 * Cascade order in this file:
 *   1. Hero
 *   2. Category topics
 *   3. Featured article
 *   4. Article list and pagination
 *   5. Empty state
 *   6. Responsive
 */

.sc-insights,
.sc-news {
	--sc-reading-hero-padding: clamp(2rem, 1.2rem + 2.4vw, 3.25rem);
	--sc-reading-rule: var(--sc-color-border-subtle);
	--sc-reading-thumb: 18rem;
}

/* ===========================================================================
 * 1. Hero
 * ======================================================================== */

.sc-insights-hero,
.sc-news-hero {
	position: relative;
	overflow: hidden;
	background-color: var(--sc-color-surface-pale);
}

.sc-insights-hero__pattern,
.sc-news-hero__pattern {
	position: absolute;
	z-index: 0;
	pointer-events: none;
	inline-size: var(--sc-pattern-size-md);
	block-size: var(--sc-pattern-size-md);
	inset-block-start: -30%;
	inset-inline-end: -8%;
	background-color: var(--sc-color-pattern-line);
	opacity: var(--sc-pattern-opacity);
	mask-image: url("../images/brand/sarv-hero-pattern.svg");
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: cover;
}

.sc-insights-hero .sc-container,
.sc-news-hero .sc-container {
	position: relative;
	z-index: 1;
}

.sc-insights-hero__inner,
.sc-news-hero__inner {
	padding-block: var(--sc-reading-hero-padding);
}

.sc-insights-hero .sc-breadcrumbs,
.sc-news-hero .sc-breadcrumbs {
	margin-block-end: var(--sc-space-md);
}

.sc-insights-hero__title,
.sc-news-hero__title {
	margin-block: var(--sc-space-sm) var(--sc-space-md);
	font-size: var(--sc-font-size-4xl);
	font-weight: var(--sc-font-weight-bold);
	line-height: var(--sc-line-height-tight);
	letter-spacing: var(--sc-letter-spacing-tight);
	color: var(--sc-color-heading);
}

.sc-insights-hero__line {
	display: block;
}

.sc-insights-hero__line--accent {
	color: var(--sc-color-brand);
}

.sc-insights-hero__lead {
	max-inline-size: var(--sc-measure);
	margin-block: 0;
	font-size: var(--sc-font-size-lg);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text-muted);
}

/* ===========================================================================
 * 2. Category topics
 * ======================================================================== */

.sc-insights-hero__topics {
	margin-block-start: var(--sc-space-lg);
}

.sc-insights-topics {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sc-space-sm);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sc-insights-topics__link {
	display: inline-flex;
	align-items: center;
	gap: var(--sc-space-3xs);
	min-block-size: var(--sc-touch-target);
	font-size: var(--sc-font-size-sm);
	font-weight: var(--sc-font-weight-semibold);
	letter-spacing: var(--sc-letter-spacing-wide);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--sc-color-link);
}

.sc-insights-topics__link:is(:hover, :focus-visible) {
	color: var(--sc-color-brand-strong);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.sc-insights-topics__link:focus-visible {
	outline: var(--sc-focus-outline);
	outline-offset: var(--sc-focus-offset);
}

.sc-insights-topics__count {
	font-size: var(--sc-font-size-xs);
	color: var(--sc-color-text-subtle);
}

/* ===========================================================================
 * 3. Featured article
 * ======================================================================== */

.sc-insights-featured,
.sc-insights-list,
.sc-news-feed {
	padding-block: var(--sc-space-section);
	background-color: var(--sc-color-surface);
}

.sc-insights-list,
.sc-news-feed {
	background-color: var(--sc-color-surface-pale);
	border-block-start: var(--sc-border-width) solid var(--sc-color-border-subtle);
}

.sc-insights-section-label,
.sc-news-feed__heading {
	margin-block: 0 var(--sc-space-lg);
	font-size: var(--sc-font-size-sm);
	font-weight: var(--sc-font-weight-semibold);
	letter-spacing: var(--sc-letter-spacing-wide);
	text-transform: uppercase;
	color: var(--sc-color-brand-strong);
}

.sc-article--featured {
	display: grid;
	gap: var(--sc-space-lg);
}

.sc-article__media {
	display: block;
	overflow: hidden;
	border-radius: var(--sc-radius-media);
	background-color: var(--sc-color-surface-muted);
}

.sc-article__image {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	aspect-ratio: 16 / 9;
}

.sc-article__text {
	display: flex;
	flex-direction: column;
}

/* ===========================================================================
 * 4. Article list and pagination
 * ======================================================================== */

.sc-insights-list__items,
.sc-news-feed__items {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sc-article--list {
	padding-block: var(--sc-space-lg);
	border-block-start: var(--sc-border-width) solid var(--sc-reading-rule);
}

.sc-article__meta {
	margin-block: 0 var(--sc-space-2xs);
}

.sc-article__category {
	display: inline-flex;
	align-items: center;
	min-block-size: var(--sc-touch-target);
	font-size: var(--sc-font-size-sm);
	font-weight: var(--sc-font-weight-semibold);
	letter-spacing: var(--sc-letter-spacing-wide);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--sc-color-brand-strong);
}

.sc-article__category:is(:hover, :focus-visible) {
	color: var(--sc-color-brand);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.sc-article__title {
	margin-block: 0 var(--sc-space-2xs);
	font-size: var(--sc-font-size-xl);
	font-weight: var(--sc-font-weight-semibold);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-heading);
}

.sc-article--featured .sc-article__title {
	font-size: var(--sc-font-size-2xl);
}

/* The link fills its row so an article title is a touch target rather than the
   height of a line of text; the affordance is an underline at the text. */
.sc-article__link {
	display: inline-flex;
	align-items: center;
	min-block-size: var(--sc-touch-target);
	color: inherit;
	text-decoration: none;
}

.sc-article__link:is(:hover, :focus-visible) {
	color: var(--sc-color-brand-strong);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.sc-article__link:focus-visible {
	outline: var(--sc-focus-outline);
	outline-offset: var(--sc-focus-offset);
}

.sc-article__excerpt {
	max-inline-size: var(--sc-measure);
	margin-block: 0 var(--sc-space-2xs);
	font-size: var(--sc-font-size-base);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text-muted);
}

.sc-article__date {
	margin-block: 0;
	font-size: var(--sc-font-size-sm);
	color: var(--sc-color-text-subtle);
}

.sc-insights-list__pagination {
	margin-block-start: var(--sc-space-xl);
}

.sc-insights-list__pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sc-space-2xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sc-insights-list__pagination a,
.sc-insights-list__pagination span {
	display: inline-flex;
	align-items: center;
	min-block-size: var(--sc-touch-target);
	padding-inline: var(--sc-space-xs);
	font-size: var(--sc-font-size-sm);
	font-weight: var(--sc-font-weight-semibold);
	text-decoration: none;
	color: var(--sc-color-link);
}

/* ===========================================================================
 * 5. Empty state
 * ======================================================================== */

.sc-insights-empty,
.sc-news-feed__empty {
	max-inline-size: var(--sc-measure);
	margin-block: 0;
	font-size: var(--sc-font-size-lg);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text-muted);
}

.sc-insights-empty {
	padding-block: var(--sc-space-section);
	background-color: var(--sc-color-surface);
}

/* ===========================================================================
 * 6. Responsive
 * ======================================================================== */

@media (width >= 40rem) {
	.sc-insights-list__items,
	.sc-news-feed__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--sc-space-2xl);
	}
}

@media (width >= 60rem) {
	.sc-article--featured {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		align-items: center;
		column-gap: var(--sc-space-2xl);
	}
}
