/* ============================================================
   CURSOR.CSS — Sri Garuda Decorators
   Custom flower cursor — replaces default OS cursor.
   Click effect: petals burst outward.
   Hover effect: cursor grows and glows.
   ============================================================ */

/* ── Hide default cursor everywhere ── */
*,
*::before,
*::after {
  cursor: none !important;
}

/* ── Main cursor — flower shape ── */
.sgd-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, opacity 0.3s ease;
  will-change: transform;
}

/* ── Cursor follower / trailing ring ── */
.sgd-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
  will-change: transform;
}

/* Follower ring */
.sgd-cursor-follower-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid rgba(242, 217, 160, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease, width 0.3s ease, height 0.3s ease;
}

/* ── SVG flower inside cursor ── */
.sgd-cursor-svg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 4px rgba(242, 217, 160, 0.6));
}

/* ── Hover state — cursor grows ── */
body.cursor-hover .sgd-cursor {
  transform: translate(-50%, -50%) scale(1.5);
}
body.cursor-hover .sgd-cursor-svg {
  filter: drop-shadow(0 0 8px rgba(242, 217, 160, 1));
}
body.cursor-hover .sgd-cursor-follower {
  width: 64px;
  height: 64px;
}
body.cursor-hover .sgd-cursor-follower-ring {
  border-color: rgba(242, 217, 160, 0.9);
  transform: scale(1.1);
}

/* ── Click state — cursor bursts ── */
body.cursor-click .sgd-cursor {
  transform: translate(-50%, -50%) scale(0.7);
}
body.cursor-click .sgd-cursor-svg {
  filter: drop-shadow(0 0 14px rgba(242, 217, 160, 1));
}

/* ── Hidden when leaving window ── */
body.cursor-hidden .sgd-cursor,
body.cursor-hidden .sgd-cursor-follower {
  opacity: 0;
}

/* ── Click burst particles ── */
.sgd-cursor-burst {
  position: fixed;
  pointer-events: none;
  z-index: 999997;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
}

/* Individual petal burst particle */
.sgd-petal {
  position: absolute;
  width: 10px;
  height: 10px;
  transform-origin: center center;
  border-radius: 50% 0 50% 0;
  opacity: 1;
  animation: petalBurst 0.6s ease-out forwards;
}

/* Gold particles on click */
.sgd-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sand-gold, #F2D9A0);
  opacity: 1;
  animation: sparkBurst 0.5s ease-out forwards;
}

/* ── Burst animations ── */
@keyframes petalBurst {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0) rotate(var(--rot));
    opacity: 0;
  }
}

@keyframes sparkBurst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* ── Rotation animation on flower ── */
.sgd-cursor-svg {
  animation: slowRotate 8s linear infinite;
}
body.cursor-hover .sgd-cursor-svg {
  animation: slowRotate 4s linear infinite;
}
body.cursor-click .sgd-cursor-svg {
  animation: quickSpin 0.3s ease-out;
}

@keyframes slowRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes quickSpin {
  from { transform: rotate(0deg) scale(0.7); }
  to   { transform: rotate(180deg) scale(1); }
}

/* ── Mobile: disable custom cursor (touch devices) ── */
@media (hover: none) and (pointer: coarse) {
  * { cursor: auto !important; }
  .sgd-cursor,
  .sgd-cursor-follower,
  .sgd-cursor-burst { display: none !important; }
}