/* ==========================================================================
   Edysor — blog listing
   Loaded only on the blog, the archives and search. It depends on the tokens
   and the button/badge rules in landing.css, which is enqueued site-wide, so
   nothing here restates a colour or a radius that already has a name.
   ========================================================================== */

/* ---------------------------------------------------------------- masthead */

/* Same gradient family as the landing hero, stopped earlier: the hero runs
   150px of bright purple under a product card that sits on top of it, and
   this band has nothing to carry, so the bright end would be all there is. */
.bd-blog__masthead {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-top: 200px;
	padding-bottom: 180px;
	text-align: center;
	background-color: #0c0620;
	background-image:
		radial-gradient(120% 90% at 50% 108%,
			rgba(184, 158, 255, .78) 0%,
			rgba(129, 104, 250, .55) 30%,
			rgba( 86,  56, 214, .28) 54%,
			rgba( 12,   6,  32,   0) 78%),
		linear-gradient(180deg, #120a30 0%, #1d1152 32%, #2c1a86 66%, #3d24ac 100%);
}

.bd-blog__masthead-inner { position: relative; z-index: 2; }

.bd-blog__title {
	max-width: 16ch;
	margin: 0 auto;
	color: #fff;
	font-size: clamp(38px, 5.4vw, 68px);
	line-height: 1.06;
	letter-spacing: -.03em;
}

.bd-blog__lede {
	max-width: 660px;
	margin: 22px auto 0;
	color: rgba(255, 255, 255, .76);
	font-size: 18px;
	line-height: 1.7;
}

/* The masthead's bottom padding is mostly eaten by the 104px curve sitting on
   top of it, so without a top pad here the filter row ends up jammed against
   the curve rather than breathing under it. */
.bd-blog__body { padding: 64px 0 116px; background: #fff; }


/* ------------------------------------------------------- author masthead */

/* Slightly shorter than the blog masthead: the avatar adds its own height, so
   matching the padding would push the first card well below the fold. */
.bd-author__masthead { padding-top: 170px; padding-bottom: 170px; }

/* grid, not inline-grid: as an inline box it sat on the same line as the
   badge that follows it instead of stacking above it. */
.bd-author__avatar {
	display: grid;
	place-items: center;
	width: 92px;
	height: 92px;
	margin: 0 auto 26px;
	border: 2px solid rgba(255, 255, 255, .22);
	border-radius: 50%;
	background: linear-gradient(135deg, var(--bd-primary-400), var(--bd-primary));
	box-shadow: 0 18px 44px -14px rgba(12, 6, 32, .8);
	color: #fff;
	font-size: 34px;
	font-weight: 800;
	letter-spacing: .01em;
}

.bd-author__count {
	margin-top: 22px;
	color: rgba(255, 255, 255, .58);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

@media (max-width: 640px) {
	.bd-author__masthead { padding-top: 132px; padding-bottom: 118px; }
	.bd-author__avatar { width: 74px; height: 74px; font-size: 27px; margin-bottom: 20px; }
	.bd-author__count { font-size: 13px; }
}


/* ------------------------------------------------------------------ chips */

.bd-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0 0 52px;
}

.bd-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border: 1px solid var(--bd-line);
	border-radius: 999px;
	background: #fff;
	color: var(--bd-body);
	font-size: 14.5px;
	font-weight: 600;
	transition: color .18s var(--bd-ease), border-color .18s var(--bd-ease), background-color .18s var(--bd-ease);
}
.bd-filter i {
	font-style: normal;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--bd-muted);
}
.bd-filter:hover { border-color: var(--bd-primary-200); color: var(--bd-primary); }
.bd-filter.is-active {
	border-color: transparent;
	background: var(--bd-primary);
	color: #fff;
}
.bd-filter.is-active i { color: rgba(255, 255, 255, .7); }


/* ------------------------------------------------------------------- grid */

/* auto-fill rather than a fixed column count: the container is 1600px, so a
   hard 3-up would leave 500px cards that read like landing-page panels. This
   settles at 4 across on a wide desktop and steps down on its own. */
.bd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
	gap: 30px;
}


/* ------------------------------------------------------------------- card */

.bd-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--bd-line);
	border-radius: 18px;
	background: #fff;
	transition: transform .28s var(--bd-ease), box-shadow .28s var(--bd-ease), border-color .28s var(--bd-ease);
}
.bd-card:hover {
	transform: translateY(-6px);
	border-color: transparent;
	box-shadow: 0 30px 60px -28px rgba(18, 16, 58, .45), 0 6px 18px -10px rgba(18, 16, 58, .2);
}

/* Keyboard users get the same affordance: the focus ring lands on the title
   link, whose stretched pseudo-element covers the card. */
.bd-card:focus-within {
	border-color: var(--bd-primary-200);
	box-shadow: 0 0 0 3px var(--bd-primary-050);
}

.bd-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background:
		linear-gradient(135deg,
			hsl(var(--bd-card-hue, 250) 82% 68%),
			hsl(calc(var(--bd-card-hue, 250) + 22) 76% 46%));
}

.bd-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s var(--bd-ease);
}
.bd-card:hover .bd-card__img { transform: scale(1.045); }

.bd-card__placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: rgba(255, 255, 255, .55);
}
.bd-card__placeholder .bd-icon { width: 40px; height: 40px; }

