/*
 * Bloomer prose: the text of posts (.bl-prose) and of the legal pages (.bl-legal). Headings,
 * the lead, the yellow callout, framed photos, numbered steps, star lists, the lilac quote,
 * snapshot galleries, videos and the shop box.
 */

.bl-prose,
.bl-legal {
	font-size: clamp(17px, 1.35vw, 19px);
	line-height: 1.7;
}

.bl-prose {
	max-width: 740px;
}

.bl-prose > * + *,
.bl-legal > * + * {
	margin-top: 28px;
}

.bl-prose > :where(h2, h3, h4),
.bl-legal > :where(h2, h3, h4) {
	margin-top: 52px;
}

.bl-prose > :where(h2, h3, h4) + *,
.bl-legal > :where(h2, h3, h4) + * {
	margin-top: 20px;
}

/* Section titles: outlined in posts, solid on the legal pages and when chosen. */
.bl-prose > h2 {
	color: var(--bl-white);
	font-family: var(--bl-display);
	font-size: clamp(28px, 2.8vw, 40px);
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	-webkit-text-stroke: 0.06em var(--bl-ink);
	paint-order: stroke fill;
	text-shadow: var(--bl-stack-short);
}

.bl-prose > h3,
.bl-prose > h4,
.bl-legal > h2,
.bl-legal > h3,
.bl-prose > .wp-block-heading.is-style-solid {
	color: var(--bl-ink);
	font-family: var(--bl-display);
	font-size: clamp(22px, 2vw, 28px);
	font-weight: 400;
	line-height: 1.05;
	text-transform: uppercase;
	-webkit-text-stroke: 0;
	text-shadow: none;
}

.bl-legal > h2 {
	font-size: clamp(24px, 2.4vw, 32px);
}

.bl-prose > h4 {
	font-size: 20px;
}

.bl-prose > h3.is-style-outline {
	color: var(--bl-white);
	-webkit-text-stroke: 0.06em var(--bl-ink);
	text-shadow: var(--bl-stack-short);
}

.bl-prose > :is(p, ul, ol) a,
.bl-prose figcaption a,
.bl-legal > :is(p, ul, ol) a {
	color: var(--bl-ink);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: var(--bl-coral);
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
}

.bl-prose > :is(p, ul, ol) a:hover,
.bl-prose figcaption a:hover,
.bl-legal > :is(p, ul, ol) a:hover {
	background: var(--bl-yellow);
	color: var(--bl-ink);
}

/* Paragraph styles. */
.bl-prose .is-style-lead {
	font-size: clamp(20px, 1.7vw, 24px);
	font-weight: 500;
	line-height: 1.55;
}

.bl-prose .is-style-note,
.bl-legal .is-style-note {
	color: var(--bl-muted);
	font-size: 14px;
	font-style: italic;
	line-height: 1.55;
}

.bl-prose > .is-style-note a {
	color: var(--bl-muted);
	font-weight: 400;
	text-decoration-color: currentColor;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.bl-prose .is-style-callout,
.bl-legal .is-style-callout {
	padding: clamp(28px, 3.6vw, 44px);
	border: var(--bl-border);
	background: var(--bl-yellow);
	box-shadow: 10px 10px 0 var(--bl-ink);
	font-family: var(--bl-display);
	font-size: clamp(26px, 2.8vw, 38px);
	line-height: 1.08;
	text-transform: uppercase;
	text-wrap: balance;
	transform: rotate(-1deg);
}

.bl-prose > .is-style-callout {
	margin-block: 44px;
}

/* The yellow summary box at the top of the legal pages. */
.bl-legal .is-style-callout {
	font-family: var(--bl-sans);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.6;
	text-transform: none;
	transform: none;
	box-shadow: none;
	padding: 22px 24px;
}

/* Photos in a frame, captions in the mono face. */
.bl-prose .wp-block-image img {
	display: block;
	border: var(--bl-border);
	box-shadow: 8px 8px 0 var(--bl-ink);
}

.bl-prose .wp-block-image .wp-element-caption,
.bl-prose .wp-block-gallery > .wp-element-caption,
.bl-prose .wp-block-embed .wp-element-caption {
	margin: 14px 0 0;
	font-family: var(--bl-mono);
	font-size: 13px;
	line-height: 1.5;
	text-align: left;
}

/* Numbered steps: each number in a coloured square. */
.bl-prose > ol.wp-block-list,
.bl-legal > ol.wp-block-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 0;
	list-style: none;
	counter-reset: bl-step;
}

.bl-prose > ol.wp-block-list > li,
.bl-legal > ol.wp-block-list > li {
	position: relative;
	min-height: 40px;
	padding: 4px 0 0 56px;
	counter-increment: bl-step;
}

