/**
 * NovaBP Bookkeeping — Our Comprehensive Bookkeeping Services (section 4)
 *
 * Centred header over a two-column card grid whose last cell is the navy
 * advisory panel. Tokens and the header/button/icon primitives come from
 * `novabp-tax-base.css`; only this section's own arrangement lives here.
 *
 * Figma reference: node 2165:6954
 */

.nova-book-services {
	--nova-book-services-bg: var(--nova-tax-white);
	--nova-book-services-gap: 80px;
	--nova-book-services-inset: 80px;
	--nova-book-services-grid-gap: 24px;
	--nova-book-services-media-h: 240px;
	--nova-book-services-promo-h: 418px;
	--nova-book-services-card-border: var(--nova-tax-border);
	--nova-book-services-promo-from: var(--nova-tax-primary);
	--nova-book-services-promo-to: #06319d;

	background-color: var(--nova-book-services-bg);
}

.nova-book-services__inner {
	display: flex;
	flex-direction: column;
	gap: var(--nova-book-services-gap);
}

/*
 * The Figma header frame is a fixed 800px column centred in the section. Cap it
 * rather than sizing it, so the 1024 and 767 tiers narrow it with the gutters
 * instead of overflowing them.
 */
.nova-book-services__header {
	--nova-tax-header-max: 800px;
}

/* ---------------------------------------------------------------------------
 * Grid
 *
 * Figma insets the cards a further 80px inside the section gutter, so they run
 * 1120px against the header's 1280px.
 * ------------------------------------------------------------------------ */

.nova-book-services__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: center;
	gap: var(--nova-book-services-grid-gap);
	padding-inline: var(--nova-book-services-inset);
}

/* ---------------------------------------------------------------------------
 * Service card
 * ------------------------------------------------------------------------ */

.nova-book-services__card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px;
	background-color: var(--nova-tax-white);
	border: 1px solid var(--nova-book-services-card-border);
	border-radius: 20px;
	transition: background 0.25s ease, border-color 0.25s ease;
}

.nova-book-services__media {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	height: var(--nova-book-services-media-h);
	padding: 20px;
	background-color: #f7f7f7;
	background-image: var(--nova-book-services-media);
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	border-radius: 16px;
}

.nova-book-services__badge {
	display: none;
}

.nova-book-services__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px;
}

.nova-book-services .nova-book-services__card-title {
	font-family: var(--nova-tax-font);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: normal;
	text-transform: none;
	color: var(--nova-tax-heading);
}

.nova-book-services__card-text {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--nova-tax-body);
}

/* ---------------------------------------------------------------------------
 * Advisory panel
 *
 * Same 8px shell as a service card, but its single child is a navy gradient
 * plate rather than a photo and a paragraph.
 * ------------------------------------------------------------------------ */

.nova-book-services__card--promo {
	background: var(--nova-tax-white);
	border-color: var(--nova-book-services-card-border);
}

.nova-book-services__promo {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--nova-book-services-promo-h);
	padding: 40px 32px;
	overflow: hidden;
	background-image: linear-gradient(
		169deg,
		var(--nova-book-services-promo-from) 13%,
		var(--nova-book-services-promo-to) 100%
	);
	border-radius: 16px;
}

.nova-book-services__glow-clip {
	position: absolute;
	z-index: 0;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

/*
 * The white "Union" wash. A gradient-filled vector rather than a flat tint, so
 * it is painted as an image instead of rebuilt as a CSS gradient — the same
 * asset and the same treatment as the Superannuation sections.
 */
.nova-book-services__glow {
	position: absolute;
	inset-block-start: 73px;
	inset-inline-start: 123px;
	width: 480px;
	height: 369px;
	background-image: var(--nova-book-services-glow);
	background-repeat: no-repeat;
	background-position: left top;
	background-size: contain;
	opacity: 0.2;
}

.nova-book-services__promo-stack {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: 100%;
}

.nova-book-services__promo-head {
	align-items: center;
	text-align: center;
}

.nova-book-services .nova-book-services__promo-title {
	font-family: var(--nova-tax-font);
	font-size: 32px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: -0.02em;
	text-transform: none;
	color: var(--nova-tax-white);
}

.nova-book-services__pills {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nova-book-services__pill {
	--nova-book-services-pill-bg: rgb(255 255 255 / 0.1);

	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px;
	background-color: var(--nova-book-services-pill-bg);
	border: 1px solid var(--nova-book-services-pill-bg);
	border-radius: 100px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--nova-tax-white);
}

.nova-book-services__pill .nova-tax-icon {
	width: 20px;
	height: 20px;
}

.nova-book-services .nova-book-services__promo-btn {
	position: relative;
	z-index: 1;
	background-color: var(--nova-tax-white);
	border: 1px solid var(--nova-tax-rule);
	color: var(--nova-tax-primary);
}

.nova-book-services .nova-book-services__promo-btn:hover,
.nova-book-services .nova-book-services__promo-btn:focus {
	background-color: var(--nova-tax-surface);
	color: var(--nova-tax-primary);
}

/* ---------------------------------------------------------------------------
 * Closing rule
 *
 * The 1280x1 Primary/50 hairline Figma draws below this section (2165:8149).
 * Inset to the content measure rather than bleeding to the viewport edge, the
 * same treatment `.nova-tax-section--rule-top` gives its own.
 * ------------------------------------------------------------------------ */

.nova-book-services--rule-bottom::after {
	content: "";
	position: absolute;
	inset-block-end: 0;
	inset-inline-start: 50%;
	width: min(100%, var(--nova-tax-content-max));
	height: 1px;
	background-color: var(--nova-tax-rule);
	transform: translateX(-50%);
}

/* ---------------------------------------------------------------------------
 * Responsive
 *
 * Figma supplies desktop only. Everything below 1440 is an addition.
 * ------------------------------------------------------------------------ */

@media (max-width: 1366px) {
	.nova-book-services {
		--nova-book-services-inset: 40px;
	}
}

@media (max-width: 1024px) {
	/*
	 * The second inset is the first thing to go. It exists so the cards sit
	 * inside the header on a wide screen; once the gutters are down to 40px the
	 * cards need the measure more than the section needs the symmetry.
	 */
	.nova-book-services {
		--nova-book-services-inset: 0px;
		--nova-book-services-media-h: 220px;
	}

	.nova-book-services .nova-book-services__card-title {
		font-size: 22px;
	}

	.nova-book-services__card-text {
		font-size: 16px;
	}

	.nova-book-services .nova-book-services__promo-title {
		font-size: 28px;
	}

	/* The panel is drawn to sit beside a card of its own height; stacked copy
	 * sets that height for itself. */
	.nova-book-services__promo {
		min-height: 0;
	}
}

@media (max-width: 767px) {
	.nova-book-services {
		--nova-book-services-media-h: 200px;
	}

	.nova-book-services__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.nova-book-services__body {
		padding: 8px;
	}

	.nova-book-services .nova-book-services__promo-title {
		font-size: 24px;
	}

	.nova-book-services__promo {
		padding: 32px 20px;
	}

	/* A three-across pill row wraps to one pill per line at this width anyway;
	 * stretching them makes that read as a list rather than a broken row. */
	.nova-book-services__pill {
		justify-content: center;
		width: 100%;
	}
}
