/* Construction Boffin - Expert Witness page.
   Everything is scoped under .cbew so theme styles stay untouched.
   Brand: red #B02333, dark #1B1B1B, cream #F7F4EF.
   Fonts: Playfair Display (headings) + Montserrat (body), same as the site. */

.cbew {
	--cbew-red: #B02333;
	--cbew-red-dark: #8E1C29;
	--cbew-dark: #1B1B1B;
	--cbew-cream: #F7F4EF;
	--cbew-body: #4A4A4A;
	--cbew-line: rgba(27, 27, 27, 0.12);
	--cbew-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--cbew-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

	font-family: var(--cbew-sans);
	color: var(--cbew-body);
	background: #fff;
}

/* Horizontal-bleed guard lives on body: overflow on .cbew itself would turn
   it into a scroll container and kill the sticky FAQ heading. */
body.cbew-tpl {
	overflow-x: hidden;
}

.cbew *,
.cbew *::before,
.cbew *::after {
	box-sizing: border-box;
}

.cbew h1,
.cbew h2,
.cbew h3,
.cbew p,
.cbew ul {
	margin: 0;
	padding: 0;
}

.cbew ul {
	list-style: none;
}

.cbew a {
	text-decoration: none;
}

/* Neutralise common theme content paddings around our full-bleed main. */
body.cbew-tpl .site-content,
body.cbew-tpl .site-main,
body.cbew-tpl #content,
body.cbew-tpl #primary {
	padding: 0;
	margin: 0;
	max-width: none;
}

/* ---------- Layout primitives ---------- */

.cbew-container {
	max-width: 1120px;
	margin: 0 auto;
	padding-left: clamp(20px, 4vw, 40px);
	padding-right: clamp(20px, 4vw, 40px);
}

.cbew-container--narrow {
	max-width: 880px;
}

.cbew-section {
	padding-top: clamp(64px, 9vw, 104px);
	padding-bottom: clamp(64px, 9vw, 104px);
}

.cbew-section--white {
	background: #fff;
}

.cbew-section--cream {
	background: var(--cbew-cream);
}

/* ---------- Type ---------- */

.cbew-eyebrow {
	font-family: var(--cbew-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--cbew-red);
}

.cbew-eyebrow--onDark {
	color: #E4A6AD;
	display: inline-flex;
	align-items: center;
	gap: 14px;
}

.cbew-eyebrow--onDark::before {
	content: "";
	width: 28px;
	height: 2px;
	background: var(--cbew-red);
	flex: 0 0 auto;
}

.cbew-h1 {
	font-family: var(--cbew-serif);
	font-weight: 500;
	font-size: clamp(34px, 5vw, 56px);
	line-height: 1.12;
	color: #fff;
	max-width: 20ch;
}

.cbew-h2 {
	font-family: var(--cbew-serif);
	font-weight: 500;
	font-size: clamp(28px, 3.6vw, 40px);
	line-height: 1.18;
	color: var(--cbew-dark);
}

.cbew-h2--onDark {
	color: #fff;
}

.cbew-h3 {
	font-family: var(--cbew-serif);
	font-weight: 600;
	font-size: 21px;
	line-height: 1.3;
	color: var(--cbew-dark);
}

.cbew .cbew-body {
	font-size: 15.5px;
	line-height: 1.75;
	color: var(--cbew-body);
}

.cbew-section-head {
	max-width: 760px;
	margin: 0 auto clamp(36px, 5vw, 56px);
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
}

.cbew-section-head .cbew-h2 {
	position: relative;
	padding-bottom: 18px;
}

.cbew-section-head .cbew-h2::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 46px;
	height: 3px;
	background: var(--cbew-red);
}

.cbew-intro {
	font-size: 16px;
	line-height: 1.75;
	color: var(--cbew-body);
}

.cbew-intro--left {
	text-align: left;
}

/* ---------- Buttons ---------- */

.cbew-cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.cbew-cta-row--center {
	justify-content: center;
}

.cbew-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--cbew-sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--cbew-red);
	padding: 16px 30px;
	border-radius: 2px;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cbew-btn:hover {
	background: var(--cbew-red-dark);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(176, 35, 51, 0.28);
}

