/* Homebrew Academy Revival — primary section hub pages */
:root {
	--hba-hub-ink: #171a16;
	--hba-hub-green: #24372b;
	--hba-hub-paper: #f7f2e8;
	--hba-hub-cream: #fff8e9;
	--hba-hub-card: #fffdf8;
	--hba-hub-amber: #c67b2c;
	--hba-hub-gold: #e0a647;
	--hba-hub-line: #d9cebc;
	--hba-hub-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
	--hba-hub-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--hba-hub-hand: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
}

body.page .hba-hub,
body.single-post .hba-hub,
.hba-hub * { box-sizing: border-box; }

.hba-hub {
	font-family: var(--hba-hub-sans);
	background: var(--hba-hub-paper);
	color: var(--hba-hub-ink);
	overflow: hidden;
}

body.page:has(.hba-hub) #inner-wrap,
body.single-post:has(.hba-hub) #inner-wrap,
body.page:has(.hba-hub) #primary,
body.single-post:has(.hba-hub) #primary,
body.page:has(.hba-hub) .content-area,
body.single-post:has(.hba-hub) .content-area,
body.page:has(.hba-hub) .site-main,
body.single-post:has(.hba-hub) .site-main {
	max-width: none;
	margin: 0;
	padding: 0;
}

.hba-hub a { color: inherit; text-decoration: none; }
.hba-hub-wrap { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }

.hba-hub-hero {
	position: relative;
	padding: 72px 0 62px;
	border-bottom: 1px solid var(--hba-hub-line);
	background:
		radial-gradient(circle at 92% 18%, rgba(198,123,44,.11) 0 95px, transparent 96px),
		linear-gradient(120deg, rgba(36,55,43,.025), transparent 45%),
		var(--hba-hub-paper);
}

.hba-hub-hero::after {
	content: "";
	position: absolute;
	left: 4%;
	bottom: -25px;
	width: 210px;
	height: 60px;
	border-top: 4px solid rgba(198,123,44,.25);
	border-radius: 50%;
	transform: rotate(-4deg);
}

.hba-hub-hero-grid {
	display: grid;
	grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr);
	gap: 70px;
	align-items: end;
}

.hba-hub-eyebrow,
.hba-hub-section-head span,
.hba-hub-note span,
.hba-hub-door > span,
.hba-hub-lead span,
.hba-hub-side span,
.hba-hub-card-image span,
.hba-hub-reference aside > span {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.hba-hub-eyebrow { color: #8f4f17; display: inline-flex; align-items: center; gap: 10px; }
.hba-hub-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--hba-hub-amber); }

.hba-hub-hero h1 {
	font-family: var(--hba-hub-display);
	font-size: clamp(58px, 7.2vw, 108px);
	line-height: .89;
	letter-spacing: -.055em;
	text-wrap: balance;
	margin: 14px 0 24px;
	max-width: 900px;
}

.hba-hub-hero p {
	font-family: var(--hba-hub-display);
	font-size: clamp(21px, 2.2vw, 30px);
	line-height: 1.34;
	color: #514e47;
	max-width: 800px;
	margin: 0;
}

.hba-hub-note {
	position: relative;
	min-height: 200px;
	padding: 30px;
	background: var(--hba-hub-ink);
	color: var(--hba-hub-cream);
	border: 5px solid #22261f;
	box-shadow: inset 0 0 0 1px rgba(255,248,233,.18), 8px 9px 0 rgba(198,123,44,.16);
	transform: rotate(.8deg);
	overflow: hidden;
}

.hba-hub-note::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 20% 20%, rgba(255,255,255,.05) 0 1px, transparent 1.5px),
		radial-gradient(circle at 75% 60%, rgba(255,255,255,.03) 0 1px, transparent 1.5px);
	background-size: 19px 19px, 27px 27px;
}