.bd-card__cat {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	padding: 6px 13px;
	border-radius: 999px;
	background: rgba(12, 6, 32, .72);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .01em;
}
.bd-card__cat:hover { background: var(--bd-primary); }

.bd-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 24px 26px 26px;
}

.bd-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--bd-muted);
	font-size: 13.5px;
	font-weight: 500;
}

.bd-card__title {
	margin: 12px 0 0;
	font-size: 21px;
	line-height: 1.32;
	letter-spacing: -.02em;
}
.bd-card__title a { transition: color .18s var(--bd-ease); }
.bd-card__title a:hover { color: var(--bd-primary); }

/* Makes the whole card clickable without wrapping interactive children in an
   outer anchor, which is invalid and gets un-nested by the parser. */
.bd-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.bd-card__excerpt {
	margin-top: 12px;
	color: var(--bd-body);
	font-size: 15px;
	line-height: 1.68;
}

/* Clamping keeps every card in a row the same height whatever the copy does.
   -webkit-box is still the only cross-browser line clamp. */
.bd-card__title,
.bd-card__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bd-card__title { -webkit-line-clamp: 2; }
.bd-card__excerpt { -webkit-line-clamp: 3; }

.bd-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 20px;
	color: var(--bd-primary);
	font-size: 14.5px;
	font-weight: 600;
}
.bd-card__more .bd-icon { transition: transform .22s var(--bd-ease); }
.bd-card:hover .bd-card__more .bd-icon { transform: translateX(4px); }


/* -------------------------------------------------------------- lead card */

.bd-card--lead { grid-column: 1 / -1; }

@media (min-width: 900px) {
	.bd-card--lead {
		flex-direction: row;
		align-items: stretch;
	}
	.bd-card--lead .bd-card__media {
		flex: 0 0 52%;
		aspect-ratio: auto;
	}
	.bd-card--lead .bd-card__body {
		justify-content: center;
		padding: 46px 52px;
	}
	.bd-card--lead .bd-card__title {
		-webkit-line-clamp: 3;
		font-size: clamp(26px, 2.4vw, 36px);
		line-height: 1.2;
	}
	.bd-card--lead .bd-card__excerpt {
		-webkit-line-clamp: 4;
		max-width: 60ch;
		font-size: 16.5px;
	}
	/* The grid card pushes this to the bottom so every card in a row lines up.
	   The lead card is alone in its row and is vertically centred, so `auto`
	   there just opens a gap under the excerpt. */
	.bd-card--lead .bd-card__more { margin-top: 26px; }
}


/* ------------------------------------------------------------ empty state */

.bd-empty {
	max-width: 620px;
	margin: 0 auto;
	padding: 64px 40px;
	border: 1px solid var(--bd-line);
	border-radius: 20px;
	background: #fbfaff;
	text-align: center;
}
.bd-empty__icon {
	display: inline-grid;
	place-items: center;
	width: 62px;
	height: 62px;
	margin-bottom: 22px;
	border-radius: 18px;
	background: var(--bd-primary-050);
	color: var(--bd-primary);
}
.bd-empty__icon .bd-icon { width: 26px; height: 26px; }
.bd-empty h2 { font-size: 26px; }
.bd-empty p { margin: 14px 0 28px; font-size: 16px; line-height: 1.7; }


/* ------------------------------------------------------------- pagination */

.bd-pagination { margin-top: 64px; }
.bd-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.bd-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 46px;
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--bd-line);
	border-radius: 12px;
	color: var(--bd-body);
	font-size: 15px;
	font-weight: 600;
	transition: color .18s var(--bd-ease), border-color .18s var(--bd-ease), background-color .18s var(--bd-ease);
}
.bd-pagination .page-numbers:hover { border-color: var(--bd-primary-200); color: var(--bd-primary); }
.bd-pagination .page-numbers.current {
	border-color: transparent;
	background: var(--bd-primary);
	color: #fff;
}
.bd-pagination .page-numbers.dots { border-color: transparent; }


/* ------------------------------------------------------------- responsive */

@media (max-width: 1024px) {
	.bd-blog__masthead { padding-top: 170px; padding-bottom: 150px; }
	.bd-blog__body { padding-bottom: 88px; }
	.bd-grid { gap: 24px; }
}

@media (max-width: 640px) {
	.bd-blog__masthead { padding-top: 138px; padding-bottom: 120px; }
	.bd-blog__lede { font-size: 16px; }
	.bd-blog__body { padding-bottom: 62px; }

	.bd-filters {
		flex-wrap: nowrap;
		justify-content: flex-start;
		/* Full-bleed so the row can scroll edge to edge instead of clipping
		   inside the container's padding. */
		margin-inline: calc(var(--bd-gutter) * -1);
		padding-inline: var(--bd-gutter);
		overflow-x: auto;
		scrollbar-width: none;
	}
	.bd-filters::-webkit-scrollbar { display: none; }
	.bd-filter { flex: 0 0 auto; }

	.bd-card__body { padding: 20px 20px 22px; }
	.bd-card__title { font-size: 19px; }
	.bd-pagination { margin-top: 44px; }
	.bd-pagination .page-numbers { min-width: 42px; height: 42px; }
}
