/* =========================================================================
   Blog listing (v2)  —  layered on top of home-v2.css (Uncut Sans, .hv-shell,
   vertical frame rails on every `main > section`, sticky nav).

   Built from Figma "Blog-Listing" (8C41…, desktop 177:16306 / mobile 177:16656).
   Dark hero → Featured carousel → All Blogs (category sidebar + search + a
   2-column card grid + Load more). Content is inset to the Figma 160px rail.
   ========================================================================= */

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

/* -------------------------------------------------------------------------
   HERO
   ------------------------------------------------------------------------- */
.bl-hero {
	background: #0e0e0e;
	color: #fff;
}
.bl-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	text-align: center;
	padding-block: clamp(72px, 9vw, 120px);
}
.bl-hero__title {
	margin: 0;
	font-weight: 500;
	font-size: 80px;
	line-height: 1.4;
	letter-spacing: -1.6px;
	color: #fff;
}
.bl-hero__sub {
	margin: 0;
	max-width: 640px;
	font-weight: 400;
	font-size: 24px;
	line-height: 1.4;
	letter-spacing: -0.48px;
	color: #fff;
}

/* -------------------------------------------------------------------------
   Shared
   ------------------------------------------------------------------------- */
.bl-featured,
.bl-all {
	background: #fff;
}
.bl-inner {
	max-width: min(1600px, 100%);
	margin-inline: auto;
}
.bl-sechead {
	margin: 0;
	font-weight: 500;
	font-size: 36px;
	line-height: 1.4;
	letter-spacing: -0.72px;
	color: var(--bl-ink);
}
.bl-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--bl-line);
	flex: none;
}
.bl-readmore {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 18px;
	background: var(--bl-teal);
	border-radius: 2px;
	font-weight: 500;
	font-size: 14px;
	line-height: 1.5;
	letter-spacing: -0.14px;
	color: #0a0a0a;
}

/* -------------------------------------------------------------------------
   FEATURED
   ------------------------------------------------------------------------- */
.bl-featured {
	padding-block: 100px 0;
}
.bl-feat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-top: 24px;
}
.bl-feat__card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	padding: 40px;
	border: 1px solid var(--bl-line);
	text-decoration: none;
	color: inherit;
}
.bl-feat__media {
	position: relative;
	aspect-ratio: 3 / 2;
	max-height: clamp(240px, 26vw, 440px);
	overflow: hidden;
	background: rgba(17, 17, 17, 0.1);
}
.bl-feat__media::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--bl-thumb) center / cover no-repeat;
	filter: blur(28px) saturate(1.1);
	transform: scale(1.15);
}
.bl-feat__media img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.bl-feat__media--banner { aspect-ratio: 5 / 2; }
.bl-feat__media--banner img { object-fit: cover; }
.bl-feat__media--banner::before { content: none; }
.bl-card__media img {
	width: 100%;
	height: 100%;
	/* cover is safe here: the box ratio matches the source, so it trims about
	   1% rather than the third a square box cost. */
	object-fit: cover;
	display: block;
}
/* "X Min Read" badge with decorative corner squares */
.bl-badge {
	position: absolute;
	top: 20px;
	left: 19px;
	padding: 8px 12px;
	/* Opaque so the label stays legible over any featured image, dark or light. */
	background: var(--bl-teal);
	border-radius: 1px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	font-weight: 600;
	font-size: 14px;
	line-height: 1;
	color: #0a2b28;
	white-space: nowrap;
}
.bl-badge__dot {
	position: absolute;
	width: 8px;
	height: 8px;
	border-radius: 1px;
	background: rgba(29, 64, 60, 0.2);
}
.bl-badge__dot--tl { top: 0; left: 0; }
.bl-badge__dot--tr { top: 0; right: 0; }
.bl-badge__dot--br { bottom: 0; right: 0; }
.bl-badge__dot--bl { bottom: 0; left: 0; }

