/* PrettyWellFit Elements — Hero Scroll Video
   Structure:
   .pwf-hero            tall scroll track (height from Elementor control)
   .pwf-hero__sticky    pinned viewport
     .pwf-hero__video   full-bleed cover video, scroll-scrubbed
     .pwf-hero__intro   logo + tagline (load fade-in, scrolls away)
     .pwf-hero__arch    transparent arch; giant box-shadow paints the surround
     .pwf-hero__end     end-state content layer
*/

.pwf-hero {
	position: relative;
	width: 100%;
	--pwf-surround: #231812;
	--pwf-intro: 0;
	--pwf-intro-y: 12px;
}

.pwf-hero__sticky {
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	background: var(--pwf-surround);
}

.pwf-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/* ---------- intro (logo + tagline) ---------- */

.pwf-hero__intro {
	position: absolute;
	inset: 0;
	pointer-events: auto;
	opacity: var(--pwf-intro);
	transform: translateY(var(--pwf-intro-y));
	will-change: opacity, transform;
}

.pwf-hero.is-intro-gone .pwf-hero__intro {
	pointer-events: none;
}

/* The nested intro-frame container fills the layer, whatever Elementor
   generation produced it. */
.pwf-hero__intro > * {
	height: 100%;
	max-width: none;
}

/* ---------- arch overlay ----------
   .pwf-hero__arch is an invisible measuring element: the Elementor width and
   height controls target it, and the script reads its size as the resting
   opening. The visible surround is the SVG below it: one evenodd path, outer
   rect plus an inner arch subpath that reads as a hole. The script rewrites
   the path each frame, so nothing is ever painted or rasterized beyond the
   viewport and scrub direction cannot change the result. */

.pwf-hero__arch {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	visibility: hidden;
	pointer-events: none;
}

.pwf-hero__mask {
	position: absolute;
	left: -200px;
	top: -200px;
	width: calc(100% + 400px);
	height: calc(100% + 400px);
	display: none;
	pointer-events: none;
}

.pwf-hero.is-arch .pwf-hero__mask {
	display: block;
}

.pwf-hero__mask-path {
	fill: var(--pwf-surround);
}

/* ---------- end-state content ---------- */

