/* Custom homepage template — page-home.php */

body.page-template-page-home #main-content {
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
}

.bn-hp {
	--bn-hp-ink: #2f3648;
	--bn-hp-muted: #6d7585;
	--bn-hp-coral: #bf5d54;
	--bn-hp-navy: #3e4a64;
	--bn-hp-line: #e4d9cf;
	--bn-hp-paper: #f7f3ee;
	--bn-hp-white: #fff;
	color: var(--bn-hp-ink);
	background: var(--bn-hp-white);
	font-family: "Open Sans", sans-serif;
	overflow-x: clip;
}

.bn-hp a {
	color: inherit;
	text-decoration: none;
}

.bn-hp a:hover,
.bn-hp a:focus-visible {
	color: var(--bn-hp-coral);
}

.bn-hp__wrap {
	width: min(1120px, calc(100% - 1.5rem));
	margin: 0 auto;
}

/*
 * Hero — equal content pad top/bottom.
 * Nav clearance is already handled by .bn-wp-nav__offset (home keeps the spacer).
 * Do not add a second nav-height pad here or the band looks top-heavy.
 */
.bn-hp__hero {
	--bn-hero-pad-y: 2.25rem;
	--bn-hero-min-h: clamp(14rem, 36vh, 20rem);
	position: relative;
	isolation: isolate;
	min-height: var(--bn-hero-min-h);
	display: flex;
	align-items: center;
	margin-top: 0;
	padding: var(--bn-hero-pad-y) 0;
	color: #fff;
	overflow: hidden;
	background: #222a3a;
}

.bn-hp__hero-media {
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		linear-gradient(105deg, rgba(47, 54, 72, 0.78) 0%, rgba(191, 93, 84, 0.58) 52%, rgba(47, 54, 72, 0.42) 100%),
		var(--bn-hp-hero-image, url("/wp-content/uploads/2020/03/books.jpg")) center / cover no-repeat;
	transform: scale(1.02);
	transform-origin: center center;
	animation: bn-hp-hero-pan 20s ease-in-out infinite alternate;
	will-change: transform;
}

@keyframes bn-hp-hero-pan {
	from { transform: scale(1.02) translate3d(0, 0, 0); }
	to { transform: scale(1.05) translate3d(-1%, -0.6%, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.bn-hp__hero-media { animation: none; transform: none; }
}

.bn-hp__hero > .bn-hp__wrap.bn-hp__hero-inner {
	position: relative;
	z-index: 1;
	width: min(1120px, calc(100% - 1.5rem));
	max-width: none;
	display: flex;
	flex-direction: column;
	gap: 1.35rem;
}

.bn-hp__hero-copy {
	max-width: 48rem;
}

.bn-hp__brand,
.bn-hp__hero .bn-hp__brand {
	margin: 0 0 0.55rem;
	font-family: "Open Sans", sans-serif;
	font-style: normal;
	font-weight: 700;
	font-size: clamp(0.78rem, 1.6vw, 0.92rem);
	letter-spacing: 0.04em;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.88) !important;
	animation: bn-hp-fade-up 0.7s ease both;
}

.bn-hp__h1,
.bn-hp__hero .bn-hp__h1 {
	margin: 0 0 0.65rem;
	max-width: 22ch;
	font-family: "Sansita", Georgia, serif;
	font-style: italic;
	font-weight: 800;
	font-size: clamp(1.65rem, 4.2vw, 2.55rem);
	line-height: 1.12;
	color: #fff !important;
	animation: bn-hp-fade-up 0.7s ease 0.08s both;
}

.bn-hp__lead,
.bn-hp__hero .bn-hp__lead {
	margin: 0 0 1rem;
	max-width: 38rem;
	font-size: 0.95rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.9) !important;
	animation: bn-hp-fade-up 0.7s ease 0.16s both;
}

