/* ──────────────────────────────────────────────────────────────────────────
   Article Hero block
   Nav + back link + two-column row: featured image (left) + text column.
   Text column: category pill + date, h1 title (full, never clamped),
   excerpt (line-clamp 2), author block + share/download actions.
   Tokens only — no raw hex.
   ────────────────────────────────────────────────────────────────────────── */

.uw-ah {
	position: relative;
}

/* ── Colour variants ── */
.uw-ah--navy {
	background: var(--wp--preset--color--deep-navy);
	color: var(--wp--preset--color--white);
}
.uw-ah--icy {
	background: var(--wp--preset--color--icy-blue);
	color: var(--wp--preset--color--deep-navy);
}
.uw-ah--blue {
	background: var(--wp--preset--color--cobalt-blue);
	color: var(--wp--preset--color--white);
}

/* Nav is fixed (site-nav.css); this hero's own top padding reserves the
   space it used to take up in normal flow. The nav is hoisted out of <main>
   (inc/site-nav.php), so it is no longer inside .uw-ah: target the modifier
   class the hero passes instead of the hero as ancestor. */
.uw-nav--ah .uw-nav__inner { padding-left: 0; padding-right: 0; }

/* ── Outer wrapper ── */
.uw-ah__inner {
	padding-top: var(--uw-nav-height);
	padding-bottom: clamp(48px, 6vw, 96px);
	display: flex;
	flex-direction: column;
	gap: clamp(1.25rem, 2.5vw, 2rem);
}

/* ── Back link ── */
.uw-ah__back {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: clamp(1.25rem, 2.5vw, 2rem);
	font-family: var(--wp--preset--font-family--pp-mori);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.01em;
	text-decoration: none;
}
.uw-ah__back--no-link {
	cursor: default;
}
.uw-ah--navy .uw-ah__back,
.uw-ah--blue .uw-ah__back  { color: var(--wp--preset--color--white); }
.uw-ah--icy .uw-ah__back { color: var(--wp--preset--color--deep-navy); }

.uw-ah__back-arrow {
	width: 20px;
	height: 20px;
	flex: none;
	display: block;
}

/* ── Two-column row ── */
.uw-ah__row {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: clamp(2rem, 5vw, 4rem);
}

/* ── Image column ── */
.uw-ah__figure {
	margin: 0;
	flex: 0 0 clamp(280px, 38vw, 594px);
	width: clamp(280px, 38vw, 594px);
	aspect-ratio: 594 / 660;
	border-radius: 12px;
	overflow: hidden;
}
.uw-ah__img,
.uw-ah__figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.uw-ah__img-placeholder {
	width: 100%;
	height: 100%;
	background: color-mix(in srgb, var(--wp--preset--color--white) 12%, transparent);
}

/* ── Text / content column ── */
.uw-ah__content {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
/* Top group carries the 8px white bar (border-top). */
.uw-ah__main {
	display: flex;
	flex-direction: column;
	gap: clamp(1.25rem, 2vw, 30px);
	padding-top: clamp(1.5rem, 3vw, 40px);
	border-top: 8px solid;
}
.uw-ah--navy .uw-ah__main,
.uw-ah--blue .uw-ah__main  { border-color: var(--wp--preset--color--white); }
.uw-ah--icy .uw-ah__main { border-color: var(--wp--preset--color--deep-navy); }

/* ── Meta top: category pill + date ── */
.uw-ah__meta-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/* Category tag — red rectangle, white text. */
.uw-ah__category {
	display: inline-flex;
	align-items: center;
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--wp--preset--color--red);
	color: var(--wp--preset--color--white) !important;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

/* Date. */
.uw-ah__date {
	font-family: var(--wp--preset--font-family--pp-mori);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: -0.01em;
	white-space: nowrap;
}
.uw-ah--navy .uw-ah__date,
.uw-ah--blue .uw-ah__date  { color: color-mix(in srgb, var(--wp--preset--color--white) 70%, transparent); }
.uw-ah--icy .uw-ah__date { color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 65%, transparent); }

/* ── Title ── */
.uw-ah__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	line-height: 0.96;
	letter-spacing: -0.02em;
	text-wrap: balance;
}
.uw-ah--large .uw-ah__title { font-size: clamp(44px, 6.8vw, var(--wp--preset--font-size--heading-1)); line-height: 0.9; letter-spacing: -2px; }
.uw-ah--small .uw-ah__title { font-size: clamp(30px, 4.2vw, 64px); }

