/* ==========================================================================
   Microhomehacks — Main Stylesheet
   ========================================================================== */

:root {
	--mhh-color-background: #F8F6F2;
	--mhh-color-card: #FFFFFF;
	--mhh-color-accent: #C8A66A;
	--mhh-color-accent-hover: #A9854E;
	--mhh-color-text: #242424;
	--mhh-color-secondary: #767676;
	--mhh-color-border: #E8E3DC;

	--mhh-font-heading: 'Cormorant Garamond', 'Times New Roman', serif;
	--mhh-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--mhh-h1: 64px;
	--mhh-h2: 42px;
	--mhh-h3: 30px;
	--mhh-card-title: 26px;
	--mhh-text: 18px;

	--mhh-max-width: 1320px;
	--mhh-radius-sm: 8px;
	--mhh-radius-md: 16px;
	--mhh-radius-lg: 28px;
	--mhh-button-radius: 30px;
	--mhh-shadow-soft: 0 10px 40px rgba(36, 36, 36, 0.06);
	--mhh-shadow-lift: 0 24px 60px rgba(36, 36, 36, 0.14);
	--mhh-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark mode overrides */
body.mhh-dark {
	--mhh-color-background: #171613;
	--mhh-color-card: #201F1B;
	--mhh-color-text: #F4F1EA;
	--mhh-color-secondary: #A9A49A;
	--mhh-color-border: #33312B;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--mhh-color-background);
	color: var(--mhh-color-text);
	font-family: var(--mhh-font-body);
	font-size: var(--mhh-text);
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
	transition: background-color .4s var(--mhh-ease), color .4s var(--mhh-ease);
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
h1, h2, h3, h4 {
	font-family: var(--mhh-font-heading);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
}
h1 { font-size: var(--mhh-h1); }
h2 { font-size: var(--mhh-h2); }
h3 { font-size: var(--mhh-h3); }
p { margin: 0 0 1em; color: var(--mhh-color-text); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.mhh-skip-link {
	position: fixed; top: -60px; left: 16px; z-index: 9999;
	background: var(--mhh-color-text); color: #fff;
	padding: 12px 20px; border-radius: var(--mhh-radius-sm);
	transition: top .3s var(--mhh-ease);
}
.mhh-skip-link:focus { top: 16px; }

:focus-visible {
	outline: 2px solid var(--mhh-color-accent);
	outline-offset: 3px;
}

.mhh-container {
	max-width: var(--mhh-max-width);
	margin: 0 auto;
	padding: 0 32px;
}

.mhh-section { padding: 96px 0; }
.mhh-section__header { margin-bottom: 48px; position: relative; }
.mhh-section__header h2 { margin-bottom: 0.2em; }
.mhh-section__view-all {
	position: absolute; right: 0; top: 8px;
	font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
	color: var(--mhh-color-secondary);
	border-bottom: 1px solid var(--mhh-color-border);
	padding-bottom: 2px;
	transition: color .25s var(--mhh-ease), border-color .25s var(--mhh-ease);
}
.mhh-section__view-all:hover { color: var(--mhh-color-accent); border-color: var(--mhh-color-accent); }

.mhh-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mhh-color-accent);
	margin-bottom: 16px;
}
.mhh-eyebrow::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--mhh-color-border);
}
.mhh-eyebrow--light { color: #F1E6D0; }
.mhh-eyebrow--light::after { background: rgba(255, 255, 255, 0.35); }

/* ---------- Buttons ---------- */
.mhh-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 16px 32px;
	border-radius: var(--mhh-button-radius);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	transition: transform .35s var(--mhh-ease), box-shadow .35s var(--mhh-ease), background-color .3s var(--mhh-ease), color .3s var(--mhh-ease), border-color .3s var(--mhh-ease);
	white-space: nowrap;
}
.mhh-btn--small { padding: 11px 22px; font-size: 12px; }
.mhh-btn--primary {
	background: var(--mhh-color-accent);
	color: #fff;
	box-shadow: 0 8px 24px rgba(200, 166, 106, 0.35);
}
.mhh-btn--primary:hover {
	background: var(--mhh-color-accent-hover);
	transform: translateY(-2px);
	box-shadow: 0 14px 32px rgba(169, 133, 78, 0.4);
}
.mhh-btn--ghost {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255,255,255,0.6);
}
.mhh-btn--ghost:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.mhh-btn--outline {
	background: transparent;
	color: var(--mhh-color-text);
	border: 1px solid var(--mhh-color-border);
}
.mhh-btn--outline:hover { border-color: var(--mhh-color-accent); color: var(--mhh-color-accent); }
.mhh-btn--animated svg { transition: transform .3s var(--mhh-ease); }
.mhh-btn--animated:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.mhh-header {
	position: sticky; top: 0; z-index: 1000;
	background: transparent;
	transition: background-color .4s var(--mhh-ease), box-shadow .4s var(--mhh-ease), backdrop-filter .4s var(--mhh-ease);
}
.mhh-header.is-scrolled {
	background: rgba(248, 246, 242, 0.92);
	backdrop-filter: blur(12px);
	box-shadow: 0 1px 0 var(--mhh-color-border);
}
body.mhh-dark .mhh-header.is-scrolled { background: rgba(23,22,19,0.9); }
.mhh-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 26px 32px;
	transition: padding .4s var(--mhh-ease);
}
.mhh-header.is-scrolled .mhh-header__inner { padding: 16px 32px; }
.mhh-header__site-title { display: flex; flex-direction: column; }
.mhh-header__title-main {
	font-family: var(--mhh-font-heading);
	font-size: 26px;
	font-weight: 700;
	color: var(--mhh-color-text);
}
body:not(.mhh-header-scrolled-yet) .mhh-header:not(.is-scrolled) .mhh-header__title-main { color: #fff; }
.mhh-header__title-sub { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mhh-color-secondary); }

