/**
 * Central motion layer.
 * Layout and visual design live in the other stylesheets.
 * This file only times, eases, and slightly moves what already exists.
 */

html.jrich-smooth-scroll {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--jrich-header-offset, 5.5rem) + 0.75rem);
}

/* -------------------------------------------------------------------------
   Scroll reveals — groups, not every paragraph
   ------------------------------------------------------------------------- */

.jrich-js .jrich-reveal {
	opacity: 0;
	transform: translate3d(0, var(--jrich-reveal-y), 0);
	transition:
		opacity var(--jrich-duration-reveal) var(--jrich-ease-out),
		transform var(--jrich-duration-reveal) var(--jrich-ease-out);
}

.jrich-js .jrich-reveal--in {
	transform: none;
}

.jrich-js .jrich-reveal--left {
	transform: translate3d(calc(var(--jrich-reveal-x) * -1), 0, 0);
}

.jrich-js .jrich-reveal--right {
	transform: translate3d(var(--jrich-reveal-x), 0, 0);
}

.jrich-js .jrich-reveal--scale {
	transform: scale(0.985);
}

.jrich-js .jrich-reveal.is-inview {
	opacity: 1;
	transform: none;
}

.jrich-js .jrich-stagger > * {
	opacity: 0;
	transform: translate3d(0, var(--jrich-reveal-y), 0);
	transition:
		opacity var(--jrich-duration-reveal) var(--jrich-ease-out),
		transform var(--jrich-duration-reveal) var(--jrich-ease-out);
}

.jrich-js .jrich-stagger.is-inview > * {
	opacity: 1;
	transform: none;
}

.jrich-js .jrich-stagger.is-inview > *:nth-child(1) { transition-delay: 0ms; }
.jrich-js .jrich-stagger.is-inview > *:nth-child(2) { transition-delay: var(--jrich-stagger); }
.jrich-js .jrich-stagger.is-inview > *:nth-child(3) { transition-delay: calc(var(--jrich-stagger) * 2); }
.jrich-js .jrich-stagger.is-inview > *:nth-child(4) { transition-delay: calc(var(--jrich-stagger) * 3); }
.jrich-js .jrich-stagger.is-inview > *:nth-child(5) { transition-delay: calc(var(--jrich-stagger) * 4); }
.jrich-js .jrich-stagger.is-inview > *:nth-child(6) { transition-delay: calc(var(--jrich-stagger) * 5); }
.jrich-js .jrich-stagger.is-inview > *:nth-child(7) { transition-delay: calc(var(--jrich-stagger) * 6); }
.jrich-js .jrich-stagger.is-inview > *:nth-child(8) { transition-delay: calc(var(--jrich-stagger) * 7); }
.jrich-js .jrich-stagger.is-inview > *:nth-child(n + 9) { transition-delay: calc(var(--jrich-stagger) * 7); }

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */

.jrich-nav--desktop .jrich-menu--primary > li > .jrich-menu__link {
	position: relative;
}

.jrich-nav--desktop .jrich-menu--primary > li > .jrich-menu__link::after {
	content: "";
	position: absolute;
	left: 0.7rem;
	right: 0.7rem;
	bottom: 0.4rem;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--jrich-duration) var(--jrich-ease);
	pointer-events: none;
}

.jrich-nav--desktop .jrich-menu--primary > li > .jrich-menu__link:hover::after,
.jrich-nav--desktop .jrich-menu--primary > li > .jrich-menu__link:focus-visible::after,
.jrich-nav--desktop .jrich-menu--primary > .current-menu-item > .jrich-menu__link::after,
.jrich-nav--desktop .jrich-menu--primary > .current-menu-ancestor > .jrich-menu__link::after {
	transform: scaleX(1);
}

.jrich-nav--desktop .jrich-sub-menu {
	transform: translate3d(0, 0.25rem, 0);
}

.jrich-drawer__panel {
	transition:
		transform var(--jrich-duration-drawer) var(--jrich-ease),
		opacity var(--jrich-duration-drawer) var(--jrich-ease);
	opacity: 0.55;
}

.jrich-drawer.is-open .jrich-drawer__panel {
	opacity: 1;
}

/* -------------------------------------------------------------------------
   Buttons, cards, links
   ------------------------------------------------------------------------- */

.jrich-cta-buttons .jrich-button--primary::after,
.jrich-slider .jrich-button--primary::after,
.jrich-drawer__foot .jrich-button--primary::after {
	content: "";
	width: 0.32rem;
	height: 0.32rem;
	margin-left: 0.15rem;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(45deg) translate3d(0, 0, 0);
	transition: transform var(--jrich-duration) var(--jrich-ease);
}

.jrich-cta-buttons .jrich-button--primary:hover::after,
.jrich-cta-buttons .jrich-button--primary:focus-visible::after,
.jrich-slider .jrich-button--primary:hover::after,
.jrich-slider .jrich-button--primary:focus-visible::after,
.jrich-drawer__foot .jrich-button--primary:hover::after {
	transform: rotate(45deg) translate3d(0.12rem, -0.12rem, 0);
}

