/**
 * nc/card-grid — front-end styles.
 *
 * Three card styles (variant): People (portrait + name + title + optional quote),
 * Brand (logo tile + name + description + website link), Feature (icon badge + title
 * + copy). The whole grid sits on a section tone band (white / muted / navy / blue)
 * so pages alternate background colour for rhythm.
 *
 * Brand navy #062537 / orange #ff6900 / blue #0067b1 / Vollkorn serif headings.
 */
.nc-cardgrid {
	box-sizing: border-box;
	padding-block: clamp( 48px, 6vw, 88px );
}

.nc-cardgrid__inner {
	box-sizing: border-box;
	padding-inline: var( --nc-content-gutter, 60px );
}

/* ---- Tone bands ----------------------------------------------------------- */
.nc-tone-muted {
	background: #eef3f7;
}

.nc-tone-navy {
	background: #062537;
}

.nc-tone-blue {
	background: #0c4a82;
}

/* ---- Heading + intro ------------------------------------------------------ */
.nc-cardgrid__heading {
	margin: 0 0 16px;
	font-family: "Vollkorn", Georgia, serif;
	font-weight: 600;
	font-size: clamp( 28px, 3.2vw, 42px );
	line-height: 1.14;
	letter-spacing: -0.01em;
	text-align: center;
	text-wrap: balance;
	color: #062537;
}

.nc-cardgrid__intro {
	max-width: 66ch;
	margin: 0 auto 8px;
	font-size: 17px;
	line-height: 1.65;
	text-align: center;
	color: #41525c;
}

.nc-cardgrid__intro p {
	margin: 0 0 1em;
}

.nc-cardgrid__intro p:last-child {
	margin-bottom: 0;
}

.nc-tone-navy .nc-cardgrid__heading,
.nc-tone-blue .nc-cardgrid__heading {
	color: #fff;
}

.nc-tone-navy .nc-cardgrid__intro,
.nc-tone-blue .nc-cardgrid__intro {
	color: rgba( 255, 255, 255, 0.82 );
}

/* ---- Grid ----------------------------------------------------------------- */
.nc-cardgrid__grid {
	display: grid;
	grid-template-columns: repeat( var( --nc-cardgrid-cols, 3 ), minmax( 0, 1fr ) );
	gap: clamp( 20px, 2.2vw, 34px );
	margin: 36px 0 0;
	padding: 0;
	list-style: none;
}

.nc-cardgrid__card {
	margin: 0;
}

/* People (portrait) cards balloon on a wide section; cap the grid to a centred
   column so the cards stay a sensible size with breathing room on the sides. */
.nc-cardgrid--people .nc-cardgrid__grid {
	max-width: 960px;
	margin-inline: auto;
}

/* ---- People variant ------------------------------------------------------- */
.nc-card--person .nc-card__photo {
	position: relative;
	display: flex;
	align-items: flex-end;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background-color: #cdd6dc;
}

.nc-card__photo-img {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.nc-card__photo-scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient( 180deg, rgba( 6, 37, 55, 0 ) 45%, rgba( 6, 37, 55, 0.82 ) 100% );
}

.nc-card__caption {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 20px 18px;
	text-align: center;
	color: #fff;
}

/* Legacy leadership caption: a translucent white box inset at the photo bottom,
   with a navy serif name + grey role — no dark photo scrim. */
.nc-card--person .nc-card__photo-scrim {
	display: none;
}

.nc-card--person .nc-card__caption {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	width: auto;
	padding: 12px 14px;
	background: rgba( 255, 255, 255, 0.9 );
	color: #062537;
}

.nc-card--person .nc-card__name {
	display: block;
	margin: 0;
	font-family: "Vollkorn", Georgia, serif;
	font-size: clamp( 19px, 1.5vw, 26px );
	font-weight: 400;
	line-height: 1.2;
	color: #062537;
}

.nc-card--person .nc-card__role {
	display: block;
	margin-top: 3px;
	font-size: 13px;
	letter-spacing: 0.02em;
	color: #51606a;
}

.nc-card--person .nc-card__quote {
	margin: 14px 2px 0;
	padding: 0;
	border: 0;
	font-size: 14px;
	font-style: italic;
	line-height: 1.55;
	color: #51606a;
}

.nc-tone-navy .nc-card--person .nc-card__quote,
.nc-tone-blue .nc-card--person .nc-card__quote {
	color: rgba( 255, 255, 255, 0.78 );
}

.nc-card--person .nc-card__quote p {
	margin: 0;
}

/* ---- Feature variant (icon badge + title + copy) -------------------------- */
.nc-card--feature {
	text-align: center;
	padding: 4px 8px;
}

.nc-card__badge {
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: #062537;
}

.nc-card__badge img {
	width: 34px;
	height: 34px;
	object-fit: contain;
	filter: brightness( 0 ) invert( 1 );
}

.nc-tone-navy .nc-card__badge,
.nc-tone-blue .nc-card__badge {
	background: #ff6900;
}

.nc-card--feature .nc-card__name {
	margin: 0 0 10px;
	font-family: "Vollkorn", Georgia, serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.25;
	color: #062537;
}

.nc-card--feature .nc-card__sub {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #ff6900;
}

.nc-card--feature .nc-card__desc {
	font-size: 15px;
	line-height: 1.6;
	color: #41525c;
}

.nc-tone-navy .nc-card--feature .nc-card__name,
.nc-tone-blue .nc-card--feature .nc-card__name {
	color: #fff;
}

