/**
 * Homepage template sections.
 *
 * 1. Hero
 * 2. Clients
 * 3. Services
 * 4. Practice areas
 * 5. About
 * 6. People
 * 7. Articles
 *
 * The closing call to action is a shared component in main.css, the
 * testimonials carousel is shared with the Our Clients page in quotes.css.
 */

/* 1. Hero ---------------------------------------------------------------- */

.hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 84px);
	min-height: calc(100svh - 84px);
	overflow: hidden;
	background: #121a30;
	color: var(--c-white);
	text-align: center;
}

.hero__media {
	position: absolute;
	inset: -4%;
}

/* Stays invisible until frames are actually playing, so no loader or player UI shows. */
.hero__video {
	position: absolute;
	inset: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.8s ease;
}

.hero__video.is-playing {
	opacity: 1;
	transition-duration: 1.2s;
}

video.hero__video,
.hero__poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Visible from first paint; the video fades in on top of it. */
.hero__poster {
	position: absolute;
	inset: 0;
	max-width: none;
}

/* Match the framing of the scaled YouTube iframe below, so the crossfade does not jump. */
.hero__media--youtube .hero__poster {
	transform: scale(1.15);
}

/* Cover the frame like background-size: cover for a 16:9 video. */
.hero__video iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: max(100%, 177.78vh);
	height: max(100%, 56.25vw);
	border: 0;
	transform: translate(-50%, -50%) scale(1.15);
}

.hero__overlay {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(70% 60% at 50% 50%, rgba(17, 26, 49, 0.35), rgba(17, 26, 49, 0.85)),
		linear-gradient(180deg, rgba(17, 26, 49, 0.4), rgba(17, 26, 49, 0.75));
}

.hero__content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 34px;
	max-width: calc(980px + 2 * var(--gutter));
	padding: 120px var(--gutter) 160px;
}

.hero__title {
	font-size: clamp(26px, 5.2vw, 74px);
	font-weight: 300;
	line-height: 1.04;
	letter-spacing: -0.03em;
	white-space: nowrap;
}

.hero__title .reveal-mask {
	padding-bottom: 0.06em;
}

.hero__title .reveal-mask + .reveal-mask {
	padding-bottom: 0.1em;
}

.hero__title .accent {
	font-size: 1.1em;
}

.hero__lead {
	max-width: 600px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 17px;
	line-height: 1.7;
	text-wrap: pretty;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 32px;
}

.hero__actions .btn {
	padding: 18px 28px;
}

.hero__actions .link-arrow {
	gap: 22px;
	border-bottom-color: rgba(255, 255, 255, 0.5);
}

.hero__actions .link-arrow:hover {
	border-bottom-color: var(--c-gold-light);
}

