/* Navbar cat: a 24x16 pixel tabby that lives on the bottom edge of #top-nav.
   The stage covers the nav and is click-through; only the small .navcat box
   (the cat's body) takes pointer events, so the links underneath stay usable. */

.navcat-stage {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 2;
}

.navcat {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 24px;
	height: 16px;
	pointer-events: auto;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	-webkit-user-select: none;
	will-change: transform;
}

.navcat canvas {
	position: absolute;
	left: 0;
	bottom: 0;
	display: block;
	width: 24px;
	height: 30px;
	pointer-events: none;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

/* Visiting (NavCat.visit): the box sits inside a host element another gadget
   positions, e.g. on the top edge of the profile photo. It drops in from
   above and hops off again before walking home along the navbar. */
.navcat.is-perched {
	animation: navcat-land 420ms cubic-bezier(0.3, 1.4, 0.5, 1) both;
}

.navcat.is-perched.is-leaving {
	animation: navcat-hop 260ms ease-in both;
}

@keyframes navcat-land {
	from {
		opacity: 0;
		transform: translate3d(0, -14px, 0);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes navcat-hop {
	from {
		opacity: 1;
		transform: none;
	}
	to {
		opacity: 0;
		transform: translate3d(0, -12px, 0);
	}
}

/* Below the md breakpoint the nav collapses into a burger: no ledge to sit on. */
@media (max-width: 767.98px) {
	.navcat-stage {
		display: none;
	}
}

/* Debug sprite sheet (?gadgetDebug=navcat-sheet) */
.navcat-sheet {
	position: fixed;
	left: 12px;
	top: 70px;
	z-index: 2000;
	display: block;
	image-rendering: pixelated;
}