.mhh-nav__list { display: flex; gap: 36px; align-items: center; }
.mhh-nav__list a {
	font-size: 14px; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase;
	position: relative; padding: 4px 0;
}
.mhh-nav__list a::after {
	content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
	background: var(--mhh-color-accent); transition: width .3s var(--mhh-ease);
}
.mhh-nav__list a:hover::after { width: 100%; }

.mhh-header:not(.is-scrolled) .mhh-header__title-main,
.mhh-header:not(.is-scrolled) .mhh-nav__list a,
.mhh-header:not(.is-scrolled) .mhh-icon-btn { color: #fff; }
.mhh-header:not(.is-scrolled) .mhh-icon-btn svg { color: #fff; }

.mhh-header__actions { display: flex; align-items: center; gap: 8px; }
.mhh-icon-btn {
	width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
	border-radius: 50%; color: var(--mhh-color-text);
	transition: background-color .25s var(--mhh-ease), color .25s var(--mhh-ease);
}
.mhh-icon-btn:hover { background: var(--mhh-color-border); }
.mhh-menu-toggle { display: none; }

.mhh-search-overlay {
	position: fixed; inset: 0; z-index: 1100;
	background: rgba(23,22,19,0.6);
	backdrop-filter: blur(6px);
	opacity: 0; pointer-events: none;
	transition: opacity .35s var(--mhh-ease);
	display: flex; align-items: flex-start;
}
.mhh-search-overlay.is-open { opacity: 1; pointer-events: auto; }
.mhh-search-overlay__inner {
	background: var(--mhh-color-card);
	margin-top: 120px; padding: 48px; border-radius: var(--mhh-radius-lg);
	position: relative; box-shadow: var(--mhh-shadow-lift);
}
.mhh-search-overlay__close {
	position: absolute; top: 16px; right: 24px; font-size: 28px; line-height: 1; color: var(--mhh-color-secondary);
}
.mhh-search-form { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid var(--mhh-color-border); padding-bottom: 16px; min-width: 500px; }
.mhh-search-form__input { flex: 1; border: none; background: transparent; font-size: 24px; font-family: var(--mhh-font-heading); color: var(--mhh-color-text); }
.mhh-search-form__input:focus { outline: none; }
.mhh-search-form__submit { color: var(--mhh-color-accent); }

.mhh-mobile-menu {
	position: fixed; top: 0; right: 0; height: 100%; width: min(360px, 85vw); z-index: 1200;
	background: var(--mhh-color-card);
	transform: translateX(100%);
	transition: transform .4s var(--mhh-ease);
	box-shadow: -20px 0 60px rgba(0,0,0,0.15);
	padding: 100px 40px;
}
.mhh-mobile-menu.is-open { transform: translateX(0); }
.mhh-mobile-menu__list { display: flex; flex-direction: column; gap: 24px; }
.mhh-mobile-menu__list a { font-family: var(--mhh-font-heading); font-size: 24px; }

.mhh-breadcrumbs-wrap { padding-top: 24px; }
.mhh-breadcrumbs ol { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--mhh-color-secondary); }
.mhh-breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 8px; color: var(--mhh-color-border); }
.mhh-breadcrumbs a:hover { color: var(--mhh-color-accent); }

