/**
 * RSI Toolkit — Fly-through Intro (Projects hero), after floema.com.
 *
 * Measured on floema: the hero is exactly one viewport tall, the image layer
 * sits BEHIND the title (z-index -1 there), and the title is centred in the
 * middle of the screen. The section bleeds full width and up behind the
 * theme's transparent header, like the other RSI heroes.
 */

.rsi-fly {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
	height: 100vh;
	height: 100svh;
	min-height: 560px;
	overflow: hidden;
	isolation: isolate;
	background-color: #fff;
}

.rsi-fly__canvas {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.rsi-fly__content {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 32px;
	padding: 0 24px;
	text-align: center;
	pointer-events: none;
}

.rsi-fly__title {
	max-width: 900px;
	margin: 0;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 64px;
	line-height: 1.12;
	letter-spacing: -1.5px;
	color: #0a0a0a;
	text-align: center;
}

.rsi-fly__line {
	display: block;
}

/*
 * Entrance (floema: each line from yPercent -100 + fade, 0.8s circ.out, 0.1s
 * apart). Hidden only while the reveal gate is on and the scene is not ready;
 * the 3.5s failsafe shows the title anyway if the script never arrives.
 */
html.rsi-anim .rsi-fly:not(.is-ready) .rsi-fly__title {
	opacity: 0;
	animation: rsi-fly-failsafe 0s 3.5s forwards;
}

@keyframes rsi-fly-failsafe {
	to { opacity: 1; }
}

.rsi-fly.is-ready .rsi-fly__line {
	animation: rsi-fly-line .8s cubic-bezier(0, .55, .45, 1) backwards;
}

@keyframes rsi-fly-line {
	from {
		opacity: 0;
		transform: translateY(-100%);
	}
}

.rsi-fly__btn,
.rsi-fly__btn:hover,
.rsi-fly__btn:focus {
	text-decoration: none !important;
}

.rsi-fly__btn {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	padding: 14px 28px;
	border-radius: 999px;
	background: #bf0031;
	color: #fff !important;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 16px;
	letter-spacing: .3px;
}

@media (max-width: 767px) {
	.rsi-fly__title {
		font-size: 36px;
		letter-spacing: -.8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rsi-fly.is-ready .rsi-fly__line {
		animation: none;
	}
}
