/* =========================================================
   RightChanger — FX LAYER (JS driven)
   ========================================================= */

/* reveal on scroll */
.rc-js .rc-reveal { opacity: 0; transform: translateY(32px) scale(.985); filter: blur(8px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); will-change: opacity, transform; }
.rc-js .rc-reveal.rc-in { opacity: 1; transform: none; filter: none; }
.rc-js .rc-reveal.rc-done { will-change: auto; transition-delay: 0ms; }

/* scramble text */
[data-scramble] .rc-sc-fx { color: var(--a-text); opacity: .75; }

/* tilt / magnetic */
[data-tilt] { transform-style: preserve-3d; transition: transform .35s var(--ease); will-change: transform; }
[data-tilt].rc-tilting { transition: transform .08s linear; }
[data-magnetic] { transition: transform .35s var(--ease); will-change: transform; }

/* soft navigation */
.wrapper.rc-leave { animation: rcLeave .28s var(--ease-io) forwards; }
.wrapper.rc-enter { animation: rcEnter .6s var(--ease); }
@keyframes rcLeave { to { opacity: 0; transform: translateY(-14px); filter: blur(6px); } }
@keyframes rcEnter { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

/* theme switch (View Transitions API) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* toasts */
.rc-toasts { position: fixed; z-index: 99998; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 36px); }
.rc-toast {
	position: relative; display: flex; align-items: center; gap: 12px; min-width: 240px; max-width: 380px; padding: 14px 18px 14px 16px; overflow: hidden;
	border-radius: 16px; color: var(--tx); font-size: 13.5px; line-height: 1.4; pointer-events: auto;
	background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: rcToastIn .55s var(--ease);
}
.rc-toast::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--grad); transform-origin: 0 50%; animation: rcToastBar var(--ttl, 3.4s) linear forwards; }
.rc-toast i { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--a1) 16%, transparent); color: var(--a-text); }
.rc-toast i::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i, url(../images/verify.svg)) center / contain no-repeat; mask: var(--i, url(../images/verify.svg)) center / contain no-repeat; }
.rc-toast.err i { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); --i: url(../images/warning.svg); }
.rc-toast.err::after { background: var(--bad); }
.rc-toast.bye { animation: rcToastOut .4s var(--ease) forwards; }
@keyframes rcToastIn { from { opacity: 0; transform: translateX(60px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes rcToastOut { to { opacity: 0; transform: translateX(60px) scale(.92); } }
@keyframes rcToastBar { to { transform: scaleX(0); } }

/* command palette */
.rc-cmd { position: fixed; inset: 0; z-index: 99995; display: none; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; background: rgba(2, 4, 10, .66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.rc-cmd.open { display: flex; animation: rcFade .25s; }
.rc-cmd__box { width: min(640px, 100%); border-radius: 22px; overflow: hidden; background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: 0 60px 140px -30px rgba(0, 0, 0, .95), 0 0 100px -40px var(--a1); animation: rcModal .45s var(--ease); }
.rc-cmd__in { display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.rc-cmd__in::before { content: ''; width: 20px; height: 20px; flex: 0 0 auto; background: var(--a-text); -webkit-mask: url(../images/search.svg) center / contain no-repeat; mask: url(../images/search.svg) center / contain no-repeat; }
.rc-cmd__in input { flex: 1; min-height: 64px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font-size: 17px; }
.rc-cmd__in input:focus { box-shadow: none; background: none; }
.rc-cmd__in kbd, .rc-cmd__foot kbd { font: 500 10.5px/1 var(--f-mono); padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--tx-3); }
.rc-cmd__list { max-height: min(50vh, 380px); overflow-y: auto; padding: 8px; }
.rc-cmd__grp { padding: 12px 12px 6px; font: 600 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--tx-3); }
.rc-cmd__item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; cursor: pointer; color: var(--tx-2); font-size: 14.5px; text-decoration: none; }
.rc-cmd__item:hover { text-decoration: none; }
.rc-cmd__item.sel { background: var(--field-focus); color: var(--tx); box-shadow: inset 2px 0 0 var(--a1); }
.rc-cmd__item .rc-ico { width: 18px; height: 18px; color: var(--a-text); }
.rc-cmd__item small { margin-left: auto; font: 500 11px/1 var(--f-mono); color: var(--tx-3); }
.rc-cmd__empty { padding: 30px; text-align: center; color: var(--tx-3); }
.rc-cmd__foot { display: flex; gap: 18px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--tx-3); font-size: 12px; }
.rc-cmd__foot span { display: inline-flex; align-items: center; gap: 6px; }

/* live badge */
.rc-live { display: inline-flex; align-items: center; gap: 8px; font: 600 10.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tx-2); }
.rc-live time { color: var(--a-text); font-variant-numeric: tabular-nums; }
.rc-live.sync .rc-dot { animation: rcSyncDot .8s ease-in-out 3; }
@keyframes rcSyncDot { 50% { transform: scale(1.8); box-shadow: 0 0 16px var(--a1); background: var(--a1); } }

/* custom cursor ring (pointer devices only) */
.rc-cursor { position: fixed; z-index: 99999; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--a1) 80%, transparent); pointer-events: none; opacity: 0; mix-blend-mode: normal; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, opacity .3s, border-color .3s; will-change: transform; }
.rc-cursor::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 10px var(--a1); }
.rc-has-pointer.rc-cursor-on .rc-cursor { opacity: 1; }
.rc-cursor.hov { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: color-mix(in srgb, var(--a1) 12%, transparent); border-color: var(--a1); }
.rc-cursor.down { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
@media (hover: none), (pointer: coarse) { .rc-cursor, .rc-spot { display: none !important; } }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.rc-js .rc-reveal { opacity: 1; transform: none; filter: none; }
	.rc-ticker__track { animation: none !important; }
}
.rc-fx-off .rc-spot, .rc-fx-off .rc-cursor, .rc-fx-off #rc-bg { display: none !important; }
.rc-fx-off .rc-js .rc-reveal, .rc-fx-off.rc-js .rc-reveal { opacity: 1; transform: none; filter: none; }
