/*
 * Homepage.
 *
 * Three sections: a cinematic hero, a horizontal trust strip, and an editorial
 * opening statement.
 *
 * The governing rule is restraint. The photography and the typography carry the page.
 * Nothing is layered unless the layer does something for the composition, and there
 * are never more than three visible planes in one place.
 *
 * Proportions across the three sections: white and warm white dominate, navy anchors
 * the hero, red appears only on the call action and one accent line, and steel is a
 * hairline and a single backing plane.
 *
 * Deliberately not here, having been tried and removed: page wide drafting grids,
 * a filled panel behind the headline, chamfered plate corners, skewed cards, rivets,
 * staggered dashboard layouts, and glow beyond the button.
 */

/* ===========================================================================
 * 1. Hero
 *
 * A full width photograph with a directional navy overlay and the headline set
 * straight onto it. No panel, no frame, no grid.
 *
 * Contrast is held by the overlay alone. It sits at 94 percent navy at the left edge
 * and 86 percent at the third of the width where the lead paragraph ends, so white
 * text there measures better than 7 to 1 even where the photograph behind it is
 * bright sky. It then opens to 10 percent on the right, which is what keeps the
 * photograph clearly visible rather than merely present.
 * ======================================================================== */

.afc-home-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 0;
	min-block-size: 0;
	background-color: var(--afc-navy-deep);
	color: var(--afc-color-text-on-dark);
}

.afc-home-hero__viewport {
	position: relative;
}

.afc-home-hero__track {
	position: relative;
}

/*
 * Height and padding live on the slide only. Putting min-height on the section and
 * the track as well stacked two full hero heights and left an empty navy band above
 * the photograph.
 */
.afc-home-hero__slide {
	position: relative;
	z-index: 0;
	display: grid;
	align-items: end;
	min-block-size: min(78vh, 44rem);
	padding-block: calc(var(--afc-section-y) * 1.1) var(--afc-space-2xl);
}

.afc-home-hero--flat .afc-home-hero__slide {
	min-block-size: auto;
	padding-block: var(--afc-section-y);
}

@media (max-width: 767px) {
	.afc-home-hero__slide {
		/*
		 * Match desktop: anchor height to the viewport immediately. Content-only
		 * sizing (min-block-size: auto) waits for web-font swap and defers the
		 * absolute media box that carries the LCP image on mobile.
		 */
		min-block-size: min(72svh, 40rem);
		padding-block: var(--afc-section-y) var(--afc-space-xl);
	}
}

/* Extra slides stay out of the layout until the slider script is ready. */
.afc-home-hero__slide--hidden {
	display: none;
}

/*
 * The first slide and its photograph must paint immediately from server HTML.
 * Opacity and visibility are never withheld pending slider JavaScript.
 */
.afc-home-hero__slide--active,
.afc-home-hero__slide--active .afc-home-hero__media,
.afc-home-hero__slide--active .afc-home-hero__image {
	opacity: 1;
	visibility: visible;
}

/*
 * Once ready, the track keeps the height the first slide already established, and
 * every slide stacks inside it. Absolute positioning applies only after ready, so
 * the first slide stays in normal flow until then and there is no layout shift.
 */
html.afc-js .afc-home-hero--slider.afc-home-hero--ready .afc-home-hero__track {
	min-block-size: var(--afc-hero-track-height, min(78vh, 44rem));
}

html.afc-js .afc-home-hero--slider.afc-home-hero--ready .afc-home-hero__slide {
	position: absolute;
	inset: 0;
	display: grid;
	min-block-size: 0;
	block-size: 100%;
	padding-block: calc(var(--afc-section-y) * 1.1) var(--afc-space-2xl);
}

html.afc-js .afc-home-hero--slider.afc-home-hero--ready .afc-home-hero__slide--hidden {
	display: grid;
}

html.afc-js .afc-home-hero--slider.afc-home-hero--ready .afc-home-hero__slide:not(.afc-home-hero__slide--active) {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	z-index: 0;
}

html.afc-js .afc-home-hero--slider.afc-home-hero--ready .afc-home-hero__slide--active {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto;
	z-index: 1;
}

html.afc-js .afc-home-hero--slider.afc-home-hero--ready.afc-home-hero--transition-fade.afc-home-hero--transitions-on .afc-home-hero__slide {
	transition:
		opacity var(--afc-hero-transition-ms, 420ms) var(--afc-ease-standard),
		visibility var(--afc-hero-transition-ms, 420ms) var(--afc-ease-standard);
}

html.afc-js .afc-home-hero--slider.afc-home-hero--ready.afc-home-hero--transition-slide.afc-home-hero--transitions-on .afc-home-hero__slide {
	transition:
		transform var(--afc-hero-transition-ms, 420ms) var(--afc-ease-standard),
		opacity var(--afc-hero-transition-ms, 420ms) var(--afc-ease-standard);
}

html.afc-js .afc-home-hero--slider.afc-home-hero--ready.afc-home-hero--transition-slide.afc-home-hero--transitions-on .afc-home-hero__slide:not(.afc-home-hero__slide--active) {
	transform: translateX(4%);
}

html.afc-js .afc-home-hero--slider.afc-home-hero--ready.afc-home-hero--transition-slide.afc-home-hero--transitions-on .afc-home-hero__slide--active {
	transform: translateX(0);
}

/*
 * Shared content mode: one H1 and text layer, background slides fade underneath.
 */