.bl-feat__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}
.bl-feat__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}
.bl-feat__author {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-weight: 400;
	font-size: 16px;
	letter-spacing: -0.16px;
	color: var(--bl-ink-70);
}
.bl-feat__date {
	font-weight: 400;
	font-size: 16px;
	letter-spacing: -0.16px;
	color: var(--bl-ink);
}
.bl-feat__titles {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.bl-feat__title {
	margin: 0;
	font-weight: 500;
	font-size: 24px;
	line-height: 1.4;
	letter-spacing: -0.48px;
	color: var(--bl-ink);
}
.bl-feat__excerpt {
	margin: 0;
	max-width: 616px;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.4;
	letter-spacing: -0.32px;
	color: var(--bl-ink-70);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* carousel controls */
.bl-feat__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.bl-navbtn {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--bl-ink);
	cursor: pointer;
}
.bl-navbtn:hover {
	opacity: 0.6;
}
/* At the first/last slide there is nothing to move to, so the control is
   dimmed and inert rather than silently doing nothing. */
.bl-navbtn:disabled {
	opacity: 0.25;
	cursor: default;
}
.bl-navbtn:disabled:hover {
	opacity: 0.25;
}
.bl-dots {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	padding-inline: 8px;
}
.bl-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(17, 17, 17, 0.2);
}
.bl-dot[data-on="true"] {
	background: var(--bl-teal);
}

/* -------------------------------------------------------------------------
   ALL BLOGS
   ------------------------------------------------------------------------- */
.bl-all {
	padding-block: 100px;
}
.bl-all__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.bl-all__body {
	display: grid;
	grid-template-columns: 400px minmax(0, 1fr);
	margin-top: 24px;
}
.bl-cats {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	/* Sticky nav on the left; the blog grid on the right scrolls past it. */
	position: sticky;
	top: 96px;
	align-self: start;
}
.bl-cat {
	position: relative;
	padding: 0 0 4px;
	background: none;
	border: none;
	font-family: inherit;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.4;
	letter-spacing: -0.32px;
	color: var(--bl-ink-60);
	text-align: left;
	cursor: pointer;
}
/* Active category: darker text + a line below it. */
.bl-cat[aria-current="true"] {
	color: var(--bl-ink);
}
.bl-cat[aria-current="true"]::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--bl-teal);
}