.jrich-card__action .jrich-button--text,
.jrich-programme-tile__action .jrich-button--text {
	display: inline-flex;
	align-items: center;
}

.jrich-footer__quick .jrich-menu__link,
.jrich-footer__column .jrich-menu__link,
.jrich-footer__legal a {
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	text-decoration: none;
	transition:
		color var(--jrich-duration) var(--jrich-ease),
		background-size var(--jrich-duration) var(--jrich-ease);
}

.jrich-footer__quick .jrich-menu__link:hover,
.jrich-footer__column .jrich-menu__link:hover,
.jrich-footer__legal a:hover {
	background-size: 100% 1px;
}

@media (hover: hover) and (pointer: fine) {
	.jrich-card:hover {
		transform: translate3d(0, var(--jrich-hover-shift), 0);
	}
}

@media (hover: none) {
	.jrich-card:hover {
		transform: none;
	}
}

/* -------------------------------------------------------------------------
   Gallery overlay
   ------------------------------------------------------------------------- */

.jrich-gallery-masonry__item a,
.jrich-gallery-mosaic__link,
.jrich-page-gallery__item a,
.jrich-grid--gallery a {
	position: relative;
	display: block;
	overflow: hidden;
}

.jrich-gallery-masonry__item a::after,
.jrich-gallery-mosaic__link::after,
.jrich-page-gallery__item a::after,
.jrich-grid--gallery a::after {
	content: "";
	position: absolute;
	inset: 0;
	background: color-mix(in srgb, var(--jrich-color-green-950) 32%, transparent);
	opacity: 0;
	transition: opacity var(--jrich-duration) var(--jrich-ease);
	pointer-events: none;
}

.jrich-gallery-masonry__item a::before,
.jrich-gallery-mosaic__link::before,
.jrich-page-gallery__item a::before,
.jrich-grid--gallery a::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	width: 2rem;
	height: 2rem;
	margin: -1rem 0 0 -1rem;
	border: 1px solid color-mix(in srgb, var(--jrich-color-white) 85%, transparent);
	border-radius: 50%;
	opacity: 0;
	transform: scale(0.92);
	transition:
		opacity var(--jrich-duration) var(--jrich-ease),
		transform var(--jrich-duration) var(--jrich-ease);
	pointer-events: none;
}

.jrich-gallery-masonry__item a:hover::after,
.jrich-gallery-masonry__item a:focus-visible::after,
.jrich-gallery-mosaic__link:hover::after,
.jrich-gallery-mosaic__link:focus-visible::after,
.jrich-page-gallery__item a:hover::after,
.jrich-page-gallery__item a:focus-visible::after,
.jrich-grid--gallery a:hover::after,
.jrich-grid--gallery a:focus-visible::after {
	opacity: 1;
}

.jrich-gallery-masonry__item a:hover::before,
.jrich-gallery-masonry__item a:focus-visible::before,
.jrich-gallery-mosaic__link:hover::before,
.jrich-gallery-mosaic__link:focus-visible::before,
.jrich-page-gallery__item a:hover::before,
.jrich-page-gallery__item a:focus-visible::before,
.jrich-grid--gallery a:hover::before,
.jrich-grid--gallery a:focus-visible::before {
	opacity: 1;
	transform: scale(1);
}

/* -------------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------------- */

.jrich-faq__answer {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition:
		grid-template-rows var(--jrich-duration-slow) var(--jrich-ease),
		opacity var(--jrich-duration) var(--jrich-ease);
}

.jrich-faq__answer-inner {
	overflow: hidden;
	min-height: 0;
}

.jrich-faq__item[open] .jrich-faq__answer {
	grid-template-rows: 1fr;
	opacity: 1;
}

.jrich-js .jrich-faq__item[open] .jrich-faq__answer {
	grid-template-rows: 0fr;
	opacity: 0;
}

.jrich-js .jrich-faq__item.is-expanded .jrich-faq__answer {
	grid-template-rows: 1fr;
	opacity: 1;
}

.jrich-faq__item[open] .jrich-faq__question::after,
.jrich-js .jrich-faq__item.is-expanded .jrich-faq__question::after {
	transform: rotate(225deg);
}

.jrich-js .jrich-faq__item[open]:not(.is-expanded) .jrich-faq__question::after {
	transform: rotate(45deg);
}

/* -------------------------------------------------------------------------
   Images appearing, forms
   ------------------------------------------------------------------------- */

.jrich-js .jrich-media-fade img:not(.is-shown) {
	opacity: 0;
}

.jrich-js .jrich-media-fade img {
	transition: opacity var(--jrich-duration-slow) var(--jrich-ease);
}

.jrich-js .jrich-media-fade img.is-shown {
	opacity: 1;
}

.jrich-form input:user-invalid,
.jrich-form select:user-invalid,
.jrich-form textarea:user-invalid,
.wpcf7-form .wpcf7-not-valid,
.wpforms-field input.wpforms-error,
.wpforms-field textarea.wpforms-error,
.wpforms-field select.wpforms-error {
	box-shadow: inset 0.2rem 0 0 var(--jrich-color-error);
}