.hero__bar {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero__bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 22px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

/* 2. Clients ------------------------------------------------------------- */

.clients {
	padding: 44px 0;
	overflow: hidden;
	border-bottom: 1px solid var(--c-line-soft);
	background: var(--c-white);
}

.marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

/* Two identical groups: shifting by -50% loops seamlessly. Duration is set from JS. */
.marquee__track {
	display: flex;
	align-items: center;
	width: max-content;
	animation: legart-marquee var(--marquee-duration, 80s) linear infinite;
}

.marquee:hover .marquee__track {
	animation-play-state: paused;
}

.marquee__group {
	display: flex;
	flex: none;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.client {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	/* Wide enough that twelve logos per group outrun a 2560px screen. */
	min-width: clamp(140px, 16vw, 240px);
	height: 56px;
	padding: 0 clamp(28px, 4vw, 56px);
	border-right: 1px solid var(--c-line-soft);
}

.client__logo {
	display: block;
	width: auto;
	max-width: 150px;
	height: clamp(30px, 3.2vw, 44px);
	object-fit: contain;
}

/* Fewer than five logos: a centred row instead of a loop. */
.clients__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.clients__row .client {
	border-right: 0;
}

@keyframes legart-marquee {
	to {
		transform: translate3d(-50%, 0, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.marquee__track {
		animation: none;
	}
}

/* 3. Services ------------------------------------------------------------ */

.services {
	padding: var(--section-space) 0;
	background: var(--c-white);
}

.services__inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
	align-items: start;
	gap: clamp(48px, 7vw, 110px);
}

.services__intro {
	position: sticky;
	top: 120px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.services__intro .section-lead {
	max-width: 440px;
}

.services__intro .link-arrow {
	align-self: flex-start;
}

@media (max-width: 899.98px) {
	.services__intro {
		position: static;
	}
}

.service-list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--c-line);
	list-style: none;
}

.service-item {
	display: grid;
	grid-template-columns: clamp(48px, 10vw, 96px) minmax(0, 1fr) 20px;
	align-items: start;
	gap: clamp(14px, 3vw, 24px);
	padding: 28px 8px;
	border-bottom: 1px solid var(--c-line);
	color: var(--c-navy);
	transition: background-color 0.4s, padding 0.4s;
}

.service-item:hover,
.service-item:focus-visible {
	padding-left: 28px;
	background: var(--c-cream);
	color: var(--c-navy);
}

.service-item__no {
	color: transparent;
	font: 300 clamp(34px, 6vw, 56px) / 1 var(--font-sans);
	-webkit-text-stroke: 1px #a9adbd;
}

.service-item__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.service-item__title {
	font-size: 21px;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.service-item__text {
	color: var(--c-text-soft);
	font-size: 14px;
	line-height: 1.6;
}

.service-item__arrow {
	padding-top: 4px;
	color: var(--c-gold);
	font-size: 18px;
}

/* 4. Practice areas ------------------------------------------------------ */

.practice {
	position: relative;
	padding: var(--section-space) 0;
	overflow: hidden;
	background: var(--c-navy);
	color: var(--c-white);
}

.practice__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 64px;
}

.practice__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}

.practice__heading {
	display: flex;
	flex-direction: column;
	gap: 28px;
	max-width: 720px;
}

.practice__panels {
	display: flex;
	height: 580px;
	border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.practice-panel {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	border-left: 1px solid rgba(255, 255, 255, 0.16);
	background: transparent;
	transition: flex 0.9s var(--ease-out), height 0.9s var(--ease-out), background-color 0.6s;
}

.practice-panel.is-active {
	flex: 3.2 1 0;
	background: var(--c-navy-700);
}

.practice-panel__media {
	position: absolute;
	inset: 0;
	transform: scale(1.08);
	transition: transform 1.4s var(--ease-out);
}

.practice-panel.is-active .practice-panel__media {
	transform: scale(1);
}

/* Closed panels show their photo dimmed, the open one at full brightness.
 * The focus point of each photo is set inline (object-position). */
.practice-panel__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.6);
	transition: filter 0.8s ease;
}

.practice-panel.is-active .practice-panel__img {
	filter: none;
}

@media (hover: hover) {
	.practice-panel:not(.is-active):hover .practice-panel__img {
		filter: brightness(0.85);
	}
}

/* Light at the top so the photo shows, dark from where the text starts. */
.practice-panel__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(17, 26, 49, 0.15) 0%, rgba(17, 26, 49, 0.62) 36%, rgba(17, 26, 49, 0.92) 68%);
}

/* Covers the collapsed panel so the whole strip is one accessible button. */
.practice-panel__toggle {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: var(--c-white);
	text-align: left;
	cursor: pointer;
}

.practice-panel.is-active .practice-panel__toggle {
	cursor: default;
	pointer-events: none;
}

.practice-panel__label {
	position: absolute;
	bottom: 32px;
	left: 24px;
	font-size: 20px;
	font-weight: 400;
	letter-spacing: 0.01em;
	white-space: nowrap;
	transform: rotate(180deg);
	writing-mode: vertical-rl;
	transition: opacity 0.4s;
}

