/* Shared Comet-style motion. Separate decorative layers preserve card controls. */
@property --pf-comet-orbit { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes pf-comet-orbit { to { --pf-comet-orbit: 360deg; } }

html[data-pf-theme][data-pf-theme][data-pf-theme][data-pf-theme] body :is(#pf-comet-ui,.pf-comet-card) {
    --pf-comet-rx: 0deg; --pf-comet-ry: 0deg;
    --pf-comet-tx: 0px; --pf-comet-ty: 0px;
    --pf-comet-scale: 1; --pf-comet-z: 0px;
    --pf-comet-x: 50%; --pf-comet-y: 50%; --pf-comet-angle: 40deg;
    position: relative;
    isolation: isolate;
    transform: perspective(1200px) translate3d(var(--pf-comet-tx),var(--pf-comet-ty),var(--pf-comet-z)) rotateX(var(--pf-comet-rx)) rotateY(var(--pf-comet-ry)) scale(var(--pf-comet-scale)) !important;
    transform-style: preserve-3d;
    transform-origin: center;
    translate: none !important;
    transition: left .4s cubic-bezier(.22,1,.36,1), top .4s cubic-bezier(.22,1,.36,1), width .4s cubic-bezier(.22,1,.36,1), height .4s cubic-bezier(.22,1,.36,1), box-shadow .2s, border-color .2s !important;
    backface-visibility: hidden;
}

html[data-pf-theme] body .pf-comet-card.pf-comet-tracking { will-change: transform; }
html[data-pf-theme] body .pf-comet-card.pf-comet-active:not(.pf-card-expanded) { z-index: 3; }
html[data-pf-theme][data-pf-theme][data-pf-theme][data-pf-theme] body :is(#pf-comet-ui,.pf-comet-card).pf-comet-active {
    box-shadow: 0 520px 146px #00000003, 0 333px 133px #0000000a, 0 83px 83px #00000042, 0 21px 46px #0000004a !important;
}

/* Replace the old rotating frame with one frame driven by the cursor. */
html[data-pf-theme][data-pf-theme][data-pf-theme][data-pf-theme] body :is(#pf-comet-ui,.filimo-card.pf-comet-card)::before,
html[data-pf-theme][data-pf-theme][data-pf-theme][data-pf-theme] body :is(#pf-comet-ui,.filimo-card.pf-comet-card)::after { content: none !important; }

html[data-pf-theme] body .pf-comet-card > .pf-comet-beam,
html[data-pf-theme] body .pf-comet-card > .pf-comet-sheen {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: auto !important; height: auto !important;
    margin: 0 !important;
    box-sizing: border-box;
    border-radius: inherit;
    pointer-events: none !important;
    z-index: 40;
    transform: none !important;
}

html[data-pf-theme] body .pf-comet-card > .pf-comet-beam {
    padding: 2px;
    background: conic-gradient(from calc(var(--pf-comet-angle) + var(--pf-comet-orbit)), transparent 0deg 215deg, #8b5cf6 255deg, #38bdf8 290deg, #5dffd0 325deg, #e0fffa 340deg, transparent 360deg) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: .45;
    animation: pf-comet-orbit 10s linear infinite;
    animation-play-state: paused;
    transition: opacity .35s;
}

html[data-pf-theme] body .pf-comet-card > .pf-comet-sheen {
    background: radial-gradient(circle at var(--pf-comet-x) var(--pf-comet-y), rgba(255,255,255,.9) 10%, rgba(255,255,255,.75) 20%, rgba(255,255,255,0) 80%) !important;
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity .2s;
}

html[data-pf-theme] body .pf-comet-card:is(.pf-comet-active,:focus-within) > .pf-comet-beam { opacity: 1; }
html[data-pf-theme] body .pf-comet-card.pf-comet-active > .pf-comet-sheen { opacity: .6; }
html[data-pf-theme] body .pf-comet-card:focus-within > .pf-comet-beam { animation-play-state: running; }
html[data-pf-theme] body .pf-comet-card.pf-comet-active > .pf-comet-beam { animation: none; }
html[data-pf-theme="light"] body .pf-comet-card > .pf-comet-beam { filter: saturate(1.4) brightness(.85); }

/* Platform covers use the same beam and sheen as the free cards, without
   their previous platform-specific halo or separate white flash. */
html[data-pf-theme][data-pf-theme][data-pf-theme][data-pf-theme] body :is(#pf-comet-ui,.elementor-5594.pf-comet-card) { filter: none !important; }
html[data-pf-theme][data-pf-theme][data-pf-theme][data-pf-theme] body :is(#pf-comet-ui,.elementor-5594.pf-comet-card) .elementor-widget-container::after { content: none !important; }

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
    html[data-pf-theme][data-pf-theme][data-pf-theme][data-pf-theme] body :is(#pf-comet-ui,.pf-comet-card) { transform: none !important; will-change: auto !important; }
    html[data-pf-theme] body .pf-comet-card > .pf-comet-beam { animation: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    html[data-pf-theme] body .pf-comet-card > :is(.pf-comet-beam,.pf-comet-sheen) { transition: none; }
}