/* ---------- Hero ---------- */
.mhh-hero {
	position: relative; height: 700px; overflow: hidden;
	display: flex; align-items: flex-end; margin-top: -96px;
}
.mhh-hero__media {
	position: absolute; inset: 0;
	background: #d8cdb8 url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="4" height="4"%3E%3Crect width="4" height="4" fill="%23d8cdb8"/%3E%3C/svg%3E') center/cover;
	background-size: cover; background-position: center;
	transform: scale(1.08);
	will-change: transform;
}
.mhh-hero__overlay {
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(23,20,15,0.15) 0%, rgba(23,20,15,0.65) 100%);
}
.mhh-hero__content { position: relative; z-index: 2; color: #fff; padding-bottom: 88px; max-width: 720px; }
.mhh-hero__heading { font-size: var(--mhh-h1); color: #fff; margin-bottom: 20px; }
.mhh-hero__subtitle { font-size: 18px; color: rgba(255,255,255,0.88); max-width: 520px; margin-bottom: 32px; }
.mhh-hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.mhh-hero__scroll-cue {
	position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
	width: 1px; height: 40px; background: rgba(255,255,255,0.5);
}
.mhh-hero__scroll-cue::after {
	content: ''; position: absolute; top: 0; left: -3px; width: 7px; height: 7px; border-radius: 50%;
	background: #fff; animation: mhh-scroll-cue 2s var(--mhh-ease) infinite;
}
@keyframes mhh-scroll-cue { 0% { top: 0; opacity: 1; } 100% { top: 34px; opacity: 0; } }

/* ---------- Featured Article ---------- */
.mhh-featured { padding: 96px 0 0; }
.mhh-featured__grid {
	display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center;
}
.mhh-featured__media { display: block; position: relative; border-radius: var(--mhh-radius-lg); overflow: hidden; box-shadow: var(--mhh-shadow-soft); aspect-ratio: 10/7; }
.mhh-featured__image { transition: transform .6s var(--mhh-ease); aspect-ratio: 10/7; object-fit: cover; width: 100%; height: 100%; }
.mhh-featured__media:hover .mhh-featured__image { transform: scale(1.05); }
.mhh-featured__image--placeholder {
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, #EFE9DE, #E3DACB);
	color: var(--mhh-color-accent);
}
.mhh-featured__title { font-size: var(--mhh-h2); margin: 16px 0; overflow-wrap: break-word; word-break: break-word; }
.mhh-featured__title a:hover { color: var(--mhh-color-accent); }
.mhh-featured__excerpt {
	color: var(--mhh-color-secondary);
	margin-bottom: 24px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow-wrap: break-word;
	word-break: break-word;
}

.mhh-card__category {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--mhh-cat-color, var(--mhh-color-accent)); margin-bottom: 12px;
}
.mhh-card__category::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--mhh-color-border);
}
.mhh-card__meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mhh-color-secondary); }
.mhh-card__meta svg { vertical-align: -2px; margin-right: 4px; }
.mhh-card__meta-sep { opacity: 0.6; }

/* ---------- Front layout (main + sidebar) ---------- */
.mhh-front-layout { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: start; }
.mhh-front-layout__main { min-width: 0; }

/* Homepage only: pull the sidebar up so it "climbs" over the hero,
   creating the layered editorial-card effect from the design brief.
   Desktop only — on narrower screens the sidebar wraps below the
   content and an overlap would look broken. */
