/*
 * blog.css — loaded on every page (before pages.css and site-chrome.css).
 *
 * Contains the page base (box sizing, body font, links), the layout wrapper
 * and shared bits (eyebrow, meta line, chips), plus everything specific to
 * the news listing (/news-1/, category archives), article pages and the
 * sitemap page. Colours come from the tokens in site-chrome.css.
 */

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
/* scroll-padding keeps #anchor targets clear of the sticky header. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body.ohf-blog-page {
	margin: 0;
	background: var(--ohf-bg);
	color: var(--ohf-text);
	font: 400 16px/1.65 "Poppins", system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}
.ohf-blog-page img, .ohf-blog-page video { max-width: 100%; height: auto; }
.ohf-blog-page a { color: var(--ohf-ochre-dark); }
.ohf-blog h1, .ohf-blog h2, .ohf-blog h3 {
	font-family: "Montserrat", sans-serif;
	color: var(--ohf-ink);
	line-height: 1.2;
	margin: 0;
}
.ohf-blog a:focus-visible { border-radius: 4px; }

/* Centred content column used by every section. */
.ohf-wrap { max-width: var(--ohf-max); margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Shared bits: eyebrow label, meta line, category chips
   ========================================================================== */

.ohf-eyebrow {
	margin: 0 0 14px;
	color: var(--ohf-ochre-dark);
	font: 700 13px/1.2 "Montserrat", sans-serif;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.ohf-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	color: var(--ohf-muted);
	font-size: 13.5px;
}
.ohf-meta__info { white-space: nowrap; }
.ohf-chip {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--ohf-tint);
	color: var(--ohf-ochre-dark) !important;
	font: 600 12px/1.5 "Montserrat", sans-serif;
	letter-spacing: 0.03em;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}
.ohf-chip:hover { background: var(--ohf-ochre); color: var(--ohf-on-accent) !important; }
/* Chip on top of a photo (article hero). */
.ohf-chip--light { background: rgba(255, 255, 255, 0.18); color: #fff !important; backdrop-filter: blur(6px); }

/* ==========================================================================
   News listing: hero, category filter tabs, cards
   ========================================================================== */

/* ---------- Listing hero (also used by the sitemap page) ---------- */
.ohf-blog-hero {
	background: var(--ohf-beige);
	padding: 72px 0 0;
	border-bottom: 1px solid var(--ohf-line);
}
.ohf-blog-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; max-width: 820px; letter-spacing: -0.01em; }
.ohf-blog-hero a { color: var(--ohf-ochre-dark); }
.ohf-blog-hero--plain { padding-bottom: 64px; } /* hero without filter tabs */
.ohf-lede { max-width: 680px; margin: 18px 0 0; font-size: 18px; color: var(--ohf-muted); }

/* ---------- Category filter tabs (scroll sideways on small screens) ---------- */
.ohf-filters { margin-top: 40px; }
.ohf-filters ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.ohf-filters ul::-webkit-scrollbar { display: none; }
.ohf-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 18px 16px;
	border-bottom: 3px solid transparent;
	color: var(--ohf-muted) !important;
	font: 600 14.5px/1 "Montserrat", sans-serif;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s, border-color 0.2s;
}
/* Post count badge */
.ohf-filter span {
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--ohf-beige);
	box-shadow: inset 0 0 0 1px var(--ohf-line);
	font-size: 12px;
}
.ohf-filter:hover { color: var(--ohf-ink) !important; }
.ohf-filter.is-active { color: var(--ohf-ink) !important; border-bottom-color: var(--ohf-ochre); }
.ohf-filter.is-active span { background: var(--ohf-ochre); box-shadow: none; color: var(--ohf-on-accent); }

