/*
 * HCM Build on WordPress: the few rules the block markup needs on top of the
 * PHP site's own /assets/css/site.css, which is served UNCHANGED (the parity
 * gate compares it byte for byte with the source).
 *
 * Sections are stored as core/group blocks carrying the source's own classes
 * (section, wrap, section-head, factors, steps ...), so site.css styles them as
 * before. What WordPress adds is a wp-block-* / is-layout-* class on each block,
 * none of which site.css targets, and the site kit removes the core block and
 * global-styles CSS on the front end.
 */

/* A step's number is kept as raw HTML inside its block, exactly as the source
   wrote it; nothing to adjust. */

/*
 * PHONES SHOW THE FULL LOGO, slogan included (client request, 23 October 2026).
 *
 * site.css drew the wordmark-only crop below 37.5rem, because the phone bar
 * also carried the "Discuss a Project" button and left the logo 68-106px wide
 * (its measured budget, site.css "MEASURED, not guessed"). The lockup is
 * 3.48:1 with its slogan at 14% of the height, so it needs ~160px to keep
 * the slogan readable. Below 37.5rem the header button therefore goes -- the
 * same action stays in the hero, the menu panel and the floating dock -- and
 * the bar becomes logo + menu button:
 *
 *     free for the logo = bar inner - menu button - gap
 *     320px   275 - 44 - 16 = 215px     160px used
 *     390px   342 - 44 - 16 = 282px     160px used
 *
 * 2.875rem tall fits the compact bar too (3.75rem, less the logo link's
 * 0.35rem padding top and bottom). The file is 650px wide: ~4x its drawn size.
 * From 37.5rem nothing changes.
 */
@media (max-width: 37.49rem) {
	.site-header__actions > .btn {
		display: none;
	}

	.site-header__logo img {
		height: 2.875rem;
	}
}

/*
 * /projects/ SECTIONS (23 October 2026): every project card keeps the column
 * width, even alone in its row. site.css stretches a lone card in a .grid--3
 * to 34rem -- right for the single founder link on /about/, but in a section
 * whose rows hold one or two cards it made a lone portrait card (Huddington)
 * far bigger than its neighbours' (Hillview, Jalan Leban).
 */
.project-grid > :only-child {
	grid-column: auto;
	max-width: none;
}

/*
 * An artist's impression in the home hero (23 Oct 2026: the Berwick Road crop).
 * site.css sets position: static only for a placeholder or stock figure there; a
 * render's figure stayed position: relative, so its caption anchored to the
 * 16:9 image (1440 x 810 at 1440 px) instead of the 736 px hero -- measured below
 * the hero's bottom edge, i.e. clipped -- and on phones it sat over the eyebrow.
 * Static, the caption takes the same bottom-right place as the placeholder's.
 */
.hero .media--render {
	position: static;
}

/*
 * The home hero as a line illustration (26 Oct 2026, client: the navy "blueprint" house drawing,
 * docs/HCM-CLAUDE-CLIENT-AMENDMENTS-2026-10-25.md A09). views/pages/home.php adds .hero--illustration
 * when the hero image's recorded source is ai-generated. The drawing is white linework on its own
 * uniform navy (#002f62), made for a dark ground: so it is shown WHOLE (sized to the hero, not
 * cropped), UNDIMMED, on the right, on a hero painted in that same navy so its edges disappear. Its
 * left and bottom edges, where the trees and ground lines run off the artwork, fade out with a mask.
 * From 64rem the drawing stands beside the text, undimmed, with a left-to-right scrim. Narrower, the
 * text runs across the drawing, so there it is a dimmed background under a bottom-up scrim (as every
 * hero image was before), measured readable at 320/390/768. The caption keeps its bottom-right place.
 *
 * 28 Oct 2026 (owner): the drawing no longer runs to the screen's right edge. Its right edge, and its
 * caption's, line up with the header's content edge -- the right edge of "Discuss a Project" on desktop,
 * of the menu button on phones: the .wrap's centred max-width plus its gutter (site.css .wrap), repeated
 * here because the drawing is positioned in the full-width hero, not in a .wrap. Opacity 60% at every
 * width, and the heading gets a navy text-shadow to stay crisp where it now runs over the linework.
 *
 * 28 Oct 2026 (client, later): the hero is the header's navy (--navy, #0d345c), not the drawing's own darker
 * #002f62. The drawing keeps its baked-in navy, so it is blended with `lighten`: per colour channel the lighter
 * value wins, which turns its navy into the hero's (measured within 4 levels) and leaves the white linework as it
 * was -- no visible rectangle at its hard top and right edges. The scrims use the same navy.
 */