.practice-panel.is-active .practice-panel__label {
	opacity: 0;
}

.practice-panel__body {
	position: absolute;
	bottom: 36px;
	left: 36px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 18px;
	width: min(440px, calc(100% - 72px));
	opacity: 0;
	transform: translateY(24px);
	pointer-events: none;
	transition: opacity 0.25s, transform 0.25s;
}

.practice-panel.is-active .practice-panel__body {
	opacity: 1;
	transform: none;
	pointer-events: auto;
	transition: opacity 0.7s ease 0.35s, transform 0.9s var(--ease-out) 0.35s;
}

.practice-panel__title {
	color: var(--c-white);
	font-size: clamp(26px, 2.4vw, 34px);
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.practice-panel__text {
	color: rgba(255, 255, 255, 0.78);
	font-size: 15px;
	line-height: 1.7;
	text-wrap: pretty;
}

.practice-panel__body .link-arrow {
	align-self: flex-start;
	margin-top: 6px;
}

@media (max-width: 1079.98px) {
	.practice__panels {
		flex-direction: column;
		height: auto;
		border-right: 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	}

	.practice-panel,
	.practice-panel.is-active {
		flex: none;
	}

	.practice-panel {
		height: 85px;
		border-top: 1px solid rgba(255, 255, 255, 0.16);
		border-left: 0;
	}

	.practice-panel.is-active {
		height: 561px;
	}

	.practice-panel__label {
		top: 26px;
		right: 24px;
		bottom: auto;
		left: 24px;
		font-size: 18px;
		letter-spacing: normal;
		white-space: normal;
		transform: none;
		writing-mode: horizontal-tb;
	}

	.practice-panel__body {
		bottom: 28px;
		left: 24px;
		width: calc(100% - 48px);
	}
}

/* 5. About --------------------------------------------------------------- */

/* No space at the bottom: the cut-out portrait stands on the lower edge. On
 * small screens it follows the text, from 960px it sits on the left. */
.about {
	padding: var(--section-space) 0 0;
	background: var(--c-cream);
}

.about__inner {
	display: grid;
	gap: clamp(48px, 7vw, 110px);
}

.about__media {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.about__frame {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
}

/* Cut-out portrait: kept whole and resting on the bottom edge, so no parallax. */
.about__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
}

.placeholder--light {
	--ph-a: #ebe8e1;
	--ph-b: #e2dfd6;
}

.about__quote {
	display: flex;
	flex-direction: column;
	align-self: flex-end;
	gap: 12px;
	width: min(100%, 400px);
	padding: 28px 30px;
	background: var(--c-navy);
	color: var(--c-white);
}

.about__quote-text {
	color: var(--c-gold-light);
	font: italic 400 24px / 1.3 var(--font-serif);
}

.about__quote-note {
	color: rgba(255, 255, 255, 0.72);
	font-size: 12.5px;
	line-height: 1.6;
}

.about__content {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.about__content .link-arrow {
	align-self: flex-start;
}

/* The portrait on the left, resting on the bottom edge with the quote over its
 * corner; the text keeps some room below when it is the taller column. */
@media (min-width: 960px) {
	.about__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: center;
	}

	.about__media {
		grid-area: 1 / 1;
		align-self: end;
	}

	.about__content {
		grid-area: 1 / 2;
		padding-bottom: 48px;
	}

	.about__quote {
		position: absolute;
		right: 0;
		bottom: 0;
		z-index: 1;
		width: calc(min(78%, 340px) + 60px);
	}
}

.values {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	border-top: 1px solid rgba(23, 34, 63, 0.14);
	list-style: none;
}

.values__item {
	display: grid;
	grid-template-columns: 24px 1fr;
	align-items: start;
	gap: 14px;
	padding: 20px 0;
	border-bottom: 1px solid rgba(23, 34, 63, 0.14);
}

/* Centred on the first text line (15px x 1.6 = 24px). */
.values__icon {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border: 1px solid rgba(176, 141, 87, 0.45);
	border-radius: 50%;
	background: rgba(176, 141, 87, 0.1);
	color: var(--c-gold-deep);
}

.values__text {
	color: #2a3147;
	font-size: 15px;
	line-height: 1.6;
}

.values__text strong {
	color: var(--c-navy);
	font-weight: 600;
}

/* 6. People -------------------------------------------------------------- */

.people {
	padding: var(--section-space) 0;
	overflow: hidden;
	background: var(--c-cream);
}

.people__inner {
	display: flex;
	flex-direction: column;
	gap: 56px;
}

.people__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}

