/**
 * Group Header Motion — front-end positioning.
 *
 * Classes emitted by extension.php on the <header> group. Front-end only (no
 * scroll state in the editor); owns the hide/reveal transform + transition.
 */

/* No resting transform — it makes the header the containing block for its fixed
   descendants (dropdowns/mega-menus land off-screen); applied only when hidden. */
.le-hm {
	top: var( --le-hm-top-offset, 0px );
	transition: transform 0.32s ease;
}

/* Offset added to -100% so a header with a top offset fully clears the top edge. */
.le-hm-hidden {
	transform: translateY( calc( -100% - var( --le-hm-top-offset, 0px ) ) );
}

/* Content offset (body space below the fixed header) is set by extension.php + view.js, not here. */

/* Keep the fixed header clear of the WordPress admin bar for logged-in users. */
.admin-bar .le-hm {
	top: calc( var( --le-hm-top-offset, 0px ) + 32px );
}

@media screen and ( max-width: 782px ) {
	.admin-bar .le-hm {
		top: calc( var( --le-hm-top-offset, 0px ) + 46px );
	}
}

/* Reduced-motion: the header still repositions, just no slide animation. */
@media ( prefers-reduced-motion: reduce ) {
	.le-hm {
		transition: none;
	}
}
