/* ==========================================================================
   Person Closing CTA (neilkelly/person-cta-close)
   Figma: Designer Profile / 8 — Closing CTA (1051:417). Split image region +
   dark content panel. Token-driven.
   Wrapper: .wp-block-neilkelly-person-cta-close.nk-person-cta-close
   ========================================================================== */
.wp-block-neilkelly-person-cta-close.nk-person-cta-close {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
	background: var(--wp--preset--color--surface-dark);
	font-family: var(--wp--preset--font-family--inter);
	box-sizing: border-box;
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__media {
	position: relative;
	min-height: var(--wp--custom--components--person--cta-media-min-height);
	background: var(--wp--preset--color--surface-subtle);
	overflow: hidden;
}

/* Absolute so the image cover-crops to the panel height instead of dictating it
   (a portrait photo must not blow the section up to its natural height). */
.wp-block-neilkelly-person-cta-close .nk-person-cta-close__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Cap the content column at half the 1440 frame and hold it against the centre
   line, so above 1440 the surplus dark space falls to its right instead of
   stretching the copy across the panel. The section is the grid and bleeds full
   width, so the media column already runs to the viewport's left edge and the
   column divide already sits on the centre line — this is the remaining half of
   what service-cta-close does via its capped __inner frame (see bb98db3b). Below
   1440 the cap never bites (half the viewport is already narrower). */
.wp-block-neilkelly-person-cta-close .nk-person-cta-close__content {
	width: 100%;
	max-width: calc(var(--wp--custom--layout--max-width) / 2);
	justify-self: start;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--wp--preset--spacing--20);
	box-sizing: border-box;
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--5);
	width: 100%;
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__heading {
	margin: 0;
	/* Size + case come from the shared .nk-headline--structural class (mapped in
	   render.php); block keeps weight, line-height and color. */
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: var(--wp--custom--line-height--xl);
	color: var(--wp--preset--color--brand-white);
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__body {
	margin: 0;
	font-size: var(--wp--preset--font-size--md-base);
	font-weight: var(--wp--custom--font-weight--regular);
	line-height: var(--wp--custom--line-height--base);
	color: var(--wp--preset--color--neutral-350);
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__actions {
	display: flex;
	padding-top: var(--wp--preset--spacing--2);
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--wp--preset--spacing--4) var(--wp--preset--spacing--7);
	border-radius: var(--wp--custom--radius--lg);
	/* White on the dark (surface-dark) CTA panel — off the red CTA. */
	background: var(--wp--preset--color--brand-white);
	color: var(--wp--preset--color--ink-primary);
	font-size: var(--wp--preset--font-size--base);
	font-weight: var(--wp--custom--font-weight--semibold);
	line-height: var(--wp--custom--line-height--none);
	text-decoration: none;
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__btn:hover {
	background: var(--wp--preset--color--neutral-100);
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-white);
	outline-offset: 2px;
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__careers {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2);
	font-size: var(--wp--preset--font-size--sm-md);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--none);
	color: var(--wp--preset--color--neutral-350);
	text-decoration: none;
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__careers:hover {
	color: var(--wp--preset--color--brand-white);
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__careers:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-white);
	outline-offset: 2px;
}

.wp-block-neilkelly-person-cta-close .nk-person-cta-close__arrow {
	display: block;
	flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 1023px) {
	.wp-block-neilkelly-person-cta-close .nk-person-cta-close__content {
		padding: var(--wp--preset--spacing--12);
	}
}

@media (max-width: 767px) {
	.wp-block-neilkelly-person-cta-close.nk-person-cta-close {
		grid-template-columns: 1fr;
		/* Stacked: equal-height rows so the image panel matches the content
		   panel's height (the absolutely-positioned image covers the cell). */
		grid-template-rows: 1fr 1fr;
	}
	.wp-block-neilkelly-person-cta-close .nk-person-cta-close__media {
		min-height: var(--wp--preset--spacing--24);
	}
	.wp-block-neilkelly-person-cta-close .nk-person-cta-close__content {
		/* Release the two-column cap: stacked, the content owns the full width. Without
		   this, a 721–767px viewport would hold the copy to 720px and leave a dark
		   strip down its right side. */
		max-width: none;
		padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--6);
	}
	.wp-block-neilkelly-person-cta-close .nk-person-cta-close__heading {
		font-size: var(--wp--preset--font-size--md);
		line-height: var(--wp--custom--line-height--lg-tight);
	}
}

/* No block-gap seam between full-bleed sections. */
.wp-block-neilkelly-person-cta-close { margin-block: 0; }

/* When this CTA is the last section in <main>, pull the footer up by one gutter
   step to close the block-gap seam the footer template part carries. Scoped with
   :last-child so it doesn't fire when the section is removed/smart-hidden. */
.wp-block-neilkelly-person-cta-close:last-child {
	margin-bottom: calc(-1 * var(--wp--preset--spacing--6));
}
