/* [GH05T] Custom Cursor — web (Tebex theme). Colors via --cg-main (set by gh-cursor.js). */

:root { --cg-main: 255, 50, 50; }

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

.cg-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999999;
  transform: translate3d(0, 0, 0);
  will-change: transform, filter;
  display: none;
}

.cg-hotspot {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, rgb(var(--cg-main)) 70%, transparent 100%);
  box-shadow: 0 0 6px rgba(var(--cg-main), 0.95), 0 0 12px rgba(var(--cg-main), 0.55);
  pointer-events: none;
  z-index: 1000000;
  will-change: transform;
  translate: -2px -2px;
  display: none;
}

body.cg-on .cg-cursor,
body.cg-on .cg-hotspot { display: block; }

.cg-cursor svg {
  display: block;
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), filter 0.12s ease;
}

.cg-cursor.cg-hover svg {
  transform: scale(1.06);
  animation: cg-hover-breathe 1.1s ease-in-out infinite;
}

@keyframes cg-hover-breathe {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(var(--cg-main), 0.55)); }
  50%      { filter: drop-shadow(0 0 8px rgba(var(--cg-main), 0.95)); }
}

.cg-cursor.cg-click svg {
  transform: scale(0.78) rotate(6deg);
  filter: brightness(1.6) drop-shadow(0 0 16px rgba(var(--cg-main), 0.9));
  animation: none;
}

.cg-click-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999997;
  border: 2px solid rgba(var(--cg-main), 0.65);
  box-shadow: 0 0 12px rgba(var(--cg-main), 0.4), inset 0 0 8px rgba(var(--cg-main), 0.25);
  transform: scale(0.2);
  opacity: 0.9;
  animation: cg-ring-expand 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cg-ring-expand {
  0%   { transform: scale(0.2); opacity: 0.9; }
  60%  { transform: scale(1.1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.cg-click-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--cg-main), 0.40) 0%, transparent 70%);
  opacity: 0.6;
  animation: cg-flash 0.6s ease-out forwards;
}

@keyframes cg-flash { to { opacity: 0; transform: scale(1.4); } }

.cg-ripple {
  position: fixed;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--cg-main), 0.85);
  pointer-events: none;
  z-index: 999997;
  transform: translate(-50%, -50%) scale(0);
  animation: cg-ripple-expand 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cg-ripple-expand {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  60%  { opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

.cg-trail {
  position: fixed;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(var(--cg-main), 0.22);
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%, -50%);
  animation: cg-fadeOut 0.4s ease forwards;
}

@keyframes cg-fadeOut {
  to { opacity: 0; transform: translate(-50%, -50%) scale(0.15); }
}

@media (prefers-reduced-motion: reduce) {
  body.cg-on,
  body.cg-on * { cursor: auto !important; }
  body.cg-on .cg-cursor,
  body.cg-on .cg-hotspot { display: none !important; }
}