.uw-ah--navy .uw-ah__title  { color: var(--wp--preset--color--white); }
.uw-ah--blue .uw-ah__title  { color: var(--wp--preset--color--white); }
.uw-ah--icy .uw-ah__title { color: var(--wp--preset--color--deep-navy); }

/* ── Meta bottom: author + actions ── */
.uw-ah__meta-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: auto;
}

/* Author. */
.uw-ah__author {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.uw-ah__author-name {
	font-family: var(--wp--preset--font-family--pp-mori);
	font-size: 16px;
	font-weight: 600;
	line-height: 0.9;
}
/* Inline path: ACF wraps the inner-block region in a div, which would become the
   flex child of .uw-ah__author in place of the role line - the name and role would
   no longer share the column's 0.5rem gap. display:contents dissolves it, and the
   editor nests the blocks one level deeper again, so those wrappers get the same
   treatment. The paragraph also arrives with the editor's default block margin,
   which the column gap already provides. */
.uw-ah__flow,
.uw-ah__flow > .block-editor-inner-blocks,
.uw-ah__flow > .block-editor-inner-blocks > .block-editor-block-list__layout { display: contents; }
.uw-ah__author > p.uw-ah__author-role { margin-block: 0; }
/* An untouched or emptied placeholder serializes as an empty element, which would
   otherwise render as a blank line under every byline and consume the column's
   0.5rem gap - the legacy markup emitted nothing at all when the role was blank.
   The editor canvas keeps it visible so there is something to click. */
p.uw-ah__author-role:empty:not([contenteditable]) { display: none; }

.uw-ah__author-role {
	font-family: var(--wp--preset--font-family--pp-mori);
	font-size: 16px;
	font-weight: 400;
	line-height: 0.9;
}
.uw-ah--navy .uw-ah__author-name,
.uw-ah--blue .uw-ah__author-name   { color: var(--wp--preset--color--white); }
.uw-ah--icy .uw-ah__author-name  { color: var(--wp--preset--color--deep-navy); }
.uw-ah--navy .uw-ah__author-role,
.uw-ah--blue .uw-ah__author-role   { color: color-mix(in srgb, var(--wp--preset--color--white) 65%, transparent); }
.uw-ah--icy .uw-ah__author-role  { color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 60%, transparent); }

/* ── Action buttons ── */
.uw-ah__actions {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	flex-wrap: wrap;
}

/* Shared rectangle button shell — 140×52, text left, icon right. */
.uw-ah__share,
.uw-ah__download {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	width: 140px;
	height: 52px;
	padding: 16px 20px;
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--test-national-2-condensed);
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	border: 1px solid transparent;
	background: transparent;
	text-decoration: none;
	white-space: nowrap;
}
.uw-ah__btn-icon {
	width: 18px;
	height: 18px;
	flex: none;
	display: block;
}

/* Share + Download — solid outline. */
.uw-ah--navy .uw-ah__share,
.uw-ah--blue .uw-ah__share,
.uw-ah--navy .uw-ah__download,
.uw-ah--blue .uw-ah__download {
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--white);
}
.uw-ah--icy .uw-ah__share,
.uw-ah--icy .uw-ah__download {
	border-color: var(--wp--preset--color--deep-navy);
	color: var(--wp--preset--color--deep-navy);
}

/* Hover states. */
.uw-ah--navy .uw-ah__share:hover,
.uw-ah--navy .uw-ah__download:hover,
.uw-ah--blue .uw-ah__share:hover,
.uw-ah--blue .uw-ah__download:hover {
	background: color-mix(in srgb, var(--wp--preset--color--white) 12%, transparent);
}
.uw-ah--icy .uw-ah__share:hover,
.uw-ah--icy .uw-ah__download:hover {
	background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 8%, transparent);
}

/* ── Mobile ── */
@media (max-width: 781px) {
	.uw-ah__row {
		flex-direction: column;
		align-items: flex-start;
		gap: 2rem;
	}
	.uw-ah__figure {
		flex: none;
		width: 100%;
		aspect-ratio: 4 / 3;
	}
	.uw-ah--large .uw-ah__title { font-size: clamp(32px, 12vw, 56px); }
	.uw-ah--small .uw-ah__title { font-size: clamp(24px, 9vw, 42px); }
	.uw-ah__meta-bottom { flex-direction: column; align-items: flex-start; }
}
