/* Header branding — dual logos, mobile + sticky variants, zero layout shift */
:root {
	--cx-brand-logo-h: 44px;
	--cx-brand-logo-h-desktop: 36px;
}

.cx-brand-logo-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	height: var(--cx-brand-logo-h);
	min-width: var(--cx-brand-logo-w-mobile, var(--cx-brand-logo-h));
	flex-shrink: 0;
	position: relative;
}

@media (min-width: 768px) {
	.cx-brand-logo-wrap {
		height: var(--cx-brand-logo-h-desktop);
		min-width: var(--cx-brand-logo-w-desktop, var(--cx-brand-logo-h-desktop));
	}
}

.cx-brand-logo-img {
	display: none;
	height: 100%;
	width: auto;
	max-width: min(220px, 42vw);
	object-fit: contain;
	object-position: left center;
	vertical-align: middle;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

/* Light mode — default desktop */
.cx-brand-logo-img--light.cx-brand-logo-img--default.cx-brand-logo-img--desktop {
	display: block;
}

/* Dark mode — default desktop */
[data-theme="dark"] .cx-brand-logo-img--light.cx-brand-logo-img--default.cx-brand-logo-img--desktop,
html.cx-theme-scheme-dark .cx-brand-logo-img--light.cx-brand-logo-img--default.cx-brand-logo-img--desktop {
	display: none;
}

[data-theme="dark"] .cx-brand-logo-img--dark.cx-brand-logo-img--default.cx-brand-logo-img--desktop,
html.cx-theme-scheme-dark .cx-brand-logo-img--dark.cx-brand-logo-img--default.cx-brand-logo-img--desktop {
	display: block;
}

/* Sticky variants — hidden until header scrolls */
.cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--sticky {
	display: none;
}

.cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--default,
.cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--default {
	display: none !important;
}

.cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
.cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop {
	display: block;
}

[data-theme="dark"] .cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
[data-theme="dark"] .cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
html.cx-theme-scheme-dark .cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
html.cx-theme-scheme-dark .cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop {
	display: none !important;
}

[data-theme="dark"] .cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--dark.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
[data-theme="dark"] .cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--dark.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
html.cx-theme-scheme-dark .cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--dark.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
html.cx-theme-scheme-dark .cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky .cx-brand-logo-img--dark.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop {
	display: block !important;
}

/* Mobile variants */
@media (max-width: 767px) {
	.cx-brand-logo-wrap.has-mobile .cx-brand-logo-img--desktop {
		display: none !important;
	}

	.cx-brand-logo-wrap.has-mobile .cx-brand-logo-img--light.cx-brand-logo-img--default.cx-brand-logo-img--mobile {
		display: block;
	}

	[data-theme="dark"] .cx-brand-logo-wrap.has-mobile .cx-brand-logo-img--light.cx-brand-logo-img--default.cx-brand-logo-img--mobile,
	html.cx-theme-scheme-dark .cx-brand-logo-wrap.has-mobile .cx-brand-logo-img--light.cx-brand-logo-img--default.cx-brand-logo-img--mobile {
		display: none !important;
	}

	[data-theme="dark"] .cx-brand-logo-wrap.has-mobile .cx-brand-logo-img--dark.cx-brand-logo-img--default.cx-brand-logo-img--mobile,
	html.cx-theme-scheme-dark .cx-brand-logo-wrap.has-mobile .cx-brand-logo-img--dark.cx-brand-logo-img--default.cx-brand-logo-img--mobile {
		display: block !important;
	}

	/* Sticky + mobile: no separate sticky-mobile slot; desktop sticky rules apply above 768 only */
	.cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--mobile,
	.cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--mobile {
		display: none !important;
	}

	.cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
	.cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop {
		display: block !important;
	}

	[data-theme="dark"] .cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
	[data-theme="dark"] .cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
	html.cx-theme-scheme-dark .cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
	html.cx-theme-scheme-dark .cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--light.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop {
		display: none !important;
	}

	[data-theme="dark"] .cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--dark.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
	[data-theme="dark"] .cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--dark.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
	html.cx-theme-scheme-dark .cx-nav-header.cx-nav-shrink .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--dark.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop,
	html.cx-theme-scheme-dark .cx-theme-header--scrolled .cx-brand-logo-wrap.has-sticky.has-mobile .cx-brand-logo-img--dark.cx-brand-logo-img--sticky.cx-brand-logo-img--desktop {
		display: block !important;
	}
}

/* Nav + theme anchor alignment */
.cx-nav-logo.cx-brand-logo,
.cx-theme-brand.cx-brand-logo {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
	flex-shrink: 0;
}

.cx-nav-logo .cx-nav-logo-text {
	display: none;
}

@media (min-width: 768px) {
	.cx-nav-logo .cx-nav-logo-text {
		display: inline;
	}
}

.cx-theme-brand.cx-brand-logo {
	font-weight: 800;
	letter-spacing: -0.02em;
}

/* Light mode — soften logo mark glow on white header */
html.cx-theme-scheme-light .cx-brand-logo-wrap .cx-brand-logo-img,
html:not(.cx-theme-scheme-dark) .cx-brand-logo-wrap .cx-brand-logo-img {
	filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.06));
}

html.cx-theme-scheme-dark .cx-brand-logo-wrap .cx-brand-logo-img,
[data-theme="dark"] .cx-brand-logo-wrap .cx-brand-logo-img {
	filter: none;
}