.bl-gridwrap {
	min-width: 0;
}
.bl-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px;
}
.bl-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	border: 1px solid var(--bl-line);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bl-card:hover {
	border-color: rgba(17, 17, 17, 0.2);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.bl-card__media {
	/* 3:2, matching what WordPress serves -- every thumbnail measured came back
	   1.48-1.51, so the artwork fills the card with about 1% trimmed and the
	   headline text baked into it stays readable.

	   A fixed height was the original problem: the column is fluid, so 298px
	   made the crop ratio change with the viewport -- portrait on narrow
	   screens, landscape on wide ones -- and the same thumbnail looked
	   different at every breakpoint. A ratio holds everywhere. */
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #f2f2f2;
}
.bl-card__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.bl-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 400;
	font-size: 16px;
	letter-spacing: -0.16px;
	color: var(--bl-ink-70);
}
.bl-card__title {
	margin: 0;
	font-weight: 500;
	font-size: 24px;
	line-height: 1.4;
	letter-spacing: -0.48px;
	color: var(--bl-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bl-card__author {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 400;
	font-size: 16px;
	letter-spacing: -0.16px;
	color: var(--bl-ink-70);
}
.bl-empty {
	padding: 48px 0;
	color: rgba(17, 17, 17, 0.5);
	font-size: 16px;
}
.bl-loadmore {
	margin-top: 40px;
}
.bl-loadmore__btn {
	padding: 12px 24px;
	background: var(--bl-teal);
	border: none;
	border-radius: 2px;
	font-family: inherit;
	font-weight: 500;
	font-size: 16px;
	letter-spacing: -0.16px;
	color: #0a0a0a;
	cursor: pointer;
}
.bl-loadmore__btn:hover {
	filter: brightness(0.96);
}

/* -------------------------------------------------------------------------
   MOBILE  (Figma 177:16656 — 390px frame, stacked)
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.bl-hero__inner {
		align-items: flex-start;
		gap: 16px;
		text-align: left;
		padding-block: 40px;
	}
	.bl-hero__title {
		font-size: 32px;
		letter-spacing: -0.64px;
	}
	.bl-hero__sub {
		font-size: 14px;
		letter-spacing: -0.28px;
	}
	.bl-sechead {
		font-size: 24px;
		letter-spacing: -0.48px;
	}

	.bl-featured {
		padding-block: 32px 0;
	}
	.bl-feat {
		margin-top: 20px;
	}
	.bl-feat__card {
		padding: 0;
		gap: 0;
	}
	.bl-feat__media {
		height: auto;
		max-height: none;
	}
	.bl-feat__body {
		gap: 16px;
		padding: 20px;
	}
	/* Figma mobile order: title/excerpt, then author/date, then Read more */
	.bl-feat__titles { order: 1; }
	.bl-feat__meta { order: 2; }
	.bl-readmore { order: 3; }
	.bl-feat__title {
		font-size: 16px;
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	.bl-feat__excerpt {
		font-size: 14px;
		-webkit-line-clamp: 3;
	}
	.bl-feat__author,
	.bl-feat__date {
		font-size: 12px;
	}
	.bl-avatar { width: 24px; height: 24px; }
	.bl-badge {
		top: 12px;
		left: 12px;
		padding: 6px 8px;
		font-size: 10px;
	}
	.bl-badge__dot { width: 6px; height: 6px; }
	.bl-readmore {
		font-size: 14px;
		padding: 8px 16px;
	}

	.bl-all {
		padding-block: 24px 40px;
	}
	.bl-all__head {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}
	.bl-all__body {
		display: block;
		margin-top: 20px;
	}
	/* category chips wrap horizontally instead of the vertical sidebar */
	.bl-cats {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px 12px;
		margin-bottom: 24px;
	}
	.bl-cat {
		font-size: 12px;
	}
	.bl-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.bl-card {
		padding: 0;
		gap: 0;
	}
	.bl-card__media {
		/* inherits the square ratio from the base rule */
		height: auto;
	}
	.bl-card__body {
		gap: 12px;
		padding: 16px 12px;
	}
	.bl-card__meta {
		font-size: 12px;
	}
	.bl-card__title {
		font-size: 16px;
	}
	.bl-card__author {
		font-size: 12px;
	}
	.bl-card__author .bl-avatar { width: 28px; height: 28px; }
	.bl-loadmore {
		margin-top: 24px;
		display: flex;
		justify-content: center;
	}
}

/* =========================================================================
   FLUID DESKTOP BAND (769-1919)

   Type and section rhythm were frozen at their 1920 values all the way down to
   769px, so on a laptop the copy and spacing stayed full-size while the cards
   and imagery (width-driven) shrank around them.

   Max = the 1920 design value, so 1920 and above is byte-identical. Min = this
   file's own <=768 value, so the 768/769 boundary is continuous. Coefficient is
   design/19.2vw, which resolves to exactly the design value at 1920. Tracking
   is -0.02em at both type anchors, so one em value is correct at every step.
   Body copy and small UI are deliberately left fixed.
   ========================================================================= */
@media (min-width: 769px) and (max-width: 1919px) {
	/* Hero */
	.bl-hero__title {
		font-size: clamp(32px, 4.167vw, 80px);
		letter-spacing: -0.02em;
	}
	.bl-hero__sub {
		font-size: clamp(14px, 1.25vw, 24px);
		letter-spacing: -0.02em;
	}

	/* Section rhythm */
	.bl-featured { padding-block: clamp(32px, 5.208vw, 100px) 0; }
	.bl-all { padding-block: clamp(40px, 5.208vw, 100px); }
	.bl-grid { gap: clamp(20px, 2.083vw, 40px); }
	.bl-sechead { font-size: clamp(24px, 1.875vw, 36px); }
	.bl-feat__title,
	.bl-card__title { font-size: clamp(16px, 1.25vw, 24px); }
}