.bl-prose > ol.wp-block-list > li::before,
.bl-legal > ol.wp-block-list > li::before {
	content: counter(bl-step);
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: var(--bl-border);
	background: var(--bl-yellow);
	font-family: var(--bl-display);
	font-size: 18px;
	line-height: 1;
}

.bl-prose > ol.wp-block-list > li:nth-child(3n + 2)::before,
.bl-legal > ol.wp-block-list > li:nth-child(3n + 2)::before {
	background: var(--bl-lilac);
}

.bl-prose > ol.wp-block-list > li:nth-child(3n + 3)::before,
.bl-legal > ol.wp-block-list > li:nth-child(3n + 3)::before {
	background: var(--bl-coral);
}

/* Lists with a coral star. */
.bl-prose > ul.wp-block-list,
.bl-legal > ul.wp-block-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 0;
	list-style: none;
}

.bl-prose > ul.wp-block-list > li,
.bl-legal > ul.wp-block-list > li {
	position: relative;
	padding-left: 30px;
}

.bl-prose > ul.wp-block-list > li::before,
.bl-legal > ul.wp-block-list > li::before {
	content: "\2726";
	position: absolute;
	top: 0;
	left: 0;
	color: var(--bl-coral);
	font-size: 18px;
}

/* Quotes: a lilac card with a large quote mark over its corner. */
.bl-prose .wp-block-quote {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 44px 0 36px;
	padding: 64px clamp(24px, 3.4vw, 44px) clamp(24px, 3vw, 36px);
	border: var(--bl-border);
	background: var(--bl-lilac);
	box-shadow: 10px 10px 0 var(--bl-ink);
}

.bl-prose .wp-block-quote::before {
	content: "\201C";
	position: absolute;
	top: -36px;
	left: 24px;
	height: 88px;
	overflow: hidden;
	color: var(--bl-white);
	font-family: var(--bl-display);
	font-size: 96px;
	line-height: 1;
	-webkit-text-stroke: 0.05em var(--bl-ink);
	paint-order: stroke fill;
	text-shadow: 0.04em 0.04em 0 var(--bl-ink);
}

.bl-prose .wp-block-quote p {
	margin: 0;
	font-size: clamp(20px, 1.8vw, 24px);
	font-style: italic;
	font-weight: 500;
	line-height: 1.45;
}

.bl-prose .wp-block-quote cite {
	font-family: var(--bl-mono);
	font-size: 13px;
	font-style: normal;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.bl-prose .wp-block-quote cite::before {
	content: "\2014\00A0";
}

/* Galleries: tilted snapshots with their captions under them. */
.bl-prose .wp-block-gallery.wp-block-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
	gap: 18px;
	padding: 0;
}

/* Core sizes the gallery images with an id-level selector: the same one, plus the theme's. */
.bl-prose .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image),
.bl-prose .wp-block-gallery .wp-block-image {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: auto;
	margin: 0;
	transform: rotate(-1.5deg);
}

.bl-prose .wp-block-gallery .wp-block-image:nth-child(2n) {
	transform: rotate(1deg);
}

.bl-prose .wp-block-gallery .wp-block-image:nth-child(3n) {
	transform: rotate(-0.8deg);
}

.bl-prose .wp-block-gallery > .wp-element-caption {
	grid-column: 1 / -1;
}

.bl-prose .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) img,
.bl-prose .wp-block-gallery .wp-block-image img {
	flex: none;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	box-shadow: 6px 6px 0 var(--bl-ink);
}

/* The gallery's own captions sit over the photo: here they go under it. */
.bl-prose .wp-block-gallery .wp-block-image .wp-element-caption {
	position: static;
	max-height: none;
	margin: 0;
	padding: 0;
	background: none;
	color: var(--bl-ink);
	font-family: var(--bl-mono);
	font-size: 12px;
	font-weight: 700;
	text-align: left;
	text-shadow: none;
	text-transform: uppercase;
}

.bl-prose .wp-block-gallery .wp-block-image::before {
	display: none;
}

.bl-prose > .bl-video {
	box-shadow: 10px 10px 0 var(--bl-ink);
}

.bl-prose > .bl-shop-box,
.bl-prose > .bl-video {
	margin-block: 40px;
}

/* Embeds and separators. */
.bl-prose .wp-block-embed iframe {
	max-width: 100%;
	border: var(--bl-border);
}

.bl-prose hr,
.bl-legal hr {
	height: 0;
	border: 0;
	border-top: var(--bl-border);
}

.bl-legal .wmcookies-table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.bl-legal p.bl-legal__updated {
	font-family: var(--bl-mono);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}
