/*
 * Hero Logo — [lf_hero_logo template="emblem"]
 *
 * Loads after templates/default/style.css (registered as its dependency) and changes only what
 * the emblem layout needs: where the bands are cut, the shield's own layer, the timing, and the
 * area the glint crosses. Box, layers, glint mask, keyframes and reduced motion come from the base.
 *
 * Timeline (ms):  shield 0–1000 · mark 250–1350 · rule 700–1600 · title 1000–1800 · tag 1300–2000
 *                 · glint 1800–3300 after the mask lands
 * Approved preview: https://claude.ai/artifact/JoN7FBSLgskscCwUR5NJ79
 */

/*
 * Wide art: the LV27 "H" lockup, 1600 × 628. Shield x 76–440, full height; text column x 502–1518
 * with wordmark rows 181–344, rule 371–382, title 404–474, tagline 519–543. The shield/text split
 * sits at x 471 (29.44%), the cuts in the gaps at 56.93%, 62.58% and 79.06%. Percentages, so a
 * 2× export of the same art fits too; different art needs new values here.
 */
.lf-hl.lf-hl--emblem {
	--lf-hl-emblem: inset(0 70.56% 0 0);
	--lf-hl-emblem-origin: 15% 50%;
	--lf-hl-mark: inset(0 0 43.07% 29.44%);
	--lf-hl-rule: inset(56.93% 0 37.42% 29.44%);
	--lf-hl-rule-from: inset(56.93% 70.56% 37.42% 29.44%);   /* draws out from the shield's side */
	--lf-hl-title: inset(62.58% 0 20.94% 29.44%);
	--lf-hl-tag: inset(79.06% 0 0 29.44%);
	--lf-hl-glint: polygon(0 0, 100% 0, 100% 56.93%, 29.44% 56.93%, 29.44% 100%, 0 100%);   /* shield + wordmark */
}

/*
 * Phones (Elementor's mobile breakpoint, Shortcodes::PHONE_BREAKPOINT), only when `image_phone`
 * is set (.lf-hl--phone): the stacked lockup, 1200 × 1126, five full-width bands. Shield rows
 * 51–624, wordmark 672–846, rule 875–887, title 911–986, tagline 1044–1069.
 */
@media (max-width: 767px) {
	.lf-hl.lf-hl--emblem.lf-hl--phone {
		width: var(--lf-hl-w-p, var(--lf-hl-w-m, var(--lf-hl-w, 560px)));
		aspect-ratio: var(--lf-hl-ratio-p, 1200 / 1126);
		--lf-hl-emblem: inset(0 0 42.45% 0);
		--lf-hl-emblem-origin: 50% 30%;
		--lf-hl-mark: inset(57.55% 0 23.58% 0);
		--lf-hl-rule: inset(76.42% 0 20.16% 0);
		--lf-hl-rule-from: inset(76.42% 50% 20.16% 50%);   /* centred rule: draws out from the middle */
		--lf-hl-title: inset(79.84% 0 9.86% 0);
		--lf-hl-tag: inset(90.14% 0 0 0);
		--lf-hl-glint: inset(0 0 23.58% 0);
	}
}

/* The <picture> wrappers drop out of layout, so each <img> still sits absolutely in .lf-hl. */
.lf-hl.lf-hl--emblem picture { display: contents; }

.lf-hl--emblem .lf-hl__emblem {
	clip-path: var(--lf-hl-emblem);
	transform-origin: var(--lf-hl-emblem-origin);
}

.lf-hl--emblem .lf-hl__sheen { clip-path: var(--lf-hl-glint); }

/* Motion only when allowed: under reduced motion the base's plain fade applies to all five layers. */
@media (prefers-reduced-motion: no-preference) {
	.lf-hl--emblem .lf-hl__emblem { animation: lf-hl-emblem 1000ms var(--lf-hl-ease-out) 0ms backwards; }
	.lf-hl--emblem .lf-hl__mark   { animation-delay: 250ms; }
	.lf-hl--emblem .lf-hl__rule   { animation-delay: 700ms; }
	.lf-hl--emblem .lf-hl__title  { animation-delay: 1000ms; }
	.lf-hl--emblem .lf-hl__tag    { animation-delay: 1300ms; }
	.lf-hl--emblem.lf-hl--masked .lf-hl__sheen::before { animation-duration: 1500ms; animation-delay: 1800ms; }
}

@keyframes lf-hl-emblem { from { opacity: 0; filter: blur(8px); transform: scale(.9); } }
