/*
 * Editorial content: Page intro and Standard section patterns.
 * Values are the prototype's (px), expressed with theme presets where one
 * matches exactly. Section padding is here rather than in block attributes
 * because it changes at 820px, which block settings cannot express.
 *
 *   .bl-intro            Page intro group (patterns/page-intro.php)
 *   .bl-kicker           label above the headline (empty = hidden)
 *   .bl-intro__title     the page's one H1
 *   .bl-lede             opening paragraph (size comes from the "medium" preset)
 *   .bl-section          Standard section group (patterns/standard-section.php)
 *   .bl-section__title   its H2
 *
 * --bl-pt is each group's top padding, defined once here. spine.css uses it to
 * place the section marker when JavaScript is off. Both patterns carry the
 * "Section" block style (is-style-section), which puts them on the spine.
 *
 * Revised in Stage 4 for the page template: the small label above the H1 is
 * the page title (templates/page.html), not part of the pattern.
 *
 * Vertical rhythm uses margin-block-start only, on the element that follows.
 *
 * In the prototype every section's last paragraph has a 24px bottom margin
 * inside the section's padding, so the effective space below a section's text
 * is padding + 24px. Block margins collapse to 0 here, so the bottom padding
 * adds the 24px (spacing preset 40) explicitly.
 */

.bl-intro,
.bl-section {
	margin-block-start: 0;
}

/* Page intro: follows the page label (templates/page.html), 22px below it */
.bl-intro {
	padding-top: 0;
	padding-bottom: calc(136px + var(--wp--preset--spacing--40));
}

.bl-kicker {
	text-transform: uppercase;
	letter-spacing: 0.16em;
	line-height: 1.4;
}

.bl-kicker:empty {
	display: none;
}

/* The page H1: the Article title size, as on single posts */
.bl-intro__title {
	margin-block-start: 0;
	font-size: var(--wp--preset--font-size--title);
	line-height: 1.1;
	letter-spacing: -0.018em;
}

.bl-intro .bl-lede {
	margin-block-start: 48px;
}

.bl-intro .bl-lede + p {
	margin-block-start: 28px;
}

/* About: portrait between the headline and the lede; pull quote after the text */
.bl-intro .bl-portrait {
	margin-block-start: 48px;
}

.bl-intro .bl-portrait + .bl-lede {
	margin-block-start: 52px;
}

.bl-intro .wp-block-pullquote {
	margin-block-start: 56px;
}

/* Standard section */
.bl-section {
	--bl-pt: var(--wp--preset--spacing--70);
	padding-top: var(--bl-pt);
	padding-bottom: calc(var(--wp--preset--spacing--80) + var(--wp--preset--spacing--40));
}

.bl-section__title + * {
	margin-block-start: 32px;
}

@media (max-width: 820px) {
	.bl-intro {
		padding-bottom: calc(88px + var(--wp--preset--spacing--40));
	}

	.bl-intro .bl-lede {
		margin-block-start: 32px;
	}

	.bl-intro .bl-portrait {
		margin-block-start: 32px;
	}

	.bl-intro .bl-portrait + .bl-lede {
		margin-block-start: 36px;
	}

	.bl-intro .wp-block-pullquote {
		margin-block-start: 40px;
	}

	.bl-section {
		--bl-pt: var(--wp--preset--spacing--60);
		padding-bottom: calc(var(--wp--preset--spacing--60) + var(--wp--preset--spacing--40));
	}

	.bl-section__title + * {
		margin-block-start: 24px;
	}
}
