/* Cursor utilities
---------------------------------------------------------------------------- */

.cn-cursor-layer {
	position: relative;
}

.cn-cursor-auto-layer {
	display: inline-block;
}

div.cn-cursor-auto-layer {
	display: block;
}

.cn-cursor-presence-target {
	position: relative;
	transform: translate(0, 0) scale(1);
	transform-origin: center;
	will-change: transform;
	z-index: 1;
}

.cn-cursor-auto-layer > .cn-cursor {
	z-index: 10;
}

.cn-cursor-follow {
	--cn-cursor-follow-base-transform: translate3d(0, 0, 0);
	--cn-cursor-follow-scale: 1;
	--cn-cursor-follow-speed: 160ms;
	--cn-cursor-follow-return-speed: 920ms;
	--cn-cursor-follow-x: 0px;
	--cn-cursor-follow-y: 0px;
	position: relative;
	transform: var(--cn-cursor-follow-base-transform) translate3d(var(--cn-cursor-follow-x), var(--cn-cursor-follow-y), 0) scale(var(--cn-cursor-follow-scale));
	transition: transform var(--cn-cursor-follow-return-speed) cubic-bezier(0.16, 1, 0.3, 1);
	will-change: transform;
	z-index: 1;
}

a.cn-cursor-follow,
b.cn-cursor-follow,
em.cn-cursor-follow,
span.cn-cursor-follow,
strong.cn-cursor-follow {
	display: inline-block;
}

.cn-cursor-follow.is-cn-cursor-follow-active {
	transition-duration: var(--cn-cursor-follow-speed);
	transition-timing-function: cubic-bezier(0.2, 0, 0.18, 1);
}

.cn-cursor-follow-lift.is-cn-cursor-follow-active {
	--cn-cursor-follow-scale: 1.025;
}

.cn-cursor-follow-subtle {
	--cn-cursor-follow-speed: 220ms;
}

.cn-cursor-follow-strong,
.cn-cursor-follow-direct {
	--cn-cursor-follow-return-speed: 1080ms;
}

.cn-cursor-follow-tight {
	--cn-cursor-follow-speed: 90ms;
}

.cn-cursor-follow-loose {
	--cn-cursor-follow-speed: 360ms;
}

.cn-cursor {
	--cn-cursor-active-duration: 4s;
	--cn-cursor-arc-x: 0px;
	--cn-cursor-arc-y: 0px;
	--cn-cursor-easing: cubic-bezier(0.2, 0, 0.18, 1);
	--cn-cursor-label-background: var(--cn-presence-cursor);
	--cn-cursor-label-color: var(--cn-presence-cursor-text);
	--cn-cursor-drag-height: 0px;
	--cn-cursor-drag-left: 0px;
	--cn-cursor-drag-top: 0px;
	--cn-cursor-drag-width: 0px;
	--cn-cursor-move-x: 0px;
	--cn-cursor-move-y: 0px;
	--cn-cursor-scale: 1;
	--cn-cursor-shadow: rgba(0, 0, 0, 0.22);
	--cn-cursor-trace-angle: 0deg;
	--cn-cursor-trace-length: 0px;
	display: inline-block;
	height: 3.5rem;
	pointer-events: none;
	position: relative;
	user-select: none;
	vertical-align: top;
	width: 11rem;
	z-index: 2;
}

.cn-cursor.is-cn-cursor-managed {
	opacity: 0;
	visibility: hidden;
}

.cn-cursor.is-cn-cursor-visible,
.cn-cursor:not(.is-cn-cursor-managed) {
	opacity: 1;
	visibility: visible;
}

.cn-cursor__body,
.cn-cursor__scale,
.cn-cursor__jitter,
.cn-cursor:not(.is-cn-cursor-ready)::before,
.cn-cursor:not(.is-cn-cursor-ready)::after {
	display: block;
	left: 0;
	position: absolute;
	top: 0;
}

.cn-cursor__body,
.cn-cursor__scale,
.cn-cursor__jitter {
	height: 100%;
	width: 100%;
}

.cn-cursor__body {
	transform-origin: 0 0;
	z-index: 3;
}

