/*
 * The interview series hub, its sidebar card and its article-rail card.
 * Loaded only on titles that switch the hub on; see inc/leaders.php.
 *
 * Colour and type come from the title's own theme.json presets, so each title
 * gets the hub in its own brand without a line of title-specific CSS.
 */

.leaders-hub {
	--leaders-ink: var(--wp--preset--color--contrast, #0a0c16);
	--leaders-brand: var(--wp--preset--color--brand, #2e3eee);
	--leaders-muted: var(--wp--preset--color--muted, #5a5e75);
	--leaders-line: var(--wp--preset--color--line, #e3e5eb);
	--leaders-paper: var(--wp--preset--color--base, #fff);
	--leaders-surface: var(--wp--preset--color--surface, #f4f5fa);
	display: grid;
	gap: clamp(28px, 4vw, 48px);
	color: var(--leaders-ink);
}

.leaders-hub a { text-decoration: none; color: inherit; }

.leaders-hub__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--leaders-line);
}

.leaders-hub__intro {
	margin: 0;
	max-width: 60ch;
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	line-height: 1.5;
	color: var(--leaders-muted);
}

/* Before the first interview: one quiet line, then the invitation below it. */
.leaders-hub__empty {
	margin: 0;
	padding: clamp(28px, 4vw, 48px);
	background: var(--leaders-surface);
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: clamp(1.2rem, 2vw, 1.5rem);
	font-weight: 600;
	text-align: center;
}

.leader-flag {
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* The latest interview: photo left, their words right. */
.leader-feature {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	background: var(--leaders-paper);
	border-top: 4px solid var(--leaders-brand);
	overflow: hidden;
	box-shadow:
		0 1px 2px color-mix(in srgb, var(--leaders-ink) 6%, transparent),
		0 22px 48px -28px color-mix(in srgb, var(--leaders-ink) 35%, transparent);
	transition: box-shadow 0.25s ease;
}

.leader-feature:hover {
	box-shadow:
		0 1px 2px color-mix(in srgb, var(--leaders-ink) 8%, transparent),
		0 28px 60px -26px color-mix(in srgb, var(--leaders-ink) 45%, transparent);
}

.leader-feature__media,
.leader-card__media,
.leaders-mpu__media {
	display: block;
	position: relative;
	overflow: hidden;
	background: var(--leaders-surface, #f4f5fa);
}

.leader-feature__media { aspect-ratio: 4 / 5; }

.leader-feature__img,
.leader-card__img,
.leaders-mpu__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.leader-feature:hover .leader-feature__img,
.leader-card:hover .leader-card__img,
.leaders-mpu__feature:hover .leaders-mpu__img { transform: scale(1.035); }

.leader-feature__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 22px;
	padding: clamp(28px, 4.5vw, 64px);
}

.leader-flag { color: var(--leaders-brand); }

/* The headline, set large, with the standfirst under it. */
.leader-feature__headline {
	display: block;
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: clamp(1.55rem, 2.7vw, 2.35rem);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.015em;
}

.leader-feature__excerpt {
	font-size: clamp(1rem, 1.3vw, 1.1rem);
	line-height: 1.55;
	color: var(--leaders-muted);
}

.leader-line { font-size: 0.9rem; font-weight: 600; }

.leader-cta {
	font-weight: 600;
	color: var(--leaders-brand);
}

.leader-cta span { display: inline-block; transition: transform 0.2s ease; }
.leader-feature:hover .leader-cta span { transform: translateX(4px); }

/* The rest of the series. */
.leaders-hub__heading {
	margin: 0 0 -8px;
	font-size: clamp(1.2rem, 2vw, 1.5rem);
}

/*
 * Two columns of wide cards, photo beside quote. A grid of narrow portrait
 * tiles was tried first and, with the two earlier profiles Smart SME launched
 * with, filled the left half of a 1200px row and left the right half empty. A
 * pair of wide cards is balanced at any count from one upwards.
 */
.leaders-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(16px, 2.2vw, 28px);
}

.leader-card {
	display: flex;
	flex-direction: row;
	background: var(--leaders-paper);
	border: 1px solid var(--leaders-line);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.leader-card:hover {
	transform: translateY(-4px);
	border-color: color-mix(in srgb, var(--leaders-brand) 35%, var(--leaders-line));
	box-shadow: 0 18px 40px -26px color-mix(in srgb, var(--leaders-ink) 45%, transparent);
}

.leader-card__media { flex: 0 0 42%; aspect-ratio: 4 / 5; }

.leader-card__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1;
	min-width: 0;
	padding: clamp(18px, 2.2vw, 28px);
}

.leader-card__headline {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.28;
}

.leader-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--leaders-muted);
}

.leader-card .leader-line { margin-top: auto; }

/* The invitation. Every nomination is a founder who already wants to talk. */
.leaders-nominate {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 32px;
	padding: clamp(24px, 3.5vw, 40px);
	background: color-mix(in srgb, var(--leaders-brand) 7%, var(--leaders-paper));
	border-left: 4px solid var(--leaders-brand);
}

.leaders-nominate__title { margin: 0 0 6px; font-size: clamp(1.2rem, 2vw, 1.45rem); }

.leaders-nominate__text { margin: 0; max-width: 56ch; color: var(--leaders-muted); }

.leaders-hub .leaders-nominate__btn {
	padding: 13px 22px;
	background: var(--leaders-brand);
	color: #fff;
	font-weight: 600;
	white-space: nowrap;
	transition: background 0.2s ease;
}

.leaders-hub .leaders-nominate__btn:hover { background: var(--leaders-ink); }

@media (max-width: 900px) {
	.leaders-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
	.leader-feature { grid-template-columns: 1fr; }
	.leader-feature__media { aspect-ratio: 4 / 3; }
}

@media (max-width: 480px) {
	.leader-card { flex-direction: column; }
	.leader-card__media { flex: none; aspect-ratio: 4 / 3; }
}

/*
 * The sidebar and article-rail card. Built as a sibling of the theme's own
 * .sidebar-card (same radius, hairline border, padding and hairline-ruled
 * title) so it sits in the column as one of the family. The first version had
 * a brand-coloured top bar, a fixed 300px width and square corners, and read as
 * an advert dropped into the sidebar. No outer margin: both rails space their
 * children with "> * + *".
 */
.leaders-mpu {
	--leaders-ink: var(--wp--preset--color--contrast, #0a0c16);
	--leaders-brand: var(--wp--preset--color--brand, #2e3eee);
	--leaders-muted: var(--wp--preset--color--muted, #5a5e75);
	--leaders-line: var(--wp--preset--color--line, #e3e5eb);
	--leaders-paper: var(--wp--preset--color--base, #fff);
	--leaders-radius: var(--fm-radius, 12px);
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 1.25rem;
	background: var(--leaders-paper);
	border: 1px solid var(--leaders-line);
	border-radius: var(--leaders-radius);
	color: var(--leaders-ink);
}

.leaders-mpu a { text-decoration: none; color: inherit; }

.leaders-mpu__title {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--leaders-line);
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
}

.leaders-mpu__title span {
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: 0.66rem;
	font-weight: 400;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--leaders-brand);
	white-space: nowrap;
}

.leaders-mpu__feature { display: block; }

.leaders-mpu__media {
	aspect-ratio: 4 / 3;
	border-radius: calc(var(--leaders-radius) * 0.66);
}

.leaders-mpu__body { display: grid; gap: 6px; padding-top: 14px; }

.leaders-mpu__headline {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 1.12rem;
	font-weight: 600;
	line-height: 1.28;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.leaders-mpu__feature:hover .leaders-mpu__headline { color: var(--leaders-brand); }

.leaders-mpu__company { font-size: 0.85rem; color: var(--leaders-muted); }

.leaders-mpu .leaders-mpu__all {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 1rem;
	padding: 11px 14px;
	border-radius: calc(var(--leaders-radius) * 0.66);
	background: color-mix(in srgb, var(--leaders-brand) 8%, var(--leaders-paper));
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--leaders-brand);
	transition: background 0.2s ease, color 0.2s ease;
}

.leaders-mpu .leaders-mpu__all:hover { background: var(--leaders-brand); color: #fff; }
