/* Husky Intro — see husky-intro.js */
html.hw-cover body::after { content: ''; position: fixed; inset: 0; background: #000; z-index: 2147483600; }
html.hw-hide-logo a.husky-logo .hl-letter { visibility: hidden; }
html.hw-hide-player .hs-player { opacity: 0; }
html.hw-hide-menu smp-nav-section ul > li, html.hw-hide-menu .smp-navbar ul > li { opacity: 0; }
html.hw-hide-menu .hs-player li { opacity: 1; }
/* .001 rather than 0: still invisible (and under the black intro), but the browser counts the pictures
   as shown when they arrive, so speed tests don't wait for the intro to finish (LCP). */
html.hw-hide-grid .husky-grid .hg-tile .hg-hit { opacity: 0; }
/* (only the first screenful — painting every tile under the intro kept slow phones busy) */
html.hw-hide-grid .husky-grid .hg-tile:nth-child(-n+6) .hg-hit { opacity: .001; }
html.hw-intro { overflow: hidden; }

.hw-intro-overlay {
	position: fixed; inset: 0;
	z-index: 2147483600;
	background: #000;
	transition: background-color .7s ease, opacity .45s ease;
}
.hw-intro-overlay.is-revealed { background-color: transparent; pointer-events: none; transition: background-color .45s ease; }
.hw-intro-overlay.is-out { opacity: 0; pointer-events: none; }
.hw-wash { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity .55s ease; }
.hw-nogl .hw-wash { background: conic-gradient(from 0deg, #ff1f1f, #ffe600, #00e64d, #00f0ff, #3d5cff, #ff2bd6, #ff1f1f); filter: blur(40px) saturate(1.6); transform: scale(1.4); animation: hw-spin 6s linear infinite; }
@keyframes hw-spin { to { transform: scale(1.4) rotate(360deg); } }

/* Black falls over the wash everywhere except inside the letters (multiply: white shows the wash). */
.hw-mask {
	position: absolute; inset: 0;
	display: grid; place-items: center;
	background: #000;
	mix-blend-mode: multiply;
	opacity: 0;
	transition: opacity .9s cubic-bezier(.4, 0, .2, 1);
}
.hw-intro-overlay.is-masked .hw-mask { opacity: 1; }
.hw-word {
	color: #fff;
	font-family: Helvetica, Arial, sans-serif;
	font-weight: 700;
	font-size: clamp(48px, 10.5vw, 200px);
	line-height: 1;
	white-space: nowrap;
	transform: scale(1.06);
	transition: transform 1.6s cubic-bezier(.2, .8, .2, 1);
}
.hw-intro-overlay.is-masked .hw-word { transform: none; }
.hw-intro-overlay.is-flying .hw-wash { opacity: 0; }
.hw-intro-overlay.is-flying .hw-mask { opacity: 0; transition-duration: .25s; }

/* Flying letters: the rainbow travels with them. */
.hw-flyers { position: absolute; inset: 0; pointer-events: none; transition: opacity .12s linear; }
.hw-flyer {
	position: fixed;
	transform-origin: 0 0;
	white-space: pre;
	color: transparent;
	background: linear-gradient(115deg, #ff1f1f, #ffe600, #00e64d, #00f0ff, #3d5cff, #ff2bd6, #ff1f1f);
	background-size: 300% 100%;
	-webkit-background-clip: text; background-clip: text;
	animation: hw-flow 1.2s linear infinite;
	animation-delay: calc(var(--d, 0s) * -1);
	filter: drop-shadow(-3px 0 0 rgba(255, 0, 60, .55)) drop-shadow(3px 0 0 rgba(0, 240, 255, .55));
	will-change: transform;
}
@keyframes hw-flow { to { background-position: 300% 0; } }
.hw-flyer.is-landed { background: none; -webkit-background-clip: border-box; background-clip: border-box; animation: none; filter: none; }

.hw-skip {
	position: absolute; right: 22px; bottom: 22px;
	padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 0;
	background: rgba(0, 0, 0, .35); color: #fff;
	font: 600 10px/1 Helvetica, Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase;
	cursor: pointer;
	opacity: .7;
}
.hw-intro-overlay.is-flying .hw-skip { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .hw-intro-overlay { display: none !important; } }

/* Echo left behind as a letter takes off */
.hw-echo { position: fixed; white-space: pre; pointer-events: none; color: #ff1f1f; background: none; -webkit-background-clip: border-box; background-clip: border-box; animation: none; filter: none; }
/* Intro Lab sits above the intro so you can tune while it plays */
.hw-introlab { z-index: 2147483640 !important; top: 90px; bottom: auto; left: auto; right: 16px; }
