/*
 * Blog: the post listing and the single post.
 *
 * Loads on the blog index, every post archive and single posts. The post card
 * is the product card with a serif name and a date in its foot; the single
 * post body borrows the reading column and prose typography from page.css,
 * which loads alongside this sheet on a post.
 */

/* ------------------------------------------------------- Listing head ----- */

.lb-blog-head {
	padding-block: var(--lb-s6) var(--lb-s6);
	text-align: center;
}

.lb-blog-head .lb-eyebrow { margin-top: var(--lb-s5); }

.lb-blog-head__title { margin: 0; }

.lb-blog-head__text {
	max-width: 62ch;
	margin: var(--lb-s4) auto 0;
}

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

.lb-blog-body { padding-bottom: var(--lb-s8); }

.lb-blog-featured { margin-bottom: var(--lb-s6); }

.lb-posts {
	display: grid;
	grid-template-columns: repeat(var(--lb-cols, 3), minmax(0, 1fr));
	gap: 26px 22px;
}

.lb-blog-empty {
	padding-block: var(--lb-s7);
	text-align: center;
}

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

/* The well takes the warm ground so a post with no picture reads as a tile
   with its category on it, not as a white gap. */
.lb-post-card__well {
	aspect-ratio: 16 / 10;
	background: var(--lb-well);
}

.lb-post-card__flat {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--lb-s5);
	font-family: var(--lb-font-serif);
	font-weight: 300;
	font-size: clamp(24px, 2.6vw, 34px);
	line-height: 1.1;
	letter-spacing: -.015em;
	text-align: center;
	color: var(--lb-ink-2);
}

.lb-post-card__body { padding-bottom: var(--lb-s4); }

.lb-post-card__kicker a { color: inherit; }
.lb-post-card__kicker a:hover { color: var(--lb-violet-ink); }

.lb-post-card__name {
	margin: 0;
	font-family: var(--lb-font-serif);
	font-weight: 300;
	font-size: 22px;
	line-height: 1.22;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.lb-post-card__name a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	color: var(--lb-ink);
}

.lb-post-card__name a:hover { color: var(--lb-violet-ink); }

.lb-post-card__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--lb-mute);
}

/* The foot sits inside the body here, so it drops to the bottom on its own
   margin rather than being a separate band. */
.lb-post-card__foot {
	margin-top: auto;
	padding: var(--lb-s3) 0 0;
}

/*
 * The newest post, once, across the top: picture beside the text rather than
 * above it, so it reads as the lead story and not as a very large card.
 */
.lb-post-card--featured {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

/* The picture sets the row height; a short body stretches to it, a long one
   stretches the picture instead. */
.lb-post-card--featured .lb-post-card__well {
	aspect-ratio: 3 / 2;
	height: auto;
	align-self: stretch;
}

.lb-post-card--featured .lb-post-card__body {
	justify-content: center;
	gap: var(--lb-s3);
	padding: var(--lb-s7) var(--lb-s7) var(--lb-s6);
}

.lb-post-card--featured .lb-post-card__name {
	font-size: var(--lb-fs-h3);
	line-height: 1.1;
}

.lb-post-card--featured .lb-post-card__name a { -webkit-line-clamp: 4; }

.lb-post-card--featured .lb-post-card__excerpt {
	-webkit-line-clamp: 4;
	font-size: 15.5px;
}

.lb-post-card--featured .lb-post-card__foot { margin-top: var(--lb-s4); }

/* ---------------------------------------------------------- Single post --- */

.lb-post-page { padding-bottom: var(--lb-s8); }

.lb-post__head {
	max-width: calc(900px + var(--lb-gutter) * 2);
	padding-block: var(--lb-s6) var(--lb-s5);
	text-align: center;
}

.lb-post__kicker {
	margin-top: var(--lb-s6);
	margin-bottom: var(--lb-s3);
}

.lb-post__kicker a { color: inherit; }

.lb-post__title {
	margin: 0;
	font-size: clamp(36px, 4.6vw, 62px);
}

.lb-post__meta { margin: var(--lb-s4) 0 0; }

.lb-post__meta a { color: var(--lb-ink); }
.lb-post__meta a:hover { color: var(--lb-violet-ink); }

.lb-post__meta-sep { padding-inline: var(--lb-s2); opacity: .5; }

/* The featured image, wider than the reading column so the page opens on the
   picture, but never the full width of the wrap. */
.lb-post__figure {
	max-width: calc(1080px + var(--lb-gutter) * 2);
	margin: var(--lb-s4) auto var(--lb-s7);
}

.lb-post__well {
	border-radius: var(--lb-r-panel);
	box-shadow: var(--lb-sh-rest);
}

/* The same reading column the editorial pages use. */
.lb-post__column {
	max-width: calc(760px + var(--lb-gutter) * 2);
}

.lb-post__body {
	font-size: 16.5px;
	line-height: var(--lb-lh-body);
	color: var(--lb-ink-2);
}

/* What page.css does not cover: pictures, captions and quotes in the body. */
.lb-scope .lb-post__body img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: var(--lb-r-thumb);
}

