/* Single-post header text block: title, deck, byline, dateline.
   Markup: template-parts/post-header/text.php. Every post type except the hero layout. */

.single-post-header--text-block {
	--sph-navy: #0F4059;
	--sph-darkest-navy: #0B272D;
	--sph-cobalt: #0075F2;
	--sph-accent: #B81C61; /* deep pink, 6.2:1 on white */
	--sph-main: "proxima-nova", "Open Sans", sans-serif;
	--sph-measure: 52.5rem; /* the article body column */
}

.single-post-header--text-block .single-post-header__title {
	text-wrap: balance;
}

.single-post-header__deck {
	max-width: 34ch;
	margin: 1.25rem 0 0;
	font-family: var(--sph-main);
	font-size: 1.375rem;
	line-height: 1.4;
	font-weight: 400;
	color: var(--sph-navy);
	text-wrap: pretty;
}

.single-post-header__byline-block {
	margin-top: 1.5rem;
	font-family: var(--sph-main);
}

.single-post-header__byline {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.4;
	font-weight: 600;
	color: var(--sph-darkest-navy);
}

.single-post-header__dateline {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.15rem 0.5em;
	margin: 0.35rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	font-weight: 500;
	color: var(--sph-accent);
}

.single-post-header__byline a,
.single-post-header__dateline a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
	text-underline-offset: 3px;
	transition: text-decoration-color .15s ease;
}

.single-post-header__byline a:hover,
.single-post-header__dateline a:hover {
	text-decoration-color: currentColor;
}

.single-post-header__byline a:focus-visible,
.single-post-header__dateline a:focus-visible {
	outline: 3px solid var(--sph-cobalt);
	outline-offset: 2px;
	border-radius: 2px;
}

.single-post-header__sep {
	color: color-mix(in srgb, currentColor 55%, transparent);
}

/* Dark and custom-colour headers: the block takes the header's own text colour. */
.single-post-header--text-block.dark .single-post-header__deck,
.single-post-header--text-block.dark .single-post-header__byline,
.single-post-header--text-block.dark .single-post-header__dateline,
.single-post-header--text-block[class*="color-"] .single-post-header__deck,
.single-post-header--text-block[class*="color-"] .single-post-header__byline,
.single-post-header--text-block[class*="color-"] .single-post-header__dateline {
	color: inherit;
}

.single-post-header--text-block.dark .single-post-header__deck,
.single-post-header--text-block[class*="color-"] .single-post-header__deck {
	opacity: 0.88;
}

/* No header art: the text block takes the body column so title and body share one edge. The
   theme insets this column by 100px (≥1200px) to sit beside header art; with none, that inset
   pushed the header off the body's left edge. */
.single-post-header--text-only .single-post-header__content {
	flex: 1 1 100%;
	max-width: var(--sph-measure);
	margin-left: auto;
	margin-right: auto;
	padding-left: 0;
	padding-right: 0;
}

.single-post-header--text-only .single-post-header__deck {
	max-width: none;
}

@media (prefers-reduced-motion: reduce) {
	.single-post-header__byline a,
	.single-post-header__dateline a {
		transition: none;
	}
}

@media (max-width: 600px) {
	/* Light headers don't need the theme's full top padding on phones. */
	.single-post-header--text-block:not(.dark):not([class*="color-"]) {
		padding-top: 1.5rem;
	}

	.single-post-header__deck {
		margin-top: 1rem;
		font-size: 1.1875rem;
	}

	.single-post-header__byline-block {
		margin-top: 1.1rem;
	}

	.single-post-header__byline {
		font-size: 1rem;
	}

	.single-post-header__dateline {
		font-size: 0.875rem;
	}
}
