/**
 * Custom cursor — fine pointer + hover devices only (see JS body class).
 * mix-blend-mode must live on the positioned element (not a child inside transform).
 */

body.tw-custom-cursor--on,
body.tw-custom-cursor--on * {
	cursor: none !important;
}

.tw-custom-cursor {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 2147483647;
	width: 12px;
	height: 12px;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
	mix-blend-mode: difference;
	isolation: auto;
	will-change: transform, width, height, opacity;
	transition:
		width 0.22s ease,
		height 0.22s ease,
		opacity 0.15s ease;
}

.tw-custom-cursor__shape {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.52);
	transform: rotate(0deg);
	transform-origin: 50% 50%;
	transition:
		transform 0.22s ease,
		border-width 0.22s ease,
		border-color 0.22s ease,
		background 0.22s ease;
}

.tw-custom-cursor.is-visible {
	opacity: 1;
	visibility: visible;
}

.tw-custom-cursor.is-hidden {
	opacity: 0;
	visibility: hidden;
}

.tw-custom-cursor.is-expanded {
	width: 16px;
	height: 16px;
}

.tw-custom-cursor.is-link .tw-custom-cursor__shape {
	border-width: 2px;
	border-color: rgba(255, 255, 255, 0.68);
	background: rgba(255, 255, 255, 0.62);
}

/* Brighter translucency over the contact overlay — still inverts. */
body.tw-contact-overlay-open .tw-custom-cursor {
	mix-blend-mode: difference;
}

body.tw-contact-overlay-open .tw-custom-cursor__shape {
	border-color: rgba(255, 255, 255, 0.92);
	background: rgba(255, 255, 255, 0.78);
}

body.tw-contact-overlay-open .tw-custom-cursor.is-link .tw-custom-cursor__shape {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.9);
}

@media (prefers-reduced-motion: reduce) {
	.tw-custom-cursor {
		transition: opacity 0.15s ease;
	}
}