/* ---------- Cards ---------- */
/* minmax(0, 1fr) instead of 1fr so long words/images can't stretch a column. */
.ohf-blog-list { padding-top: 56px; padding-bottom: 96px; }
.ohf-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}
.ohf-card {
	display: flex;
	flex-direction: column;
	background: var(--ohf-surface);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--ohf-shadow-sm);
	transition: transform 0.25s, box-shadow 0.25s;
}
.ohf-card:hover { transform: translateY(-4px); box-shadow: var(--ohf-shadow-lg); }
.ohf-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ohf-media); }
.ohf-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.ohf-card:hover .ohf-card__media img { transform: scale(1.04); }
.ohf-card__body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 22px 24px 26px; }
.ohf-card__title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.ohf-card__title a { color: inherit !important; text-decoration: none; }
.ohf-card__title a:hover { color: var(--ohf-ochre-dark) !important; }
.ohf-card__excerpt {
	margin: 0;
	color: var(--ohf-muted);
	font-size: 15px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* "Read more" link; its arrow nudges right on hover. */
.ohf-card__more {
	margin-top: auto;
	padding-top: 4px;
	font: 600 14px/1 "Montserrat", sans-serif;
	text-decoration: none;
}
.ohf-card__more span { display: inline-block; transition: transform 0.2s; }
.ohf-card__more:hover span { transform: translateX(4px); }

/* Featured (latest) post: full-width card, image left, text right. */
.ohf-card--featured {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	margin-bottom: 48px;
}
.ohf-card--featured .ohf-card__media { aspect-ratio: auto; min-height: 380px; }
.ohf-card--featured .ohf-card__body { justify-content: center; gap: 16px; padding: 44px 48px; }
.ohf-card--featured .ohf-card__title { font-size: clamp(24px, 2.6vw, 32px); }
.ohf-card--featured .ohf-card__excerpt { font-size: 16.5px; -webkit-line-clamp: 4; }

/* ==========================================================================
   Article: photo hero, body text (.ohf-prose), tags, related posts
   ========================================================================== */

/* ---------- Article hero: title over the featured image ---------- */
.ohf-article-hero {
	position: relative;
	min-height: min(68vh, 620px);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	background: var(--ohf-night);
	color: #fff;
}
.ohf-article-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}
.ohf-article-hero a:focus-visible { outline-color: var(--ohf-sand); }
/* Darkening gradient so the white title stays readable on any photo. */
.ohf-article-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 16, 12, 0.25) 0%, rgba(20, 16, 12, 0.35) 45%, rgba(20, 16, 12, 0.88) 100%);
}
.ohf-article-hero__inner { position: relative; z-index: 1; width: 100%; padding-top: 120px; padding-bottom: 56px; }
.ohf-article-hero h1 {
	max-width: 900px;
	margin-top: 18px;
	color: #fff;
	font-size: clamp(30px, 4.4vw, 52px);
	font-weight: 800;
	letter-spacing: -0.01em;
	text-wrap: balance;
}
.ohf-article-hero .ohf-meta { color: rgba(255, 255, 255, 0.85); }
/* Photo credit line below the hero */
.ohf-article-hero__credit {
	max-width: var(--ohf-max);
	margin: 0 auto;
	padding: 10px 24px 0;
	color: var(--ohf-muted);
	font-size: 12.5px;
	text-align: right;
}
.ohf-article-hero__credit a { color: inherit; }

/* ---------- Article body ---------- */
.ohf-prose {
	max-width: 720px;
	margin: 0 auto;
	padding: 56px 24px 8px;
	font: 400 19px/1.75 "PT Serif", Georgia, serif;
	color: var(--ohf-text);
	overflow-wrap: break-word;
}
.ohf-prose > :first-child { margin-top: 0; }
/* Drop cap on the opening paragraph. */
.ohf-prose > p:first-child::first-letter {
	float: left;
	margin: 6px 10px 0 0;
	color: var(--ohf-accent-lg);
	font: 700 64px/0.8 "Montserrat", sans-serif;
}
.ohf-prose p { margin: 0 0 1.3em; }
.ohf-prose h2, .ohf-prose h3 { margin: 2em 0 0.7em; }
.ohf-prose h2 { font-size: 28px; font-weight: 700; }
.ohf-prose h3 { font-size: 22px; font-weight: 700; }
.ohf-prose a { color: var(--ohf-ochre-dark); } /* underline style: site-chrome.css */
.ohf-prose a:hover { color: var(--ohf-ink); }
.ohf-prose strong { color: var(--ohf-ink); }
.ohf-prose ul, .ohf-prose ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.ohf-prose li { margin-bottom: 0.5em; }
.ohf-prose li::marker { color: var(--ohf-ochre); }
.ohf-prose hr { margin: 3em auto; width: 80px; border: 0; border-top: 3px solid var(--ohf-ochre); }
.ohf-prose blockquote {
	margin: 2em 0;
	padding: 6px 0 6px 28px;
	border-left: 4px solid var(--ohf-ochre);
	color: var(--ohf-ink);
	font-size: 22px;
	font-style: italic;
	line-height: 1.55;
}
.ohf-prose blockquote p:last-child { margin-bottom: 0; }
/* Figures break out 64px on each side of the text column on wide screens. */
.ohf-prose figure { margin: 2.4em -64px; }
.ohf-prose figure img, .ohf-prose figure video { display: block; width: 100%; border-radius: 12px; background: var(--ohf-media); }
.ohf-prose figure audio { display: block; width: 100%; }
/* Video/audio figures (class added by blog.py) stay within the column. */
.ohf-prose figure.ohf-media { margin-left: 0; margin-right: 0; }
.ohf-prose figcaption {
	margin: 12px 64px 0;
	color: var(--ohf-muted);
	font: 400 13.5px/1.55 "Poppins", sans-serif;
	text-align: center;
}
.ohf-prose figcaption a { color: inherit; }

