/*!
 * JS Academy — Motion layer styles
 * Initial states only apply once JS is confirmed (html.jsa-motion-ready), so
 * content is never hidden if JavaScript fails.
 */

/* ---------------- fx-reveal ---------------- */
.jsa-motion-ready .fx-reveal {
	opacity: 0;
	transition: opacity .9s cubic-bezier(.22, 1, .36, 1), transform .9s cubic-bezier(.22, 1, .36, 1), filter .9s ease;
	will-change: opacity, transform;
}
.jsa-motion-ready .fx-reveal.fx-up { transform: translate3d(0, 40px, 0); }
.jsa-motion-ready .fx-reveal.fx-down { transform: translate3d(0, -40px, 0); }
.jsa-motion-ready .fx-reveal.fx-left { transform: translate3d(-48px, 0, 0); }
.jsa-motion-ready .fx-reveal.fx-right { transform: translate3d(48px, 0, 0); }
.jsa-motion-ready .fx-reveal.fx-scale { transform: scale(.94); }
.jsa-motion-ready .fx-reveal.fx-blur { filter: blur(10px); }
/* default (no modifier) = subtle rise */
.jsa-motion-ready .fx-reveal:not(.fx-down):not(.fx-left):not(.fx-right):not(.fx-scale) { transform: translate3d(0, 28px, 0); }

.jsa-motion-ready .fx-reveal.is-inview {
	opacity: 1;
	transform: none;
	filter: none;
}

