/**
 * upcomer/editorial-page-header
 *
 * Light-canvas page intro: large H1 with an optional inline
 * accent phrase, a lede paragraph, and an optional decorative colored stripe.
 *
 * No-new-colors compliance (CLAUDE.md → Design conventions):
 *  - Canvas + type use the gamurs light `--wp--custom--light--*` tokens.
 *  - The accent + the three stripe swatches map to established site colors
 *    (brand gold / accent1 sage / info blue). Hex values inside var() are the
 *    exact token fallbacks — no new colors are introduced.
 *
 * Isolation: every rule is scoped under .upcomer-block--editorial-page-header.
 * The --color-* aliases below are declared ON the block root, so they resolve
 * for the inline `--stripe-color: var(--color-<token>)` that render.php emits
 * without leaking to the rest of the page. No global selectors, no id hooks.
 */

.upcomer-block--editorial-page-header {
	/* Surface + type */
	--editorial-header-canvas: var(--wp--custom--light--general-color-bg--minimal, #fefefe);
	--editorial-header-fg: var(--wp--custom--light--general-color--h-1, #171717);
	--editorial-header-fg-muted: var(--wp--custom--light--general-color--body, #494949);
	--editorial-header-accent: var(--wp--custom--light--brand--color--50, #887343);

	/* Stripe swatch palette — established site colors, aliased for render.php. */
	--color-accent: var(--wp--custom--light--brand--color--50, #887343);
	--color-secondary: var(--wp--custom--light--accent1--color--50, #647b69);
	--color-tertiary: var(--wp--custom--light--info--color-fg, #95a9c0);

	/* Shared content column with the rest of the site (matches gamurs footer). */
	--editorial-header-content-max: calc(1px * var(--wp--custom--bottom-nav--container--desktop--max-width, 1200));

	background: var(--editorial-header-canvas);
	color: var(--editorial-header-fg);
	margin: 0;
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
	padding-inline: 0;
	box-sizing: border-box;
}

.upcomer-block--editorial-page-header *,
.upcomer-block--editorial-page-header *::before,
.upcomer-block--editorial-page-header *::after {
	box-sizing: border-box;
}

/* ---- Content column --------------------------------------------------- */

.upcomer-block--editorial-page-header .upcomer-block__inner {
	max-width: var(--editorial-header-content-max);
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	gap: clamp(1rem, 2.5vw, 1.75rem);
}

@media (min-width: 992px) and (max-width: 1248px) {
	.upcomer-block--editorial-page-header .upcomer-block__inner {
		max-width: calc(1px * var(--wp--custom--bottom-nav--container--latpop--max-width, 1200));
	}
}

@media (max-width: 991px) {
	.upcomer-block--editorial-page-header .upcomer-block__inner {
		max-width: calc(1px * var(--wp--custom--bottom-nav--container--mobile--max-width, 720));
		/* Match the gamurs site-wide mobile gutter (theme.css uses 15px). */
		padding-inline: 15px;
	}
}

/* ---- Headline --------------------------------------------------------- */

/* Sentence-case editorial H1. Heavy global selectors elsewhere on the site
   force uppercase H1 — `text-transform: none !important` re-asserts the
   block's contract that this H1 is written naturally. */
.upcomer-block--editorial-page-header .editorial-header__headline {
	margin: 0;
	font-family: "Barlow Condensed", "Barlow", "Helvetica Neue", system-ui, sans-serif;
	font-size: clamp(2rem, 5.5vw, 4rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.02em;
	color: var(--editorial-header-fg);
	text-transform: none !important;
	text-wrap: balance;
	max-width: 20ch;
}

.upcomer-block--editorial-page-header .editorial-header__accent {
	color: var(--editorial-header-accent);
}

/* ---- Lede ------------------------------------------------------------- */

.upcomer-block--editorial-page-header .editorial-header__lede {
	margin: 0;
	max-width: 70ch;
	font-family: "Barlow", "Helvetica Neue", system-ui, sans-serif;
	font-size: clamp(1.0625rem, 0.875rem + 0.5vw, 1.25rem);
	font-weight: 400;
	line-height: 1.55;
	color: var(--editorial-header-fg-muted);
	text-wrap: pretty;
}

.upcomer-block--editorial-page-header .editorial-header__lede em {
	font-style: italic;
}

.upcomer-block--editorial-page-header .editorial-header__lede strong {
	font-weight: 700;
	color: var(--editorial-header-fg);
}

.upcomer-block--editorial-page-header .editorial-header__lede a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

/* ---- Decorative stripe ------------------------------------------------ */

.upcomer-block--editorial-page-header .editorial-header__stripe {
	display: flex;
	gap: 0.375rem;
	width: clamp(9rem, 26vw, 15rem);
	margin-block-start: clamp(0.25rem, 1vw, 0.75rem);
}

.upcomer-block--editorial-page-header .editorial-header__stripe-seg {
	flex: 1 1 0;
	height: 6px;
	border-radius: 999px;
	/* --stripe-color is set inline by render.php; it resolves to one of the
	   block-scoped --color-* aliases above. Falls back to the accent. */
	background: var(--stripe-color, var(--editorial-header-accent));
}

/* ---- Mobile ----------------------------------------------------------- */

@media (max-width: 640px) {
	.upcomer-block--editorial-page-header {
		padding-block: clamp(1.75rem, 8vw, 2.75rem);
	}

	.upcomer-block--editorial-page-header .editorial-header__headline {
		font-size: clamp(1.75rem, 9vw, 2.5rem);
		max-width: none;
	}
}