/* ---------- Article footer: tags + related posts ---------- */
.ohf-article-foot {
	max-width: 720px;
	margin: 0 auto;
	padding: 28px 24px 80px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	border-top: 1px solid var(--ohf-line);
}
.ohf-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ohf-tags li {
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--ohf-beige);
	color: var(--ohf-muted);
	font: 500 13px/1.4 "Montserrat", sans-serif;
}
.ohf-tags li::before { content: "#"; color: var(--ohf-ochre-dark); margin-right: 2px; }

.ohf-related { background: var(--ohf-beige); padding: 72px 0 96px; }
.ohf-related h2 { margin-bottom: 32px; font-size: 30px; font-weight: 800; }

/* ==========================================================================
   Sitemap page (/sitemap/)
   ========================================================================== */

.ohf-sitemap {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 48px;
	padding-top: 56px;
	padding-bottom: 96px;
}
.ohf-sitemap__group h2 { font-size: 20px; font-weight: 800; padding-bottom: 12px; border-bottom: 3px solid var(--ohf-ochre); }
.ohf-sitemap__group h2 a { color: var(--ohf-ink); text-decoration: none; }
.ohf-sitemap__group h2 a:hover { color: var(--ohf-ochre-dark); }
.ohf-sitemap__group > p { margin: 14px 0 0; color: var(--ohf-muted); font-size: 14.5px; }
.ohf-sitemap ul { margin: 0; padding: 0; list-style: none; }
.ohf-sitemap li { padding: 14px 0; border-bottom: 1px solid var(--ohf-line); }
.ohf-sitemap li a { color: var(--ohf-ink); font: 600 15.5px/1.35 "Montserrat", sans-serif; text-decoration: none; }
.ohf-sitemap li a:hover { color: var(--ohf-ochre-dark); }
.ohf-sitemap li p {
	margin: 6px 0 0;
	color: var(--ohf-muted);
	font-size: 14px;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* Nested pages: indented with a left rule. */
.ohf-sitemap li ul { margin: 10px 0 0 4px; padding-left: 16px; border-left: 2px solid var(--ohf-line); }
.ohf-sitemap li li { padding: 10px 0; border-bottom: 0; }
.ohf-sitemap li li a { font-size: 14.5px; font-weight: 500; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.ohf-sitemap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ohf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.ohf-prose figure { margin-left: 0; margin-right: 0; }
	.ohf-prose figcaption { margin-left: 0; margin-right: 0; }
}
@media (max-width: 760px) {
	.ohf-sitemap { grid-template-columns: 1fr; padding-top: 36px; }
	.ohf-blog-hero { padding-top: 48px; }
	.ohf-lede { font-size: 16.5px; }
	.ohf-filters { margin: 28px -24px 0; }
	.ohf-filters ul { padding: 0 14px; }
	.ohf-filter { padding: 12px 12px 14px; }
	.ohf-blog-list { padding-top: 32px; padding-bottom: 64px; }
	.ohf-card--featured { grid-template-columns: 1fr; margin-bottom: 24px; }
	.ohf-card--featured .ohf-card__media { min-height: 0; aspect-ratio: 16 / 10; }
	.ohf-card--featured .ohf-card__body { padding: 24px; }
	.ohf-grid { grid-template-columns: 1fr; }
	.ohf-article-hero { min-height: 460px; }
	.ohf-article-hero__inner { padding-bottom: 36px; }
	.ohf-prose { padding-top: 36px; font-size: 18px; }
	.ohf-prose blockquote { font-size: 19px; padding-left: 18px; }
	.ohf-related { padding: 56px 0 64px; }
}
/* ==========================================================================
   Reduced motion: no card lift / image zoom (durations are cut in site-chrome.css)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.ohf-card:hover, .ohf-card:hover .ohf-card__media img { transform: none; }
}

/* "Originally published on …" note at the top of re-posted articles */
.ohf-origin { margin: 0 0 1.6em; padding: 12px 16px; border-left: 3px solid var(--ohf-ochre); border-radius: 0 8px 8px 0; background: var(--ohf-beige); color: var(--ohf-muted); font: 500 14px/1.5 "Montserrat", sans-serif; }
.ohf-origin a { color: var(--ohf-ochre-dark); text-decoration: underline; }