.cbew-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.cbew-btn--ghost {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.45);
	color: #fff;
}

.cbew-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: #fff;
	box-shadow: none;
}

/* ---------- Hero ---------- */

.cbew-hero {
	position: relative;
	background:
		radial-gradient(900px 420px at 12% 0%, rgba(176, 35, 51, 0.22), transparent 60%),
		linear-gradient(160deg, #232323 0%, var(--cbew-dark) 55%, #141414 100%);
	color: #E8E4DE;
	padding-top: clamp(84px, 12vw, 150px);
	padding-bottom: clamp(84px, 12vw, 150px);
	overflow: hidden;
}

.cbew-hero-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 26px;
	max-width: 820px;
}

.cbew-hero-sub {
	font-size: 18px;
	line-height: 1.7;
	color: #D8D3CB;
	max-width: 58ch;
}

.cbew-watermark {
	position: absolute;
	right: -20px;
	bottom: -46px;
	font-family: var(--cbew-serif);
	font-size: clamp(120px, 18vw, 230px);
	font-weight: 600;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
	user-select: none;
	pointer-events: none;
	white-space: nowrap;
}

.cbew-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	margin-top: 4px;
}

.cbew-trust li {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	font-weight: 500;
	color: #CFC9C0;
}

.cbew-trust .cbew-tick {
	color: #E4A6AD;
	flex: 0 0 auto;
}

/* ---------- Stats band ---------- */

.cbew-stats {
	background: var(--cbew-cream);
	border-bottom: 1px solid var(--cbew-line);
	padding-top: clamp(36px, 5vw, 56px);
	padding-bottom: clamp(36px, 5vw, 56px);
}

.cbew-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 28px;
}

.cbew-stats-grid li {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-left: 22px;
	border-left: 2px solid rgba(176, 35, 51, 0.35);
}

.cbew-stat-value {
	font-family: var(--cbew-serif);
	font-weight: 600;
	font-size: clamp(30px, 3.4vw, 42px);
	line-height: 1;
	color: var(--cbew-dark);
}

.cbew-stat-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #6E6A64;
}

/* ---------- Guarantee cards ---------- */

.cbew-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.cbew-card {
	background: #fff;
	border: 1px solid var(--cbew-line);
	border-top: 3px solid var(--cbew-red);
	padding: 30px 28px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cbew-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(27, 27, 27, 0.10);
}

/* ---------- Competencies timeline ---------- */

.cbew-timeline {
	max-width: 860px;
	margin: 0 auto;
}

.cbew-tl-item {
	display: flex;
	gap: 22px;
	padding-bottom: 28px;
}

.cbew-tl-item:last-child {
	padding-bottom: 0;
}

.cbew-tl-node {
	flex: 0 0 auto;
	width: 46px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.cbew-tl-num {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--cbew-red);
	color: #fff;
	font-family: var(--cbew-sans);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.08em;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(176, 35, 51, 0.30);
}

.cbew-tl-line {
	flex: 1;
	width: 2px;
	margin-top: 8px;
	background: linear-gradient(to bottom, rgba(176, 35, 51, 0.45), rgba(176, 35, 51, 0.08));
}

.cbew-tl-item:last-child .cbew-tl-line {
	display: none;
}

.cbew-tl-card {
	flex: 1;
	background: #fff;
	border: 1px solid rgba(176, 35, 51, 0.16);
	border-left: 4px solid var(--cbew-red);
	border-radius: 4px;
	padding: 24px 28px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: 0 6px 16px rgba(27, 27, 27, 0.05);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cbew-tl-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 26px rgba(27, 27, 27, 0.11);
}

/* ---------- Instruction pack ---------- */

.cbew-pack li {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px 4px;
	border-bottom: 1px solid var(--cbew-line);
	font-size: 16.5px;
	line-height: 1.7;
	color: #333;
}

.cbew-pack li:first-child {
	border-top: 1px solid var(--cbew-line);
}

.cbew-pack .cbew-tick {
	color: var(--cbew-red);
	flex: 0 0 auto;
	margin-top: 4px;
}

/* ---------- FAQ ---------- */

