/**
 * .section-hero entry sequence (assets/js/hero-title.js).
 *
 * Early head script adds .aps-hero-pending before paint so hero content stays
 * hidden until JS arms .aps-hero-js — avoids visible → hidden flash.
 * Without JS, content stays fully visible.
 *
 * SplitText wrappers need line-height: inherit (theme nested heading rule uses
 * line-height: 1). keepSplit leaves wrappers in the DOM permanently.
 */

html.aps-hero-pending .section-hero h1,
html.aps-hero-pending .section-hero .aps-hero-fade:not( .is-revealed ),
html.aps-hero-pending .section-hero p:not( .is-revealed ),
html.aps-hero-pending .section-hero .wp-block-paragraph:not( .is-revealed ),
html.aps-hero-pending .section-hero h2:not( .is-revealed ),
html.aps-hero-pending .section-hero h3:not( .is-revealed ),
html.aps-hero-pending .section-hero h4:not( .is-revealed ),
html.aps-hero-pending .section-hero h5:not( .is-revealed ),
html.aps-hero-pending .section-hero h6:not( .is-revealed ) {
	opacity: 0;
}

html.aps-hero-js .section-hero .aps-hero-fade {
	--aps-hero-fade-duration: var( --wp--custom--motion--duration--reveal );
	--aps-hero-fade-easing: var( --wp--custom--motion--easing--out );
	transition: opacity var( --aps-hero-fade-duration ) var( --aps-hero-fade-easing );
}

html.aps-hero-js .section-hero .aps-hero-fade:not( .is-revealed ) {
	opacity: 0;
}

html.aps-hero-js .section-hero .aps-hero-fade.is-revealed {
	opacity: 1;
}

.section-hero .aps-hero-word,
.section-hero .aps-hero-char {
	line-height: inherit;
	font-kerning: none;
	font-variant-ligatures: none;
}

@media ( prefers-reduced-motion: reduce ) {
	html.aps-hero-pending .section-hero h1,
	html.aps-hero-pending .section-hero .aps-hero-fade:not( .is-revealed ),
	html.aps-hero-pending .section-hero p:not( .is-revealed ),
	html.aps-hero-pending .section-hero .wp-block-paragraph:not( .is-revealed ),
	html.aps-hero-pending .section-hero h2:not( .is-revealed ),
	html.aps-hero-pending .section-hero h3:not( .is-revealed ),
	html.aps-hero-pending .section-hero h4:not( .is-revealed ),
	html.aps-hero-pending .section-hero h5:not( .is-revealed ),
	html.aps-hero-pending .section-hero h6:not( .is-revealed ),
	html.aps-hero-js .section-hero .aps-hero-fade:not( .is-revealed ),
	html.aps-hero-js .section-hero .aps-hero-fade.is-revealed {
		opacity: 1 !important;
		transition: none !important;
	}
}

@media print {
	html.aps-hero-pending .section-hero h1,
	html.aps-hero-pending .section-hero .aps-hero-fade:not( .is-revealed ),
	html.aps-hero-pending .section-hero p:not( .is-revealed ),
	html.aps-hero-pending .section-hero .wp-block-paragraph:not( .is-revealed ),
	html.aps-hero-pending .section-hero h2:not( .is-revealed ),
	html.aps-hero-pending .section-hero h3:not( .is-revealed ),
	html.aps-hero-pending .section-hero h4:not( .is-revealed ),
	html.aps-hero-pending .section-hero h5:not( .is-revealed ),
	html.aps-hero-pending .section-hero h6:not( .is-revealed ),
	html.aps-hero-js .section-hero .aps-hero-fade:not( .is-revealed ),
	html.aps-hero-js .section-hero .aps-hero-fade.is-revealed {
		opacity: 1 !important;
		transition: none !important;
	}
}