/* ---------------- fx-marquee ---------------- */
.fx-marquee {
	overflow: hidden;
	width: 100%;
	white-space: nowrap;
}
.fx-marquee__track {
	display: flex;
	width: max-content;
	will-change: transform;
}
.fx-marquee__group {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 0.4em;
	padding-right: 0.4em;
}
/* big editorial marquee type (Casa Corpo style) */
.fx-marquee.fx-marquee-xl .fx-marquee__group {
	font-size: clamp(2.5rem, 8vw, 8rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: -0.02em;
	line-height: 1;
}
/* pill marquee (Wellnest style) */
.fx-marquee.fx-marquee-pills .fx-marquee__group > * {
	border: 1px solid currentColor;
	border-radius: 999px;
	padding: .55em 1.4em;
	margin-right: .6em;
	white-space: nowrap;
}
@keyframes jsa-marquee { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }

/* ---------------- fx-video-scale ---------------- */
.fx-video-scale {
	will-change: transform, border-radius;
	overflow: hidden;
	transform-origin: center center;
}

/* ---------------- fx-text-reveal ---------------- */
.fx-text-reveal .fx-word {
	display: inline-block;
	will-change: opacity;
}

/* ---------------- fx-sticky ---------------- */
.fx-sticky {
	position: -webkit-sticky;
	position: sticky;
	top: var(--fx-sticky-top, 100px);
}

/* ---------------- fx-sticky-grid (Fighting Monkey "upcoming workshops") -------
   Two columns: one pins while the other scrolls past it.

   On a Flatsome ROW add        fx-sticky-grid
   On the column that PINS add  fx-sticky-col
   The other column just needs to be TALLER — its height is the scroll distance.

   How FM does it: display:flex + align-items:flex-start, so the pinned column
   keeps its natural height instead of being stretched to the row height (a
   stretched item has no room to travel and sticky silently does nothing).
   No JavaScript involved. */
/* `html body .row` / `.col` prefixes are required: Flatsome ships
   `.row.align-middle { align-items:center }` and `.col { position:relative }`,
   both more specific than a bare class, so plain rules silently lose. Verified
   on the live homepage — without the prefix the column stayed position:relative
   and align-items stayed center. */
html body .row.fx-sticky-grid,
html body .fx-sticky-grid {
	align-items: flex-start !important;
}
html body .fx-sticky-grid > .col,
html body .fx-sticky-grid > div > .col {
	align-self: flex-start !important;
	height: auto !important;
}

html body .col.fx-sticky-col,
html body .fx-sticky-col {
	position: -webkit-sticky !important;
	position: sticky !important;
	top: var(--fx-sticky-top, 100px) !important;
	align-self: flex-start !important;
	height: auto !important;
}
/* the content wrapper must not re-stick or clip */
html body .fx-sticky-col > .col-inner { position: static; overflow: visible !important; }

/* offset helpers — pick the one that clears your sticky header */
.fx-sticky-top-0   { --fx-sticky-top: 0px; }
.fx-sticky-top-60  { --fx-sticky-top: 60px; }
.fx-sticky-top-100 { --fx-sticky-top: 100px; }
.fx-sticky-top-140 { --fx-sticky-top: 140px; }

/* Clear the fixed site header: the sticky column pins at --fx-sticky-top, but
   its first line still needs breathing room below the menu, so add matching
   padding on top of the content. */
html body .fx-sticky-col > .col-inner { padding-top: var(--fx-sticky-pad, 40px); }
.fx-sticky-pad-0  { --fx-sticky-pad: 0px; }
.fx-sticky-pad-20 { --fx-sticky-pad: 20px; }
.fx-sticky-pad-40 { --fx-sticky-pad: 40px; }
.fx-sticky-pad-60 { --fx-sticky-pad: 60px; }

@media (max-width: 849px) {
	/* FULLY disengage the sticky layout on mobile so Flatsome stacks the columns
	   normally. Just unsticking the column wasn't enough — the forced
	   align-items/align-self/height and the sticky top-padding kept imposing the
	   two-column desktop layout and broke the stack. Reset all of it. */
	html body .fx-sticky-grid,
	html body .row.fx-sticky-grid { align-items: normal !important; }

	html body .fx-sticky-grid > .col,
	html body .col.fx-sticky-col,
	html body .fx-sticky-col {
		position: static !important;
		align-self: auto !important;
		height: auto !important;
	}
	html body .fx-sticky-col > .col-inner {
		position: static !important;
		padding-top: 0 !important;
	}
}

/* ---------------- fx-blend (text knocked through video/image) ----------------
   Put fx-blend-stage on the SECTION (it holds the background video), and
   fx-blend on the TEXT/heading inside it. */
.fx-blend-stage { position: relative; isolation: isolate; }

/* Flatsome wraps content in layers that create their own stacking context; if
   they do, the text can only blend with its own wrapper instead of the video.

   This is done with :has() so it works with NO JavaScript — which matters,
   because UX Builder does not run the motion script, and because WP Engine may
   still be serving a cached jsa-motion.js. Scoped to sections that actually
   contain an .fx-blend, so nothing else on the site is affected. */
.section:has(.fx-blend),
.banner:has(.fx-blend),
.row-slider:has(.fx-blend),
.fx-blend-stage {
	position: relative;
	isolation: isolate;
}

.section:has(.fx-blend) .section-content,
.section:has(.fx-blend) .row,
.section:has(.fx-blend) .col,
.section:has(.fx-blend) .col-inner,
.section:has(.fx-blend) .text:not(.fx-blend):not(.fx-blend *),
.banner:has(.fx-blend) .banner-inner,
.banner:has(.fx-blend) .banner-layers,
.banner:has(.fx-blend) .row,
.banner:has(.fx-blend) .col,
.banner:has(.fx-blend) .col-inner,
.fx-blend-stage .section-content,
.fx-blend-stage .banner-inner,
.fx-blend-stage .banner-layers,
.fx-blend-stage .row,
.fx-blend-stage .col,
.fx-blend-stage .col-inner {
	z-index: auto !important;
	isolation: auto !important;
	mix-blend-mode: normal !important;
	opacity: 1 !important;
	filter: none !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

/* A dark Flatsome overlay sits between the video and the text and would mute
   the blend to nothing — drop it automatically wherever fx-blend is used. */
.section:has(.fx-blend) .section-bg-overlay,
.banner:has(.fx-blend) .banner-bg-overlay { display: none !important; }

/* ONE CLASS: put fx-blend on the heading/text over a background video.
   It applies the blend AND the display face, and the JS auto-prepares the
   parent section, so no other class is required. !important throughout because
   Flatsome's customizer prints font/colour inline in <head>. */
/* The blend goes on THIS element only. If children also blended, each one would
   composite against its own parent's group instead of the video behind the
   section — which looks like "the blend does nothing". */
.fx-blend {
	mix-blend-mode: difference !important;
	position: relative;
	z-index: 1;
}
.fx-blend * {
	mix-blend-mode: normal !important;
}
/* Type + colour apply to the element and everything inside it. */
.fx-blend,
.fx-blend * {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	font-family: 'gt_americacompressedbold', 'GT America Compressed Bold', 'gt_americacompressed', Impact, sans-serif !important;
	font-weight: normal !important; /* face is registered at normal; 700 = faux bold */
	text-transform: uppercase !important;
	letter-spacing: var(--fx-title-tracking, 3px) !important;
	line-height: .92;
	/* any background on the text would block the blend */
	background: transparent !important;
	background-color: transparent !important;
	text-shadow: none !important;
}
.fx-blend-stage .fx-blend-exclusion, .fx-blend-stage .fx-blend-exclusion * { mix-blend-mode: exclusion; }
.fx-blend-stage .fx-blend-overlay,   .fx-blend-stage .fx-blend-overlay *   { mix-blend-mode: overlay; }
.fx-blend-stage .fx-blend-screen,    .fx-blend-stage .fx-blend-screen *    { mix-blend-mode: screen; }
.fx-blend-stage .fx-blend-multiply,  .fx-blend-stage .fx-blend-multiply *  { mix-blend-mode: multiply; color: #000; }

/* A dark Flatsome overlay sits between the video and the text and mutes the
   blend — add fx-no-overlay on the section to drop it. */
.fx-blend-stage.fx-no-overlay .section-bg-overlay,
.fx-blend-stage.fx-no-overlay .banner-bg-overlay { display: none !important; }

/* ---------------- fx-bg-parallax (background video/image slides) ----------------
   Put on the SECTION/BANNER whose background should drift as you scroll. */
.fx-bg-parallax { overflow: hidden; }
.fx-bg-parallax .section-bg,
.fx-bg-parallax .banner-bg,
.fx-bg-parallax > .bg {
	/* Generous headroom so a bigger slide never exposes an edge. The bg is
	   oversized and offset up; the JS drifts it within this overflow. */
	height: 160% !important;
	top: -30% !important;
	will-change: transform;
}
.fx-bg-parallax .section-bg video,
.fx-bg-parallax .banner-bg video,
.fx-bg-parallax video { object-fit: cover; width: 100%; height: 100%; }

/* ---------------- fx-hero-sticky (pinned hero, next section slides over) ------
   Put fx-hero-sticky on the hero SECTION/BANNER (the JS pins it). The section
   that follows rides up over it — give THAT section a solid background so it
   covers the hero cleanly (add fx-hero-cover to it, or set a background colour
   in UX Builder). */
.fx-hero-sticky { z-index: 0; }
.fx-hero-sticky + * { position: relative; z-index: 2; }

/* Helper: gives the covering section a solid background (site off-white). */
.fx-hero-cover { position: relative; z-index: 2; background-color: #f8f6f1; }

/* ---------------- stickyabouttext (CSS sticky + line-by-line reveal) ----------
   The text has position:sticky and lives inside a wrapper column (.giveitheight)
   whose height is set by JS to (left column height − whatever sits above it), so
   the text locks to the nav offset and rides down to the exact bottom of the
   taller LEFT column, then releases. No added page height, never over the next
   section.

   Each line (.fx-line, added by JS) fades in from the right — right→left — as it
   enters view, and dims again when it leaves (re-plays on scroll-up). */
.stickyabouttext {
	position: -webkit-sticky;
	position: sticky;
	top: var(--fx-sticky-top, 100px);
}
/* .giveitheight gets its pixel height from JS (responsive, re-measured on
   resize). Its inner wrapper must fill it, because CSS sticky is bounded by the
   text's DIRECT parent (.col-inner) — without this the text has no travel room. */
.giveitheight {
	min-height: 0;
}
.giveitheight .col-inner {
	height: 100%;
	overflow: visible !important;
}
.stickyabouttext .fx-line {
	opacity: 0.15;
	transform: translateX(14px);
	transition: opacity .6s cubic-bezier(.22, 1, .36, 1),
	            transform .6s cubic-bezier(.22, 1, .36, 1);
	will-change: opacity, transform;
}
.stickyabouttext .fx-line.is-in {
	opacity: 1;
	transform: none;
}

/* ---------------- fx-courses (Online Courses: stacking cards) ----------------
   Add `fx-courses` to the section; JS tags the title row, heading and cards and
   sets the sticky offsets (--fx-courses-top / --fx-card-top) + opaque bg inline.
   The heading (fx-courses-title) is scaled + coloured by GSAP on scroll. */
.fx-courses-head {
	position: -webkit-sticky;
	position: sticky;
	top: var(--fx-courses-top, 104px);
	z-index: 5;
}
.fx-courses-card {
	position: -webkit-sticky;
	position: sticky;
	top: var(--fx-card-top, 258px);
}
.fx-courses-title {
	display: inline-block;
	transform-origin: center top;
	will-change: transform, color;
}
.fx-courses-card .fx-line {
	opacity: 0.15;
	transform: translateX(14px);
	transition: opacity .6s cubic-bezier(.22, 1, .36, 1),
	            transform .6s cubic-bezier(.22, 1, .36, 1);
	will-change: opacity, transform;
}
.fx-courses-card .fx-line.is-in {
	opacity: 1;
	transform: none;
}
/* Mobile: never pin/stack course cards — let Flatsome stack them normally. */
@media (max-width: 849px) {
	.fx-courses-head,
	.fx-courses-card {
		position: static !important;
		top: auto !important;
	}
	.fx-courses-card .fx-line {
		opacity: 1 !important;
		transform: none !important;
	}
	/* Breathing room between stacked day/class cards on mobile. */
	.fx-courses .col {
		margin-bottom: 22px !important;
	}
	.fx-courses .row {
		margin-bottom: 22px !important;
	}
}

/* ---------------- fx-color-shift ---------------- */
.fx-color-shift { transition: background-color .2s linear; }

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
	.jsa-motion-ready .fx-reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
	.fx-marquee__track { animation: none !important; }
}