.cbew-faq-grid {
	display: grid;
	grid-template-columns: 4fr 7fr;
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}

.cbew-faq-head {
	position: sticky;
	top: 96px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cbew-faq-head .cbew-h2 {
	position: relative;
	padding-bottom: 18px;
}

.cbew-faq-head .cbew-h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 46px;
	height: 3px;
	background: var(--cbew-red);
}

.cbew-faq {
	border-bottom: 1px solid var(--cbew-line);
}

.cbew-faq summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 20px 2px;
	font-family: var(--cbew-sans);
	font-size: 16.5px;
	font-weight: 600;
	color: var(--cbew-dark);
	transition: color 0.15s ease;
}

.cbew-faq summary:hover {
	color: var(--cbew-red);
}

.cbew-faq summary::-webkit-details-marker {
	display: none;
}

.cbew-faq-icon {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

.cbew-faq-icon::before,
.cbew-faq-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: var(--cbew-red);
	transition: transform 0.25s ease;
}

.cbew-faq-icon::before {
	width: 16px;
	height: 2px;
}

.cbew-faq-icon::after {
	width: 2px;
	height: 16px;
}

.cbew-faq[open] .cbew-faq-icon::after {
	transform: translate(-50%, -50%) scaleY(0);
}

.cbew-faq-a {
	padding: 0 2px 22px;
	max-width: 62ch;
}

/* ---------- CTA band ---------- */

.cbew-cta-band {
	background:
		radial-gradient(700px 360px at 88% 100%, rgba(176, 35, 51, 0.20), transparent 60%),
		var(--cbew-dark);
	padding-top: clamp(72px, 10vw, 120px);
	padding-bottom: clamp(72px, 10vw, 120px);
}

.cbew-cta-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	text-align: center;
}

.cbew-cta-inner .cbew-h2--onDark {
	position: relative;
	padding-bottom: 18px;
}

.cbew-cta-inner .cbew-h2--onDark::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 46px;
	height: 3px;
	background: var(--cbew-red);
}

.cbew-cta-text {
	font-size: 16.5px;
	line-height: 1.75;
	color: #D8D3CB;
	max-width: 60ch;
}

.cbew-cta-points {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 6px 0 8px;
	text-align: left;
}

.cbew-cta-points li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 15px;
	color: #CFC9C0;
}

.cbew-cta-points .cbew-tick {
	color: #E4A6AD;
	flex: 0 0 auto;
	margin-top: 2px;
}

.cbew-cta-note {
	font-size: 14px;
	color: #A9A49C;
}

.cbew-cta-note a {
	color: #E4A6AD;
	border-bottom: 1px solid rgba(228, 166, 173, 0.4);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.cbew-cta-note a:hover {
	color: #fff;
	border-color: #fff;
}

/* ---------- Scroll reveal (JS adds .cbew-js on <html>) ---------- */

html.cbew-js .cbew [data-cbew-reveal] {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

html.cbew-js .cbew [data-cbew-reveal].cbew-in {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html.cbew-js .cbew [data-cbew-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.cbew-btn,
	.cbew-card,
	.cbew-tl-card {
		transition: none;
	}
}

/* Not-yet-scrolled sections must still appear when printing or saving to PDF. */
@media print {
	html.cbew-js .cbew [data-cbew-reveal] {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.cbew-cards {
		grid-template-columns: 1fr;
		max-width: 560px;
		margin: 0 auto;
	}

	.cbew-stats-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

	.cbew-faq-grid {
		grid-template-columns: 1fr;
	}

	.cbew-faq-head {
		position: static;
	}
}

@media (max-width: 640px) {
	.cbew-hero {
		padding-top: 72px;
		padding-bottom: 72px;
	}

	.cbew-cta-row .cbew-btn {
		width: 100%;
	}

	.cbew-tl-item {
		gap: 14px;
		padding-bottom: 22px;
	}

	.cbew-tl-node {
		width: 36px;
	}

	.cbew-tl-num {
		width: 36px;
		height: 36px;
		font-size: 12px;
	}

	.cbew-tl-card {
		padding: 18px;
	}

	.cbew-watermark {
		display: none;
	}
}
