/* Homepage intro (see inc/intro.php and assets/js/intro.js). */
.t1-intro-overlay {
	display: none;
}

html.t1-intro {
	overflow: hidden;
}

html.t1-intro .t1-intro-overlay {
	display: block;
}

.t1-intro-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	pointer-events: none;
}

.t1-intro-overlay__bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	/* Built from gradients (no image) to echo the hero's lit navy paper: light from the top right, falling off to deep navy bottom left. */
	background:
		radial-gradient(115% 90% at 90% 6%, rgba(58, 94, 138, 0.42) 0%, rgba(28, 54, 88, 0.22) 34%, rgba(16, 47, 71, 0) 62%),
		radial-gradient(85% 75% at 6% 100%, rgba(2, 7, 16, 0.8) 0%, rgba(2, 7, 16, 0) 62%),
		linear-gradient(118deg, #06122a 0%, #0a1c34 40%, #0f2a44 72%, #15344f 100%);
}

/* Slow drifting light, like the glow moving across the paper. */
.t1-intro-overlay__bg::before {
	content: "";
	position: absolute;
	inset: -20%;
	background: radial-gradient(40% 35% at 70% 30%, rgba(90, 130, 175, 0.16) 0%, rgba(90, 130, 175, 0) 70%);
	animation: t1-intro-drift 7s ease-in-out infinite alternate;
}

/* Fine paper grain (generated noise, a few hundred bytes). */
.t1-intro-overlay__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
	opacity: 0.13;
	mix-blend-mode: overlay;
}

@keyframes t1-intro-drift {
	from {
		transform: translate(-6%, 4%);
	}
	to {
		transform: translate(6%, -4%);
	}
}

.t1-intro-overlay__player {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(78vw, 520px);
	transform: translate(-50%, -50%);
	transform-origin: 0 0;
	will-change: transform, opacity;
}

.t1-intro-overlay svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.t1-intro-overlay path {
	fill: #fff;
}

/* Start states (the script animates from these). */
.t1-intro-overlay .t1i-draw {
	fill-opacity: 0;
	stroke: #fff;
	stroke-width: 1.2;
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
}

.t1-intro-overlay .t1i-key-move,
.t1-intro-overlay .t1i-one-move,
.t1-intro-overlay .t1i-key-turn,
.t1-intro-overlay .t1i-line,
.t1-intro-overlay .t1i-letter,
.t1-intro-overlay .t1i-cities {
	transform-box: fill-box;
	transform-origin: center;
}

.t1-intro-overlay .t1i-key-move {
	transform: translateX(-70px);
}

.t1-intro-overlay .t1i-one-move {
	transform: translateX(70px);
}

.t1-intro-overlay .t1i-line {
	transform: scaleX(0);
}

.t1-intro-overlay .t1i-letter,
.t1-intro-overlay .t1i-cities {
	opacity: 0;
}

/* Hero parts stay hidden while the intro plays, then fade in. */
html.t1-intro .site-header,
html.t1-intro .t1-hero-brand,
html.t1-intro #top div:has(> h1) > :first-child,
html.t1-intro #top h1,
html.t1-intro #top h1 + * {
	opacity: 0;
}

@keyframes t1-intro-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes t1-intro-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

html.t1-intro-reveal .site-header {
	animation: t1-intro-fade 0.8s ease 0.1s both;
}

html.t1-intro-reveal #top h1 {
	animation: t1-intro-up 0.8s cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

html.t1-intro-reveal #top h1 + * {
	animation: t1-intro-up 0.8s cubic-bezier(0.2, 0.7, 0.25, 1) 0.15s both;
}