.nc-tone-navy .nc-card--feature .nc-card__desc,
.nc-tone-blue .nc-card--feature .nc-card__desc {
	color: rgba( 255, 255, 255, 0.8 );
}

.nc-tone-navy .nc-card--feature .nc-card__sub,
.nc-tone-blue .nc-card--feature .nc-card__sub {
	color: #ffb27a;
}

/* ---- Contained feature cards (the legacy "Neal Difference" blue tiles) ----- */
/* Each feature card becomes an individual brand-blue tile on a white section: a
   white circular badge holding a blue icon, white serif title + copy. */
.nc-cardgrid--contained .nc-cardgrid__grid {
	margin-top: 40px;
}

.nc-cardgrid--contained .nc-card--feature {
	box-sizing: border-box;
	padding: 38px 26px 34px;
	background: #0067b1;
	border-radius: 4px;
}

.nc-cardgrid--contained .nc-card__badge {
	width: 72px;
	height: 72px;
	margin-bottom: 22px;
	background: #fff;
}

.nc-cardgrid--contained .nc-card__badge img {
	width: 34px;
	height: 34px;
	/* Recolour any single-colour icon to brand blue (#0067b1). brightness(0)
	   normalises the source to black first, so the hue chain is source-agnostic. */
	filter: brightness( 0 ) saturate( 100% ) invert( 24% ) sepia( 89% ) saturate( 1752% ) hue-rotate( 188deg ) brightness( 94% ) contrast( 101% );
}

.nc-cardgrid--contained .nc-card--feature .nc-card__name {
	color: #fff;
}

.nc-cardgrid--contained .nc-card--feature .nc-card__desc {
	color: rgba( 255, 255, 255, 0.9 );
}

.nc-cardgrid--contained .nc-card--feature .nc-card__sub {
	color: #cfe6f7;
}

/* 4 contained tiles read better as a 2x2 on tablet than 3 + 1. Beats the generic
   feature 3-up step above (one more class). */
@media ( min-width: 821px ) and ( max-width: 1200px ) {
	.nc-cardgrid--contained.nc-cardgrid--feature .nc-cardgrid__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
}

/* ---- Brand variant -------------------------------------------------------- */
.nc-card--brand {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	padding: 30px 26px;
	background: #fff;
	border: 1px solid #e1e8ed;
	text-align: center;
}

.nc-tone-muted .nc-card--brand {
	border-color: #dce5ec;
}

.nc-card__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 78px;
	margin-bottom: 18px;
}

.nc-card__logo img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.nc-card--brand .nc-card__name {
	margin: 0 0 10px;
	font-family: "Vollkorn", Georgia, serif;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.2;
	color: #062537;
}

.nc-card--brand .nc-card__desc {
	flex: 1 1 auto;
	font-size: 14px;
	line-height: 1.6;
	color: #51606a;
}

.nc-card--brand .nc-card__desc p {
	margin: 0 0 0.8em;
}

.nc-card--brand .nc-card__desc p:last-child {
	margin-bottom: 0;
}

.nc-card__link {
	display: inline-block;
	align-self: center;
	margin-top: 20px;
	padding: 10px 24px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-decoration: none;
	color: #0067b1;
	border: 2px solid #0067b1;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.nc-card__link:hover {
	background: #0067b1;
	color: #fff;
}

/* ---- Intro-cell layout (the legacy "Neal Family of Companies") ------------- */
/* The heading + intro sit in the first grid cell, left-aligned, beside the cards;
   the brand cards get a blue name and a filled, full-width "Visit website" button. */
.nc-cardgrid--intro-cell .nc-cardgrid__cell--intro {
	margin: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-right: clamp( 8px, 1.5vw, 28px );
}

.nc-cardgrid--intro-cell .nc-cardgrid__cell--intro .nc-cardgrid__heading {
	margin: 0 0 18px;
	text-align: left;
}

.nc-cardgrid--intro-cell .nc-cardgrid__cell--intro .nc-cardgrid__intro {
	margin: 0;
	max-width: none;
	text-align: left;
}

.nc-cardgrid--intro-cell .nc-card--brand .nc-card__name {
	font-family: "Gotham", "Inter", "Helvetica Neue", Arial, sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #0067b1;
}

.nc-cardgrid--intro-cell .nc-card__link {
	display: block;
	align-self: stretch;
	width: 100%;
	margin-top: 22px;
	padding: 14px 16px;
	font-size: 14px;
	color: #fff;
	background: #0067b1;
	border: 0;
}

.nc-cardgrid--intro-cell .nc-card__link:hover {
	background: #00558f;
	color: #fff;
}

@media ( max-width: 820px ) {
	.nc-cardgrid--intro-cell .nc-cardgrid__cell--intro {
		padding-right: 0;
	}

	.nc-cardgrid--intro-cell .nc-cardgrid__cell--intro .nc-cardgrid__heading,
	.nc-cardgrid--intro-cell .nc-cardgrid__cell--intro .nc-cardgrid__intro {
		text-align: center;
	}
}

/* ---- Responsive column stepping ------------------------------------------- */
@media ( min-width: 821px ) and ( max-width: 1200px ) {
	.nc-cardgrid--brand .nc-cardgrid__grid,
	.nc-cardgrid--feature .nc-cardgrid__grid {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	}
}

@media ( max-width: 820px ) {
	.nc-cardgrid__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
}

@media ( max-width: 520px ) {
	.nc-cardgrid__grid {
		grid-template-columns: 1fr;
	}
}