.people__heading {
	display: flex;
	flex-direction: column;
	gap: 28px;
	max-width: 640px;
}

.people__carousel {
	--card-w: min(66vw, 300px);
	--side-scale: 0.84;
	--step: calc(var(--card-w) * 0.25); /* Neighbours tuck in behind the current card. */
	--arrow: 44px;

	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(36px, 4vw, 56px);
}

@media (min-width: 768px) {
	.people__carousel {
		--card-w: clamp(240px, 26vw, 380px);
		--step: calc(var(--card-w) * (1 + var(--side-scale)) / 2 + clamp(16px, 4vw, 60px));
		--arrow: 52px;
	}
}

.people__stage {
	position: relative;
	width: 100%;
}

/* Without JavaScript the track bleeds to the right edge of the viewport and scrolls sideways. */
.people__track {
	--bleed: calc(max(0px, (100vw - var(--container)) / 2) + var(--gutter));

	display: flex;
	gap: 24px;
	margin: 0 calc(-1 * var(--bleed)) 0 0;
	padding: 0 var(--bleed) 0 0;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.people__track::-webkit-scrollbar {
	display: none;
}

.people__track > .person-card {
	flex: none;
	width: clamp(250px, 24vw, 300px);
	scroll-snap-align: start;
}

.people__track .person-card__meta {
	align-items: center;
	text-align: center;
}

.people__track .person-card__role {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}

.people__track .person-card__name {
	font-size: clamp(18px, 14px + 0.6vw, 22px);
}

/*
 * Carousel (home.js). Every card sits in the same grid cell and data-offset
 * places it: 0 is the current person, -1 and 1 the smaller neighbours, -2 and
 * 2 the hidden cards waiting just outside.
 */
.js .people__track {
	display: grid;
	grid-template-columns: var(--card-w);
	justify-content: center;
	margin: 0;
	padding: 0;
	overflow: visible;
	touch-action: pan-y;
}

.js .people__track > .person-card {
	--x: 0;
	--scale: var(--side-scale);

	z-index: 1;
	grid-area: 1 / 1;
	width: auto;
	visibility: hidden;
	opacity: 0;
	transform: translateX(calc(var(--x) * var(--step))) scale(var(--scale));
	transform-origin: 50% 0;
	transition: transform 0.7s var(--ease-out), opacity 0.7s var(--ease-out), visibility 0s linear 0.7s;
}

.js .people__track > [data-offset="-2"] {
	--x: -2;
}

.js .people__track > [data-offset="-1"] {
	--x: -1;
}

.js .people__track > [data-offset="1"] {
	--x: 1;
}

.js .people__track > [data-offset="2"] {
	--x: 2;
}

.js .people__track > [data-offset="0"],
.js .people__track > [data-offset="-1"],
.js .people__track > [data-offset="1"] {
	visibility: visible;
	transition-delay: 0s;
}

.js .people__track > [data-offset="0"] {
	--scale: 1;

	z-index: 3;
	opacity: 1;
}

.js .people__track > [data-offset="-1"],
.js .people__track > [data-offset="1"] {
	z-index: 2;
	opacity: 0.5;
}

.js .people__track .person-card__photo {
	transition: box-shadow 0.7s ease;
}

.js .people__track > [data-offset="0"] .person-card__photo {
	box-shadow: 0 30px 44px -30px rgba(23, 34, 63, 0.5);
}

/* Only the current person is captioned. */
.js .people__track .person-card__meta {
	opacity: 0;
	transition: opacity 0.2s ease;
}

.js .people__track > [data-offset="0"] .person-card__meta {
	opacity: 1;
	transition: opacity 0.5s ease 0.25s;
}

@media (hover: hover) {
	.js .people__track > [data-offset="-1"]:hover,
	.js .people__track > [data-offset="1"]:hover {
		opacity: 0.75;
	}
}

.people__arrow {
	position: absolute;
	top: calc(var(--card-w) * 0.625); /* Middle of the 4:5 photo. */
	z-index: 4;
	display: grid;
	place-items: center;
	width: var(--arrow);
	height: var(--arrow);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--c-white);
	box-shadow: 0 8px 24px rgba(23, 34, 63, 0.12);
	color: var(--c-navy);
	font: 18px Arial, Helvetica, sans-serif; /* Long arrow glyphs, as in the design. */
	cursor: pointer;
	transform: translate(-50%, -50%);
	transition: background-color 0.3s, color 0.3s;
}

