/**
 * Equinox cursor — Autocat dual pointer.
 *
 * Colour: #fff + mix-blend-mode:difference (always opposite of backdrop).
 * Motion root uses left/top only — transform on this node breaks blending.
 */

.eq-cursor {
	--eq-c-size: 10px;
	--eq-c-ring: 40px;
	--lx: 0px;
	--ly: 0px;
	--eq-c-ease: cubic-bezier(0.16, 0.84, 0.24, 1);

	position: fixed;
	top: 0;
	left: 0;
	z-index: 2147483000;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
	pointer-events: none;
	visibility: hidden;
	mix-blend-mode: difference;
}

.eq-cursor.is-on {
	visibility: visible;
}

.eq-cursor.is-native {
	visibility: hidden !important;
}

.eq-cursor__dot,
.eq-cursor__ring {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	box-sizing: border-box;
	pointer-events: none;
	border-radius: 50%;
	background-color: #fff;
	transition:
		width 0.45s var(--eq-c-ease),
		height 0.45s var(--eq-c-ease),
		border-radius 0.45s var(--eq-c-ease),
		opacity 0.3s var(--eq-c-ease),
		background-color 0.35s var(--eq-c-ease),
		border-color 0.35s var(--eq-c-ease);
}

.eq-cursor__dot {
	width: var(--eq-c-size);
	height: var(--eq-c-size);
	transform: translate(-50%, -50%);
}

.eq-cursor__ring {
	width: var(--eq-c-ring);
	height: var(--eq-c-ring);
	background-color: transparent;
	border: 1.5px solid #fff;
	transform: translate(calc(-50% + var(--lx)), calc(-50% + var(--ly)));
}

/* Press */
.eq-cursor.is-down {
	--eq-c-size: 7px;
	--eq-c-ring: 30px;
}

.eq-cursor.is-down[data-mode='link'],
.eq-cursor.is-down[data-mode='image'],
.eq-cursor.is-down[data-mode='heading'] {
	--eq-c-ring: 46px;
}

/* Link */
.eq-cursor[data-mode='link'] {
	--eq-c-size: 12px;
	--eq-c-ring: 52px;
}

.eq-cursor[data-mode='link'] .eq-cursor__dot {
	opacity: 0;
}

.eq-cursor[data-mode='link'] .eq-cursor__ring {
	background-color: #fff;
	border-color: transparent;
}

/* Image */
.eq-cursor[data-mode='image'] {
	--eq-c-size: 8px;
	--eq-c-ring: 72px;
}

.eq-cursor[data-mode='image'] .eq-cursor__dot {
	opacity: 0;
}

.eq-cursor[data-mode='image'] .eq-cursor__ring {
	background-color: rgba(255, 255, 255, 0.2);
	border-color: #fff;
}

/* Text */
.eq-cursor[data-mode='text'] {
	--eq-c-size: 2px;
	--eq-c-ring: 22px;
}

.eq-cursor[data-mode='text'] .eq-cursor__dot {
	width: 2px;
	height: 22px;
	border-radius: 1px;
}

.eq-cursor[data-mode='text'] .eq-cursor__ring {
	opacity: 0;
}

/* Heading */
.eq-cursor[data-mode='heading'] {
	--eq-c-size: 6px;
	--eq-c-ring: 60px;
}

.eq-cursor[data-mode='heading'] .eq-cursor__dot {
	opacity: 0;
}

.eq-cursor[data-mode='heading'] .eq-cursor__ring {
	background-color: rgba(255, 255, 255, 0.14);
	border-color: #fff;
}

@media (hover: hover) and (pointer: fine) {
	html.eq-cursor-on,
	html.eq-cursor-on body,
	html.eq-cursor-on body * {
		cursor: none !important;
	}

	html.eq-cursor-on input,
	html.eq-cursor-on textarea,
	html.eq-cursor-on select,
	html.eq-cursor-on [contenteditable='true'],
	html.eq-cursor-on [data-eq-cursor='none'],
	html.eq-cursor-on [data-eq-cursor='none'] * {
		cursor: auto !important;
	}

	html.eq-cursor-on input[type='text'],
	html.eq-cursor-on input[type='email'],
	html.eq-cursor-on input[type='tel'],
	html.eq-cursor-on input[type='search'],
	html.eq-cursor-on input[type='url'],
	html.eq-cursor-on input[type='password'],
	html.eq-cursor-on textarea,
	html.eq-cursor-on [contenteditable='true'] {
		cursor: text !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eq-cursor {
		display: none !important;
	}

	html.eq-cursor-on,
	html.eq-cursor-on body,
	html.eq-cursor-on body * {
		cursor: auto !important;
	}
}