.cn-cursor__scale {
	transform: scale(var(--cn-cursor-scale));
	transform-origin: 0 0;
}

.cn-cursor__jitter {
	transform-origin: 0.8rem 0.8rem;
}

.cn-cursor__pointer {
	filter: drop-shadow(0 0.16rem 0.22rem var(--cn-cursor-shadow));
	height: 1.62rem;
	left: 0;
	position: absolute;
	top: 0;
	transform: rotate(2deg);
	transform-origin: 0 0;
	width: 1.42rem;
}

.cn-cursor:not(.is-cn-cursor-ready)::before {
	background: url("../img/presence-cursor-pointer.svg") center / contain no-repeat;
	content: "";
	filter: drop-shadow(0 0.16rem 0.22rem var(--cn-cursor-shadow));
	height: 1.62rem;
	transform: rotate(2deg);
	transform-origin: 0 0;
	width: 1.42rem;
}

.cn-cursor__pointer-image {
	display: block;
	height: 100%;
	width: 100%;
}

.cn-cursor__label,
.cn-cursor:not(.is-cn-cursor-ready)::after {
	background: var(--cn-cursor-label-background);
	border-radius: 0.16rem;
	box-shadow: 0 0.2rem 0.38rem var(--cn-cursor-shadow);
	color: var(--cn-cursor-label-color);
	display: block;
	font-family: var(--cn-font-sans);
	font-size: 0.9rem;
	font-weight: 600;
	left: 1.8rem;
	letter-spacing: 0;
	line-height: 1;
	padding: 0.43rem 0.52rem 0.48rem;
	position: absolute;
	text-transform: lowercase;
	top: 1.18rem;
	white-space: nowrap;
}

.cn-cursor__drag-box,
.cn-cursor__trace,
.cn-cursor__hover-target,
.cn-cursor__press-target,
.cn-cursor__click-ring {
	display: block;
	left: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	top: 0;
	z-index: 1;
}

.cn-cursor__drag-box {
	background: rgba(37, 99, 255, 0.14);
	border: 1px solid rgba(37, 99, 255, 0.58);
	border-radius: 0.3rem;
	height: var(--cn-cursor-drag-height);
	left: calc(0.36rem + var(--cn-cursor-drag-left));
	top: calc(0.42rem + var(--cn-cursor-drag-top));
	transform: scale(0);
	transform-origin: 0 0;
	width: var(--cn-cursor-drag-width);
	z-index: 0;
}

.cn-cursor__trace {
	background: rgba(37, 99, 255, 0.72);
	border-radius: 999px;
	height: 2px;
	left: 0.38rem;
	top: 0.48rem;
	transform: rotate(var(--cn-cursor-trace-angle)) scaleX(0);
	transform-origin: 0 50%;
	width: var(--cn-cursor-trace-length);
}

.cn-cursor__hover-target,
.cn-cursor__press-target,
.cn-cursor__click-ring {
	border: 2px solid rgba(37, 99, 255, 0.72);
	border-radius: 999px;
	height: 1.4rem;
	left: -0.45rem;
	top: -0.45rem;
	transform: scale(0.72);
	width: 1.4rem;
}

.cn-cursor__hover-target {
	background: rgba(37, 99, 255, 0.08);
	border-style: dashed;
}

.cn-cursor__press-target {
	background: rgba(37, 99, 255, 0.18);
}

.cn-cursor__click-ring--second {
	z-index: 2;
}

.cn-cursor:not(.is-cn-cursor-ready)::after {
	content: "christophernathaniel";
}

.cn-cursor-small {
	--cn-cursor-scale: 0.82;
	height: 3rem;
	width: 9.5rem;
}

.cn-cursor-large {
	--cn-cursor-scale: 1.18;
	height: 4.25rem;
	width: 13rem;
}

.cn-cursor-ease-linear {
	--cn-cursor-easing: linear;
}

.cn-cursor-ease-soft {
	--cn-cursor-easing: cubic-bezier(0.16, 1, 0.3, 1);
}