/* Centred on the outer edge of each neighbour, kept inside the container. */
.people__arrow--prev {
	left: max(var(--arrow) / 2, 50% - var(--step) - var(--card-w) * var(--side-scale) / 2);
}

.people__arrow--next {
	left: min(100% - var(--arrow) / 2, 50% + var(--step) + var(--card-w) * var(--side-scale) / 2);
}

.people__arrow:hover {
	background: var(--c-navy);
	color: var(--c-white);
}

.people__dots {
	display: flex;
}

.people__arrow[hidden],
.people__dots[hidden] {
	display: none;
}

.people__dot {
	padding: 10px 4px;
	border: 0;
	background: none;
	cursor: pointer;
}

.people__dot::before {
	display: block;
	width: 6px;
	height: 6px;
	background: rgba(23, 34, 63, 0.18);
	content: "";
	transition: width 0.4s var(--ease-out), background-color 0.3s;
}

.people__dot:hover::before {
	background: rgba(23, 34, 63, 0.4);
}

.people__dot[aria-current="true"]::before {
	width: 26px;
	background: var(--c-navy);
}

@media (prefers-reduced-motion: reduce) {
	.js .people__track > .person-card,
	.js .people__track .person-card__meta,
	.people__dot::before {
		transition: none;
	}
}

/* 7. Articles ------------------------------------------------------------ */

/* The cards start in line with the container and scroll out to the screen
 * edges. --articles-inset is the space between the screen and the container. */
.articles {
	--articles-inset: max(var(--gutter), (100% - var(--container)) / 2);
	--articles-gap: clamp(20px, 2.5vw, 32px);

	padding: var(--section-space) 0;
	background: var(--c-white);
}

.articles__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}

.articles__heading {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

/* The vertical padding leaves room for the focus outline of a card. */
.articles__track {
	display: flex;
	gap: var(--articles-gap);
	margin: 48px 0 0;
	padding: 8px var(--articles-inset);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	list-style: none;
	scroll-padding-inline: var(--articles-inset);
	scroll-snap-type: x mandatory;
	scrollbar-color: var(--c-line) transparent;
	scrollbar-width: thin;
}

/* home.js replaces the scrollbar with the arrows and the progress bar. */
.js .articles__track {
	scrollbar-width: none;
}

.js .articles__track::-webkit-scrollbar {
	display: none;
}

.article-card {
	display: flex;
	flex: 0 0 calc((100% - 2 * var(--articles-gap)) / 3);
	scroll-snap-align: start;
}

.article-card__link {
	display: flex;
	flex: 1;
	flex-direction: column;
	color: var(--c-navy);
}

.article-card__link:focus-visible {
	outline-offset: 4px;
}

.article-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--c-cream);
}

.article-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s var(--ease-out);
}

