/* The house call to action's hover (design-system/sweep-button.php): a band of light crosses the button once in the
   reading direction, the words step back and an arrow steps in after them. First the events page's "להרשמה" (Oren
   2026-10-15, items 65-67), then the about page's partners card (item 857). A button takes the class cil-sweep-btn and
   its words' span cil-sweep-btn__words; --cil-sweep-band is the band: the brand blue on a white button, and a filled
   button sets a light one. The keyboard's focus plays it too. */
.cil-sweep-btn {
    --cil-sweep-fwd: -1; --cil-sweep-band: color-mix(in srgb, var(--cil-blue) 45%, transparent);
    position: relative; overflow: hidden; isolation: isolate;
}
.lang-to-css-ltr .cil-sweep-btn { --cil-sweep-fwd: 1; }
.cil-sweep-btn::before {
    content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(calc(var(--cil-sweep-fwd) * 75deg), transparent 30%, var(--cil-sweep-band) 50%, transparent 70%);
    transform: translateX(calc(var(--cil-sweep-fwd) * -110%)); transition: none;
}
.cil-sweep-btn:is(:hover, :focus-visible)::before { transform: translateX(calc(var(--cil-sweep-fwd) * 110%)); transition: transform .9s cubic-bezier(.45, 0, .25, 1); }
/* By offset, not transform: text kept off the compositor keeps its colour while it moves. */
.cil-sweep-btn .cil-sweep-btn__words { position: relative; inset-inline-end: 0; transition: inset-inline-end .35s cubic-bezier(.22, 1, .36, 1); }
.cil-sweep-btn::after {
    content: ""; position: absolute; top: 50%; inset-inline-end: 16px; width: 16px; height: 16px; margin-top: -8px; background: currentColor;
    -webkit-mask: url("../../images/podcasts-page/caret-left.svg") center / contain no-repeat; mask: url("../../images/podcasts-page/caret-left.svg") center / contain no-repeat;
    opacity: 0; transform: translateX(calc(var(--cil-sweep-fwd) * -10px)) scaleX(calc(var(--cil-sweep-fwd) * -1));
    transition: opacity .2s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.cil-sweep-btn:is(:hover, :focus-visible) .cil-sweep-btn__words { inset-inline-end: 10px; }
.cil-sweep-btn:is(:hover, :focus-visible)::after { opacity: 1; transform: translateX(0) scaleX(calc(var(--cil-sweep-fwd) * -1)); }

/* Reduced motion: no band and no step; the arrow fades in where it rests. */
@media (prefers-reduced-motion: reduce) {
    .cil-sweep-btn:is(:hover, :focus-visible)::before { transform: translateX(calc(var(--cil-sweep-fwd) * -110%)); transition: none; }
    .cil-sweep-btn .cil-sweep-btn__words { transition: none; }
    .cil-sweep-btn:is(:hover, :focus-visible) .cil-sweep-btn__words { inset-inline-end: 0; }
    .cil-sweep-btn::after { transform: scaleX(calc(var(--cil-sweep-fwd) * -1)); transition: opacity .2s ease; }
}
