/**
 * Design enrichment — reusable visual components (black/gold).
 * Brief: decorative lines, CTA blocks, stats, icon boxes, textures, fade-in-up.
 */

/* —— Palette & layout tokens (enrich, don’t fight brand) —— */
body.cbr-theme {
	--cbr-bg: #080b0b;
	--cbr-bg-secondary: #1a1a1a;
	--cbr-section-bg: #080b0b;
	--cbr-bg-card: #0c0f0f;
	--cbr-gold: #C9A227;
	--cbr-gold-light: #e5c98a;
	--cbr-text-offwhite: #f5f5f5;
	--cbr-enrich-max: 1440px;
	--cbr-enrich-pad-x: clamp(1.25rem, 5vw, 5rem);
	--cbr-enrich-section-y: clamp(4rem, 8vw, 7.5rem);
}

@media (min-width: 1024px) {
	body.cbr-theme {
		--cbr-container: 1440px;
		--cbr-gutter: 80px;
		--cbr-section-pad-top: 120px;
	}
}

/* —— Fade-in up (600ms ease-out) —— */
body.cbr-theme .cbr-reveal {
	opacity: 0;
	transform: translate3d(0, 28px, 0);
	transition:
		opacity 600ms ease-out,
		transform 600ms ease-out;
	will-change: opacity, transform;
}

body.cbr-theme .cbr-reveal.is-revealed {
	opacity: 1;
	transform: none;
}

body.cbr-theme .cbr-reveal[data-reveal-delay="1"] {
	transition-delay: 80ms;
}

body.cbr-theme .cbr-reveal[data-reveal-delay="2"] {
	transition-delay: 160ms;
}

body.cbr-theme .cbr-reveal[data-reveal-delay="3"] {
	transition-delay: 240ms;
}

body.cbr-theme .cbr-reveal[data-reveal-delay="4"] {
	transition-delay: 320ms;
}

@media (prefers-reduced-motion: reduce) {
	body.cbr-theme .cbr-reveal,
	body.cbr-theme .cbr-reveal.is-revealed {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
		will-change: auto !important;
	}
}

/* —— Unified thin gold hairline (same as under-hero) —— */
.cbr-section-gold-line,
.cbr-divider,
.cbr-divider--wave,
.cbr-home-enrich-divider {
	display: block;
	width: 100%;
	height: var(--cbr-divider-size, 1px);
	max-height: var(--cbr-divider-size, 1px);
	min-height: var(--cbr-divider-size, 1px);
	margin: calc(var(--cbr-section-gap, 20px) / 2) auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--cbr-gold-gradient-divider);
	background-image: var(--cbr-gold-gradient-divider);
	opacity: 1;
	box-shadow: none;
	-webkit-mask-image: var(--cbr-divider-taper-mask);
	mask-image: var(--cbr-divider-taper-mask);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	pointer-events: none;
	box-sizing: border-box;
}

/* Legacy diamond segments — never show (keep markup safe if present) */
.cbr-section-gold-line__seg,
.cbr-section-gold-line__diamond {
	display: none !important;
}

/* Inside section headers / CTA — same hairline, tighter vertical margin */
.cbr-home-enrich__header .cbr-section-gold-line,
.cbr-cta-block .cbr-section-gold-line {
	margin: 0 auto 1.1rem;
}

/* —— Subtle background texture —— */
.cbr-bg-texture {
	position: relative;
	isolation: isolate;
	background-color: var(--cbr-bg-secondary, #1a1a1a);
}

.cbr-bg-texture::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0.22;
	background-image:
		linear-gradient(135deg, rgba(201, 162, 39, 0.04) 0%, transparent 42%),
		repeating-linear-gradient(
			-18deg,
			transparent 0,
			transparent 11px,
			rgba(201, 162, 39, 0.035) 11px,
			rgba(201, 162, 39, 0.035) 12px
		);
}

.cbr-bg-texture > * {
	position: relative;
	z-index: 1;
}

/* —— Icon box —— */
.cbr-icon-boxes {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	width: min(100%, var(--cbr-enrich-max));
	margin: 0 auto;
	padding-inline: var(--cbr-enrich-pad-x);
}

@media (min-width: 700px) {
	.cbr-icon-boxes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.cbr-icon-boxes {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.5rem;
	}
}

