/* Crystal Glow footer text — inspired by OriginKit's crystalline glare interaction. */
footer .crystal-glow-text {
    --crystal-text: currentColor;
    --crystal-shadow: #d97706;
    --crystal-glare: rgba(255, 255, 255, 0.92);
    position: relative;
    display: inline-block;
    isolation: isolate;
    color: var(--crystal-text);
    text-shadow: 0 0 0 transparent;
    transition: color 180ms ease, text-shadow 320ms cubic-bezier(.2, .8, .2, 1), transform 320ms cubic-bezier(.2, .8, .2, 1);
}

footer .crystal-glow-label {
    position: relative;
    z-index: 2;
    display: inline;
    color: inherit;
    background-image: linear-gradient(
        112deg,
        currentColor 0%,
        currentColor 38%,
        var(--crystal-glare) 47%,
        #fff 50%,
        var(--crystal-glare) 53%,
        currentColor 62%,
        currentColor 100%
    );
    background-size: 280% 100%;
    background-position: 120% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

footer .crystal-glow-text:hover,
footer .crystal-glow-text:focus-visible,
footer a:hover .crystal-glow-text,
footer a:focus-visible .crystal-glow-text {
    text-shadow:
        0 0 6px color-mix(in srgb, var(--crystal-shadow) 82%, transparent),
        0 0 18px color-mix(in srgb, var(--crystal-shadow) 62%, transparent),
        0 0 34px color-mix(in srgb, var(--crystal-shadow) 34%, transparent);
    transform: translateY(-1px) scale(1.012);
}

footer .crystal-glow-text:hover .crystal-glow-label,
footer .crystal-glow-text:focus-visible .crystal-glow-label,
footer a:hover .crystal-glow-label,
footer a:focus-visible .crystal-glow-label {
    animation: crystal-glare-sweep 850ms cubic-bezier(.18, .82, .25, 1) both;
}

footer .crystal-spark {
    position: absolute;
    z-index: 3;
    width: 0.3em;
    height: 0.3em;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
    filter: drop-shadow(0 0 5px var(--crystal-glare));
}

footer .crystal-spark::before,
footer .crystal-spark::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    border-radius: 999px;
    background: var(--crystal-glare);
}

footer .crystal-spark::before { width: 100%; height: 1px; }
footer .crystal-spark::after { width: 1px; height: 100%; }
footer .crystal-spark:nth-of-type(2) { left: 8%; top: 10%; }
footer .crystal-spark:nth-of-type(3) { left: 32%; top: 96%; }
footer .crystal-spark:nth-of-type(4) { left: 57%; top: 4%; }
footer .crystal-spark:nth-of-type(5) { left: 79%; top: 94%; }
footer .crystal-spark:nth-of-type(6) { left: 101%; top: 24%; }

footer .crystal-glow-text:hover .crystal-spark,
footer .crystal-glow-text:focus-visible .crystal-spark,
footer a:hover .crystal-spark,
footer a:focus-visible .crystal-spark {
    animation: crystal-spark-twinkle 720ms cubic-bezier(.2, .8, .2, 1) both;
}

footer .crystal-spark:nth-of-type(2) { animation-delay: 40ms !important; }
footer .crystal-spark:nth-of-type(3) { animation-delay: 130ms !important; }
footer .crystal-spark:nth-of-type(4) { animation-delay: 220ms !important; }
footer .crystal-spark:nth-of-type(5) { animation-delay: 310ms !important; }
footer .crystal-spark:nth-of-type(6) { animation-delay: 400ms !important; }

@keyframes crystal-glare-sweep {
    0% { background-position: 120% 0; }
    100% { background-position: -25% 0; }
}

@keyframes crystal-spark-twinkle {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0deg); }
    38% { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(45deg); }
    70% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.7) rotate(82deg); }
}

@supports not (color: color-mix(in srgb, white, transparent)) {
    footer .crystal-glow-text:hover,
    footer .crystal-glow-text:focus-visible,
    footer a:hover .crystal-glow-text,
    footer a:focus-visible .crystal-glow-text {
        text-shadow: 0 0 6px rgba(217, 119, 6, .8), 0 0 18px rgba(217, 119, 6, .55), 0 0 34px rgba(217, 119, 6, .3);
    }
}

@media (prefers-reduced-motion: reduce) {
    footer .crystal-glow-text,
    footer .crystal-glow-label,
    footer .crystal-spark {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    footer .crystal-glow-text:hover .crystal-glow-label,
    footer a:hover .crystal-glow-label {
        background-position: 50% 0;
    }
}