.afc-home-hero--shared-content .afc-home-hero__viewport {
	position: relative;
}

.afc-home-hero--shared-content .afc-home-hero__content {
	position: relative;
	z-index: 2;
	display: grid;
	align-items: end;
	min-block-size: min(78vh, 44rem);
	padding-block: calc(var(--afc-section-y) * 1.1) var(--afc-space-2xl);
	pointer-events: none;
}

.afc-home-hero--shared-content .afc-home-hero__content .afc-home-hero__inner,
.afc-home-hero--shared-content .afc-home-hero__content .afc-home-hero__actions,
.afc-home-hero--shared-content .afc-home-hero__content a,
.afc-home-hero--shared-content .afc-home-hero__content button {
	pointer-events: auto;
}

.afc-home-hero--shared-content .afc-home-hero__track {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.afc-home-hero--shared-content .afc-home-hero__slide {
	display: block;
	padding: 0;
	min-block-size: 0;
}

.afc-home-hero--shared-content .afc-home-hero__slide--bg {
	position: absolute;
	inset: 0;
}

.afc-home-hero--flat.afc-home-hero--shared-content .afc-home-hero__content {
	min-block-size: auto;
	padding-block: var(--afc-section-y);
}

@media (max-width: 767px) {
	.afc-home-hero--shared-content .afc-home-hero__content {
		min-block-size: min(72svh, 40rem);
		padding-block: var(--afc-section-y) var(--afc-space-xl);
	}
}

html.afc-js .afc-home-hero--shared-content.afc-home-hero--slider.afc-home-hero--ready .afc-home-hero__track {
	min-block-size: 100%;
	block-size: 100%;
}

html.afc-js .afc-home-hero--shared-content.afc-home-hero--slider.afc-home-hero--ready .afc-home-hero__slide {
	display: block;
	padding: 0;
	min-block-size: 0;
	block-size: 100%;
}

html.afc-js .afc-home-hero--shared-content.afc-home-hero--slider.afc-home-hero--ready .afc-home-hero__slide--hidden {
	display: block;
}

.afc-home-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin: 0;
	overflow: hidden;
}

.afc-home-hero__picture,
.afc-home-hero__media img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
}

.afc-home-hero__media img {
	object-fit: cover;
	object-position: center 45%;
}

.afc-home-hero__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.afc-home-hero__overlay--hide {
	display: none;
}

.afc-home-hero__overlay--default.afc-home-hero__overlay--focal-protect-left {
	background-image:
		linear-gradient(96deg, rgba(9, 15, 34, 0.94) 0%, rgba(9, 15, 34, 0.86) 34%, rgba(9, 15, 34, 0.42) 66%, rgba(9, 15, 34, 0.1) 100%),
		linear-gradient(0deg, rgba(9, 15, 34, 0.7) 0%, rgba(9, 15, 34, 0.12) 34%, rgba(9, 15, 34, 0) 58%);
}

.afc-home-hero__overlay--default.afc-home-hero__overlay--focal-protect-right {
	background-image:
		linear-gradient(264deg, rgba(9, 15, 34, 0.94) 0%, rgba(9, 15, 34, 0.86) 34%, rgba(9, 15, 34, 0.42) 66%, rgba(9, 15, 34, 0.1) 100%),
		linear-gradient(0deg, rgba(9, 15, 34, 0.7) 0%, rgba(9, 15, 34, 0.12) 34%, rgba(9, 15, 34, 0) 58%);
}

.afc-home-hero__overlay--default.afc-home-hero__overlay--focal-even {
	background-image: linear-gradient(180deg, rgba(9, 15, 34, 0.78) 0%, rgba(9, 15, 34, 0.9) 100%);
}

@media (max-width: 767px) {
	.afc-home-hero__overlay--default.afc-home-hero__overlay--focal-protect-left,
	.afc-home-hero__overlay--default.afc-home-hero__overlay--focal-protect-right {
		background-image: linear-gradient(180deg, rgba(9, 15, 34, 0.78) 0%, rgba(9, 15, 34, 0.9) 100%);
	}
}

.afc-home-hero__inner {
	position: relative;
	z-index: 2;
}

.afc-home-hero__inner--position-center {
	justify-self: center;
}

.afc-home-hero__inner--position-right {
	justify-self: end;
}

.afc-home-hero__text {
	max-inline-size: 44rem;
}

.afc-home-hero__text--align-center {
	text-align: center;
}

.afc-home-hero__text--align-center .afc-accent-line {
	margin-inline: auto;
}

.afc-home-hero__text--align-right {
	text-align: right;
}

.afc-home-hero__text--align-right .afc-accent-line {
	margin-inline-start: auto;
}

.afc-home-hero__text--align-center .afc-home-hero__actions,
.afc-home-hero__text--align-right .afc-home-hero__actions {
	justify-content: center;
}

.afc-home-hero__text--align-right .afc-home-hero__actions {
	justify-content: flex-end;
}