@media (min-width: 1181px) {
	.mhh-front-layout--hero-overlap {
		--mhh-sidebar-overlap: -160px;
		position: relative;
		z-index: 1;
	}
	.mhh-front-layout--hero-overlap .mhh-sidebar {
		margin-top: var(--mhh-sidebar-overlap);
		position: relative;
		z-index: 5;
	}
	/* The homepage's featured-article sits directly above the sidebar
	   overlap zone — reserve the sidebar's width (340px + 64px gap) on
	   the right so its text/button never runs underneath the sidebar. */
	.mhh-featured .mhh-container {
		padding-right: 436px;
	}
}

/* ---------- Editor's Picks ---------- */
.mhh-editors-picks__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.mhh-editors-picks__item { position: relative; }
.mhh-editors-picks__media { position: relative; display: block; border-radius: var(--mhh-radius-md); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--mhh-shadow-soft); }
.mhh-editors-picks__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--mhh-ease); }
.mhh-editors-picks__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--mhh-color-accent); }
.mhh-editors-picks__item:hover .mhh-editors-picks__media img { transform: scale(1.06); }
.mhh-editors-picks__number {
	position: absolute; top: 16px; left: 16px; font-family: var(--mhh-font-heading);
	font-size: 20px; color: #fff; background: rgba(36,36,36,0.35); backdrop-filter: blur(6px);
	width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.mhh-editors-picks__content { padding-top: 18px; }
.mhh-editors-picks__content h3 { font-size: var(--mhh-card-title); margin-bottom: 8px; overflow-wrap: break-word; word-break: break-word; }
.mhh-editors-picks__content h3 a:hover { color: var(--mhh-color-accent); }
.mhh-editors-picks__content p {
	color: var(--mhh-color-secondary);
	font-size: 15px;
	margin: 0;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow-wrap: break-word;
	word-break: break-word;
}

/* ---------- Masonry Latest Articles ---------- */
.mhh-masonry {
	display: grid;
	/* 2 columns: the main column shares the row with a 340px sidebar,
	   so 4 columns made every card ~150px wide and caused ragged gaps. */
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: auto;
	gap: 32px;
	align-items: stretch;
}
.mhh-card {
	background: var(--mhh-color-card);
	border-radius: var(--mhh-radius-md);
	overflow: hidden;
	box-shadow: var(--mhh-shadow-soft);
	transition: transform .45s var(--mhh-ease), box-shadow .45s var(--mhh-ease);
	display: flex; flex-direction: column;
	grid-column: span 1;
	min-width: 0;
}
.mhh-card--wide { grid-column: span 2; }
.mhh-card:hover { transform: translateY(-8px); box-shadow: var(--mhh-shadow-lift); }
.mhh-card__media { position: relative; overflow: hidden; aspect-ratio: 4/3; flex-shrink: 0; }
.mhh-card--portrait .mhh-card__media { aspect-ratio: 4/3; }
.mhh-card--wide .mhh-card__media { aspect-ratio: 16/8; }
.mhh-card__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--mhh-ease); }
.mhh-card__image--placeholder { background: linear-gradient(135deg, #EFE9DE, #E3DACB); }
.mhh-card:hover .mhh-card__image { transform: scale(1.08); }
.mhh-card__body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.mhh-card__title { font-size: var(--mhh-card-title); margin-bottom: 8px; overflow-wrap: break-word; word-break: break-word; }
.mhh-card__title a:hover { color: var(--mhh-color-accent); }
.mhh-card__excerpt {
	color: var(--mhh-color-secondary);
	font-size: 15px;
	flex: 1;
	margin-bottom: 14px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow-wrap: break-word;
	word-break: break-word;
}

/* ---------- Categories ---------- */
.mhh-categories__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mhh-category-card {
	position: relative; display: block; border-radius: var(--mhh-radius-md); overflow: hidden;
	aspect-ratio: 1/1; box-shadow: var(--mhh-shadow-soft);
	transition: transform .4s var(--mhh-ease);
}
.mhh-category-card:hover { transform: translateY(-6px); }
.mhh-category-card__media {
	position: absolute; inset: 0; background: linear-gradient(135deg, #E7DCC7, #D8C7A6);
	background-size: cover; background-position: center;
	transition: transform .6s var(--mhh-ease);
}
.mhh-category-card:hover .mhh-category-card__media { transform: scale(1.08); }
.mhh-category-card__overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(23,20,15,0.65) 0%, rgba(23,20,15,0.05) 55%); }
.mhh-category-card__content { position: absolute; left: 20px; bottom: 18px; color: #fff; }
.mhh-category-card__content h3 { font-size: 22px; color: #fff; margin-bottom: 2px; }
.mhh-category-card__content span { font-size: 13px; color: rgba(255,255,255,0.8); }

/* ---------- Sidebar ---------- */
.mhh-sidebar { display: flex; flex-direction: column; gap: 24px; }
.mhh-widget-card, .mhh-widget {
	background: var(--mhh-color-card);
	border: 1px solid var(--mhh-color-border);
	border-radius: var(--mhh-radius-md);
	padding: 28px;
}
.mhh-widget-card__label, .mhh-widget__title {
	display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--mhh-color-accent); margin-bottom: 14px;
}
.mhh-widget-card__about-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.mhh-widget-card__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.mhh-widget-card__heading { font-size: 20px; margin: 0; }
.mhh-widget-card p { font-size: 15px; color: var(--mhh-color-secondary); }
.mhh-widget-card__categories li { border-bottom: 1px solid var(--mhh-color-border); }
.mhh-widget-card__categories li:last-child { border-bottom: none; }
.mhh-widget-card__categories a { display: flex; justify-content: space-between; padding: 12px 0; font-size: 15px; }
.mhh-widget-card__categories a:hover { color: var(--mhh-color-accent); }
.mhh-widget-card__count { color: var(--mhh-color-secondary); font-size: 13px; }
.mhh-widget-card__view-all { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--mhh-color-accent); }

.mhh-newsletter-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.mhh-newsletter-form--compact { margin-top: 0; }
.mhh-newsletter-form__input {
	width: 100%; padding: 14px 18px; border-radius: 30px; border: 1px solid var(--mhh-color-border);
	background: var(--mhh-color-background); color: var(--mhh-color-text); font-size: 15px;
}
.mhh-newsletter-form__input:focus { outline: none; border-color: var(--mhh-color-accent); }
.mhh-newsletter-form__submit { width: 100%; justify-content: center; }
.mhh-newsletter-form__message { font-size: 13px; color: var(--mhh-color-accent); min-height: 18px; margin: 4px 0 0; }

.mhh-popular-posts li { border-bottom: 1px solid var(--mhh-color-border); }
.mhh-popular-posts li:last-child { border-bottom: none; }
.mhh-popular-posts__link { display: flex; gap: 14px; padding: 14px 0; align-items: center; }
.mhh-popular-posts__thumb { width: 64px; height: 64px; border-radius: var(--mhh-radius-sm); overflow: hidden; flex-shrink: 0; background: var(--mhh-color-border); }
.mhh-popular-posts__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mhh-popular-posts__title { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.mhh-popular-posts__link:hover .mhh-popular-posts__title { color: var(--mhh-color-accent); }

.mhh-instagram__handle { color: var(--mhh-color-secondary); font-size: 14px; margin-bottom: 12px; }
.mhh-instagram__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mhh-instagram__item { display: block; aspect-ratio: 1/1; border-radius: var(--mhh-radius-sm); background-size: cover; background-position: center; background-color: var(--mhh-color-border); transition: opacity .3s var(--mhh-ease); }
.mhh-instagram__item:hover { opacity: 0.8; }

.mhh-printable { text-align: center; }
.mhh-printable img { border-radius: var(--mhh-radius-sm); margin-bottom: 14px; }
.mhh-printable__title { font-size: 20px; margin-bottom: 6px; }

/* ---------- Newsletter Block ---------- */
.mhh-newsletter-block { background: #F1E9DA; padding: 96px 0; margin-top: 96px; overflow: hidden; position: relative; }
body.mhh-dark .mhh-newsletter-block { background: #241F17; }
.mhh-newsletter-block__inner { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: center; }
.mhh-newsletter-block__illustration svg { width: 100%; height: auto; }
.mhh-newsletter-block__content h2 { max-width: 520px; }
.mhh-newsletter-block__content p { max-width: 520px; color: var(--mhh-color-secondary); }
.mhh-newsletter-block .mhh-newsletter-form { flex-direction: row; max-width: 480px; }
.mhh-newsletter-block .mhh-newsletter-form__input { flex: 1; }
.mhh-newsletter-block .mhh-newsletter-form__submit { width: auto; }
.mhh-newsletter-block__note { font-size: 13px; color: var(--mhh-color-secondary); margin-top: 6px; }

/* ---------- Footer ---------- */
.mhh-footer { background: var(--mhh-color-text); color: #EDEAE2; padding-top: 80px; }
.mhh-footer__top { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.mhh-footer__logo-text { font-family: var(--mhh-font-heading); font-size: 26px; color: #fff; }
.mhh-footer__about { color: rgba(237,234,226,0.65); font-size: 14px; margin: 16px 0 20px; max-width: 280px; }
.mhh-footer__social { display: flex; gap: 10px; }
.mhh-footer__social-link { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 11px; transition: background-color .25s var(--mhh-ease), border-color .25s var(--mhh-ease); }
.mhh-footer__social-link:hover { background: var(--mhh-color-accent); border-color: var(--mhh-color-accent); }
.mhh-footer__col h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 18px; }
.mhh-footer__list li { margin-bottom: 12px; }
.mhh-footer__list a { color: rgba(237,234,226,0.7); font-size: 14px; }
.mhh-footer__list a:hover { color: var(--mhh-color-accent); }
.mhh-footer__bottom { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; font-size: 13px; color: rgba(237,234,226,0.55); }
.mhh-footer__to-top:hover { color: var(--mhh-color-accent); }

/* ---------- Bottom Mobile Nav ---------- */
.mhh-bottom-nav { display: none; }

/* ---------- Single Post ---------- */
.mhh-single__header { padding: 56px 0 32px; max-width: 860px; }
.mhh-single__title { font-size: 52px; margin: 8px 0 20px; }
.mhh-single__subtitle { font-size: 19px; color: var(--mhh-color-secondary); margin-bottom: 24px; }
.mhh-single__byline { display: flex; align-items: center; gap: 12px; }
.mhh-single__avatar { border-radius: 50%; }
.mhh-single__author { display: block; font-weight: 600; font-size: 14px; }
.mhh-single__date { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--mhh-color-secondary); }
.mhh-single__hero-image { max-width: 1320px; margin: 0 auto 56px; border-radius: var(--mhh-radius-lg); overflow: hidden; box-shadow: var(--mhh-shadow-soft); }
.mhh-single__hero-image img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.mhh-single__layout { display: grid; grid-template-columns: 64px 1fr 340px; gap: 48px; align-items: start; }
.mhh-single__share-rail { position: sticky; top: 140px; display: flex; flex-direction: column; align-items: center; }
.mhh-single__share-rail .mhh-share { flex-direction: column; gap: 14px; }
.mhh-single__share-rail .mhh-share__label { writing-mode: vertical-rl; text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; color: var(--mhh-color-secondary); }
.mhh-share { display: flex; align-items: center; gap: 12px; }
.mhh-share a, .mhh-share__copy {
	width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--mhh-color-border);
	display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
	transition: background-color .25s var(--mhh-ease), color .25s var(--mhh-ease), border-color .25s var(--mhh-ease);
}
.mhh-share a:hover, .mhh-share__copy:hover { background: var(--mhh-color-accent); border-color: var(--mhh-color-accent); color: #fff; }

.mhh-prose { max-width: 760px; font-size: 18px; }
.mhh-prose p { margin-bottom: 1.6em; }
.mhh-prose h2 { font-size: var(--mhh-h3); margin-top: 1.8em; }
.mhh-prose h3 { font-size: 24px; margin-top: 1.6em; }
.mhh-prose img { border-radius: var(--mhh-radius-md); margin: 2em 0; }
.mhh-prose blockquote {
	border-left: 3px solid var(--mhh-color-accent); margin: 2em 0; padding: 0.5em 0 0.5em 28px;
	font-family: var(--mhh-font-heading); font-size: 24px; font-style: italic; color: var(--mhh-color-text);
}
.mhh-prose a { color: var(--mhh-color-accent); border-bottom: 1px solid var(--mhh-color-accent); }
.mhh-prose ul, .mhh-prose ol { margin: 0 0 1.6em; padding-left: 1.4em; }
.mhh-prose ul { list-style: disc; }
.mhh-prose ol { list-style: decimal; }

.mhh-toc { background: var(--mhh-color-card); border: 1px solid var(--mhh-color-border); border-radius: var(--mhh-radius-md); padding: 24px 28px; margin-bottom: 2em; max-width: 420px; }
.mhh-toc__title { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mhh-color-accent); margin-bottom: 12px; }
.mhh-toc ol { counter-reset: toc; }
.mhh-toc li { counter-increment: toc; font-size: 14px; margin-bottom: 8px; }
.mhh-toc li a::before { content: counter(toc) '. '; color: var(--mhh-color-accent); }
.mhh-toc__sub { padding-left: 16px; }
.mhh-toc a:hover { color: var(--mhh-color-accent); }

.mhh-single__tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 2em 0; }
.mhh-tag { display: inline-block; padding: 8px 16px; border: 1px solid var(--mhh-color-border); border-radius: 20px; font-size: 13px; }

.mhh-author-box { display: flex; gap: 20px; background: var(--mhh-color-card); border: 1px solid var(--mhh-color-border); border-radius: var(--mhh-radius-md); padding: 28px; margin: 3em 0; max-width: 760px; }
.mhh-author-box__avatar { border-radius: 50%; flex-shrink: 0; }
.mhh-author-box__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mhh-color-accent); }
.mhh-author-box__content h4 { margin: 4px 0 8px; }
.mhh-author-box__link { color: var(--mhh-color-accent); font-size: 14px; }

.mhh-related { max-width: 760px; margin: 4em 0; }
.mhh-related__title { font-size: var(--mhh-h3); margin-bottom: 24px; }
.mhh-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mhh-related .mhh-card__body { padding: 16px; }
.mhh-related .mhh-card__title { font-size: 18px; }

.mhh-sticky-share-bar {
	position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
	background: var(--mhh-color-card); border-top: 1px solid var(--mhh-color-border);
	padding: 14px 32px; display: flex; justify-content: center;
	transform: translateY(100%); transition: transform .35s var(--mhh-ease);
}
.mhh-sticky-share-bar.is-visible { transform: translateY(0); }

/* ---------- Comments ---------- */
.mhh-comments-wrap { max-width: 760px; margin: 3em auto; padding-top: 3em; border-top: 1px solid var(--mhh-color-border); }
.mhh-comments__title { font-size: var(--mhh-h3); margin-bottom: 24px; }
.mhh-comments__list > li { margin-bottom: 24px; }
.comment-body { display: flex; gap: 16px; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 12px; color: var(--mhh-color-secondary); margin-bottom: 6px; }
.comment-form-comment { margin-bottom: 16px; }
.mhh-comment-form__field { width: 100%; border: 1px solid var(--mhh-color-border); border-radius: var(--mhh-radius-sm); padding: 16px; font-family: inherit; font-size: 15px; background: var(--mhh-color-card); color: var(--mhh-color-text); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] {
	width: 100%; padding: 12px 16px; border: 1px solid var(--mhh-color-border); border-radius: var(--mhh-radius-sm); margin-bottom: 12px; background: var(--mhh-color-card); color: var(--mhh-color-text);
}

/* ---------- Page / Archive headers ---------- */
.mhh-archive-header, .mhh-page__header { padding: 72px 0 40px; max-width: 760px; }
.mhh-archive-header__count { font-size: 14px; color: var(--mhh-color-secondary); }
.mhh-page__hero-image { max-width: 1320px; margin: 0 auto 56px; border-radius: var(--mhh-radius-lg); overflow: hidden; }
.mhh-page__content { max-width: 860px; }

.mhh-404 { padding: 120px 0; max-width: 640px; text-align: center; margin: 0 auto; }
.mhh-404 .mhh-search-form { min-width: 0; margin: 32px auto; justify-content: center; }
.mhh-404 .mhh-btn { margin-top: 8px; }
.mhh-404__categories { margin-top: 56px; }
.mhh-404__categories ul { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.mhh-404__categories a { padding: 10px 18px; border: 1px solid var(--mhh-color-border); border-radius: 20px; font-size: 14px; }
.mhh-404__categories a:hover { border-color: var(--mhh-color-accent); color: var(--mhh-color-accent); }

.mhh-empty-state { text-align: center; padding: 60px 0; }

/* ---------- Animations ---------- */
[data-mhh-animate] {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .8s var(--mhh-ease), transform .8s var(--mhh-ease);
}
[data-mhh-animate].mhh-in-view { opacity: 1; transform: translateY(0); }

/* Runtime fallback: if an <img> fails to load (broken/missing attachment
   file), main.js adds this class to its container so it still looks
   intentional instead of showing the browser's broken-image icon. */
.mhh-img-broken { background: linear-gradient(135deg, #EFE9DE, #E3DACB); }
.mhh-img-broken img { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
	[data-mhh-animate] { opacity: 1; transform: none; transition: none; }
	.mhh-hero__media { transform: none !important; }
	html { scroll-behavior: auto; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
	.mhh-front-layout { grid-template-columns: 1fr; }
	.mhh-sidebar { flex-direction: row; flex-wrap: wrap; }
	.mhh-widget-card, .mhh-widget { flex: 1 1 300px; }
	.mhh-single__layout { grid-template-columns: 1fr; }
	.mhh-single__share-rail { position: static; flex-direction: row; order: 3; }
	.mhh-single__share-rail .mhh-share { flex-direction: row; }
	.mhh-single__share-rail .mhh-share__label { writing-mode: horizontal-tb; }
	.mhh-featured__grid { grid-template-columns: 1fr; }
	.mhh-newsletter-block__inner { grid-template-columns: 1fr; text-align: center; }
	.mhh-newsletter-block__illustration { max-width: 200px; margin: 0 auto; }
	.mhh-newsletter-block .mhh-newsletter-form { margin: 0 auto; }
	.mhh-footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
	:root { --mhh-h1: 44px; --mhh-h2: 32px; --mhh-h3: 24px; --mhh-card-title: 21px; }
	.mhh-nav { display: none; }
	.mhh-menu-toggle { display: flex; }
	.mhh-hero { height: 560px; margin-top: -84px; }
	.mhh-masonry { grid-template-columns: minmax(0, 1fr); }
	.mhh-card, .mhh-card--portrait, .mhh-card--wide { grid-column: span 1; }
	.mhh-editors-picks__grid { grid-template-columns: 1fr; }
	.mhh-categories__grid { grid-template-columns: repeat(2, 1fr); }
	.mhh-related__grid { grid-template-columns: 1fr; }
	.mhh-footer__top { grid-template-columns: 1fr; }
	.mhh-bottom-nav {
		display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 950;
		background: var(--mhh-color-card); border-top: 1px solid var(--mhh-color-border);
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		justify-content: space-around;
	}
	.mhh-bottom-nav__item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--mhh-color-secondary); padding: 6px 10px; }
	.mhh-bottom-nav__item.is-active, .mhh-bottom-nav__item:hover { color: var(--mhh-color-accent); }
	.mhh-sticky-share-bar { display: none; }
	body { padding-bottom: 64px; }
	.mhh-container { padding: 0 20px; }
}

@media (max-width: 600px) {
	.mhh-masonry { grid-template-columns: minmax(0, 1fr); }
	.mhh-categories__grid { grid-template-columns: 1fr; }
	.mhh-hero__actions { flex-direction: column; }
	.mhh-btn { width: 100%; justify-content: center; }
	.mhh-single__title { font-size: 34px; }
}

/* Footer legal links */
.mhh-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin-left: auto; }
.mhh-footer__legal a { font-size: 14px; color: rgba(255,255,255,0.7); transition: color .3s var(--mhh-ease); }
.mhh-footer__legal a:hover { color: var(--mhh-color-accent); }
@media (max-width: 600px) { .mhh-footer__legal { margin-left: 0; gap: 8px 20px; } }
