/*
 * UBlac FX runtime styles. Everything that moves only applies after the script
 * has added .ubs-fx-on to the root element, which it does not do when the
 * visitor prefers reduced motion. Without the script the content is simply
 * visible. Timing and distance come from the motion intensity on the root
 * element (data-ubs-motion: calm, balanced, expressive), and the site's style
 * can set --ubs-fx-dur and --ubs-fx-ease on top. Only transform and opacity
 * animate, so nothing moves the layout.
 */
:root,
html[data-ubs-motion="balanced"] {
	--ubs-fx-dur: 700ms;
	--ubs-fx-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--ubs-fx-dist: 18px;
	--ubs-fx-stagger: 90ms;
	--ubs-fx-quick: 280ms;
}

html[data-ubs-motion="calm"] {
	--ubs-fx-dur: 500ms;
	--ubs-fx-dist: 10px;
	--ubs-fx-stagger: 60ms;
	--ubs-fx-quick: 220ms;
}

html[data-ubs-motion="expressive"] {
	--ubs-fx-dur: 900ms;
	--ubs-fx-dist: 28px;
	--ubs-fx-stagger: 110ms;
}

.ubs-fx-on [data-ubs-fx="reveal"] {
	opacity: 0;
	transform: translate3d(0, var(--ubs-fx-dist), 0);
	transition: opacity var(--ubs-fx-dur) var(--ubs-fx-ease), transform var(--ubs-fx-dur) var(--ubs-fx-ease);
	transition-delay: calc(var(--ubs-i, 0) * var(--ubs-fx-stagger));
}

.ubs-fx-on [data-ubs-fx="reveal"].ubs-in {
	opacity: 1;
	transform: none;
}

.ubs-fx-on [data-ubs-fx="rise"] {
	transform: scaleY(0.04);
	transform-origin: 50% 100%;
	transition: transform calc(var(--ubs-fx-dur) * 1.5) var(--ubs-fx-ease);
	transition-delay: calc(var(--ubs-i, 0) * 70ms);
}

.ubs-fx-on [data-ubs-fx="rise"][data-ubs-axis="x"] {
	transform: scaleX(0.04);
	transform-origin: 0 50%;
}

.ubs-fx-on [data-ubs-fx="rise"].ubs-in {
	transform: none;
}

.ubs-fx-on [data-ubs-fx="cue"] {
	animation: ubs-fx-cue 2.4s ease-in-out 2;
}

.ubs-fx-on [data-ubs-fx="parallax"] > * {
	will-change: transform;
}

/* Spotlight: one child is lit, the rest stay quiet. */
.ubs-fx-on [data-ubs-fx="spotlight"] > * {
	transition: border-color var(--ubs-fx-quick) ease, background-color var(--ubs-fx-quick) ease, translate var(--ubs-fx-quick) ease, box-shadow var(--ubs-fx-quick) ease;
}

.ubs-fx-on [data-ubs-fx="spotlight"] > [data-ubs-fx="reveal"] {
	transition: opacity var(--ubs-fx-dur) var(--ubs-fx-ease), transform var(--ubs-fx-dur) var(--ubs-fx-ease), border-color var(--ubs-fx-quick) ease, background-color var(--ubs-fx-quick) ease, translate var(--ubs-fx-quick) ease, box-shadow var(--ubs-fx-quick) ease;
	transition-delay: calc(var(--ubs-i, 0) * var(--ubs-fx-stagger)), calc(var(--ubs-i, 0) * var(--ubs-fx-stagger)), 0s, 0s, 0s, 0s;
}

.ubs-fx-on [data-ubs-fx="spotlight"] > .ubs-lit {
	background-color: var(--ubs-accent-tint, var(--ubs-tint, transparent));
	border-color: var(--ubs-accent, currentColor);
	translate: 0.6rem 0;
}

[dir="rtl"] [data-ubs-fx="spotlight"] > .ubs-lit {
	translate: -0.6rem 0;
}

.ubs-fx-on [data-ubs-fx="spotlight"] [data-ubs-fill] {
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform calc(var(--ubs-fx-dur) * 0.7) var(--ubs-fx-ease);
}

[dir="rtl"] [data-ubs-fx="spotlight"] [data-ubs-fill] {
	transform-origin: 100% 50%;
}

.ubs-fx-on [data-ubs-fx="spotlight"] > .ubs-lit [data-ubs-fill] {
	transform: scaleX(1);
}

[data-ubs-marker].ubs-live {
	font-variant-numeric: tabular-nums;
}

/* Progress: a line fills as the steps are passed. */
.ubs-fx-on [data-ubs-fx="progress"] [data-ubs-fill] {
	transform: scaleY(0);
	transform-origin: 50% 0;
	will-change: transform;
}

