/*
 * 4D Box Roll (fd-box-roll) v1.0.0
 * Original code by 4D WebDesign. Inspired by the "box roll" hero idea, not copied from any theme.
 *
 * Add the CSS class  fd-box-roll  to the FIRST container on a page (Advanced > CSS Classes).
 * The hero fills the screen. The first scroll "rolls" it away like the face of a cube,
 * and the rest of the page rolls up into view. Scrolling back to the top rolls it back.
 *
 * Nothing here applies until the script adds "fd-br-on" to <html>, so the Elementor
 * editor and visitors without JavaScript just see a normal page.
 */

/* The hero becomes a full-screen layer that sits over the page. */
html.fd-br-on .fd-br-hero {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	max-width: none !important;
	height: 100vh !important;
	height: 100dvh !important;
	min-height: 0 !important;
	margin: 0 !important;
	z-index: var(--fd-br-z, 40);
	will-change: transform;
}

/* While the hero is showing (or rolling), the page itself must not scroll. */
html.fd-br-locked,
html.fd-br-locked body {
	overflow: hidden !important;
	overscroll-behavior: none;
}

/* Colour seen around the "cube" while it turns. */
html.fd-br-anim body {
	background-color: var(--fd-br-bg, #111) !important;
}

/* Wrapper the script puts around everything below the hero. */
html.fd-br-on .fd-br-rest {
	position: relative;
}
