/* JHC 3D Logo — Lewis Marketing */

.jhc3d {
	--jhc3d-w: 260px;
	display: block;
	position: relative;
	width: var(--jhc3d-w);
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	perspective: 900px;
	perspective-origin: 50% 40%;
	line-height: 0;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	animation: jhc3d-fade 0.6s ease-out both;
}
.jhc3d--left  { margin-left: 0; margin-right: auto; }
.jhc3d--right { margin-left: auto; margin-right: 0; }

@media (max-width: 767px) {
	.jhc3d { width: var(--jhc3d-w-m, var(--jhc3d-w)); }
}

.jhc3d:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 8px;
	border-radius: 6px;
}

.jhc3d__stage,
.jhc3d__float,
.jhc3d__object {
	display: block;
	position: relative;
	transform-style: preserve-3d;
}

/* One-time entrance: the logo turns into place */
.jhc3d__stage {
	animation: jhc3d-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Slow idle turn so the depth stays visible */
.jhc3d--sway .jhc3d__float {
	animation: jhc3d-sway 10s ease-in-out 1.2s infinite;
}
.jhc3d--tilt:hover .jhc3d__float {
	animation-play-state: paused;
}

/* Mouse tilt target */
.jhc3d__object {
	transform: rotateX(var(--jhc3d-rx, 0deg)) rotateY(var(--jhc3d-ry, 0deg));
	transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: transform;
}
.jhc3d.is-tilting .jhc3d__object {
	transition-duration: 0.15s;
}

/* Images — extra specificity beats theme/Elementor img rules */
.jhc3d img.jhc3d__face,
.jhc3d img.jhc3d__layer {
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	-webkit-user-select: none;
	user-select: none;
	pointer-events: none;
	backface-visibility: hidden;
}
.jhc3d img.jhc3d__face {
	display: block;
	position: relative;
	width: 100%;
	height: auto;
	transform: translateZ(0.5px);
}
.jhc3d img.jhc3d__layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Light sweep, clipped to the logo shape */
.jhc3d__sheen {
	position: absolute;
	inset: 0;
	transform: translateZ(1px);
	pointer-events: none;
	background: linear-gradient(
		105deg,
		rgba(255, 255, 255, 0) 38%,
		rgba(255, 255, 255, 0.5) 50%,
		rgba(255, 255, 255, 0) 62%
	);
	background-size: 250% 100%;
	background-position: 100% 0;
	background-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	animation: jhc3d-sheen 1.3s ease-in-out 0.9s both;
}

/* Ground shadow */
.jhc3d__shadow {
	position: absolute;
	left: 14%;
	right: 14%;
	bottom: -7%;
	height: 9%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0));
	filter: blur(3px);
	pointer-events: none;
	animation: jhc3d-fade 1.2s ease-out 0.4s both;
}

@keyframes jhc3d-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes jhc3d-enter {
	from { transform: translateY(10px) rotateX(16deg) rotateY(-42deg) scale(0.92); }
	to   { transform: none; }
}
@keyframes jhc3d-sway {
	0%, 100% { transform: rotateY(0deg) rotateX(0deg); }
	25%      { transform: rotateY(-11deg) rotateX(2deg); }
	75%      { transform: rotateY(11deg) rotateX(-2deg); }
}
@keyframes jhc3d-sheen {
	from { background-position: 100% 0; }
	to   { background-position: 0% 0; }
}

/* Reduced motion: still logo, angled so the depth reads */
@media (prefers-reduced-motion: reduce) {
	.jhc3d,
	.jhc3d__stage,
	.jhc3d__float,
	.jhc3d__sheen,
	.jhc3d__shadow {
		animation: none !important;
	}
	.jhc3d__float {
		transform: rotateY(-12deg) rotateX(3deg);
	}
	.jhc3d__object {
		transition: none;
	}
}