.pwf-hero__end {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.pwf-hero.is-live .pwf-hero__end {
	pointer-events: auto;
}

/* Each end-frame element owns its reveal. Duration and delay come from the
   per-element Entrance controls as inline styles; the trigger adds
   .is-revealed once the journey crosses the threshold. Motion uses the
   independent `translate` property so it can never collide with the
   positioning transforms (headline centering, side label centering).
   Reversing back across the threshold fades out quickly and uniformly. */

.pwf-hero__reveal {
	opacity: 0;
	translate: 0 24px;
	transition-property: opacity, translate;
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.pwf-hero__reveal.sw-anim--fade-in {
	translate: 0 0;
}

.pwf-hero__reveal.sw-anim--instant {
	transition-duration: 0ms !important;
	transition-delay: 0ms !important;
}

.pwf-hero.is-revealed .pwf-hero__reveal {
	opacity: 1;
	translate: 0 0;
}

.pwf-hero.is-unrevealing .pwf-hero__reveal {
	transition-duration: 300ms !important;
	transition-delay: 0ms !important;
}

/* Composed end frame (Frames item 2): a nested container replacing the
   built-in end fields. Fills the layer, arrives as one unit on the same
   trigger classes, and hands per-child staggering to PWF Entrance
   (owner block in entrance.css). Reversing rides the fast uniform fade. */

.pwf-hero__end--composed {
	opacity: 0;
	translate: 0 24px;
	transition-property: opacity, translate;
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
	transition-duration: 900ms;
}

.pwf-hero.is-revealed .pwf-hero__end--composed {
	opacity: 1;
	translate: 0 0;
}

.pwf-hero.is-unrevealing .pwf-hero__end--composed {
	transition-duration: 300ms !important;
	transition-delay: 0ms !important;
}

.pwf-hero__end--composed > * {
	height: 100%;
	max-width: none;
}

.pwf-hero__headline {
	position: absolute;
	top: 7vh;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	width: min(90vw, 46rem);
	text-align: center;
	font-size: 2.6rem;
	line-height: 1.2;
	font-weight: 400;
}

.pwf-hero__headline em {
	font-style: italic;
}

.pwf-hero__side {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.7rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
}

.pwf-hero__side--left {
	left: 4vw;
}

.pwf-hero__side--right {
	right: 4vw;
}

.pwf-hero__footer {
	position: absolute;
	bottom: 5vh;
	left: 50%;
	transform: translateX(-50%);
	width: min(88vw, 34rem);
	text-align: center;
}

.pwf-hero__kicker {
	font-size: 0.85rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	margin-bottom: 0.75rem;
}

.pwf-hero__body {
	font-size: 0.95rem;
	line-height: 1.65;
}

.pwf-hero__cta {
	position: absolute;
	right: 4vw;
	bottom: 7vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	border: 1px solid currentColor;
	border-radius: 50%;
	text-align: center;
	text-decoration: none;
	font-size: 0.7rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	line-height: 1.5;
	padding: 1rem;
	transition: opacity 0.3s ease;
}

.pwf-hero__cta:hover {
	opacity: 0.75;
}

.pwf-hero__cta-label {
	max-width: 8em;
}

.pwf-hero__cta-arrow {
	font-size: 1.1rem;
	letter-spacing: 0;
}

/* ---------- small screens ---------- */

@media (max-width: 767px) {
	.pwf-hero__side {
		display: none;
	}
	.pwf-hero__headline {
		font-size: 1.7rem;
		top: 6vh;
	}
	.pwf-hero__cta {
		position: absolute;
		right: 50%;
		transform: translateX(50%);
		bottom: 3vh;
	}
	.pwf-hero__footer {
		bottom: 30vh;
	}
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.pwf-hero__intro,
	.pwf-hero__end {
		transition: none;
	}
}

/* ---------- Elementor editor preview ----------
   No scrolling in the canvas, so show a composed static state: video frame,
   arch at rest, end content visible, intro dimmed above the headline. */

.elementor-editor-active .pwf-hero {
	height: auto !important;
	min-height: 100vh;
}

.elementor-editor-active .pwf-hero .pwf-hero__mask {
	display: block;
}

.elementor-editor-active .pwf-hero {
	--pwf-intro: 1;
	--pwf-intro-y: 0;
}

/* Editor, narrative order: the Intro Frame is a labeled block at the
   top, and BELOW it the video, arch, and mask pin to a viewport-height
   stage with the End Frame overlaid — composed inside the arch exactly
   as it renders at scroll-end live. The stage anchors to the bottom of
   the sticky shell; the intro's bottom padding reserves it. The end
   child stacks above the arch and mask, which sit later in the DOM. */
.elementor-editor-active .pwf-hero .pwf-hero__sticky {
	position: relative;
	height: auto;
	min-height: 100vh;
	overflow: visible;
}

.elementor-editor-active .pwf-hero .pwf-hero__mask {
	top: auto;
	bottom: 0;
	height: 100vh;
}

/* The video is a viewport-height sticky layer, exactly like the live
   page: correct cover scale, holding the screen behind whichever band
   the canvas is scrolled to — frame one behind the intro, and through
   the arch below. */
.elementor-editor-active .pwf-hero {
	overflow: visible;
}

.elementor-editor-active .pwf-hero .pwf-hero__video {
	position: sticky;
	top: 0;
	bottom: auto;
	height: 100vh;
	width: 100%;
	display: block;
	margin-bottom: -100vh;
}

/* The arch is a control-sized measurement proxy: its width and height
   must stay the controls' to keep those previews live. Only its anchor
   moves — centered within the bottom viewport-height band. */
.elementor-editor-active .pwf-hero .pwf-hero__arch {
	top: auto;
	bottom: 50vh;
	transform: translate(-50%, 50%);
}

.elementor-editor-active .pwf-hero .pwf-hero__intro {
	/* Relative with a z-index lifts the whole placeholder — and the end
	   child inside it — above the arch and mask, and anchors the end
	   child's absolute box to the placeholder itself. */
	position: relative;
	z-index: 6;
	display: block;
	opacity: 1;
	transform: none;
	will-change: auto;
	pointer-events: auto;
	padding-bottom: 100vh;
}

/* Intro Frame: labeled block in flow at the top, full viewport height —
   exactly the screen it occupies live over the opening video. */
.elementor-editor-active .pwf-hero .pwf-hero__intro::before {
	content: 'INTRO FRAME';
	display: block;
	padding: 10px 10px 6px;
	font-size: 10px;
	letter-spacing: 0.2em;
	opacity: 0.5;
}

.elementor-editor-active .pwf-hero .pwf-hero__intro > :nth-child(1 of .e-con) {
	min-height: 100vh;
	outline: 1px dashed rgba(255, 255, 255, 0.25);
	outline-offset: -1px;
}

/* End Frame: overlaid on the masked stage, above the arch and mask. */
.elementor-editor-active .pwf-hero .pwf-hero__intro > :nth-last-child(1 of .e-con) {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	top: auto;
	height: 100vh;
	overflow: hidden;
	z-index: 6;
}

.elementor-editor-active .pwf-hero .pwf-hero__reveal {
	opacity: 1;
	translate: none;
	transition: none;
}