.afc-home-hero__eyebrow {
	margin: 0 0 var(--afc-space-xs);
	color: var(--afc-white);
	font-family: var(--afc-font-display);
	font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
	font-weight: var(--afc-weight-bold);
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.afc-home-hero__eyebrow span {
	font-variant-numeric: tabular-nums;
}

.afc-home-hero__title {
	margin: 0;
	color: var(--afc-white);
	font-family: var(--afc-font-display);
	font-size: clamp(2.5rem, 1.1rem + 5.2vw, 5rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.025em;
	text-transform: uppercase;
	text-wrap: balance;
}

/* The second line drops to a lighter weight and a silver tone, so the headline reads
   as two statements rather than one block of capitals. */
.afc-home-hero__title span {
	display: block;
	color: #dfe4ec;
	font-size: 0.58em;
	font-weight: 600;
	letter-spacing: -0.005em;
}

/*
 * The lead is held to a short measure on purpose. It keeps the line length readable
 * and it keeps the paragraph inside the strong part of the overlay, which is what
 * makes a panel behind the text unnecessary.
 */
.afc-home-hero__lead {
	max-inline-size: 30rem;
	margin-block: var(--afc-space-md) 0;
	color: #eef1f5;
	font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
	line-height: 1.5;
	text-wrap: pretty;
}

.afc-home-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--afc-space-sm);
	margin-block-start: var(--afc-space-lg);
}

.afc-home-hero__arrows {
	position: absolute;
	inset-block-end: var(--afc-space-lg);
	inset-inline-end: var(--afc-space-md);
	z-index: 3;
	display: flex;
	gap: var(--afc-space-2xs);
}

.afc-home-hero__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 2.75rem;
	block-size: 2.75rem;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: var(--afc-radius-xs);
	background-color: rgba(9, 15, 34, 0.55);
	color: var(--afc-white);
	cursor: pointer;
}

.afc-home-hero__arrow:hover,
.afc-home-hero__arrow:focus-visible {
	background-color: rgba(9, 15, 34, 0.82);
	border-color: rgba(255, 255, 255, 0.5);
}

.afc-home-hero__dots {
	position: absolute;
	inset-block-end: var(--afc-space-lg);
	inset-inline-start: 50%;
	z-index: 3;
	display: flex;
	gap: 0.55rem;
	transform: translateX(-50%);
}

.afc-home-hero__dot {
	inline-size: 0.75rem;
	block-size: 0.75rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.38);
	cursor: pointer;
}

.afc-home-hero__dot.is-active,
.afc-home-hero__dot[aria-current="true"] {
	background-color: var(--afc-color-brand-red);
	box-shadow: 0 0 0 3px rgba(232, 60, 60, 0.28);
}

