/* =========================================================================
   Blog detail (v2)  —  layered on top of home-v2.css (Uncut Sans, .hv-shell,
   vertical frame rails, sticky nav).

   Built from Figma "Blog-Detailed" (8C41…, desktop 177:16913 / mobile 177:17188).
   Dark hero (badges + title + excerpt + author/date + featured image) → light
   body with the rendered article (32px text, 40px section headings with divider
   rules) → Share widget → related posts. Content inset to the 160px rail.
   ========================================================================= */

:root {
	--bd-teal: #2ad9c4;
	--bd-ink: #111;
	--bd-ink-70: rgba(17, 17, 17, 0.7);
	--bd-line: rgba(17, 17, 17, 0.1);
}

/* -------------------------------------------------------------------------
   HERO  (dark)
   ------------------------------------------------------------------------- */
.bd-hero {
	background: #0e0e0e;
	color: #fff;
}
.bd-hero__inner {
	display: grid;
	/* Both tracks are fr, so they shrink together and hold the design's
	   831:635 split. With the media track capped at a fixed 635px it never gave
	   any width back, and the text column absorbed the whole shortfall: 831px
	   at 1920 but 141px by 900, which put the title on seven lines. */
	grid-template-columns: minmax(0, 831fr) minmax(0, 635fr);
	gap: clamp(40px, 6vw, 104px);
	align-items: start;
	padding-block: clamp(56px, 6vw, 96px);
}
.bd-hero__text {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}
.bd-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}
.bd-badge {
	position: relative;
	padding: 8px 12px;
	background: rgba(29, 64, 60, 0.3);
	border-radius: 1px;
	font-weight: 600;
	font-size: 16px;
	line-height: 1;
	text-transform: uppercase;
	color: var(--bd-teal);
	white-space: nowrap;
}
.bd-badge__dot {
	position: absolute;
	width: 8px;
	height: 8px;
	border-radius: 1px;
	background: rgba(42, 217, 196, 0.2);
}
.bd-badge__dot--tl { top: 0; left: 0; }
.bd-badge__dot--tr { top: 0; right: 0; }
.bd-badge__dot--br { bottom: 0; right: 0; }
.bd-badge__dot--bl { bottom: 0; left: 0; }

.bd-hero__titles {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.bd-hero__title {
	margin: 0;
	font-weight: 500;
	font-size: 42px;
	line-height: 1.3;
	letter-spacing: -0.84px;
	color: #fff;
}
.bd-hero__excerpt {
	margin: 0;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.5;
	letter-spacing: -0.18px;
	color: rgba(255, 255, 255, 0.7);
}
.bd-hero__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.bd-hero__author {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-weight: 400;
	font-size: 18px;
	letter-spacing: -0.18px;
	color: rgba(255, 255, 255, 0.7);
}
.bd-hero__date {
	font-weight: 400;
	font-size: 18px;
	letter-spacing: -0.18px;
	color: rgba(255, 255, 255, 0.7);
}
.bd-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	background: rgba(255, 255, 255, 0.15);
	flex: none;
}
.bd-hero__media {
	width: 100%;
	max-width: 635px;
	/* 3:2, matching what WordPress actually serves — every featured image
	   measured came back 1.48-1.51. The box was 635/574 (1.11), so object-fit:
	   cover was shaving ~13% off each side and cutting into artwork that has
	   text baked into it. The mobile band below already used 350/240 (1.46),
	   so desktop was the only place cropping hard. */
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.08);
}
.bd-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* -------------------------------------------------------------------------
   BODY  (light, curved top over the dark hero)
   ------------------------------------------------------------------------- */
.bd-body {
	background: #fff;
	/* Solid teal divider bar between the dark hero and the light body (Figma). */
	border-top: 48px solid var(--bd-teal);
	padding-block: 80px 100px;
}
.bd-inner {
	max-width: min(1600px, 100%);
	margin-inline: auto;
}

/* Rendered article */
.bd-prose {
	color: var(--bd-ink);
}
.bd-prose > :first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}
.bd-prose p,
.bd-prose li {
	font-weight: 400;
	font-size: 18px;
	line-height: 1.7;
	letter-spacing: -0.18px;
	color: var(--bd-ink);
}
.bd-prose p {
	margin: 0 0 20px;
}
.bd-prose h2,
.bd-prose h3 {
	margin: 48px 0 20px;
	padding-top: 32px;
	border-top: 1px solid var(--bd-line);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.4px;
	color: var(--bd-ink);
	text-transform: capitalize;
}
.bd-prose h2 { font-size: 28px; }
.bd-prose h3 { font-size: 22px; }
.bd-prose a {
	color: var(--bd-teal);
	text-decoration: underline;
}
.bd-prose ul,
.bd-prose ol {
	margin: 0 0 28px;
	padding-left: 1.2em;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.bd-prose img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}
