/*
Theme Name: Crimson Crumb Journal
Author: Marlowe Finch Studio
Description: A warm, editorial food and bakery theme with bold pastry imagery, editable homepage copy, dynamic WordPress content, and polished fallbacks for posts without featured images.
Version: 1.0.5
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: bhb7-theme
Tags: blog, food-and-drink, custom-logo, custom-menu, featured-images, block-styles, wide-blocks, translation-ready
*/

:root {
	--bhb7-cocoa: #3a1208;
	--bhb7-cocoa-deep: #210904;
	--bhb7-brown: #5a1d0b;
	--bhb7-brown-soft: #8b3a13;
	--bhb7-cream: #fff0dc;
	--bhb7-cream-soft: #fff8ed;
	--bhb7-ruby: #a61d24;
	--bhb7-orange: #ff9708;
	--bhb7-orange-deep: #dc7200;
	--bhb7-butter: #ffcf70;
	--bhb7-ink: #2b0f06;
	--bhb7-white: #ffffff;
	--bhb7-shadow: 0 22px 60px rgba(43, 15, 6, 0.18);
	--bhb7-radius: 8px;
	--bhb7-max: 1180px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bhb7-cream);
	color: var(--bhb7-ink);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.65;
	overflow-wrap: break-word;
}

img {
	display: block;
	height: auto;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--bhb7-ruby);
}

button,
input,
select,
textarea {
	font: inherit;
}

h1,
h2,
h3,
h4 {
	color: var(--bhb7-cocoa);
	font-family: "Cooper Black", "Arial Rounded MT Bold", Georgia, serif;
	font-weight: 900;
	letter-spacing: 0;
	line-height: 0.95;
	margin: 0 0 0.55em;
	text-transform: none;
}

h1 {
	font-size: clamp(2rem, 5vw, 3.8rem);
	max-width: 680px;
}

h2 {
	font-size: clamp(1.85rem, 5vw, 3.7rem);
}

h3 {
	font-size: clamp(1.35rem, 4vw, 2rem);
}

p {
	margin: 0 0 1.25rem;
}

:focus-visible {
	outline: 3px solid var(--bhb7-butter);
	outline-offset: 4px;
}

.bhb7-skip-link {
	background: var(--bhb7-cocoa);
	color: var(--bhb7-white);
	left: 1rem;
	padding: 0.75rem 1rem;
	position: fixed;
	top: -100px;
	z-index: 1000;
}

.bhb7-skip-link:focus {
	top: 1rem;
}

.bhb7-site-header {
	left: 0;
	padding: 0.75rem;
	position: absolute;
	right: 0;
	top: 0;
	z-index: 20;
}

.bhb7-header-inner {
	align-items: center;
	backdrop-filter: blur(14px);
	background: rgba(58, 18, 8, 0.82);
	border: 1px solid rgba(255, 240, 220, 0.36);
	border-radius: 999px;
	box-shadow: 0 18px 45px rgba(33, 9, 4, 0.26);
	display: grid;
	gap: 0.75rem;
	grid-template-columns: 1fr auto;
	margin: 0 auto;
	max-width: var(--bhb7-max);
	min-height: 58px;
	padding: 0.6rem 0.72rem 0.6rem 1rem;
}

.bhb7-brand {
	min-width: 0;
}

.bhb7-site-name,
.bhb7-footer-title {
	color: var(--bhb7-cream-soft);
	display: inline-block;
	font-family: "Cooper Black", "Arial Rounded MT Bold", Georgia, serif;
	font-size: clamp(0.98rem, 4.2vw, 1.32rem);
	font-weight: 900;
	line-height: 1;
	max-width: 230px;
	text-decoration: none;
}

.bhb7-menu-toggle {
	align-items: center;
	background: var(--bhb7-cream-soft);
	border: 0;
	border-radius: 50%;
	color: var(--bhb7-ink);
	cursor: pointer;
	display: inline-flex;
	font-weight: 800;
	justify-content: center;
	min-height: 44px;
	padding: 0;
	width: 44px;
}