.lb-scope .lb-post__body figure,
.lb-scope .lb-post__body .wp-block-image {
	margin: var(--lb-s6) 0;
}

.lb-scope .lb-post__body figcaption {
	margin-top: var(--lb-s2);
	font-size: var(--lb-fs-control);
	color: var(--lb-mute);
	text-align: center;
}

.lb-scope .lb-post__body blockquote {
	margin: var(--lb-s6) 0;
	padding: 0 0 0 var(--lb-s5);
	border-left: 2px solid var(--lb-sand);
	font-family: var(--lb-font-serif);
	font-weight: 300;
	font-size: 22px;
	line-height: 1.4;
	color: var(--lb-ink);
}

.lb-scope .lb-post__body blockquote p { margin: 0; font: inherit; color: inherit; }
.lb-scope .lb-post__body blockquote p + p { margin-top: var(--lb-s3); }

.lb-scope .lb-post__body .alignwide,
.lb-scope .lb-post__body .alignfull {
	max-width: none;
}

.lb-post__pages {
	margin-top: var(--lb-s6);
	font-size: var(--lb-fs-control);
	color: var(--lb-mute);
}

.lb-post__pages a,
.lb-post__pages .post-page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	margin-left: var(--lb-s2);
	padding: 0 10px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-r-pill);
	color: var(--lb-ink);
}

.lb-post__pages .post-page-numbers.current {
	background: var(--lb-ink);
	border-color: var(--lb-ink);
	color: var(--lb-sand);
}

/* Tags and share, under the body. */
.lb-post__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--lb-s4);
	margin-top: var(--lb-s7);
	padding-top: var(--lb-s5);
	border-top: 1px solid var(--lb-line);
}

.lb-post__tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--lb-s2);
}

.lb-scope .lb-post__tag {
	min-height: 34px;
	padding: 7px 13px;
	font-size: 12.5px;
	font-weight: 500;
}

/* The parent's share block: its label becomes an eyebrow, its links circles. */
.lb-post__share .post-share {
	display: flex;
	align-items: center;
	gap: var(--lb-s3);
}

.lb-post__share .share-label {
	font-size: var(--lb-fs-eyebrow);
	font-weight: 500;
	letter-spacing: var(--lb-ls-eyebrow);
	text-transform: uppercase;
	color: var(--lb-mute);
}

.lb-post__share .share-list {
	display: flex;
	gap: var(--lb-s2);
}

.lb-scope .lb-post__share .share-list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-r-pill);
	color: var(--lb-ink);
	font-size: 14px;
}

.lb-scope .lb-post__share .share-list a:hover {
	background: var(--lb-ink);
	border-color: var(--lb-ink);
	color: var(--lb-paper);
}

/* Author box. */
.lb-post__author-box {
	display: flex;
	gap: var(--lb-s5);
	align-items: flex-start;
	margin-top: var(--lb-s7);
	padding: var(--lb-s5);
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-r-card);
	background: var(--lb-surface);
}

.lb-scope .lb-post__avatar {
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: var(--lb-r-pill);
}

