/**
 * Recommended Audiobooks brand system.
 * Version 1.0.1
 *
 * This version deliberately does not change homepage geometry, hero font size,
 * carousel layout, cover positions, or Recommendation DNA score circles.
 */

:root {
	--ra-brand-purple: #6B32B8;
	--ra-brand-purple-2: #7C4DCC;
	--ra-brand-indigo: #1B1D3A;
	--ra-brand-lavender: #E9E4F7;
	--ra-brand-lavender-soft: #F3EFFB;
	--ra-brand-warm: #F7F4EF;
	--ra-brand-muted: #6B6874;
}

/* Header: subtle branded surface without changing Kadence's row height. */
#masthead.site-header,
.site-header {
	background-color: #fff;
	background-image: url("../ra-brand-assets/ra-header-banner.svg");
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	border-bottom: 1px solid rgba(107, 50, 184, .10);
	box-shadow: 0 7px 24px rgba(27, 29, 58, .045);
}

.site-main-header-wrap,
.site-main-header-wrap .site-header-row-container-inner,
.site-header-row-container-inner {
	background: transparent !important;
}

/* Logo sizing only. Kadence retains its existing alignment and header geometry. */
.site-branding,
.site-branding .site-branding-inner-wrap,
.site-header .site-branding {
	display: flex;
	align-items: center;
}

.site-branding .custom-logo-link,
.site-header .custom-logo-link,
.site-header .brand {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.site-branding img.ra-brand-logo,
.site-header img.ra-brand-logo,
.site-branding .custom-logo,
.site-header .custom-logo {
	display: block !important;
	width: 270px !important;
	max-width: min(270px, 34vw) !important;
	height: auto !important;
	max-height: 68px !important;
	object-fit: contain !important;
}

/* Hide separate text branding only when Kadence renders it beside the image. */
.site-branding:has(img.ra-brand-logo) .site-title-wrap,
.site-branding:has(img.ra-brand-logo) .site-title,
.site-branding:has(img.ra-brand-logo) .site-description {
	display: none !important;
}

.main-navigation .primary-menu-container > ul > li > a,
.site-header .menu-item > a {
	color: var(--ra-brand-indigo);
	font-weight: 600;
	letter-spacing: -.01em;
}

.main-navigation .primary-menu-container > ul > li.current-menu-item > a,
.main-navigation .primary-menu-container > ul > li.current_page_item > a,
.site-header .menu-item > a:hover,
.site-header .menu-item > a:focus {
	color: var(--ra-brand-purple);
}

/*
 * Homepage branding is color-only.
 * Existing homepage.css remains responsible for all layout and typography.
 */
body.home .ra-home-kicker,
body.home .ra-home-showcase__header > p {
	color: var(--ra-brand-purple);
}

body.home .ra-home-search button,
body.home .ra-home-slide__cta {
	background: linear-gradient(135deg, var(--ra-brand-purple), var(--ra-brand-purple-2));
}

body.home .ra-home-section__heading h2,
body.home .ra-home-method__heading h2 {
	color: var(--ra-brand-indigo);
}

body.home .ra-home-trust__item i,
body.home .ra-home-method__number {
	color: var(--ra-brand-purple);
	background: var(--ra-brand-lavender-soft);
}

/* Accessible focus. */
.site-header a:focus-visible,
.ra-homepage a:focus-visible,
.ra-homepage button:focus-visible,
.ra-homepage input:focus-visible {
	outline: 3px solid rgba(107, 50, 184, .42);
	outline-offset: 3px;
}

@media (max-width: 1100px) {
	.site-branding img.ra-brand-logo,
	.site-header img.ra-brand-logo,
	.site-branding .custom-logo,
	.site-header .custom-logo {
		width: 235px !important;
		max-width: min(235px, 38vw) !important;
		max-height: 59px !important;
	}
}

@media (max-width: 767px) {
	#masthead.site-header,
	.site-header {
		background-position: 65% center;
	}

	.site-branding img.ra-brand-logo,
	.site-header img.ra-brand-logo,
	.site-branding .custom-logo,
	.site-header .custom-logo {
		width: 205px !important;
		max-width: 62vw !important;
		max-height: 52px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header *,
	.ra-homepage * {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
}