.hero--illustration {
	--hcm-hero-edge: calc(max(0px, (100% - var(--wrap)) / 2) + clamp(1.25rem, 1rem + 2vw, 3.5rem));
	background: var(--navy);
}
.hero h1 {
	text-shadow: 0px 1px 6px rgba(0, 47, 98, 1);
}
.hero--illustration .hero__media figcaption {
	right: var(--hcm-hero-edge);
}
.hero--illustration .hero__media img {
	position: absolute;
	top: 0;
	right: var(--hcm-hero-edge);
	width: min(100%, 36rem);
	height: auto;
	max-width: none;
	object-fit: contain;
	opacity: 0.6;
	mix-blend-mode: lighten;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%), linear-gradient(to top, transparent 0, #000 12%);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(to right, transparent 0, #000 16%), linear-gradient(to top, transparent 0, #000 12%);
	mask-composite: intersect;
}
.hero--illustration .hero__media::after {
	background:
		linear-gradient(to top, rgba(13, 52, 92, 0.94) 0%, rgba(13, 52, 92, 0.8) 55%, rgba(13, 52, 92, 0.3) 100%);
}
@media (min-width: 64rem) {
	.hero--illustration .hero__media img {
		width: auto;
		height: 100%;
		opacity: 0.6;
	}
	.hero--illustration .hero__media::after {
		background:
			linear-gradient(to right, rgba(13, 52, 92, 0.92) 0%, rgba(13, 52, 92, 0.72) 38%, rgba(13, 52, 92, 0) 62%);
	}
}

/*
 * The policy pages (24 Oct 2026): one long prose column with a heading per clause.
 * .prose spaces siblings by --space-sm, which runs a heading into the paragraph
 * before it; a clause heading needs a clear break above it. Scoped to .policy so
 * no other prose (articles, project stories) moves.
 */
.callout + .policy { margin-top: var(--space-lg); }
.policy > h2 {
	font-size: var(--step-2);
	margin-top: var(--space-lg);
}
.policy > h2:first-child { margin-top: 0; }

/*
 * Home band 02, the brand statement (24 Oct 2026, client): "Plan", "Build", "Legacy" in navy;
 * "Today.", "Tomorrow.", "Forever." in gold (the brand bronze). views/pages/home.php wraps the
 * first word of each line in .brand-statement__lead and the rest in .brand-statement__accent.
 * site.css styles EVERY span in the lines (display: block on phones, staircase padding by
 * nth-child, the whole third line in bronze), so the inner spans are reset here with selectors
 * that outrank those rules.
 */
.brand-statement .brand-statement__lines span > .brand-statement__lead,
.brand-statement .brand-statement__lines span > .brand-statement__accent {
	display: inline;
	padding-left: 0;
}
.brand-statement .brand-statement__lines span > .brand-statement__lead { color: var(--navy); }
.brand-statement .brand-statement__lines span > .brand-statement__accent { color: var(--accent); }

/* The block editor's own wrapper: keep the site's measure readable while editing. */
.editor-styles-wrapper .wrap {
	max-width: 80rem;
	margin-inline: auto;
}

/*
 * Footer logos (29 Oct 2026, client). A mark or award with AVIF/WebP siblings is a <picture> (functions.php
 * hcm_footer_logos); the <img> inside keeps the 60 px rule from site.css. The award logos form a second row under
 * the marks: larger, because their artwork carries small lettering, with the whole logo always shown (contain). A
 * row marked "Light backing" in Site settings gets a small ivory card -- for dark lettering that would be lost on the
 * navy (SME 500). Artwork made for dark grounds (Golden Bull) sits on the navy like the marks. Nothing here touches
 * the marks' own row: the transparent bizSAFE STAR has no card, so no white box.
 */
.site-footer__accreditations picture,
.site-footer__award picture {
	display: block;
}
.site-footer__awards {
	margin-top: var(--space-md);
	max-width: 32rem;
}
.site-footer__awards-label {
	font-family: var(--font-body);
	font-size: var(--step--2);
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-on-dark-muted);
	margin: 0 0 var(--space-xs);
}
.site-footer__awards-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-sm) var(--space-md);
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-footer__award img {
	display: block;
	height: 104px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}
.site-footer__award--light {
	background: var(--ivory);
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
}
.site-footer__award--light img {
	height: 88px; /* with the card's padding, the same 104 px row height as an award without one */
}
@media (max-width: 30rem) {
	.site-footer__awards-label { text-align: center; }
	.site-footer__awards-list { justify-content: center; }
	.site-footer__award img { height: 88px; }
	.site-footer__award--light img { height: 72px; }
}