.lb-post__author-body .lb-eyebrow { margin-bottom: var(--lb-s1); }

.lb-post__author-name {
	margin: 0;
	font-family: var(--lb-font-serif);
	font-weight: 300;
	font-size: 22px;
	color: var(--lb-ink);
}

.lb-post__author-bio {
	margin: var(--lb-s2) 0 0;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--lb-mute);
}

/* Previous / next. */
.lb-post__nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--lb-s4);
	margin-top: var(--lb-s7);
}

.lb-scope .lb-post__nav-link {
	display: flex;
	flex-direction: column;
	gap: var(--lb-s1);
	padding: var(--lb-s5);
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-r-card);
	background: var(--lb-surface);
	color: var(--lb-ink);
	transition: border-color var(--lb-dur) var(--lb-ease),
	            box-shadow var(--lb-dur) var(--lb-ease),
	            transform var(--lb-dur) var(--lb-ease);
}

.lb-scope .lb-post__nav-link:hover {
	border-color: var(--lb-sand-soft);
	box-shadow: var(--lb-sh-hover);
	transform: translateY(-3px);
}

.lb-post__nav-link--prev { grid-column: 1; }
.lb-post__nav-link--next { grid-column: 2; text-align: right; }

.lb-post__nav-link .lb-eyebrow { margin: 0; }

.lb-post__nav-title {
	font-family: var(--lb-font-serif);
	font-weight: 300;
	font-size: 19px;
	line-height: 1.25;
}

/* Related. */
.lb-post__related { margin-top: var(--lb-s8); }
.lb-post__related .lb-posts { margin-top: var(--lb-s6); }

/* Comments: the parent's template, with its headings and controls brought in
   line. */
.lb-post__comments { margin-top: var(--lb-s8); }

.lb-scope .lb-post__comments .comments-title,
.lb-scope .lb-post__comments .comment-reply-title {
	font-family: var(--lb-font-serif);
	font-weight: 300;
	font-size: var(--lb-fs-h3);
	line-height: 1.1;
	letter-spacing: -.015em;
	margin: 0 0 var(--lb-s5);
}

.lb-scope .lb-post__comments .comment-form .submit,
.lb-scope .lb-post__comments input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 26px;
	border: 1px solid var(--lb-ink);
	border-radius: var(--lb-r-pill);
	background: var(--lb-ink);
	color: var(--lb-paper);
	font-family: var(--lb-font-sans);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .06em;
	line-height: 1;
	cursor: pointer;
}

.lb-scope .lb-post__comments .comment-form .submit:hover,
.lb-scope .lb-post__comments input[type="submit"]:hover {
	background: var(--lb-ink-2);
	border-color: var(--lb-ink-2);
}

/* ----------------------------------------------------------- Responsive --- */

@media (max-width: 1023px) {
	.lb-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.lb-post-card--featured .lb-post-card__body { padding: var(--lb-s6); }
}

@media (max-width: 767px) {
	.lb-post-card--featured { grid-template-columns: minmax(0, 1fr); }

	.lb-post-card--featured .lb-post-card__well {
		aspect-ratio: 16 / 10;
		height: auto;
		min-height: 0;
	}

	.lb-post-card--featured .lb-post-card__body { padding: var(--lb-s5) var(--lb-s4) var(--lb-s4); }

	/* The title sits right under the trail, so its own crumb is only noise. */
	.lb-post__head .rentpro_core_breadcrumb .current { display: none; }

	.lb-post__nav { grid-template-columns: minmax(0, 1fr); }
	.lb-post__nav-link--prev,
	.lb-post__nav-link--next { grid-column: auto; text-align: left; }

	.lb-post__author-box { flex-direction: column; }
}

@media (max-width: 639px) {
	.lb-posts { grid-template-columns: minmax(0, 1fr); gap: 22px; }

	.lb-blog-head,
	.lb-post__head { padding-block: var(--lb-s5) var(--lb-s5); }

	.lb-post__figure { margin-bottom: var(--lb-s6); }
	.lb-post__well { border-radius: var(--lb-r-thumb); }
}