.bhb7-menu-toggle-label {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.bhb7-menu-toggle-bar,
.bhb7-menu-toggle-bar::before,
.bhb7-menu-toggle-bar::after {
	background: currentColor;
	border-radius: 99px;
	display: block;
	height: 2px;
	width: 18px;
}

.bhb7-menu-toggle-bar {
	position: relative;
}

.bhb7-menu-toggle-bar::before,
.bhb7-menu-toggle-bar::after {
	content: "";
	left: 0;
	position: absolute;
}

.bhb7-menu-toggle-bar::before {
	top: -6px;
}

.bhb7-menu-toggle-bar::after {
	top: 6px;
}

.bhb7-main-nav,
.bhb7-header-cta {
	display: none;
}

.bhb7-main-nav-open {
	background: rgba(58, 18, 8, 0.96);
	border: 1px solid rgba(255, 240, 220, 0.32);
	border-radius: 24px;
	display: block;
	grid-column: 1 / -1;
	padding: 0.65rem;
}

.bhb7-menu,
.bhb7-footer-menu {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bhb7-menu a,
.bhb7-footer-menu a {
	border-radius: 999px;
	color: var(--bhb7-cream-soft);
	display: block;
	font-weight: 800;
	padding: 0.72rem 0.9rem;
	text-decoration: none;
}

.bhb7-menu a:hover,
.bhb7-menu a:focus-visible,
.bhb7-footer-menu a:hover,
.bhb7-footer-menu a:focus-visible {
	background: rgba(255, 240, 220, 0.12);
	color: var(--bhb7-white);
}

.bhb7-hero {
	background:
		linear-gradient(180deg, rgba(33, 9, 4, 0.72), rgba(58, 18, 8, 0.58) 52%, rgba(33, 9, 4, 0.76)),
		var(--bhb7-hero-image) center / cover no-repeat;
	color: var(--bhb7-cream-soft);
	min-height: 560px;
	padding: 8rem 1rem 3rem;
	position: relative;
}

.bhb7-hero::after {
	background: linear-gradient(180deg, rgba(255, 240, 220, 0), var(--bhb7-cream) 96%);
	bottom: -1px;
	content: "";
	height: 150px;
	left: 0;
	position: absolute;
	right: 0;
}

.bhb7-hero-inner {
	align-items: center;
	display: flex;
	flex-direction: column;
	margin: 0 auto;
	max-width: 760px;
	position: relative;
	text-align: center;
	width: 100%;
	z-index: 2;
}

.bhb7-hero-kicker,
.bhb7-section-kicker {
	color: var(--bhb7-orange);
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.12em;
	margin-bottom: 0.85rem;
	text-transform: uppercase;
}

.bhb7-hero h1 {
	color: var(--bhb7-cream-soft);
	font-size: clamp(2.05rem, 4.8vw, 3.85rem);
	max-width: 680px;
	text-shadow: 0 14px 50px rgba(33, 9, 4, 0.45);
}

.bhb7-hero-text {
	color: rgba(255, 248, 237, 0.9);
	font-size: clamp(0.98rem, 2vw, 1.12rem);
	max-width: 560px;
}

.bhb7-hero-actions,
.bhb7-post-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	justify-content: center;
	margin-top: 1.7rem;
}

.bhb7-button,
.bhb7-header-cta {
	align-items: center;
	border: 0;
	border-radius: 999px;
	font-weight: 900;
	justify-content: center;
	min-height: 48px;
	padding: 0.78rem 1.35rem;
	text-decoration: none;
	transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.bhb7-button {
	display: inline-flex;
}

.bhb7-button:hover,
.bhb7-header-cta:hover {
	transform: translateY(-2px);
}

.bhb7-button-primary,
.bhb7-header-cta {
	background: var(--bhb7-orange);
	color: var(--bhb7-ink);
}

.bhb7-button-primary:hover,
.bhb7-header-cta:hover {
	background: var(--bhb7-butter);
	color: var(--bhb7-ink);
}

.bhb7-button-ghost {
	background: var(--bhb7-cream-soft);
	color: var(--bhb7-ink);
}

.bhb7-button-ghost:hover {
	background: var(--bhb7-white);
	color: var(--bhb7-ruby);
}

.bhb7-intro,
.bhb7-latest,
.bhb7-archive-shell {
	margin: 0 auto;
	max-width: var(--bhb7-max);
	padding: 4.5rem 1rem;
}

.bhb7-intro {
	display: grid;
	gap: 3rem;
}

.bhb7-intro-media {
	min-height: 430px;
	position: relative;
}

.bhb7-intro-img {
	border: 10px solid var(--bhb7-cream-soft);
	box-shadow: var(--bhb7-shadow);
	object-fit: cover;
	position: absolute;
}

.bhb7-intro-img-one {
	border-radius: var(--bhb7-radius);
	height: 250px;
	left: 0;
	top: 0;
	transform: rotate(-3deg);
	width: min(72%, 380px);
}

.bhb7-intro-img-two {
	border-radius: 999px;
	height: 220px;
	right: 0;
	top: 86px;
	width: min(58%, 280px);
}

.bhb7-intro-img-three {
	border-radius: var(--bhb7-radius);
	bottom: 0;
	height: 230px;
	left: 12%;
	transform: rotate(2deg);
	width: min(80%, 470px);
}

.bhb7-intro-copy {
	align-self: center;
}

.bhb7-intro-copy p:not(.bhb7-section-kicker),
.bhb7-section-header p,
.bhb7-archive-description,
.bhb7-card-excerpt,
.bhb7-single-body {
	color: rgba(43, 15, 6, 0.82);
}

.bhb7-section-header,
.bhb7-archive-header {
	margin: 0 auto 2.6rem;
	max-width: 780px;
	text-align: center;
}

.bhb7-section-header h2,
.bhb7-archive-header h1 {
	margin-left: auto;
	margin-right: auto;
}

.bhb7-post-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
}

.bhb7-post-card {
	background: var(--bhb7-cream-soft);
	border: 1px solid rgba(90, 29, 11, 0.12);
	border-radius: var(--bhb7-radius);
	box-shadow: 0 14px 34px rgba(43, 15, 6, 0.08);
	overflow: hidden;
}

.bhb7-card-image-link {
	display: block;
	position: relative;
}

.bhb7-card-image-link::after {
	background: var(--bhb7-orange);
	border-radius: var(--bhb7-radius);
	content: "";
	inset: 10% 5% -5% 5%;
	position: absolute;
	z-index: 0;
}

.bhb7-card-image {
	aspect-ratio: 1 / 0.78;
	border: 6px solid var(--bhb7-brown);
	border-radius: var(--bhb7-radius);
	margin: 1.15rem auto 0;
	object-fit: cover;
	position: relative;
	width: calc(100% - 2.3rem);
	z-index: 1;
}

.bhb7-card-body {
	padding: 1.25rem;
}

.bhb7-card-meta,
.bhb7-single-meta {
	align-items: center;
	color: var(--bhb7-brown-soft);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.82rem;
	font-weight: 800;
	gap: 0.45rem;
	margin-bottom: 0.8rem;
	text-transform: uppercase;
}

.bhb7-card-cats a,
.bhb7-single-cats a {
	color: inherit;
}

.bhb7-card-title {
	font-size: clamp(1.4rem, 4vw, 2rem);
	margin-bottom: 0.65rem;
}

.bhb7-card-title a {
	color: var(--bhb7-cocoa);
	text-decoration: none;
}

.bhb7-card-title a:hover {
	color: var(--bhb7-ruby);
}

.bhb7-empty-state {
	background: var(--bhb7-cream-soft);
	border: 1px dashed rgba(90, 29, 11, 0.28);
	border-radius: var(--bhb7-radius);
	padding: 2rem;
	text-align: center;
}

.bhb7-pagination {
	margin-top: 2.5rem;
	text-align: center;
}

.bhb7-pagination a,
.bhb7-pagination span {
	border: 1px solid rgba(90, 29, 11, 0.18);
	border-radius: 999px;
	display: inline-flex;
	margin: 0.2rem;
	min-width: 42px;
	padding: 0.55rem 0.8rem;
	text-decoration: none;
}

.bhb7-pagination span[aria-current="page"] {
	background: var(--bhb7-cocoa);
	color: var(--bhb7-cream-soft);
}

.bhb7-single-hero {
	background:
		linear-gradient(90deg, rgba(33, 9, 4, 0.9), rgba(33, 9, 4, 0.38)),
		var(--bhb7-single-image) center / cover no-repeat;
	color: var(--bhb7-cream-soft);
	padding: 9rem 1rem 5rem;
}

.bhb7-single-hero-inner {
	margin: 0 auto;
	max-width: var(--bhb7-max);
}

.bhb7-single-title {
	color: var(--bhb7-cream-soft);
	max-width: 920px;
}

.bhb7-single-body,
.bhb7-content-wrap {
	background: var(--bhb7-cream-soft);
	border-radius: var(--bhb7-radius);
	box-shadow: 0 14px 40px rgba(43, 15, 6, 0.07);
	margin: -2rem auto 3rem;
	max-width: 820px;
	padding: clamp(1.25rem, 5vw, 3rem);
	position: relative;
}

.bhb7-single-body > * + *,
.bhb7-content-wrap > * + * {
	margin-top: 1.2rem;
}

.bhb7-single-body h2,
.bhb7-single-body h3,
.bhb7-content-wrap h2,
.bhb7-content-wrap h3 {
	margin-top: 1.7rem;
}

.bhb7-single-body a,
.bhb7-content-wrap a {
	color: var(--bhb7-ruby);
	font-weight: 800;
}

.bhb7-single-body img,
.bhb7-content-wrap img {
	border-radius: var(--bhb7-radius);
}

.bhb7-page-links {
	font-weight: 800;
}

.bhb7-post-nav {
	margin: 0 auto 4rem;
	max-width: 820px;
	padding: 0 1rem;
}

.bhb7-post-nav-item {
	flex: 1 1 240px;
}

.bhb7-post-nav a {
	background: var(--bhb7-cocoa);
	border-radius: var(--bhb7-radius);
	color: var(--bhb7-cream-soft);
	display: block;
	font-weight: 900;
	padding: 1rem;
	text-decoration: none;
}

.bhb7-post-nav a:hover {
	background: var(--bhb7-ruby);
	color: var(--bhb7-white);
}

.bhb7-site-footer {
	background: var(--bhb7-cocoa-deep);
	color: rgba(255, 240, 220, 0.78);
	padding: 3rem 1rem;
}

.bhb7-footer-inner {
	display: grid;
	gap: 2rem;
	margin: 0 auto;
	max-width: var(--bhb7-max);
}

.bhb7-footer-brand p,
.bhb7-footer-meta {
	margin: 0.6rem 0 0;
}

.bhb7-footer-menu {
	gap: 0.15rem;
}

.bhb7-footer-meta {
	font-size: 0.9rem;
}

@media (max-width: 979px) {
	.bhb7-header-inner {
		grid-template-columns: minmax(0, 1fr) auto !important;
	}

	.bhb7-header-cta {
		display: none !important;
		visibility: hidden !important;
	}

	.bhb7-menu-toggle {
		display: inline-flex !important;
	}

	.bhb7-menu-toggle-label {
		display: none !important;
	}
}

@media (min-width: 700px) {
	.bhb7-site-header {
		padding: 1rem;
	}

	.bhb7-hero {
		min-height: 580px;
		padding-top: 9rem;
	}

	.bhb7-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 980px) {
	.bhb7-header-inner {
		grid-template-columns: minmax(210px, 1fr) auto minmax(160px, 1fr);
		padding: 0.8rem 1rem 0.8rem 1.25rem;
	}

	.bhb7-menu-toggle {
		display: none;
	}

	.bhb7-main-nav {
		display: block;
	}

	.bhb7-menu {
		align-items: center;
		flex-direction: row;
		gap: 0.1rem;
		justify-content: center;
	}

	.bhb7-menu a {
		padding: 0.65rem 0.9rem;
	}

	.bhb7-header-cta {
		display: inline-flex;
		justify-self: end;
		min-width: 150px;
	}

	.bhb7-hero {
		min-height: 620px;
		padding-bottom: 4.25rem;
	}

	.bhb7-hero-text {
		max-width: 560px;
	}

	.bhb7-intro {
		align-items: center;
		grid-template-columns: 1.05fr 0.95fr;
		padding-bottom: 5.5rem;
		padding-top: 5.5rem;
	}

	.bhb7-intro-media {
		min-height: 560px;
	}

	.bhb7-post-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.bhb7-latest .bhb7-post-grid article:first-child {
		grid-column: span 2;
	}

	.bhb7-footer-inner {
		align-items: center;
		grid-template-columns: 1fr auto;
	}

	.bhb7-footer-meta {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1180px) {
	.bhb7-post-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.bhb7-latest .bhb7-post-grid article:first-child {
		grid-column: span 2;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