.cbr-icon-box {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.85rem;
	padding: 1.35rem 1.2rem 1.5rem;
	border: 1px solid rgba(201, 162, 39, 0.18);
	border-radius: 2px;
	background: rgba(8, 11, 11, 0.55);
	text-decoration: none;
	color: inherit;
	transition:
		border-color 280ms ease,
		transform 280ms ease,
		background-color 280ms ease;
}

a.cbr-icon-box:hover,
a.cbr-icon-box:focus-visible {
	border-color: rgba(201, 162, 39, 0.55);
	background: rgba(26, 26, 26, 0.9);
	transform: translateY(-3px);
	outline: none;
}

.cbr-icon-box__icon {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	color: var(--cbr-gold);
}

.cbr-icon-box__icon svg {
	width: 1.85rem;
	height: 1.85rem;
	stroke: currentColor;
}

.cbr-home-events__icon {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	color: var(--cbr-gold);
}

.cbr-home-events__icon svg {
	width: 2rem;
	height: 2rem;
	stroke: currentColor;
}

.cbr-stat-item__icon svg {
	width: 1.75rem;
	height: 1.75rem;
	stroke: currentColor;
	color: var(--cbr-gold);
}

.cbr-icon-box__title {
	margin: 0;
	font-family: var(--cbr-serif);
	font-size: 1.15rem;
	font-weight: 400;
	line-height: 1.25;
	color: var(--cbr-gold-light, #e5c98a);
}

.cbr-icon-box__text {
	margin: 0;
	font-family: var(--cbr-sans);
	font-size: 0.95rem;
	line-height: 1.55;
	color: #ffffff;
}

/* —— Stats row —— */
.cbr-stats-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem 1rem;
	width: min(100%, var(--cbr-enrich-max));
	margin: 0 auto;
	padding-inline: var(--cbr-enrich-pad-x);
	text-align: center;
}

@media (min-width: 900px) {
	.cbr-stats-row {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.25rem;
	}
}

.cbr-stat-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.55rem;
}

.cbr-stat-item__icon {
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	color: var(--cbr-gold);
}

.cbr-stat-item__icon svg {
	width: 1.65rem;
	height: 1.65rem;
}

.cbr-stat-item__value {
	margin: 0;
	font-family: var(--cbr-serif);
	font-size: clamp(1.85rem, 3.2vw, 2.6rem);
	font-weight: 400;
	line-height: 1;
	color: var(--cbr-gold);
	background: var(--cbr-gold-gradient-text);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.cbr-stat-item__label {
	margin: 0;
	max-width: 11rem;
	font-family: var(--cbr-sans);
	font-size: 0.88rem;
	line-height: 1.4;
	color: #ffffff;
}

/* —— CTA highlight block —— */
.cbr-cta-block {
	width: min(100% - (2 * var(--cbr-enrich-pad-x)), 920px);
	margin: 0 auto;
	padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.35rem, 4vw, 2.5rem);
	border: 1px solid rgba(201, 162, 39, 0.45);
	border-radius: 2px;
	background:
		linear-gradient(180deg, rgba(26, 26, 26, 0.92) 0%, rgba(8, 11, 11, 0.96) 100%);
	box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.06), 0 18px 40px rgba(0, 0, 0, 0.35);
	text-align: center;
}

.cbr-cta-block__logo {
	display: inline-block;
	width: auto;
	height: 48px;
	margin: 0 auto 1rem;
}

.cbr-cta-block__title {
	margin: 0 0 0.65rem;
	font-family: var(--cbr-serif);
	font-size: clamp(1.45rem, 2.5vw, 2rem);
	font-weight: 400;
	line-height: 1.2;
	color: var(--cbr-gold-light, #e5c98a);
}

.cbr-cta-block__text {
	margin: 0 auto 1.35rem;
	max-width: 36rem;
	font-family: var(--cbr-sans);
	font-size: 1rem;
	line-height: 1.55;
	color: #ffffff;
}

.cbr-cta-block__action {
	display: flex;
	justify-content: center;
}

/* —— Home enrichment sections —— */
.cbr-home-enrich {
	padding: var(--cbr-enrich-section-y) 0;
	background: #080b0b;
}

.cbr-home-enrich__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	max-width: 40rem;
	margin: 0 auto 2rem;
	padding-inline: var(--cbr-enrich-pad-x);
	text-align: center;
}

