/* ==========================================
   LUXURY FAIRY DUST EFFECT
========================================== */

.sparkle-layer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: hidden;
    pointer-events: none;
}

.sparkle {
    position: absolute;

    width: 4px;
    height: 4px;

    border-radius: 50%;
    pointer-events: none;

    opacity: 0;

    background: rgba(255, 241, 194, 1);

    box-shadow:
        0 0 6px rgba(255, 241, 194, 1),
        0 0 14px rgba(236, 202, 119, 0.9),
        0 0 25px rgba(201, 164, 90, 0.65),
        0 0 38px rgba(201, 164, 90, 0.3);

    animation:
        fairyDust var(--sparkle-duration, 3.6s)
        ease-out
        forwards;
}

.sparkle::before,
.sparkle::after {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;

    background: rgba(255, 241, 194, 0.82);

    transform: translate(-50%, -50%);
}

.sparkle::before {
    width: 12px;
    height: 1px;
}

.sparkle::after {
    width: 1px;
    height: 12px;
}

.sparkle.sparkle-small::before,
.sparkle.sparkle-small::after {
    display: none;
}

.sparkle.sparkle-small {
    box-shadow:
        0 0 5px rgba(255, 241, 194, 0.95),
        0 0 12px rgba(201, 164, 90, 0.62),
        0 0 20px rgba(201, 164, 90, 0.28);
}

@keyframes fairyDust {
    0% {
        opacity: 0;

        transform:
            translate3d(0, 8px, 0)
            scale(0.15)
            rotate(0deg);

        filter: blur(0.7px);
    }

    15% {
        opacity: 1;

        transform:
            translate3d(2px, 0, 0)
            scale(1)
            rotate(30deg);

        filter: blur(0);
    }

    48% {
        opacity: 0.82;

        transform:
            translate3d(-5px, -16px, 0)
            scale(0.82)
            rotate(90deg);
    }

    76% {
        opacity: 0.42;

        transform:
            translate3d(6px, -31px, 0)
            scale(0.55)
            rotate(145deg);

        filter: blur(0.3px);
    }

    100% {
        opacity: 0;

        transform:
            translate3d(-4px, -52px, 0)
            scale(0.12)
            rotate(210deg);

        filter: blur(1.1px);
    }
}

/* ==========================================
   SHARED LUXURY BUTTON EFFECT
   כפתור ההירו + כפתור שליחת הודעה
========================================== */

.hero-button,
.contact-submit-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    border: 1px solid rgba(201, 164, 90, 0.86);
    border-radius: 2px;

    background: rgba(5, 5, 5, 0.2) !important;
    color: var(--gold-light) !important;

    transition:
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        color 0.35s ease,
        transform 0.35s ease,
        background 0.35s ease;
}

/* ביטול אפקטים קודמים שעלולים להישאר */

.hero-button::before,
.contact-submit-button::before {
    content: none !important;
}

/* פס הברק שעובר בתוך הכפתור */

.hero-button::after,
.contact-submit-button::after {
    content: "";

    position: absolute;
    top: -55%;
    right: -135%;

    width: 38%;
    height: 220%;

    z-index: 1;
    pointer-events: none;

    background:
        linear-gradient(
            120deg,
            transparent 0%,
            rgba(255, 247, 218, 0.12) 30%,
            rgba(255, 247, 218, 0.72) 50%,
            rgba(255, 247, 218, 0.12) 70%,
            transparent 100%
        );

    transform: rotate(18deg);

    transition:
        right 0.8s ease;
}

.hero-button:hover,
.contact-submit-button:hover {
    background: rgba(5, 5, 5, 0.2) !important;
    color: var(--gold-light) !important;

    border-color: var(--gold-light);

    transform: translateY(-2px);

    box-shadow:
        0 0 8px rgba(225, 196, 122, 0.14),
        0 0 20px rgba(201, 164, 90, 0.2),
        inset 0 0 12px rgba(201, 164, 90, 0.04);
}

.hero-button:hover::after,
.contact-submit-button:hover::after {
    right: 135%;
}

.hero-button:focus-visible,
.contact-submit-button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

/* הטקסט נשאר מעל פס הברק */

.hero-button > *,
.contact-submit-button > * {
    position: relative;
    z-index: 3;
}

/* במקרה של כפתור מושבת בזמן שליחה */

.contact-submit-button:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.contact-submit-button:disabled::after {
    display: none;
}

/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {
    .sparkle {
        display: none;
    }

    .hero-button,
    .contact-submit-button,
    .hero-button::after,
    .contact-submit-button::after {
        transition: none;
    }
}