.bn-hp__authors-teaser {
	max-width: 42rem;
	margin-inline: auto;
	text-align: center;
	padding: 0.5rem 0;
}

.bn-hp__authors-text {
	max-width: 36rem;
	margin: 0.75rem auto 1rem;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--bn-hp-muted);
}

.bn-hp__hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	animation: bn-hp-fade-up 0.7s ease 0.24s both;
}

/* Same compact pill language as list-hero filter toggles */
.bn-hp__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.2rem;
	padding: 0.42rem 0.95rem;
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 999px;
	box-sizing: border-box;
	font-family: "Open Sans", sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bn-hp__btn--primary {
	background: rgba(255, 255, 255, 0.94);
	color: #3e4a64 !important;
}

.bn-hp__btn--primary:hover,
.bn-hp__btn--primary:focus-visible {
	background: #fff;
	border-color: rgba(255, 255, 255, 0.55);
	color: var(--bn-hp-coral) !important;
}

.bn-hp__btn--ghost {
	border-color: rgba(255, 255, 255, 0.45);
	color: #fff !important;
	background: rgba(255, 255, 255, 0.12);
	box-shadow: none;
}

.bn-hp__btn--ghost:hover,
.bn-hp__btn--ghost:focus-visible {
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.2);
	color: #fff !important;
}

/* Hero stats — clean glass tiles; horizontal snap-slide on small screens */
.bn-hp__stats {
	list-style: none !important;
	margin: 0.35rem 0 0;
	padding: 0 1.1rem 0.15rem 0 !important;
	display: flex;
	gap: 0.7rem;
	max-width: none;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0.15rem;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.4rem), transparent 100%);
	-webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.4rem), transparent 100%);
	animation: bn-hp-fade-up 0.7s ease 0.32s both;
}

.bn-hp__stats::-webkit-scrollbar {
	display: none;
}

.bn-hp__stat {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	flex: 0 0 min(70vw, 11.5rem);
	scroll-snap-align: start;
}

.bn-hp__stat::before,
.bn-hp__stat::marker {
	content: none !important;
	display: none !important;
}