.cbr-home-enrich__title {
	margin: 0;
	font-family: var(--cbr-serif);
	font-size: var(--cbr-section-title-size, clamp(1.75rem, 3vw, 2.4rem));
	font-weight: 400;
	line-height: 1.2;
	color: var(--cbr-gold);
}

.cbr-home-enrich__text {
	margin: 0;
	font-family: var(--cbr-sans);
	font-size: 1rem;
	line-height: 1.55;
	color: #ffffff;
}

.cbr-home-enrich--services {
	background: #080b0b;
}

/* 4 service cards under home hero — desktop only */
.cbr-home-enrich--services-desktop {
	display: none;
}

@media (min-width: 1024px) {
	.cbr-home-enrich--services-desktop {
		display: block;
	}

	.cbr-home-enrich--services-desktop .cbr-icon-boxes {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.cbr-home-enrich--stats {
	padding-block: 0;
}

/* Metrics — desktop only */
.cbr-home-enrich--stats-desktop {
	display: none;
}

@media (min-width: 1024px) {
	.cbr-home-enrich--stats-desktop {
		display: block;
	}
}

.cbr-home-enrich--cta {
	background: #080b0b;
}

.cbr-home-enrich--contact-invite {
	background: #080b0b;
}

/* Mobile: home section order — contact invite last (flex layout in section-spacing.css) */
@media (max-width: 1023px) {
	body.cbr-theme .cbr-page--home > .cbr-home-hero {
		order: 1;
	}

	body.cbr-theme .cbr-page--home > .cbr-home-andrea {
		order: 2;
	}

	body.cbr-theme .cbr-page--home > .cbr-home-service--coverage {
		order: 3;
	}

	body.cbr-theme .cbr-page--home > .cbr-home-events-signed {
		order: 4;
	}

	body.cbr-theme .cbr-page--home > .cbr-home-partners {
		order: 5;
	}

	body.cbr-theme .cbr-page--home > .cbr-home-enrich--contact-invite {
		order: 6;
	}

	body.cbr-theme .cbr-page--home > .cbr-home-enrich--services-desktop,
	body.cbr-theme .cbr-page--home > .cbr-home-enrich--stats-desktop {
		order: 20;
	}

	body.cbr-theme .cbr-page--home > :not(
		.cbr-home-hero,
		.cbr-home-andrea,
		.cbr-home-service--coverage,
		.cbr-home-events-signed,
		.cbr-home-partners,
		.cbr-home-enrich--contact-invite,
		.cbr-home-enrich--services-desktop,
		.cbr-home-enrich--stats-desktop
	) {
		order: 30;
	}
}

.cbr-home-contact-invite {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.35rem;
	max-width: 40rem;
	margin: 0 auto;
	padding-inline: var(--cbr-enrich-pad-x);
	text-align: center;
}

.cbr-home-contact-invite__title {
	margin: 0;
	font-family: var(--cbr-serif);
	font-size: var(--cbr-section-title-size, clamp(1.75rem, 3vw, 2.4rem));
	font-weight: 500;
	line-height: 1.08;
	color: var(--cbr-gold);
}

.cbr-home-contact-invite__subtitle {
	margin: 0;
	font-family: var(--cbr-serif);
	font-size: var(--cbr-type-display-sub);
	font-weight: 500;
	font-style: italic;
	line-height: 1.08;
	letter-spacing: -0.004em;
	color: var(--cbr-hierarchy-subtitle);
}

.cbr-home-contact-invite__action {
	display: flex;
	justify-content: center;
}

/* Extra rhythm: divider between enrichment clusters */
body.cbr-theme .cbr-page--home > .cbr-home-enrich-divider,
body.cbr-theme .cbr-home > .cbr-home-enrich-divider {
	margin: 0;
	padding: 0.25rem 0;
}

/* Footer enrichment */
body.cbr-theme .cbr-site-footer {
	position: relative;
	isolation: isolate;
	background-color: #080b0b;
}

body.cbr-theme .cbr-site-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0.18;
	background-image: repeating-linear-gradient(
		-18deg,
		transparent 0,
		transparent 12px,
		rgba(201, 162, 39, 0.04) 12px,
		rgba(201, 162, 39, 0.04) 13px
	);
}

body.cbr-theme .cbr-site-footer > * {
	position: relative;
	z-index: 1;
}

body.cbr-theme .cbr-site-footer__ornament-wrap {
	margin-bottom: 0.5rem;
}