@media (max-width: 767px) {
	.afc-home-hero__arrows {
		inset-block-end: calc(var(--afc-space-xl) + 1.75rem);
		inset-inline-end: var(--afc-space-sm);
	}

	.afc-home-hero__arrow {
		inline-size: 2.5rem;
		block-size: 2.5rem;
	}

	.afc-home-hero__dots {
		inset-block-end: var(--afc-space-sm);
	}

	.afc-home-hero__dot {
		inline-size: var(--afc-tap-target);
		block-size: 0.45rem;
		max-inline-size: 2.5rem;
		border-radius: 999px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.afc-js .afc-home-hero--slider.afc-home-hero--ready .afc-home-hero__slide {
		transition: none;
	}
}

/* ===========================================================================
 * 3. Trust strip
 *
 * One horizontal band of four facts on a white into silver surface. Four equal cells,
 * large figures, small capitalised labels, and hairline dividers. No cards, no tilt,
 * no offsets.
 *
 * Navy on the silver end of the surface measures better than 11 to 1, and the steel
 * grey label on the same ground is 4.9 to 1.
 * ======================================================================== */

.afc-home-trust {
	padding-block: var(--afc-space-lg);
	border-block: 1px solid var(--afc-steel-300);
	background-color: var(--afc-white);
	background-image: linear-gradient(168deg, #ffffff 0%, #fbfaf8 42%, #eceff4 100%);
}

/*
 * Column counts and spans are stated rather than left to auto-fit, for two reasons.
 *
 * The dividers need to know where the row breaks are, because a divider on the leading
 * edge of a cell that has wrapped to a new row reads as a stray line.
 *
 * And the four facts are not the same width. A seven figure licence number is far
 * wider than a two digit count, so equal quarters make the licence collide with the
 * cell beside it. The twelve column grid gives the licence four columns and the count
 * two, which fixes the collision by giving the number room rather than by shrinking
 * every fact to fit the widest one.
 */
.afc-home-trust__list {
	display: grid;
	gap: 0;
	grid-template-columns: minmax(0, 1fr);
	margin: 0;
	padding: 0;
	list-style: none;
}

.afc-home-trust__item {
	min-inline-size: 0;
	padding: var(--afc-space-sm) var(--afc-space-md);
}

.afc-home-trust__item + .afc-home-trust__item {
	border-block-start: 1px solid var(--afc-steel-300);
}

@media (min-width: 620px) {
	.afc-home-trust__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.afc-home-trust__item + .afc-home-trust__item {
		border-block-start: 0;
	}

	.afc-home-trust__item:nth-child(even) {
		border-inline-start: 1px solid var(--afc-steel-300);
	}

	.afc-home-trust__item:nth-child(n + 3) {
		border-block-start: 1px solid var(--afc-steel-300);
	}
}

@media (min-width: 1000px) {
	.afc-home-trust__list {
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}

	.afc-home-trust__item:nth-child(n + 3) {
		border-block-start: 0;
	}

	.afc-home-trust__item + .afc-home-trust__item {
		border-inline-start: 1px solid var(--afc-steel-300);
	}

	/* Two, four, four, two. The first cell loses its left padding so the figure lines
	   up with the container edge and the copy above it. */
	.afc-home-trust__item--years {
		grid-column: span 2;
		padding-inline-start: 0;
	}

	.afc-home-trust__item--licence {
		grid-column: span 4;
	}

	.afc-home-trust__item--types {
		grid-column: span 4;
	}

	.afc-home-trust__item--areas {
		grid-column: span 2;
	}
}

.afc-home-trust__value {
	margin: 0;
	color: var(--afc-navy-dark);
	font-family: var(--afc-font-display);
	font-size: clamp(2.25rem, 1.6rem + 2.1vw, 3.5rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

/*
 * The licence number is the only value that must not break, so it is the only one that
 * declares nowrap, and it runs a step smaller than the other figures. At its largest,
 * eight characters of Archivo 800 at 40 pixels occupy roughly 200 pixels, against a
 * cell that is 345 pixels wide at 1440, 313 at 1280, and 268 at 1024.
 */
.afc-home-trust__value--licence {
	font-size: clamp(1.75rem, 1.35rem + 1.1vw, 2.5rem);
	letter-spacing: -0.015em;
	white-space: nowrap;
}

/* A written value rather than a figure needs a smaller size to hold the same optical
   weight as the numerals beside it. */
.afc-home-trust__value--text {
	font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.afc-home-trust__label {
	margin: var(--afc-space-2xs) 0 0;
	color: var(--afc-steel-600);
	font-family: var(--afc-font-display);
	font-size: 0.75rem;
	font-weight: var(--afc-weight-bold);
	letter-spacing: 0.16em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* ===========================================================================
 * 4. Opening statement
 *
 * Two columns. Copy left, photography right. Exactly three planes on the right: a
 * steel backing plane, the project photograph, and one smaller detail overlapping a
 * single corner.
 * ======================================================================== */

.afc-home-intro {
	padding-block: var(--afc-section-y);
	background-color: var(--afc-white);
	background-image: linear-gradient(172deg, #ffffff 0%, #fdfcfa 62%, #f6f7fa 100%);
	overflow-x: clip;
}

.afc-home-intro__grid {
	display: grid;
	gap: var(--afc-space-xl);
}

@media (min-width: 900px) {
	.afc-home-intro__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
		gap: var(--afc-space-2xl);
		align-items: center;
	}
}

/* --- Copy --------------------------------------------------------------- */

.afc-home-intro__eyebrow {
	margin: 0 0 var(--afc-space-2xs);
	color: var(--afc-color-brand-red-dark);
	font-family: var(--afc-font-display);
	font-size: 0.8125rem;
	font-weight: var(--afc-weight-bold);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.afc-home-intro__title {
	margin: 0;
	color: var(--afc-navy-dark);
	font-family: var(--afc-font-display);
	font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3rem);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.022em;
	text-wrap: balance;
}

.afc-home-intro__text {
	max-inline-size: 34rem;
	margin-block: var(--afc-space-md) 0;
	font-size: clamp(1rem, 0.97rem + 0.3vw, 1.125rem);
	line-height: 1.65;
	text-wrap: pretty;
}

.afc-home-intro__text + .afc-home-intro__text {
	margin-block-start: var(--afc-space-sm);
}

/* --- Photography -------------------------------------------------------- */

.afc-home-intro__media {
	position: relative;
}

/*
 * The steel backing plane, behind the lead photograph and offset up and to the right.
 * One flat rectangle, no skew and no chamfer. It is the third plane, and the last.
 */
.afc-home-intro__media::before {
	content: "";
	position: absolute;
	inset-block: 0 auto;
	inset-inline: auto 0;
	block-size: 62%;
	inline-size: 72%;
	transform: translate(var(--afc-space-md), calc(var(--afc-space-md) * -1));
	background-image: linear-gradient(150deg, #e9ecf1 0%, #d5dbe3 52%, #bdc5d0 100%);
	pointer-events: none;
}

/*
 * The lead photograph is inset from the left of its column so the detail has somewhere
 * to overlap into, and the two together fill the column width. On a phone both are
 * full width and stacked, so neither inset applies.
 */
.afc-home-intro__lead {
	position: relative;
	margin: 0;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background-color: var(--afc-steel-300);
	box-shadow: var(--afc-depth-lg);
}

.afc-home-intro__detail {
	position: relative;
	margin: var(--afc-space-md) 0 0;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	inline-size: 78%;
	background-color: var(--afc-steel-300);
	border: 8px solid var(--afc-white);
	box-shadow: var(--afc-depth-xl);
}

/*
 * Overlapping one corner, and one corner only.
 *
 * The detail is 66 percent of the column against the lead's 86, which is roughly half
 * again the size it was, and it overlaps the lead across about 52 percent of the
 * column and most of its own height. That is a deliberate overlap rather than a corner
 * touching a corner.
 *
 * The group is measured off the column rather than off the viewport, so it holds its
 * proportions from 900 pixels upward without a second breakpoint.
 */
@media (min-width: 900px) {
	.afc-home-intro__media {
		padding-block-end: 14%;
	}

	.afc-home-intro__lead {
		margin-inline-start: 14%;
		z-index: 1;
	}

	.afc-home-intro__detail {
		position: absolute;
		inset-block-end: 0;
		inset-inline-start: 0;
		inline-size: 66%;
		margin: 0;
		z-index: 2;
	}
}

.afc-home-intro__lead img,
.afc-home-intro__detail img,
.afc-home-intro__photo {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
}

/*
 * Hover depth swap on the photograph pair.
 *
 * Default: the detail frame sits above the lead. On hover the lead reads forward and
 * the detail drops out. Both frames stay exactly where they are, and no image is
 * copied into the other frame.
 *
 * The swap is deliberately immediate. motion.css owns the transition on these figures
 * because they are reveal targets, so an opacity transition declared here has no
 * effect on hover.
 */
@media (hover: hover) and (pointer: fine) {
	.afc-home-intro__media--dual:hover .afc-home-intro__lead {
		z-index: 3;
	}

	.afc-home-intro__media--dual:hover .afc-home-intro__detail {
		opacity: 0;
	}
}

/* ===========================================================================
 * 5. Shared section furniture
 *
 * One eyebrow, one heading, one lede, used by every band below. Defined once because
 * six sections wanting the same three text sizes is a reason to have three rules, not
 * eighteen.
 * ======================================================================== */

.afc-home-eyebrow {
	margin: 0 0 var(--afc-space-2xs);
	color: var(--afc-color-brand-red-dark);
	font-family: var(--afc-font-display);
	font-size: 0.8125rem;
	font-weight: var(--afc-weight-bold);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* On navy the dark red fails contrast, so the eyebrow goes to the bright red, which
   measures 5.1 to 1 on the darkest part of the plane. */
.afc-home-eyebrow--on-dark {
	color: #ff8a8a;
}

.afc-home-heading {
	margin: 0;
	max-inline-size: 34rem;
	color: var(--afc-navy-dark);
	font-family: var(--afc-font-display);
	font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.75rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.022em;
	text-wrap: balance;
}

.afc-home-heading--on-dark {
	color: var(--afc-white);
}

.afc-home-lede {
	max-inline-size: 34rem;
	margin-block: var(--afc-space-md) 0;
	font-size: clamp(1rem, 0.97rem + 0.3vw, 1.125rem);
	line-height: 1.65;
	text-wrap: pretty;
}

/* ===========================================================================
 * 6. Featured services
 *
 * Rows, not cards. Six service groups of unequal importance, each carrying a sentence
 * of description, which a row holds comfortably and a card does not. The heading block
 * sits in its own column so the rows have a shorter measure to run against.
 * ======================================================================== */

/*
 * A silver to white surface rather than flat white. The section is mostly type, so the
 * background is doing the work of separating it from the white band above, and a
 * gradient across the diagonal reads as a lit plane rather than as a coloured box.
 */
.afc-home-services {
	padding-block: var(--afc-section-y);
	border-block-start: 1px solid var(--afc-steel-300);
	background-color: #f4f6fa;
	background-image: linear-gradient(166deg, #ffffff 0%, #f5f7fb 54%, #e8ecf3 100%);
}

.afc-home-services__grid {
	display: grid;
	gap: var(--afc-space-xl);
}

/* Near enough to even. The left column now carries a photograph as well as the heading,
   so it no longer needs to give width away to the list. */
@media (min-width: 900px) {
	.afc-home-services__grid {
		grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
		gap: var(--afc-space-2xl);
		align-items: start;
	}
}

.afc-home-services__action {
	margin-block: var(--afc-space-lg) 0;
}

/* The anchor photograph, with a red edge down its leading side. This is the section's
   only image, so it carries the whole visual weight of the left column. */
.afc-home-services__anchor {
	position: relative;
	margin: var(--afc-space-xl) 0 0;
	overflow: hidden;
	aspect-ratio: 5 / 4;
	background-color: var(--afc-steel-300);
	box-shadow: var(--afc-depth-lg);
}

.afc-home-services__anchor::after {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	inline-size: 4px;
	background-color: var(--afc-color-brand-red);
	z-index: 2;
}

.afc-home-services__stage {
	position: relative;
	inline-size: 100%;
	block-size: 100%;
}

.afc-home-services__photo {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--afc-services-fade-ms, 500ms) ease-in-out;
}

.afc-home-services__photo.is-active {
	opacity: 1;
}

.afc-home-services__photo img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
}

.afc-home-services__anchor > img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
}

@media (prefers-reduced-motion: reduce) {
	.afc-home-services__photo {
		transition: none;
	}
}

.afc-home-services__list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-block-start: 1px solid var(--afc-steel-300);
}

.afc-home-services__item {
	position: relative;
	padding-block: var(--afc-space-md);
	border-block-end: 1px solid var(--afc-steel-300);
}

/*
 * The hover edge. A red rule that draws across the row from the left, sitting exactly on
 * top of the hairline it replaces, so the row gains an accent rather than gaining a
 * second line.
 */
.afc-home-services__item::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: -1px;
	block-size: 2px;
	background-color: var(--afc-color-brand-red);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 320ms var(--afc-ease-standard);
}

.afc-home-services__name,
.afc-home-services__text {
	transition: transform 320ms var(--afc-ease-standard);
}

@media (hover: hover) and (pointer: fine) {
	.afc-home-services__item:hover::after,
	.afc-home-services__item:focus-within::after {
		transform: scaleX(1);
	}

	/* A short shift, enough to register as a response without disturbing the column. */
	.afc-home-services__item:hover .afc-home-services__name,
	.afc-home-services__item:hover .afc-home-services__text,
	.afc-home-services__item:focus-within .afc-home-services__name,
	.afc-home-services__item:focus-within .afc-home-services__text {
		transform: translateX(8px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.afc-home-services__item::after,
	.afc-home-services__name,
	.afc-home-services__text {
		transition: none;
	}
}

.afc-home-services__name {
	margin: 0;
	color: var(--afc-navy-dark);
	font-family: var(--afc-font-display);
	font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.4375rem);
	font-weight: var(--afc-weight-bold);
	line-height: 1.2;
	letter-spacing: -0.012em;
}

.afc-home-services__text {
	max-inline-size: 34rem;
	margin: var(--afc-space-2xs) 0 0;
	color: var(--afc-color-text-muted);
	font-size: var(--afc-text-body-sm);
	line-height: 1.6;
}

/*
 * The one row that has somewhere to go.
 *
 * Five of the six services have no page yet, so the row that does needs to look
 * different rather than merely being clickable. It gets a red leading bar, a tinted
 * ground, and an arrow, which together read as a destination.
 */
.afc-home-services__item--linked {
	padding-inline: var(--afc-space-md);
	border-inline-start: 3px solid var(--afc-color-brand-red);
	background-image: linear-gradient(90deg, rgba(200, 30, 30, 0.07) 0%, rgba(200, 30, 30, 0) 62%);
}

.afc-home-services__item--linked .afc-home-services__name a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: inherit;
	text-decoration: none;
}

.afc-home-services__item--linked .afc-home-services__name a span {
	text-decoration: underline;
	text-decoration-color: var(--afc-color-brand-red);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

.afc-home-services__item--linked .afc-icon {
	flex: none;
	color: var(--afc-color-brand-red);
	transition: transform 320ms var(--afc-ease-standard);
}

@media (hover: hover) and (pointer: fine) {
	.afc-home-services__item--linked:hover .afc-icon {
		transform: translateX(5px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.afc-home-services__item--linked .afc-icon {
		transition: none;
	}
}

/* ===========================================================================
 * 7. Featured projects
 *
 * Full-width portfolio grid. Fifteen published projects in a consistent 4:3
 * rhythm, with an accessible lightbox on the photograph rather than links to
 * incomplete single views.
 * ======================================================================== */

.afc-home-projects {
	padding-block: var(--afc-section-y);
	background-color: #fbfaf8;
	background-image: linear-gradient(172deg, #fdfcfa 0%, #f6f7fa 100%);
}

.afc-home-projects__head {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: var(--afc-space-md);
	margin-block-end: var(--afc-space-lg);
}

.afc-home-projects__band {
	inline-size: 100%;
	padding-inline: var(--afc-gutter);
}

.afc-home-projects__grid {
	display: grid;
	gap: var(--afc-space-md);
	grid-template-columns: minmax(0, 1fr);
	max-inline-size: 112.5rem;
	margin-inline: auto;
}

@media (min-width: 540px) {
	.afc-home-projects__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	.afc-home-projects__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--afc-space-lg);
	}
}

@media (min-width: 1024px) {
	.afc-home-projects__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1440px) {
	.afc-home-projects__grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

.afc-home-projects__card {
	display: flex;
	flex-direction: column;
	gap: var(--afc-space-sm);
}

.afc-home-projects__trigger {
	display: block;
	inline-size: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	text-align: inherit;
}

.afc-home-projects__trigger:focus-visible {
	outline: 2px solid var(--afc-color-brand-red);
	outline-offset: 3px;
}

.afc-home-projects__media {
	position: relative;
	margin: 0;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background-color: var(--afc-steel-300);
	box-shadow: var(--afc-depth-md);
}

.afc-home-projects__photo {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 420ms var(--afc-ease-standard);
}

.afc-home-projects__meta {
	display: grid;
	gap: 0.2rem;
	color: var(--afc-steel-700);
	transition: color 220ms var(--afc-ease-standard);
}

.afc-home-projects__category {
	margin: 0;
	color: var(--afc-color-brand-red-dark);
	font-family: var(--afc-font-display);
	font-size: 0.6875rem;
	font-weight: var(--afc-weight-bold);
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.afc-home-projects__title {
	margin: 0;
	color: var(--afc-navy-dark);
	font-family: var(--afc-font-display);
	font-size: var(--afc-text-body-sm);
	font-weight: var(--afc-weight-bold);
	line-height: 1.35;
}

.afc-home-projects__location {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
}

@media (hover: hover) and (pointer: fine) {
	.afc-home-projects__card:hover .afc-home-projects__photo {
		transform: scale(1.03);
	}

	.afc-home-projects__card:hover .afc-home-projects__meta {
		color: var(--afc-navy-dark);
	}
}

@media (prefers-reduced-motion: reduce) {
	.afc-home-projects__photo {
		transition: none;
	}

	.afc-home-projects__card:hover .afc-home-projects__photo {
		transform: none;
	}
}

/* ===========================================================================
 * 8. Process
 *
 * The one dark band in the body of the page. Navy into charcoal, four numbered steps,
 * no cards and no panels. The numerals carry the structure.
 * ======================================================================== */

.afc-home-process {
	padding-block: var(--afc-section-y);
	background-color: var(--afc-navy-dark);
	background-image: linear-gradient(158deg, #16224c 0%, #101a3a 42%, #1c2029 100%);
	color: var(--afc-color-text-on-dark);
}

.afc-home-process__head {
	max-inline-size: 40rem;
	margin-block-end: var(--afc-space-xl);
}

/*
 * One fabrication line across the four stages.
 *
 * The previous version gave each step its own top rule, red on the first and pale on the
 * rest. Repeated four times that reads as a flag, which is not what a process diagram
 * should say. It is replaced by a single continuous run of steel with one red segment at
 * the head of it and a machined node at each stage, which is what a line of work
 * actually looks like.
 *
 * The wrapper carries data-afc-reveal="line", so --afc-line-draw goes from 0 to 1 once
 * the band arrives. The fallback of 1 in every var() below means the line is drawn
 * whenever that flag is absent, which covers no scripting and reduced motion.
 */
.afc-home-process__line {
	position: relative;
	padding-block-start: var(--afc-space-lg);
}

/* The steel run. Brighter through the middle, as rolled stock is under a light. */
.afc-home-process__line::before,
.afc-home-process__line::after {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	block-size: 2px;
	transform: scaleX(var(--afc-line-draw, 1));
	transform-origin: left center;
}

.afc-home-process__line::before {
	inline-size: 100%;
	background-image: linear-gradient(90deg, #6f7a8c 0%, #aab4c4 46%, #7c8697 100%);
	transition: transform 900ms var(--afc-ease-entrance);
}

/* The active segment, covering the first stage only. */
.afc-home-process__line::after {
	inline-size: 25%;
	background-image: linear-gradient(90deg, var(--afc-red-bright) 0%, var(--afc-color-brand-red) 100%);
	transition: transform 640ms 320ms var(--afc-ease-entrance);
}

/* Below four across the run would have to jump between rows, so it is hidden and each
   step carries its own short rule instead. */
@media (max-width: 1079px) {
	.afc-home-process__line::before,
	.afc-home-process__line::after {
		display: none;
	}

	.afc-home-process__step {
		border-block-start: 2px solid #6f7a8c;
	}
}

.afc-home-process__list {
	display: grid;
	gap: var(--afc-space-lg);
	grid-template-columns: minmax(0, 1fr);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 700px) {
	.afc-home-process__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--afc-space-xl);
	}
}

@media (min-width: 1080px) {
	.afc-home-process__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--afc-space-lg);
	}
}

.afc-home-process__step {
	position: relative;
	padding-block-start: var(--afc-space-md);
}

/*
 * The node. A small square rather than a dot, because a square reads as machined and a
 * dot reads as a bullet. It sits centred on the two pixel run, and it scales in from
 * nothing on its own delay so the four arrive left to right behind the line.
 */
.afc-home-process__node {
	position: absolute;
	inset-block-start: calc(var(--afc-space-lg) * -1 - 5px);
	inset-inline-start: 0;
	inline-size: 12px;
	block-size: 12px;
	background-color: #16224c;
	border: 2px solid #aab4c4;
	transform: scale(var(--afc-line-draw, 1));
	transition:
		transform 300ms var(--afc-ease-standard),
		background-color 240ms var(--afc-ease-standard),
		border-color 240ms var(--afc-ease-standard),
		box-shadow 240ms var(--afc-ease-standard);
}

/* First node is on the red segment, so it is the red one. */
.afc-home-process__step:first-child .afc-home-process__node {
	background-color: var(--afc-red-bright);
	border-color: var(--afc-red-bright);
}

.afc-home-process__step:nth-child(2) .afc-home-process__node {
	transition-delay: 120ms;
}

.afc-home-process__step:nth-child(3) .afc-home-process__node {
	transition-delay: 240ms;
}

.afc-home-process__step:nth-child(4) .afc-home-process__node {
	transition-delay: 360ms;
}

/* Off the run, the node centres on the step's own rule instead. Border box sizing means
   the node is 12 pixels tall in total, so half of it above a line centred at 1 pixel
   puts its top edge at minus 5. */
@media (max-width: 1079px) {
	.afc-home-process__node {
		inset-block-start: -5px;
	}
}

.afc-home-process__number {
	margin: 0;
	color: #b9c6dd;
	font-family: var(--afc-font-display);
	font-size: 0.875rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	font-variant-numeric: tabular-nums;
}

.afc-home-process__name {
	margin: var(--afc-space-2xs) 0 0;
	color: var(--afc-white);
	font-family: var(--afc-font-display);
	font-size: clamp(1.375rem, 1.15rem + 0.75vw, 1.75rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.afc-home-process__text {
	margin: var(--afc-space-xs) 0 0;
	color: #e4e9f2;
	font-size: var(--afc-text-body-sm);
	line-height: 1.6;
}

/*
 * Hover raises the stage and lights its node.
 *
 * The node is counter translated by the same amount the step rises, so it stays welded
 * to the line while everything above it lifts. Without that it would ride up and detach,
 * which would undo the point of drawing a connected line in the first place.
 */
@media (hover: hover) and (pointer: fine) {
	.afc-home-process__step {
		transition: transform 300ms var(--afc-ease-standard);
	}

	.afc-home-process__step:hover {
		transform: translateY(-6px);
	}

	.afc-home-process__step:hover .afc-home-process__node {
		transform: translateY(6px) scale(var(--afc-line-draw, 1));
		background-color: var(--afc-red-bright);
		border-color: var(--afc-red-bright);
		box-shadow: 0 0 0 5px rgba(232, 60, 60, 0.22);
		transition-delay: 0ms;
	}
}

@media (prefers-reduced-motion: reduce) {
	.afc-home-process__line::before,
	.afc-home-process__line::after,
	.afc-home-process__node,
	.afc-home-process__step {
		transition: none;
	}

	.afc-home-process__step:hover {
		transform: none;
	}

	.afc-home-process__step:hover .afc-home-process__node {
		transform: scale(1);
	}
}

.afc-home-process__action {
	margin-block: var(--afc-space-xl) 0;
}

/* ===========================================================================
 * 9. Residential and commercial
 *
 * Two halves of equal weight, because the business serves both rather than leading
 * with one. Photograph, name, sentence. Nothing else.
 * ======================================================================== */

.afc-home-markets {
	padding-block: var(--afc-section-y);
	background-color: var(--afc-white);
}

.afc-home-markets__head {
	margin-block-end: var(--afc-space-lg);
}

.afc-home-markets__pair {
	display: grid;
	gap: var(--afc-space-xl);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 800px) {
	.afc-home-markets__pair {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--afc-space-2xl);
	}
}

.afc-home-markets__media {
	margin: 0 0 var(--afc-space-md);
	overflow: hidden;
	aspect-ratio: 3 / 2;
	background-color: var(--afc-steel-300);
	box-shadow: var(--afc-depth-lg);
}

.afc-home-markets__media img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
}

.afc-home-markets__name {
	margin: 0;
	color: var(--afc-navy-dark);
	font-family: var(--afc-font-display);
	font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
	font-weight: 800;
	line-height: 1.14;
	letter-spacing: -0.018em;
}

/* A short red rule under each name, so the two halves are clearly two things. */
.afc-home-markets__name::after {
	content: "";
	display: block;
	inline-size: 3rem;
	block-size: 3px;
	margin-block-start: var(--afc-space-xs);
	background-color: var(--afc-color-brand-red);
}

.afc-home-markets__text {
	max-inline-size: 30rem;
	margin: var(--afc-space-sm) 0 0;
	font-size: 1rem;
	line-height: 1.65;
}

/* ===========================================================================
 * 10. Materials and craftsmanship
 *
 * Photograph on the left, copy and the material list on the right. The list is a plain
 * inline set of names with hairline separators, not a row of chips.
 * ======================================================================== */

.afc-home-materials {
	padding-block: var(--afc-section-y);
	background-color: #fbfaf8;
	background-image: linear-gradient(172deg, #ffffff 0%, #f7f5f1 58%, #eef0f5 100%);
}

.afc-home-materials__grid {
	display: grid;
	gap: var(--afc-space-xl);
}

@media (min-width: 900px) {
	.afc-home-materials__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: var(--afc-space-2xl);
		align-items: center;
	}
}

.afc-home-materials__media {
	margin: 0;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background-color: var(--afc-steel-300);
	box-shadow: var(--afc-depth-lg);
}

.afc-home-materials__media img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
}

.afc-home-materials__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--afc-space-2xs) var(--afc-space-md);
	margin: var(--afc-space-lg) 0 0;
	padding: 0;
	list-style: none;
}

.afc-home-materials__list li {
	margin: 0;
	color: var(--afc-navy-dark);
	font-family: var(--afc-font-display);
	font-size: clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);
	font-weight: var(--afc-weight-bold);
	letter-spacing: 0.02em;
}

/* A hairline between names rather than a box around each. */
.afc-home-materials__list li + li {
	padding-inline-start: var(--afc-space-md);
	border-inline-start: 1px solid var(--afc-steel-300);
}

/* ===========================================================================
 * 11. Service areas and profiles
 *
 * The closing band before the footer call action. Counties large on the left, office
 * and profiles on the right, on the silver end of the light palette so it separates
 * from the warm white above it and the navy below.
 * ======================================================================== */

.afc-home-areas {
	padding-block: var(--afc-section-y);
	border-block-start: 1px solid var(--afc-steel-300);
	background-color: #eef0f5;
	background-image: linear-gradient(168deg, #f6f7fa 0%, #e9ecf2 58%, #dfe4ec 100%);
}

.afc-home-areas__grid {
	display: grid;
	gap: var(--afc-space-xl);
}

@media (min-width: 900px) {
	.afc-home-areas__grid {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
		gap: var(--afc-space-2xl);
		align-items: start;
	}
}

.afc-home-areas__list {
	display: grid;
	gap: 0;
	grid-template-columns: minmax(0, 1fr);
	margin: var(--afc-space-lg) 0 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 620px) {
	.afc-home-areas__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--afc-space-lg);
	}
}

.afc-home-areas__list li {
	margin: 0;
	padding-block: var(--afc-space-sm);
	border-block-start: 1px solid var(--afc-steel-300);
	color: var(--afc-navy-dark);
	font-family: var(--afc-font-display);
	font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.015em;
}

.afc-home-areas__call {
	margin-block: var(--afc-space-lg) 0;
}

.afc-home-areas__label {
	margin: 0 0 var(--afc-space-2xs);
	color: var(--afc-steel-600);
	font-family: var(--afc-font-display);
	font-size: 0.75rem;
	font-weight: var(--afc-weight-bold);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.afc-home-areas__label:not(:first-child) {
	margin-block-start: var(--afc-space-lg);
}

.afc-home-areas__address {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
}

.afc-home-areas__profiles {
	display: flex;
	flex-direction: column;
	gap: var(--afc-space-2xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.afc-home-areas__profiles a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-block-size: var(--afc-tap-target);
	color: var(--afc-navy-dark);
	font-size: 1rem;
	font-weight: var(--afc-weight-bold);
}

.afc-home-areas__profiles .afc-icon {
	flex: none;
	color: var(--afc-color-brand-red);
}

.afc-home-areas__action {
	margin-block: var(--afc-space-lg) 0;
}