.article-card__link:hover .article-card__img {
	transform: scale(1.04);
}

/* Posts without a featured image get the logo on navy, framed by a hairline. */
.article-card__media--blank {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--c-navy-700);
}

.article-card__media--blank::after {
	content: "";
	position: absolute;
	inset: 14px;
	border: 1px solid rgba(227, 207, 169, 0.22);
	transition: inset 0.8s var(--ease-out), border-color 0.8s;
}

.article-card__link:hover .article-card__media--blank::after {
	inset: 20px;
	border-color: rgba(227, 207, 169, 0.45);
}

.article-card__logo {
	width: 34%;
	max-width: 140px;
	height: auto;
	opacity: 0.92;
}

/* The post's category; cards without one go straight from photo to title. */
.article-card__meta {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--c-line);
	color: var(--c-gold-deep);
	font: 600 11px var(--font-sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.article-card__title {
	display: -webkit-box;
	margin-top: 16px;
	overflow: hidden;
	font-size: clamp(19px, 1.6vw, 22px);
	font-weight: 400;
	line-height: 1.38;
	letter-spacing: -0.01em;
	text-wrap: pretty;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

/* Underline drawn in on hover, following every line of the title. */
.article-card__title span {
	background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
	transition: background-size 0.6s var(--ease-out);
}

.article-card__link:hover .article-card__title span,
.article-card__link:focus-visible .article-card__title span {
	background-size: 100% 1px;
}

.article-card__media + .article-card__title {
	margin-top: 22px;
}

.article-card__summary {
	display: -webkit-box;
	margin-top: 12px;
	overflow: hidden;
	color: var(--c-text-soft);
	font-size: 14.5px;
	line-height: 1.65;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.articles__controls {
	display: flex;
	align-items: center;
	gap: 40px;
	margin-top: 32px;
}

.articles__controls[hidden] {
	display: none;
}

.articles__progress {
	position: relative;
	flex: 1;
	height: 2px;
	overflow: hidden;
	background: var(--c-line-soft);
}

.articles__thumb {
	position: absolute;
	inset: 0 auto 0 0;
	background: var(--c-navy);
}

.articles__arrows {
	display: flex;
	gap: 8px;
}

.articles__arrows .carousel-btn[aria-disabled="true"] {
	opacity: 0.3;
	pointer-events: none;
}

@media (max-width: 1079.98px) {
	.article-card {
		flex-basis: calc((100% - var(--articles-gap)) / 2);
	}
}

/* A single post fills the row; on wider screens the image sits beside the
 * text. Two posts share the row. */
.articles__track[data-count="1"] .article-card {
	flex-basis: 100%;
}

@media (min-width: 760px) {
	.articles__track[data-count="2"] .article-card {
		flex-basis: calc((100% - var(--articles-gap)) / 2);
	}

	.articles__track[data-count="1"] .article-card__link {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		grid-template-rows: 1fr auto auto auto 1fr;
		column-gap: clamp(32px, 5vw, 80px);
	}

	.articles__track[data-count="1"] .article-card__media {
		grid-row: 1 / -1;
	}

	.articles__track[data-count="1"] .article-card__meta {
		grid-row: 2;
		margin-top: 0;
	}

	.articles__track[data-count="1"] .article-card__title {
		grid-row: 3;
		font-size: clamp(24px, 2.4vw, 32px);
		line-height: 1.25;
	}

	.articles__track[data-count="1"] .article-card__media + .article-card__title {
		margin-top: 0;
	}

	.articles__track[data-count="1"] .article-card__summary {
		grid-row: 4;
		margin-top: 18px;
		font-size: 15.5px;
		-webkit-line-clamp: 5;
	}
}

@media (max-width: 759.98px) {
	.article-card {
		flex-basis: 82%;
	}

	.articles__controls {
		margin-top: 24px;
	}

	/* Swiping replaces the arrows; the bar still shows how much is left. */
	.articles__arrows {
		display: none;
	}
}
