/* Sparkle Button Styles */
.sparkle-button {
    /* Reset any inherited styles from btn-helix-premium */
    box-shadow: none !important;

    --active: 1;
    --transition: 0.3s;
    --spark: 1.8s;
    --cut: 0.1em;
    --bg: radial-gradient(40% 50% at center 100%,
            hsl(330 calc(var(--active) * 97%) 72% / var(--active)),
            transparent),
        radial-gradient(80% 100% at center 120%,
            hsl(320 calc(var(--active) * 97%) 70% / var(--active)),
            transparent),
        hsl(320 calc(var(--active) * 97%) calc((var(--active) * 44%) + 12%));

    background: var(--bg);
    font-size: 1.1rem;
    font-weight: 500;
    border: 0 !important;
    outline: none !important;
    cursor: pointer;
    padding: 0.9em 1.5em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    white-space: nowrap;
    border-radius: 100px;
    position: relative;
    box-shadow:
        0 0 calc(var(--active) * 3em) calc(var(--active) * 1em) hsl(320 97% 61% / 0.75),
        0 0em 0 0 hsl(320 calc(var(--active) * 97%) calc((var(--active) * 50%) + 30%)) inset,
        0 -0.05em 0 0 hsl(320 calc(var(--active) * 97%) calc(var(--active) * 60%)) inset !important;
    transition: box-shadow var(--transition), scale var(--transition), background var(--transition), color var(--transition);
    scale: calc(1 + (var(--active) * 0.1));
}

.sparkle-button:active {
    scale: 1;
}

.sparkle-button:is(:hover, :focus-visible) {
    --active: 1;
}

/* Sparkle Icon Animation */
.sparkle {
    inline-size: 1.25em;
    translate: -25% -5%;
}

.sparkle path {
    color: hsl(0 0% calc((var(--active, 0) * 70%) + var(--base)));
    transform-box: fill-box;
    transform-origin: center;
    fill: currentColor;
    stroke: currentColor;
    animation-delay: calc((var(--transition) * 1.5) + (var(--delay) * 1s));
    animation-duration: 0.6s;
    transition: color var(--transition);
}

.sparkle-button:is(:hover, :focus-visible) .sparkle path {
    animation-name: bounce;
}

@keyframes bounce {

    35%,
    65% {
        scale: var(--scale);
    }
}

.sparkle path:nth-of-type(1) {
    --scale: 0.5;
    --delay: 0.1;
    --base: 40%;
}

.sparkle path:nth-of-type(2) {
    --scale: 1.5;
    --delay: 0.2;
    --base: 20%;
}

.sparkle path:nth-of-type(3) {
    --scale: 2.5;
    --delay: 0.35;
    --base: 30%;
}

/* Border Glow Effect - DISABLED */
.sparkle-button:before {
    display: none;
}

/* Rotating Spark Effect */
.spark {
    position: absolute;
    inset: 0;
    border-radius: 100px;
    rotate: 0deg;
    overflow: hidden;
    mask: linear-gradient(white, transparent 50%);
    animation: flip calc(var(--spark) * 2) infinite steps(2, end);
}

@keyframes flip {
    to {
        rotate: 360deg;
    }
}

.spark:before {
    content: "";
    position: absolute;
    width: 200%;
    aspect-ratio: 1;
    top: 0%;
    left: 50%;
    z-index: -1;
    translate: -50% -15%;
    rotate: 0;
    transform: rotate(-90deg);
    opacity: calc((var(--active)) + 0.4);
    background: conic-gradient(from 0deg,
            transparent 0 340deg,
            white 360deg);
    transition: opacity var(--transition);
    animation: rotate var(--spark) linear infinite both;
}

.spark:after {
    content: "";
    position: absolute;
    inset: var(--cut);
    border-radius: 100px;
}

@keyframes rotate {
    to {
        transform: rotate(90deg);
    }
}

/* Backdrop */
.backdrop {
    position: absolute;
    inset: var(--cut);
    background: var(--bg);
    border-radius: 100px;
    transition: background var(--transition);
}

/* Button Text */
.sparkle-button .text {
    translate: 2% -6%;
    letter-spacing: 0.01ch;
    background: linear-gradient(90deg,
            hsl(0 0% calc((var(--active) * 100%) + 65%)),
            hsl(0 0% calc((var(--active) * 100%) + 26%)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: background var(--transition);
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sparkle-button {
        font-size: 1rem;
        padding: 0.8em 1.2em;
    }
}