/*
 * Home hero (prototype index.html "page-hero (home variant)", cmc.css §3b + §8 .glow-warm). Pattern cmc/home-hero:
 *
 *   core/group  backing  {"align":"full","className":"section-page-hero is-style-section is-style-home-hero",
 *                         "backgroundColor":"white"}                                   ← this file (and section.css)
 *     core/group  surface {"tagName":"section","className":"is-style-hero"}          the mesh: sections/hero.css
 *       core/group  copy   constrained 730px, left: eyebrow + H1 (heading style "Typewriter")
 *       core/query  .home-latest: the newest statement, as the cream "Latest from the CMC" card
 *
 * Differences from the standard hero (hero.css): taller (max(66.67vh, 600px), 870 from 1024px), 22px under the copy,
 * the arc mark INSET (1225x698 at x=18, y=138 of the 1440x870 canvas) and faded out to the right, and the greige glow
 * bled off the top left (with the white band, over the arc: see below).
 */
.is-style-home-hero > .wp-block-group.is-style-hero {
	min-height: max(66.6667vh, 600px);
	padding-bottom: 22px;
}

@media (width >= 1024px) {
	.is-style-home-hero > .wp-block-group.is-style-hero {
		min-height: max(66.6667vh, 870px);
		padding-bottom: 22px;
	}
}

/* The arc mark, inset: canvas x 1.25%, y 15.862%, 85.069% wide at its own aspect, fading out over its right third.
   (The surface's ::after; hero.css draws the full-bleed version and the white band there.) */
.is-style-home-hero > .wp-block-group.is-style-hero::after {
	top: max(15.862%, 100cqw * 0.15862 * 870 / 1440);
	left: 1.25%;
	width: 85.069%;
	height: auto;
	aspect-ratio: 938.91749 / 629.95349;
	background: url("../../images/cmc-icon-progressive-blur.svg") 0 0 / 100% 100% no-repeat;
	-webkit-mask-image: linear-gradient(to right, #000 65%, transparent 100%);
	mask-image: linear-gradient(to right, #000 65%, transparent 100%);
}

/* Above the arc and under the copy (prototype order: mesh, arc, white band, glow, copy): the white band behind the
   menu (168px, white to clear at 75%) and the glow (a 764px greige circle at 30%, 273px off the left edge), drawn by
   the first child's ::before. It is positioned against the surface (the children are not positioned); the children's
   z-index (they are flex items) stacks them over the surface's own decoration, the card over the glow. */
.is-style-home-hero > .wp-block-group.is-style-hero > * {
	position: static; /* core gives constrained Groups position: relative */
	z-index: 1;
}

.is-style-home-hero > .wp-block-group.is-style-hero > :first-child::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(closest-side, color-mix(in srgb, var(--wp--preset--color--greige) 30%, transparent) 0%, transparent 100%) -273px 0 / 764px 764px no-repeat,
		linear-gradient(180deg, color-mix(in srgb, var(--wp--preset--color--white) 75%, transparent) 0%, transparent 100%) 0 0 / 100% 168px no-repeat;
}

/* The eyebrow wraps to two lines on a phone: as the prototype's inline-flex wrapper it sits on its parent's line by
   its FIRST baseline (an inline-block would use its last, and lose the ~3px the strut puts above it). */
.section-page-hero .is-style-eyebrow-rule {
	display: inline-flex;
	flex-direction: column;
}

/* The latest statement: mt-75, cream card, py-15 pl-20 pr-25; a column below 1024, a row from it. */
.section-page-hero .home-latest {
	margin-top: 75px;
}

.home-latest .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-latest__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 25px;
	padding: 15px 25px 15px 20px;
	border-radius: var(--wp--custom--radius--card);
}

@media (width >= 1024px) {
	.home-latest__card {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.home-latest__info {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

/* "Latest from the CMC": an 8px charcoal dot, 10px before the eyebrow */
.home-latest__label {
	display: flex;
	align-items: center;
	gap: 10px;
}

.home-latest__label::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--charcoal);
}

.home-latest__row {
	display: flex;
	align-items: center;
	gap: 15px;
}

.home-latest .is-style-category-badge {
	flex: none;
	width: 70px;
	height: 70px;
}

.home-latest__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

/* The title links to the statement with the animated underline (prototype .link-rule) */
.home-latest .wp-block-post-title a {
	position: relative;
	display: block;
}

.home-latest .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.35s var(--wp--custom--ease);
}

.home-latest .wp-block-post-title a:is(:hover, :focus-visible)::after {
	transform: scaleX(1);
}

/* "July 2026 • Estimated financial impact: £1.7 billion": date, words and the bound figure run as one line of text */
.home-latest__meta > * {
	display: inline;
}

.home-latest__cta {
	flex: none;
}

@media (prefers-reduced-motion: reduce) {
	.home-latest .wp-block-post-title a::after {
		transition: none;
	}
}