.jrich-form__notice--error,
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
	border-left: 0.2rem solid var(--jrich-color-error);
}

.jrich-form__notice--success,
.wpcf7-mail-sent-ok,
.wpforms-confirmation-container,
.wpforms-confirmation-container-full {
	border-left: 0.2rem solid var(--jrich-color-green);
}

.jrich-form input[type="checkbox"],
.jrich-form input[type="radio"],
.wpcf7-form input[type="checkbox"],
.wpcf7-form input[type="radio"],
.wpforms-field input[type="checkbox"],
.wpforms-field input[type="radio"],
.comment-form input[type="checkbox"] {
	transition: box-shadow var(--jrich-duration-fast) var(--jrich-ease);
}

.jrich-form input[type="checkbox"]:focus-visible,
.jrich-form input[type="radio"]:focus-visible,
.wpcf7-form input[type="checkbox"]:focus-visible,
.wpcf7-form input[type="radio"]:focus-visible,
.wpforms-field input[type="checkbox"]:focus-visible,
.wpforms-field input[type="radio"]:focus-visible,
.comment-form input[type="checkbox"]:focus-visible {
	outline: none;
	box-shadow: var(--jrich-focus-ring);
}

/* -------------------------------------------------------------------------
   Admin kill-switches
   ------------------------------------------------------------------------- */

body.jrich-no-reveals .jrich-js .jrich-reveal,
body.jrich-no-reveals .jrich-js .jrich-stagger > *,
body.jrich-no-animations .jrich-js .jrich-reveal,
body.jrich-no-animations .jrich-js .jrich-stagger > * {
	opacity: 1;
	transform: none;
	transition: none;
}

body.jrich-no-effects .jrich-card:hover .jrich-card__media img,
body.jrich-no-effects .jrich-gallery-masonry__item a:hover img,
body.jrich-no-effects .jrich-gallery-mosaic__link:hover img,
body.jrich-no-effects .jrich-page-gallery__item a:hover img,
body.jrich-no-effects .jrich-welcome__media:hover img,
body.jrich-no-effects .jrich-programme-tile:hover .jrich-programme-tile__media img,
body.jrich-no-effects .jrich-split__media:hover img,
body.jrich-no-effects .elementor-widget-image:hover img {
	transform: none;
}

body.jrich-no-effects .jrich-gallery-masonry__item a::after,
body.jrich-no-effects .jrich-gallery-masonry__item a::before,
body.jrich-no-effects .jrich-gallery-mosaic__link::after,
body.jrich-no-effects .jrich-gallery-mosaic__link::before,
body.jrich-no-effects .jrich-page-gallery__item a::after,
body.jrich-no-effects .jrich-page-gallery__item a::before,
body.jrich-no-effects .jrich-grid--gallery a::after,
body.jrich-no-effects .jrich-grid--gallery a::before {
	opacity: 0;
	transform: none;
}

body.jrich-no-hero-motion .jrich-slider--kenburns .jrich-slider__img,
body.jrich-no-animations .jrich-slider--kenburns .jrich-slider__img {
	animation: none;
}

body.jrich-no-hero-motion .jrich-slider.is-ready .jrich-slider__eyebrow,
body.jrich-no-hero-motion .jrich-slider.is-ready .jrich-slider__title,
body.jrich-no-hero-motion .jrich-slider.is-ready .jrich-slider__lead,
body.jrich-no-hero-motion .jrich-slider.is-ready .jrich-cta-buttons--hero,
body.jrich-no-animations .jrich-slider.is-ready .jrich-slider__eyebrow,
body.jrich-no-animations .jrich-slider.is-ready .jrich-slider__title,
body.jrich-no-animations .jrich-slider.is-ready .jrich-slider__lead,
body.jrich-no-animations .jrich-slider.is-ready .jrich-cta-buttons--hero {
	opacity: 1;
	transform: none;
	transition: none;
}

/* -------------------------------------------------------------------------
   Mobile: lighter motion
   ------------------------------------------------------------------------- */

@media (max-width: 47.99rem) {
	.jrich-slider--kenburns .jrich-slider__slide.is-active .jrich-slider__img,
	.jrich-slider:not(.jrich-slider--kenburns) .jrich-slider__slide--ken.is-active .jrich-slider__img {
		animation: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jrich-js .jrich-reveal,
	.jrich-js .jrich-stagger > *,
	.jrich-slider--kenburns .jrich-slider__slide.is-active .jrich-slider__img {
		opacity: 1;
		transform: none;
		animation: none;
		transition: none;
	}

	.jrich-faq__answer {
		transition: none;
	}

	.jrich-js .jrich-faq__item[open] .jrich-faq__answer,
	.jrich-js .jrich-faq__item.is-expanded .jrich-faq__answer {
		grid-template-rows: 1fr;
		opacity: 1;
	}

	html.jrich-smooth-scroll {
		scroll-behavior: auto;
	}
}
