/* -------------------------------------------------------------------------
 * futudesign - AEO support styles
 *
 * HAND-WRITTEN. Deliberately NOT part of the webpack build.
 * package.json is from Nov 2022, node_modules is absent, and local Node is
 * v24 - a fresh install would resolve different transitive versions and emit
 * new content hashes, changing the asset URL on every page of the site.
 * This file is enqueued after main.css so it always wins on equal specificity.
 * ---------------------------------------------------------------------- */


/* 1. H1 PARITY -------------------------------------------------------------
 * single-project.php now wraps the project title in <h1> instead of <h2>,
 * so 83 pages finally have a top-level heading.
 *
 * The compiled stylesheet (dist/main.c1cd17.css) contains NO font rule for
 * h1 at all - its only h1 declaration is `h1,h2,h3,p { max-width: 800px }`.
 * Left alone, the swap would visibly change every project page:
 *   font-size  2.2em -> 2em   (browser default; it GROWS on mobile, where
 *                              the h2 rule steps down to 1.8em)
 *   margin     0.83em 0 -> 0.67em 0   (UA default for h1 vs h2)
 *
 * These values are copied verbatim from the compiled h2 rules, not guessed,
 * so the rendered result is byte-identical. Proven by pixel diff.
 * ---------------------------------------------------------------------- */

main article > h1 {
	max-width: 800px;
	margin: 0.83em 0;
	font-size: 2.2em;
	font-weight: 700;
}

@media (max-width: 600px) {
	main article > h1 {
		font-size: 2em;
	}
}

@media (max-width: 500px) {
	main article > h1 {
		font-size: 1.8em;
	}
}


/* 2. SCREEN-READER-ONLY ----------------------------------------------------
 * Used for the single <h1> on the front page and taxonomy archives, which
 * currently have no heading at all.
 *
 * This is the standard accessibility pattern (WordPress core ships the same
 * rule as .screen-reader-text). It is NOT hidden-text spam: the heading
 * truthfully describes the page, and a page with no h1 is a genuine WCAG
 * failure. White-on-white text was considered and rejected - it is named
 * directly in Google's spam policies.
 * ---------------------------------------------------------------------- */

.futu-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