.bn-hp__stat-link {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.12rem;
	min-height: 0;
	height: auto;
	padding: 0.55rem 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 0.75rem;
	background: rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow:
		0 8px 20px rgba(20, 24, 36, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.28);
	text-decoration: none !important;
	color: #fff !important;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.bn-hp__stat-link:hover,
.bn-hp__stat-link:focus-visible {
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(255, 255, 255, 0.48);
	color: #fff !important;
	transform: translateY(-2px);
	box-shadow:
		0 14px 32px rgba(20, 24, 36, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.bn-hp__stat-num {
	display: block;
	font-family: "Sansita", Georgia, serif;
	font-style: italic;
	font-weight: 800;
	font-size: clamp(1.35rem, 2.8vw, 1.7rem);
	line-height: 1;
	letter-spacing: 0.01em;
	color: #fff !important;
	font-variant-numeric: tabular-nums;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.bn-hp__stat-label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: rgba(255, 255, 255, 0.9) !important;
}

@keyframes bn-hp-fade-up {
	from { opacity: 0; transform: translate3d(0, 14px, 0); }
	to { opacity: 1; transform: none; }
}

/* Sections */
.bn-hp__section {
	padding: 2rem 0 1.85rem;
}

.bn-hp__section--soft {
	background: var(--bn-hp-paper);
	border-top: 1px solid var(--bn-hp-line);
	border-bottom: 1px solid var(--bn-hp-line);
	padding-bottom: 1.5rem;
}

.bn-hp__section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.bn-hp__section-actions {
	display: flex;
	align-items: center;
	gap: 0.65rem 0.9rem;
	flex-wrap: wrap;
}

.bn-hp__h2 {
	margin: 0;
	font-family: "Sansita", Georgia, serif;
	font-style: italic;
	font-weight: 800;
	font-size: clamp(1.3rem, 2.8vw, 1.7rem);
	line-height: 1.15;
	color: var(--bn-hp-ink);
}

.bn-hp__h2--center {
	text-align: center;
	margin-bottom: 0.35rem;
}

.bn-hp__section-link {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--bn-hp-coral) !important;
	white-space: nowrap;
}

.bn-hp__section-note,
.bn-hp__section-intro {
	font-size: 0.9rem;
	color: var(--bn-hp-muted);
}

.bn-hp__section-intro {
	margin: -0.25rem 0 1rem;
	max-width: 46rem;
	line-height: 1.45;
}

.bn-hp__shuffle {
	appearance: none;
	border: 1px solid var(--bn-hp-line);
	background: var(--bn-hp-white);
	color: var(--bn-hp-navy);
	font: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.4rem 0.65rem;
	cursor: pointer;
}

.bn-hp__section--soft .bn-hp__shuffle {
	background: #fff;
}

.bn-hp__shuffle:hover,
.bn-hp__shuffle:focus-visible {
	border-color: var(--bn-hp-coral);
	color: var(--bn-hp-coral);
}

.bn-hp__shuffle.is-loading {
	opacity: 0.7;
	cursor: wait;
}

/* Equal cards grid */
.bn-hp__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.2rem 0.75rem;
	align-items: start;
	transition: opacity 0.22s ease, transform 0.22s ease;
	will-change: opacity, transform;
}

.bn-hp__grid.is-fading-out {
	opacity: 0;
	transform: translate3d(0, 8px, 0);
	pointer-events: none;
}

.bn-hp__grid.is-fading-in {
	opacity: 0;
	transform: translate3d(0, 8px, 0);
}

@media (prefers-reduced-motion: reduce) {
	.bn-hp__grid {
		transition: none;
	}
	.bn-hp__grid.is-fading-out,
	.bn-hp__grid.is-fading-in {
		transform: none;
	}
}

.bn-hp__card {
	min-width: 0;
	margin: 0;
}

.bn-hp__card-media {
	display: block;
	margin-bottom: 0.5rem;
	background: transparent;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

.bn-hp__card-img,
.bn-hp__card-ph {
	display: block;
	width: 100%;
	height: auto;
	max-height: 20rem;
	object-fit: contain;
	object-position: center top;
	background: transparent;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

.bn-hp__card-ph {
	aspect-ratio: 3 / 4;
	background: #fff;
}

.bn-hp__card-title,
.bn-hp h3.bn-hp__card-title {
	margin: 0 0 0.28rem;
	font-family: "Sansita", Georgia, serif;
	font-style: italic;
	font-weight: 800;
	font-size: 0.88rem !important;
	line-height: 1.25 !important;
}

.bn-hp__card-title a {
	color: var(--bn-hp-ink);
	text-decoration: none;
}

.bn-hp__card-title a:hover,
.bn-hp__card-title a:focus-visible {
	color: var(--bn-hp-coral);
}

.bn-hp__card-meta {
	margin: 0 0 0.3rem;
	font-size: 0.72rem;
	line-height: 1.35;
	color: var(--bn-hp-muted);
}

.bn-hp__card-meta a {
	color: var(--bn-hp-coral);
	text-decoration: none;
}

.bn-hp__card-meta a:hover,
.bn-hp__card-meta a:focus-visible {
	text-decoration: underline;
}

.bn-hp__card-excerpt {
	margin: 0;
	font-size: 0.76rem;
	line-height: 1.4;
	color: var(--bn-hp-ink);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.bn-hp__card--book .bn-hp__card-excerpt {
	display: none;
}

/* Genres */
.bn-hp__genres {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem;
}

.bn-hp__genres a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--bn-hp-line);
	background: var(--bn-hp-white);
	min-height: 0;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.bn-hp__genres a:hover,
.bn-hp__genres a:focus-visible {
	border-color: var(--bn-hp-coral);
	color: var(--bn-hp-ink);
	transform: translateY(-1px);
}

.bn-hp__genre-name {
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1.25;
}

.bn-hp__genre-count {
	font-size: 0.76rem;
	color: var(--bn-hp-muted);
	white-space: nowrap;
}

/* Hubs */
.bn-hp__hubs {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85rem;
}

.bn-hp__hub {
	border: 1px solid var(--bn-hp-line);
	background: var(--bn-hp-white);
	padding: 1rem 1.05rem 0.85rem;
}

.bn-hp__hub-main { display: block; }

.bn-hp__hub-main:hover .bn-hp__hub-title,
.bn-hp__hub-main:focus-visible .bn-hp__hub-title {
	color: var(--bn-hp-coral);
}

.bn-hp__hub-title {
	margin: 0 0 0.35rem;
	font-family: "Sansita", Georgia, serif;
	font-style: italic;
	font-weight: 800;
	font-size: 1.2rem;
	line-height: 1.2;
	color: var(--bn-hp-ink);
	transition: color 0.15s ease;
}

.bn-hp__hub-text {
	margin: 0 0 0.55rem;
	font-size: 0.9rem;
	line-height: 1.4;
	color: var(--bn-hp-muted);
}

.bn-hp__hub-links {
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0.7rem 0 0;
	border-top: 1px solid var(--bn-hp-line);
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.9rem;
}

.bn-hp__hub-links a {
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--bn-hp-navy);
}

.bn-hp__hub-links a:hover,
.bn-hp__hub-links a:focus-visible {
	color: var(--bn-hp-coral);
}

/* Site-wide bn_newsletter_form — keep plugin styles,
only section spacing */
.bn-hp__newsletter-section {
	padding-top: 1.25rem;
	padding-bottom: 1.25rem;
}

.bn-hp__newsletter {
	display: flex;
	justify-content: center;
}

.bn-hp .bn-newsletter-wrap {
	width: 100%;
	margin: 0;
	text-align: center;
}

.bn-hp .bn-newsletter {
	margin: 0 auto;
	vertical-align: top;
}

/* About — keep tight so it doesn't leave a blank band before the footer */
.bn-hp__section--about {
	padding-top: 1.15rem;
	padding-bottom: 0.35rem;
}

.bn-hp__about {
	max-width: 46rem;
}

.bn-hp__about .bn-hp__h2 {
	margin-bottom: 0;
}

.bn-hp__about p {
	margin: 0.45rem 0 0;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--bn-hp-ink);
}

.bn-hp__about a {
	color: var(--bn-hp-coral);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bn-hp__empty {
	margin: 0;
	color: var(--bn-hp-muted);
}

@media (min-width: 768px) {
	.bn-hp__hero {
		--bn-hero-min-h: clamp(16rem, 38vh, 24rem);
		padding: var(--bn-hero-pad-y) 0;
	}

	.bn-hp__stats {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 0.8rem;
		max-width: 52rem;
		padding: 0 !important;
		overflow: visible;
		scroll-snap-type: none;
		mask-image: none;
		-webkit-mask-image: none;
	}

	.bn-hp__stat {
		flex: none;
		scroll-snap-align: none;
	}

	.bn-hp__stat-link {
		min-height: 0;
		padding: 0.6rem 0.9rem;
	}

	.bn-hp__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.4rem 1.05rem;
	}

	.bn-hp__card-title,
	.bn-hp h3.bn-hp__card-title {
		font-size: 0.95rem !important;
	}

	.bn-hp__genres {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.bn-hp__hubs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1rem;
	}
}

@media (min-width: 992px) {
	.bn-hp__hero {
		--bn-hero-min-h: clamp(18rem, 40vh, 26rem);
	}
}

@media (min-width: 1100px) {
	.bn-hp__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.6rem 1.2rem;
	}

	.bn-hp__card-img {
		max-height: 22rem;
	}
}
