/* TRJ Motion. "@P" = high-specificity prefix (built into motion.css). Everything sits inside a no-preference media query, so reduce-motion users get a still page. */

:root { --trjm-ease: cubic-bezier(.2, .7, .2, 1); --trjm-ease-out: cubic-bezier(.16, 1, .3, 1); --trjm-ink: #141414; --trjm-pale: #c5c9bf; }

@media (prefers-reduced-motion: no-preference) {

	/* ---------- Rise and focus ---------- */
	/* The theme's own section reveal: 1.3.0 quick and sharp (no blur), so nothing sits faded or blank mid-scroll. */
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-reveal .trj-rd-reveal { transition: opacity .35s var(--trjm-ease), transform .45s var(--trjm-ease-out) !important; filter: none !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-reveal:is(.trj-rd-js *, .trj-rd-js) .trj-rd-reveal:not(.is-in) { opacity: 0 !important; transform: translateY(12px) !important; filter: none !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-reveal .trj-rd-reveal.is-in { filter: none !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-reveal .trj-rd-stagger > * { transition-duration: .3s, .4s !important; filter: none !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-reveal .trj-rd-stagger.is-in > * { transition-delay: 0s !important; }

	/* Everything else this plugin picks out (headings, cards, images). */
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-reveal .trjm-r { opacity: 0 !important; translate: 0 12px !important; transition: none !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-reveal .trjm-r.trjm-in { opacity: 1 !important; translate: none !important; transition: opacity .35s var(--trjm-ease) var(--trjm-d, 0ms), translate .45s var(--trjm-ease-out) var(--trjm-d, 0ms) !important; }

	@supports (animation-timeline: view()) {
		/* ---------- Images that ease open ---------- */
		:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-grow .trjm-g { animation: trjm-grow linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; will-change: clip-path; }
		:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-grow .trjm-g img, :root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-grow img.trjm-g { animation: trjm-zoom linear both; animation-timeline: view(); animation-range: entry 0% cover 55%; }
		:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-grow img.trjm-g { animation-name: trjm-grow-img; }
		:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-grow img.trjm-z { animation: trjm-zoom linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
		@keyframes trjm-grow { from { clip-path: inset(7% 6% round 36px); } to { clip-path: inset(0 0 round var(--trjm-r, 0px)); } }
		@keyframes trjm-zoom { from { scale: 1.12; } to { scale: 1; } }
		@keyframes trjm-grow-img { from { clip-path: inset(7% 6% round 36px); scale: 1.06; } to { clip-path: inset(0 0 round var(--trjm-r, 0px)); scale: 1; } }

		/* ---------- Hero parallax ---------- */
		:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-parallax .trjm-p { animation: trjm-par linear both; animation-timeline: scroll(root); animation-range: 0 100vh; transform-origin: 50% 30%; will-change: translate, scale; }
		@keyframes trjm-par { from { translate: 0 0; scale: 1.08; } to { translate: 0 9%; scale: 1.08; } }
	}

	/* ---------- Page load: the hero arrives in stages (label, headline, accent word, intro, buttons, panel) ---------- */
	html.trjm-load :is(.trj-rd-hero-inner > *, .trjgh-hero-copy > *, aside.trjgh-hero-panel, .trjgh-race-hero210 .trjgh-hero-copy > *, .trjho-ahero-text > *, .trjho-ahero-media, .trjfgd-hero > *, .trjtp-band-in > *) { opacity: 0 !important; translate: 0 25px !important; filter: blur(5px) !important; }
	html.trjm-load :is(.trj-rd-hero-inner, .trjgh-hero-copy, .trjho-ahero-text) h1 :is(span, em, i) { opacity: 0 !important; filter: blur(6px) !important; }
	html.trjm-load :is(.trj-rd-hero-bg img, .trjho-ahero-media img) { opacity: 0 !important; }
	body.trjm-entering :is(.trj-rd-hero-inner > *, .trjgh-hero-copy > *, aside.trjgh-hero-panel, .trjgh-race-hero210 .trjgh-hero-copy > *, .trjho-ahero-text > *, .trjho-ahero-media, .trjfgd-hero > *, .trjtp-band-in > *) { transition: opacity .9s var(--trjm-ease) var(--trjm-d, 0ms), translate 1.1s var(--trjm-ease-out) var(--trjm-d, 0ms), filter .9s var(--trjm-ease) var(--trjm-d, 0ms) !important; }
	body.trjm-entering :is(.trj-rd-hero-inner, .trjgh-hero-copy, .trjho-ahero-text) h1 :is(span, em, i) { display: inline-block; transition: opacity 1s var(--trjm-ease) var(--trjm-d, 0ms), filter 1s var(--trjm-ease) var(--trjm-d, 0ms) !important; }
	body.trjm-entering :is(.trj-rd-hero-bg img, .trjho-ahero-media img) { transition: opacity 1.4s var(--trjm-ease) .1s !important; }

	/* Italic or accent words in headings arrive a beat after the rest */
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-reveal :is(.trjm-r.trjm-in, .trj-rd-reveal.is-in) :is(h2, h3) :is(em, i) { display: inline-block; animation: trjm-accent .5s var(--trjm-ease-out) .08s both; }
	@keyframes trjm-accent { from { opacity: 0; translate: 0 6px; } to { opacity: 1; filter: none; translate: none; } }

	@supports (animation-timeline: view()) {
		/* ---------- Images open like a window: the frame scales up and squares off while the photo zooms out ---------- */
		:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-grow .trjm-x { overflow: clip !important; animation: trjm-x linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; will-change: scale; }
		:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-grow .trjm-x .trjm-xi { animation: trjm-xi linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; will-change: scale; }
		/* overflow: clip (not hidden) so the photo inside still follows the page scroll */
		:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-grow .trjm-clip { overflow: clip !important; }
		@keyframes trjm-x { from { scale: .86; border-radius: 24px; } to { scale: 1; border-radius: var(--trjm-r, 0px); } }
		@keyframes trjm-xi { from { scale: 1.16; } to { scale: 1; } }
	}

	/* ---------- Smooth page transitions ---------- */
	@view-transition { navigation: auto; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-transitions .trj-rd-header { view-transition-name: trjm-header; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-transitions .trjho-bar { view-transition-name: trjm-offer; }
	::view-transition-old(root) { animation: trjm-vt-out .22s var(--trjm-ease) both; }
	::view-transition-new(root) { animation: trjm-vt-in .35s var(--trjm-ease) both; }
	::view-transition-group(trjm-header), ::view-transition-group(trjm-offer) { animation: none; }
	@keyframes trjm-vt-out { to { opacity: 0; } }
	@keyframes trjm-vt-in { from { opacity: 0; } to { opacity: 1; } }

	/* ---------- Softer hover ---------- */
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-hover :is(.trj-rd-pill, .trjtp-btn, .trjfp-pick, .trjfgd-btn, .trjho-coach, .trjkit-btn, .trj-rd-glass, .wp-element-button) { transition: translate .45s var(--trjm-ease-out), background-color .35s var(--trjm-ease), color .35s var(--trjm-ease), box-shadow .45s var(--trjm-ease) !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-hover :is(.trj-rd-pill, .trjtp-btn, .trjfp-pick, .trjfgd-btn, .trjho-coach, .trjkit-btn, .trj-rd-glass, .wp-element-button):hover { translate: 0 -2px !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-hover :is(.trj-rd-pill, .trjtp-btn, .trjfp-pick, .trjfgd-btn, .trjkit-btn) :is(span[aria-hidden="true"], i) { display: inline-block; transition: translate .45s var(--trjm-ease-out) !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-hover :is(.trj-rd-pill, .trjtp-btn, .trjfp-pick, .trjfgd-btn, .trjkit-btn):hover :is(span[aria-hidden="true"], i) { translate: 3px 0; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-hover .trjm-card { transition: translate .6s var(--trjm-ease-out), box-shadow .6s var(--trjm-ease) !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-hover .trjm-card:hover { translate: 0 -4px !important; box-shadow: 0 18px 40px rgba(20,20,20,.08) !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-hover .trjm-card img { transition: scale 1.1s var(--trjm-ease-out) !important; }
	:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm-hover .trjm-card:hover img:not(.trjm-p):not(.trjm-z):not(.trjm-g) { scale: 1.035 !important; }
}

/* 1.2.3 No scroll cue on page headers. */
:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4) .trj-rd-scrollcue { display: none !important; }

/* 1.2.3 Homepage header: the original low position. The intro runs on two lines and the space left by the
   scroll cue is taken back, so both buttons sit inside the first screen. */
:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).home .trj-rd-hero-full .trj-rd-hero-inner { max-width: none !important; padding-bottom: 40px !important; }
:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).home .trj-rd-hero-full .trj-rd-hero-inner .trj-rd-lead { max-width: 640px !important; width: auto !important; }

/* 1.4.0 With "Rise and focus" off, nothing fades or slides in on scroll: the theme's own section reveal shows everything at once. */
:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm:not(.trjm-reveal) :is(.trj-rd-reveal, .trj-rd-reveal:not(.is-in), .trj-rd-stagger > *) { opacity: 1 !important; transform: none !important; translate: none !important; filter: none !important; transition: none !important; animation: none !important; }
:root:is(html,#trjm0) body:is(body,#trjm1):is(body,#trjm2):is(body,#trjm3):is(body,#trjm4).trjm:not(.trjm-reveal) .trj-rd-settle :is(img, .trj-rd-img) { transform: none !important; scale: none !important; transition: none !important; }