.hba-hub-note span,
.hba-hub-note strong,
.hba-hub-note i { position: relative; z-index: 2; }
.hba-hub-note span { color: var(--hba-hub-gold); display: block; margin-bottom: 17px; }
.hba-hub-note strong {
	display: block;
	font-family: var(--hba-hub-hand);
	font-size: clamp(28px, 3vw, 42px);
	line-height: 1.02;
	font-weight: 700;
	transform: rotate(-1.5deg);
}
.hba-hub-note i {
	display: block;
	width: 55%;
	height: 7px;
	border-top: 3px solid var(--hba-hub-gold);
	border-radius: 50%;
	margin-top: 22px;
	transform: rotate(-2deg);
}

/* Door grid */
.hba-hub-doors { padding: 78px 0 82px; }
.hba-hub-section-head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 30px;
	margin-bottom: 34px;
}
.hba-hub-section-head span { color: #8f4f17; }
.hba-hub-section-head h2 {
	font-family: var(--hba-hub-display);
	font-size: clamp(44px, 5vw, 72px);
	line-height: .95;
	letter-spacing: -.045em;
	margin: 7px 0 0;
}
.hba-hub-section-head em {
	font-family: var(--hba-hub-hand);
	font-size: 21px;
	font-style: normal;
	color: var(--hba-hub-green);
	transform: rotate(-2deg);
	padding-bottom: 9px;
}

.hba-hub-door-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0,1fr));
	gap: 14px;
}
.hba-hub-door {
	position: relative;
	min-height: 178px;
	padding: 22px 22px 20px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	border: 1px solid var(--hba-hub-line);
	border-radius: 14px;
	background: rgba(255,253,248,.72);
	overflow: hidden;
	transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.hba-hub-door::after {
	content: "";
	position: absolute;
	right: -26px;
	top: -28px;
	width: 100px;
	height: 100px;
	background: var(--hba-hub-amber);
	border-radius: 28px;
	transform: rotate(24deg);
	opacity: .14;
}
.hba-hub-door:nth-child(2n)::after { background: var(--hba-hub-green); border-radius: 50%; }
.hba-hub-door:nth-child(3n)::after { background: #a65038; border-radius: 8px 34px 8px 34px; }
.hba-hub-door:hover { transform: translateY(-3px); background: var(--hba-hub-card); border-color: #c4ac89; }
.hba-hub-door > span { color: #8f4f17; position: relative; z-index: 2; }
.hba-hub-door strong {
	font-family: var(--hba-hub-display);
	font-size: clamp(26px, 2.5vw, 34px);
	line-height: 1;
	letter-spacing: -.035em;
	position: relative;
	z-index: 2;
}
.hba-hub-door i {
	font-style: normal;
	font-size: 28px;
	position: absolute;
	right: 18px;
	bottom: 13px;
	color: var(--hba-hub-amber);
}

/* Chalkboard featured area */
.hba-hub-featured {
	position: relative;
	padding: 78px 0;
	background: var(--hba-hub-green);
	color: var(--hba-hub-cream);
	overflow: hidden;
}
.hba-hub-featured::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 18% 30%, rgba(255,255,255,.035) 0 1px, transparent 1.5px),
		radial-gradient(circle at 78% 65%, rgba(255,255,255,.025) 0 1px, transparent 1.5px);
	background-size: 21px 21px, 31px 31px;
}
.hba-hub-featured::after {
	content: "GOOD STUFF →";
	position: absolute;
	right: 4%;
	top: 34px;
	font-family: var(--hba-hub-hand);
	font-size: 18px;
	color: rgba(255,248,233,.14);
	transform: rotate(6deg);
}
.hba-hub-featured .hba-hub-wrap { position: relative; z-index: 2; }
.hba-hub-section-head--light span { color: #efb85f; }
.hba-hub-section-head--light h2 { color: var(--hba-hub-cream); }
.hba-hub-section-head--light em { color: rgba(255,248,233,.8); }

.hba-hub-feature-grid {
	display: grid;
	grid-template-columns: minmax(0,1.55fr) minmax(300px,.45fr);
	gap: 22px;
}
.hba-hub-lead,
.hba-hub-side a {
	position: relative;
	display: block;
	overflow: hidden;
	background: #1a1b18;
	isolation: isolate;
}
.hba-hub-lead { min-height: 540px; border-radius: 18px; }
.hba-hub-side { display: grid; grid-template-rows: 1fr 1fr; gap: 22px; }
.hba-hub-side a { min-height: 259px; border-radius: 15px; }
.hba-hub-lead::after,
.hba-hub-side a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, transparent 18%, rgba(10,12,9,.88) 100%);
}
.hba-hub-lead img,
.hba-hub-side img,
.hba-hub-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}
.hba-hub-lead:hover img,
.hba-hub-side a:hover img { transform: scale(1.025); }
.hba-hub-placeholder {
	display: grid;
	place-items: center;
	font-family: var(--hba-hub-display);
	font-size: 80px;
	color: rgba(255,248,233,.22);
	background: #17251c;
}
.hba-hub-lead > div,
.hba-hub-side a > div {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 32px;
}
.hba-hub-lead span,
.hba-hub-side span { color: #f2bd6b; }
.hba-hub-lead h3,
.hba-hub-side h3 {
	font-family: var(--hba-hub-display);
	color: var(--hba-hub-cream);
	letter-spacing: -.035em;
	text-wrap: balance;
	margin: 9px 0 0;
}
.hba-hub-lead h3 { font-size: clamp(38px, 4.5vw, 64px); line-height: .98; }
.hba-hub-side h3 { font-size: clamp(24px, 2.1vw, 32px); line-height: 1.03; }

/* Latest cards */
.hba-hub-latest { padding: 78px 0 86px; border-bottom: 1px solid var(--hba-hub-line); }
.hba-hub-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 64px 26px; }
.hba-hub-card-image {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 14px;
	background: #e8decd;
	box-shadow: 0 12px 34px rgba(46,33,21,.07);
}
.hba-hub-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hba-hub-card:hover img { transform: scale(1.03); }
.hba-hub-card-image span {
	position: absolute;
	left: 12px;
	top: 12px;
	z-index: 3;
	background: var(--hba-hub-ink);
	color: var(--hba-hub-gold);
	padding: 7px 9px 6px;
	box-shadow: 3px 3px 0 var(--hba-hub-gold);
	transform: rotate(-1deg);
}
.hba-hub-card h3 {
	font-family: var(--hba-hub-display);
	font-size: clamp(26px, 2.5vw, 33px);
	line-height: 1.08;
	letter-spacing: -.035em;
	margin: 19px 0 0;
	padding-bottom: 6px;
	text-wrap: balance;
}
.hba-hub-card p { font-size: 14px; line-height: 1.6; color: #5a564e; margin: 10px 0 0; }

/* Legacy evergreen reference layer */
.hba-hub-reference { padding: 86px 0 96px; background: #eee4d2; }
.hba-hub-reference-grid {
	display: grid;
	grid-template-columns: minmax(280px, 320px) minmax(0,1fr);
	grid-template-areas: "sidebar content";
	gap: 64px;
	align-items: start;
}
.hba-hub-reference-grid > .hba-hub-reference-rail {
	grid-area: sidebar !important;
	grid-column: 1 !important;
	grid-row: 1 !important;
	position: relative;
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	color: inherit;
	align-self: start;
}
.hba-hub-reference-grid > .hba-hub-original-content {
	grid-area: content !important;
	grid-column: 2 !important;
	grid-row: 1 !important;
	min-width: 0;
}
.hba-hub-reference-rail .sidebar-inner-wrap {
	position: relative;
	min-width: 0;
}
.hba-hub-reference-note {
	position: relative;
	padding: 24px;
	background: var(--hba-hub-ink);
	color: var(--hba-hub-cream);
	border: 4px solid #22261f;
	box-shadow: 7px 8px 0 rgba(198,123,44,.18);
	transform: rotate(-.7deg);
}
.hba-mediavine-sidebar-slot {
	margin: 34px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	min-height: 1px;
}
.hba-hub-reference-note > span { color: var(--hba-hub-gold); }
.hba-hub-reference-note strong {
	display: block;
	font-family: var(--hba-hub-hand);
	font-size: 28px;
	line-height: 1.04;
	margin: 14px 0;
	font-weight: 700;
}
.hba-hub-reference-note p { font-size: 13px; line-height: 1.55; color: rgba(255,248,233,.72); margin: 0; }

.hba-hub-original-content {
	background: var(--hba-hub-card);
	border: 1px solid #d5c8b4;
	border-radius: 16px;
	padding: 44px 48px 52px;
	font-size: 17px;
	line-height: 1.72;
	box-shadow: 0 18px 46px rgba(53,38,23,.06);
}
.hba-hub-original-content > p:first-child { font-family: var(--hba-hub-display); font-size: 22px; line-height: 1.5; }
.hba-hub-original-content h2,
.hba-hub-original-content h3 {
	font-family: var(--hba-hub-display);
	letter-spacing: -.035em;
	line-height: 1.05;
}
.hba-hub-original-content h2 { font-size: 38px; margin-top: 1.6em; }
.hba-hub-original-content h3 { font-size: 29px; margin-top: 1.5em; }
.hba-hub-original-content a { color: #8f4f17; text-decoration: underline; text-underline-offset: 3px; }
.hba-hub-original-content li { margin-bottom: .45em; }
/* The old dynamic latest-post wall is replaced by the designed feed above. */
.hba-hub-original-content .wp-block-latest-posts { display: none; }

@media (max-width: 980px) {
	.hba-hub-hero-grid { grid-template-columns: 1fr; gap: 34px; }
	.hba-hub-note { max-width: 570px; }
	.hba-hub-door-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
	.hba-hub-feature-grid { grid-template-columns: 1.2fr .8fr; }
	.hba-hub-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
	.hba-hub-reference-grid { grid-template-columns: 1fr; grid-template-areas: "sidebar" "content"; gap: 32px; }
	.hba-hub-reference-grid > .hba-hub-reference-rail { grid-column: 1 !important; grid-row: 1 !important; max-width: 520px !important; }
	.hba-hub-reference-grid > .hba-hub-original-content { grid-column: 1 !important; grid-row: 2 !important; }
}

@media (max-width: 720px) {
	.hba-hub-wrap { width: min(100% - 28px,1240px); }
	.hba-hub-hero { padding: 48px 0 42px; }
	.hba-hub-hero h1 { font-size: clamp(50px,15vw,76px); }
	.hba-hub-hero p { font-size: 20px; }
	.hba-hub-note { min-height: 155px; padding: 24px; }
	.hba-hub-doors,
	.hba-hub-featured,
	.hba-hub-latest,
	.hba-hub-reference { padding-top: 58px; padding-bottom: 62px; }
	.hba-hub-section-head { align-items: start; flex-direction: column; gap: 12px; }
	.hba-hub-feature-grid { grid-template-columns: 1fr; }
	.hba-hub-lead { min-height: 450px; }
	.hba-hub-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
	.hba-hub-side a { min-height: 250px; }
	.hba-hub-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 52px 18px; }
	.hba-hub-original-content { padding: 30px 24px 38px; }
}

@media (max-width: 520px) {
	.hba-hub-door-grid,
	.hba-hub-side,
	.hba-hub-card-grid { grid-template-columns: 1fr; }
	.hba-hub-door { min-height: 150px; }
	.hba-hub-side a { min-height: 300px; }
	.hba-hub-original-content h2 { font-size: 32px; }
}