.cn-cursor-absolute,
.cn-cursor-top-left,
.cn-cursor-top-right,
.cn-cursor-bottom-left,
.cn-cursor-bottom-right,
.cn-cursor-center {
	position: absolute;
}

.cn-cursor-top-left {
	left: 1rem;
	top: 1rem;
}

.cn-cursor-top-right {
	right: 1rem;
	top: 1rem;
}

.cn-cursor-bottom-left {
	bottom: 1rem;
	left: 1rem;
}

.cn-cursor-bottom-right {
	bottom: 1rem;
	right: 1rem;
}

.cn-cursor-center {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.cn-cursor.is-cn-cursor-running.has-cn-cursor-motion .cn-cursor__body {
	animation: cn-cursor-move var(--cn-cursor-active-duration) var(--cn-cursor-easing) both;
}

.cn-cursor.is-cn-cursor-running.has-cn-cursor-curve .cn-cursor__body {
	animation-name: cn-cursor-curve;
}

.cn-cursor.is-cn-cursor-running.has-cn-cursor-shake .cn-cursor__jitter {
	animation: cn-cursor-shake 720ms cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}

.cn-cursor.is-cn-cursor-running.cn-cursor-click .cn-cursor__click-ring:not(.cn-cursor__click-ring--second),
.cn-cursor.is-cn-cursor-running.cn-cursor-double-click .cn-cursor__click-ring:not(.cn-cursor__click-ring--second) {
	animation: cn-cursor-click var(--cn-cursor-active-duration) ease-out both;
}

.cn-cursor.is-cn-cursor-running.cn-cursor-double-click .cn-cursor__click-ring--second {
	animation: cn-cursor-click var(--cn-cursor-active-duration) ease-out both;
	animation-delay: calc(var(--cn-cursor-active-duration) * 0.18);
}

.cn-cursor.is-cn-cursor-running.cn-cursor-press .cn-cursor__press-target {
	animation: cn-cursor-press var(--cn-cursor-active-duration) ease-out both;
}

.cn-cursor.is-cn-cursor-running.cn-cursor-press .cn-cursor__scale {
	animation: cn-cursor-press-pointer var(--cn-cursor-active-duration) ease-out both;
}

.cn-cursor.is-cn-cursor-running.cn-cursor-hover-pause .cn-cursor__hover-target {
	animation: cn-cursor-hover-target var(--cn-cursor-active-duration) ease-out both;
}

.cn-cursor.is-cn-cursor-running.has-cn-cursor-drag .cn-cursor__drag-box {
	animation: cn-cursor-drag-box var(--cn-cursor-active-duration) var(--cn-cursor-easing) both;
}

.cn-cursor.is-cn-cursor-running.has-cn-cursor-trace .cn-cursor__trace {
	animation: cn-cursor-trace var(--cn-cursor-active-duration) var(--cn-cursor-easing) both;
}

.cn-cursor.is-cn-cursor-running.cn-cursor-orbit .cn-cursor__body {
	animation: cn-cursor-orbit var(--cn-cursor-active-duration) linear both;
}

.cn-cursor.is-cn-cursor-running.cn-cursor-scan .cn-cursor__body {
	animation: cn-cursor-scan var(--cn-cursor-active-duration) var(--cn-cursor-easing) both;
}

.cn-cursor.is-cn-cursor-running.cn-cursor-zigzag .cn-cursor__body {
	animation: cn-cursor-zigzag var(--cn-cursor-active-duration) var(--cn-cursor-easing) both;
}

@media (prefers-reduced-motion: reduce) {
	.cn-cursor-presence-target {
		transform: none !important;
	}

	.cn-cursor-follow {
		--cn-cursor-follow-scale: 1;
		--cn-cursor-follow-x: 0px;
		--cn-cursor-follow-y: 0px;
		transform: var(--cn-cursor-follow-base-transform);
		transition: none;
	}
}

@keyframes cn-cursor-move {
	from {
		transform: translate(0, 0);
	}

	to {
		transform: translate(var(--cn-cursor-move-x), var(--cn-cursor-move-y));
	}
}

@keyframes cn-cursor-curve {
	0% {
		transform: translate(0, 0);
	}

	50% {
		transform: translate(var(--cn-cursor-arc-x), var(--cn-cursor-arc-y));
	}

	100% {
		transform: translate(var(--cn-cursor-move-x), var(--cn-cursor-move-y));
	}
}

@keyframes cn-cursor-click {
	0%,
	22% {
		opacity: 0;
		transform: scale(0.54);
	}

	36% {
		opacity: 1;
		transform: scale(0.82);
	}

	62% {
		opacity: 0;
		transform: scale(1.85);
	}

	100% {
		opacity: 0;
		transform: scale(1.85);
	}
}

@keyframes cn-cursor-press {
	0%,
	16%,
	82%,
	100% {
		opacity: 0;
		transform: scale(0.72);
	}

	28%,
	72% {
		opacity: 1;
		transform: scale(1.12);
	}
}

@keyframes cn-cursor-press-pointer {
	0%,
	18%,
	80%,
	100% {
		transform: scale(var(--cn-cursor-scale));
	}

	30%,
	70% {
		transform: scale(calc(var(--cn-cursor-scale) * 0.92));
	}
}

@keyframes cn-cursor-hover-target {
	0%,
	16%,
	88%,
	100% {
		opacity: 0;
		transform: scale(0.8);
	}

	28%,
	76% {
		opacity: 1;
		transform: scale(1.18);
	}
}

@keyframes cn-cursor-drag-box {
	0%,
	20% {
		opacity: 0;
		transform: scale(0);
	}

	32% {
		opacity: 1;
		transform: scale(0.04);
	}

	86% {
		opacity: 1;
		transform: scale(1);
	}

	100% {
		opacity: 0;
		transform: scale(1);
	}
}

@keyframes cn-cursor-trace {
	0%,
	18% {
		opacity: 0;
		transform: rotate(var(--cn-cursor-trace-angle)) scaleX(0);
	}

	32% {
		opacity: 1;
		transform: rotate(var(--cn-cursor-trace-angle)) scaleX(0);
	}

	86% {
		opacity: 1;
		transform: rotate(var(--cn-cursor-trace-angle)) scaleX(1);
	}

	100% {
		opacity: 0;
		transform: rotate(var(--cn-cursor-trace-angle)) scaleX(1);
	}
}

@keyframes cn-cursor-orbit {
	0% {
		transform: translate(0, 0);
	}

	25% {
		transform: translate(48px, -26px);
	}

	50% {
		transform: translate(96px, 0);
	}

	75% {
		transform: translate(48px, 26px);
	}

	100% {
		transform: translate(0, 0);
	}
}

@keyframes cn-cursor-scan {
	0% {
		transform: translate(-42px, -34px);
	}

	28% {
		transform: translate(88px, -34px);
	}

	50% {
		transform: translate(-42px, 0);
	}

	72% {
		transform: translate(88px, 0);
	}

	100% {
		transform: translate(-42px, 34px);
	}
}

@keyframes cn-cursor-zigzag {
	0% {
		transform: translate(0, 0);
	}

	20% {
		transform: translate(30px, -24px);
	}

	40% {
		transform: translate(60px, 18px);
	}

	60% {
		transform: translate(90px, -18px);
	}

	80% {
		transform: translate(120px, 22px);
	}

	100% {
		transform: translate(150px, 0);
	}
}

@keyframes cn-cursor-shake {
	0%,
	100% {
		transform: translate(0, 0) rotate(0deg);
	}

	18% {
		transform: translate(-1px, 1px) rotate(-1.5deg);
	}

	36% {
		transform: translate(2px, -1px) rotate(1.5deg);
	}

	54% {
		transform: translate(-2px, -1px) rotate(-1deg);
	}

	72% {
		transform: translate(1px, 2px) rotate(1deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cn-cursor,
	.cn-cursor * {
		animation: none !important;
		transition: none !important;
	}

	.cn-cursor.has-cn-cursor-motion .cn-cursor__body {
		transform: translate(var(--cn-cursor-move-x), var(--cn-cursor-move-y));
	}
}