.ubs-fx-on [data-ubs-fx="progress"] .ubs-pass [data-ubs-badge] {
	background-color: var(--ubs-accent, currentColor);
	border-color: var(--ubs-accent, currentColor);
	color: var(--ubs-on-accent, #ffffff);
}

.ubs-fx-on [data-ubs-fx="progress"] [data-ubs-badge] {
	transition: background-color var(--ubs-fx-quick) ease, border-color var(--ubs-fx-quick) ease, color var(--ubs-fx-quick) ease;
}

/* Expressive only. The script starts these, and the selectors check the level
   too, so a calm or balanced page never plays them. */
html[data-ubs-motion="expressive"].ubs-fx-on [data-ubs-fx="spin"] {
	animation: ubs-fx-spin var(--ubs-dur, 60s) linear infinite;
}

html[data-ubs-motion="expressive"].ubs-fx-on [data-ubs-fx="spin"][data-ubs-dir="reverse"] {
	animation-direction: reverse;
}

html[data-ubs-motion="expressive"].ubs-fx-on [data-ubs-fx="drift"] {
	animation: ubs-fx-drift var(--ubs-dur, 9s) ease-in-out infinite alternate;
}

html[data-ubs-motion="expressive"].ubs-fx-on [data-ubs-fx="glow"] > * {
	position: relative;
}

html[data-ubs-motion="expressive"].ubs-fx-on [data-ubs-fx="glow"] > *::after {
	background: radial-gradient(18rem circle at var(--mx, 50%) var(--my, 50%), var(--ubs-accent-tint, #ffffff1f), transparent 62%);
	border-radius: inherit;
	content: "";
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	transition: opacity var(--ubs-fx-quick) ease;
}

html[data-ubs-motion="expressive"].ubs-fx-on [data-ubs-fx="glow"] > *:hover::after {
	opacity: 1;
}

/* Marquee. Before the script runs, an expressive page keeps one row so the
   strip does not change height when the script starts; the row can still be
   scrolled by hand, so nothing is lost if the script never loads. */
html.ubs-fx-pre [data-ubs-fx="marquee"] {
	margin-bottom: 2.75rem;
	overflow-x: auto;
	position: relative;
}

html.ubs-fx-pre [data-ubs-fx="marquee"] > :first-child {
	flex-wrap: nowrap;
}

html.ubs-fx-pre [data-ubs-fx="marquee"] > :first-child > * {
	flex: none;
}

[data-ubs-fx="marquee"].ubs-marquee-on {
	overflow: visible;
	position: relative;
}

.ubs-fx-view {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000000 6%, #000000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000000 6%, #000000 94%, transparent);
	overflow: hidden;
}

.ubs-fx-track {
	animation: ubs-fx-marquee var(--ubs-dur, 40s) linear infinite;
	display: flex;
	width: max-content;
}

.ubs-fx-track > * {
	flex: none;
	flex-wrap: nowrap;
	padding-inline-end: var(--ubs-marquee-gap, 1rem);
}

[dir="rtl"] .ubs-fx-track {
	animation-direction: reverse;
}

.ubs-paused .ubs-fx-track,
.ubs-fx-track:focus-within {
	animation-play-state: paused;
}

@media (hover: hover) {
	.ubs-fx-track:hover {
		animation-play-state: paused;
	}
}

.ubs-fx-pause {
	appearance: none;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 999px;
	color: inherit;
	cursor: pointer; /* pragma: allowlist secret */
	font: inherit;
	font-size: 0.8125rem;
	inset-block-end: -2.5rem;
	inset-inline-start: 0;
	line-height: 1;
	min-height: 2rem;
	padding: 0.5rem 0.9rem;
	position: absolute;
}

.ubs-fx-pause:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

@keyframes ubs-fx-spin {
	to { transform: rotate(360deg); }
}

@keyframes ubs-fx-drift {
	from { transform: translate3d(calc(var(--ubs-amp, 1.2%) * -1), calc(var(--ubs-amp, 1.2%) * -1), 0); }
	to { transform: translate3d(var(--ubs-amp, 1.2%), var(--ubs-amp, 1.2%), 0); }
}

@keyframes ubs-fx-cue {
	0% { transform: scaleX(0.2); opacity: 0.4; }
	60% { transform: scaleX(1); opacity: 1; }
	100% { transform: scaleX(1); opacity: 0.4; }
}

@keyframes ubs-fx-marquee {
	to { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.ubs-fx-track {
		animation: none;
	}
}

.ubs-bg-static [data-ubs-bg-layer],
.ubs-bg-lite [data-ubs-bg-layer][data-ubs-bg-load="heavy"] {
	display: none !important;
}