.bd-prose figure {
	margin: 32px 0;
}
.bd-prose figure img {
	display: block;
	margin-inline: auto;
}
.bd-notfound {
	font-size: 20px;
	color: var(--bd-ink-70);
}
.bd-notfound a {
	color: var(--bd-teal);
}

/* Share */
.bd-share {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin-top: 56px;
}
.bd-share__title {
	margin: 0;
	font-weight: 600;
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: -0.24px;
	color: #000;
}
.bd-share__row {
	display: flex;
	align-items: center;
	gap: 24px;
}
.bd-share__link {
	display: block;
	width: 40px;
	height: 40px;
}
.bd-share__link img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* Related */
.bd-related {
	margin-top: 80px;
}
.bd-related__title {
	margin: 0 0 32px;
	font-weight: 600;
	font-size: 28px;
	line-height: 1.2;
	letter-spacing: -0.56px;
	color: var(--bd-ink);
}
.bd-related__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px;
	max-width: min(1200px, 100%);
}
.bd-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	border: 1px solid var(--bd-line);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bd-card:hover {
	border-color: rgba(17, 17, 17, 0.2);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.bd-card__media {
	/* 3:2 rather than a fixed height, matching the listing cards: the column is
	   fluid, so a fixed height made the crop change with the viewport. */
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #cacaca;
}
.bd-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.bd-card__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.bd-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 16px;
	letter-spacing: -0.16px;
	color: var(--bd-ink-70);
}
.bd-card__title {
	margin: 0;
	font-weight: 500;
	font-size: 24px;
	line-height: 1.4;
	letter-spacing: -0.48px;
	color: var(--bd-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bd-card__author {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	letter-spacing: -0.16px;
	color: var(--bd-ink-70);
}
.bd-card__author .bd-avatar {
	background: var(--bd-line);
}

/* -------------------------------------------------------------------------
   MOBILE  (Figma 177:17188 — image on top, no section dividers, smaller type)
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.bd-hero__inner {
		grid-template-columns: 1fr;
		gap: 24px;
		padding-block: 32px;
	}
	.bd-hero__media {
		order: -1;
		max-width: none;
		aspect-ratio: 350 / 240;
		border-radius: 8px;
	}
	.bd-badges {
		gap: 8px;
	}
	.bd-badge {
		font-size: 12px;
		padding: 8px 12px;
	}
	.bd-hero__title {
		font-size: 28px;
		letter-spacing: -0.56px;
	}
	.bd-hero__excerpt {
		font-size: 16px;
		letter-spacing: -0.16px;
	}
	.bd-hero__meta {
		padding-top: 24px;
		border-top: 1px solid rgba(255, 255, 255, 0.15);
	}
	.bd-hero__author,
	.bd-hero__date {
		font-size: 12px;
	}
	.bd-avatar {
		width: 24px;
		height: 24px;
	}

	.bd-body {
		border-top-width: 16px;
		padding-block: 40px;
	}
	.bd-prose p,
	.bd-prose li {
		font-size: 16px;
		letter-spacing: -0.16px;
	}
	.bd-prose p {
		margin: 0 0 16px;
	}
	/* No divider rules between sections on mobile */
	.bd-prose h2,
	.bd-prose h3 {
		margin: 40px 0 16px;
		padding-top: 0;
		border-top: none;
	}
	.bd-prose h2 { font-size: 20px; letter-spacing: -0.4px; }
	.bd-prose h3 { font-size: 18px; letter-spacing: -0.36px; }

	.bd-share {
		margin-top: 40px;
		gap: 16px;
	}
	.bd-share__title {
		font-size: 20px;
	}
	.bd-share__row {
		gap: 40px;
	}
	.bd-share__link {
		width: 40px;
		height: 40px;
	}

	.bd-related {
		margin-top: 48px;
	}
	.bd-related__title {
		font-size: 20px;
		letter-spacing: -0.4px;
		margin-bottom: 24px;
	}
	.bd-related__grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.bd-card {
		padding: 0;
		gap: 0;
	}
	.bd-card__media {
		/* inherits the 3:2 ratio from the base rule */
		height: auto;
	}
	.bd-card__body {
		gap: 12px;
		padding: 16px 12px;
	}
	.bd-card__meta {
		font-size: 12px;
	}
	.bd-card__title {
		font-size: 16px;
	}
	.bd-card__author {
		font-size: 12px;
	}
	.bd-card__author .bd-avatar {
		width: 28px;
		height: 28px;
	}
}
