/* Shared by the 12 prepared designs: reveals, split text, scenes, preloader, cursor, marquee, pins and Lenis.
   engine.js toggles every class used here. Content hides only while the design script runs (html.rk-js), never in the
   editor (.ed), in quiet thumbnails (.rk-q), after a failure (.rk-fail) or under reduced motion. */
:root{--rk-ease:cubic-bezier(.16,1,.3,1)}

/* reveals: [data-r] = up | fade | scale | clip | words | chars gets .in as it scrolls in; data-rs on a parent staggers
   its children (--rd). The reveal owns translate, scale, opacity and clip-path, so put a design's own transform or
   hover transition on a child. words/chars need a block or inline parent, not a flex or grid one (spaces vanish). */
@media (prefers-reduced-motion:no-preference){
html.rk-js:not(.ed,.rk-fail,.rk-q) [data-r=up]:not(.in){opacity:0;translate:0 40px}
html.rk-js:not(.ed,.rk-fail,.rk-q) [data-r=fade]:not(.in){opacity:0}
html.rk-js:not(.ed,.rk-fail,.rk-q) [data-r=scale]:not(.in){opacity:0;scale:.94}
html.rk-js:not(.ed,.rk-fail,.rk-q) [data-r=clip]:not(.in){clip-path:inset(100% 0 0 0)}
html.rk-js:not(.ed,.rk-fail,.rk-q) :is([data-r=words],[data-r=chars]):not([data-split],.in){opacity:0}
html.rk-js:not(.ed,.rk-fail,.rk-q) [data-r=words]:not(.in) .rk-w>span,
html.rk-js:not(.ed,.rk-fail,.rk-q) [data-r=chars]:not(.in) .rk-c{translate:0 calc(100% + var(--rk-wb,.2em) + .12em)}
html.rk-js [data-r]{transition:opacity .9s var(--rk-ease) var(--rd,0ms),translate 1s var(--rk-ease) var(--rd,0ms),scale 1s var(--rk-ease) var(--rd,0ms),clip-path 1.1s var(--rk-ease) var(--rd,0ms)}
html.rk-js [data-r=clip]{clip-path:inset(0 0 0 0)}
html.rk-js [data-r] .rk-w>span{transition:translate 1s var(--rk-ease) calc(var(--rd,0ms) + min(var(--i,0) * 40ms,1.2s))}
html.rk-js [data-r] .rk-w>.rk-c{transition:translate .8s var(--rk-ease) calc(var(--rd,0ms) + min(var(--i,0) * 18ms,1.2s))}
.rk-q [data-r],.rk-q [data-r] *{transition:none!important}
}

/* split words: each word box clips its own line; the padding leaves room for Georgian ascenders and descenders and the
   negative margin keeps the layout unchanged. A design with very tight leading can raise --rk-wt / --rk-wb. */
.rk-w{display:inline-block;vertical-align:top;max-width:100%;overflow:hidden;padding:var(--rk-wt,.14em) .05em var(--rk-wb,.2em);margin:calc(-1 * var(--rk-wt,.14em)) -.05em calc(-1 * var(--rk-wb,.2em))}
.rk-w>span,.rk-w>.rk-c{display:inline-block}
.rk-sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

/* WebGL scenes: stage() puts canvas.rk-gl in a positioned box; without WebGL the box shows --poster */
.scene{position:relative}
.scene>canvas.rk-gl{position:absolute;inset:0;width:100%;height:100%;display:block}
.scene.no-gl{background:var(--poster,none) center/cover no-repeat}
html.ed .scene,html.ed .scene canvas{pointer-events:none}

/* preloader and scroll locks */
.rk-pre{position:fixed;inset:0;z-index:100}
.rk-pre.out{pointer-events:none}
html.ed .rk-pre,html.rk-q .rk-pre,html.rk-fail .rk-pre,html:not(.rk-js) .rk-pre{display:none}
@media (prefers-reduced-motion:reduce){.rk-pre{display:none}}
html.rk-loading,html.rk-lock{overflow:hidden;scrollbar-gutter:stable}

/* cursor: engine.js moves the dot and the ring with transform, so the ring grows through its :before */
.rk-cur{position:fixed;left:0;top:0;z-index:9999;pointer-events:none;opacity:0;transition:opacity .3s;color:var(--fg)}
.rk-cur.on{opacity:1}
.rk-cur>i{position:absolute;left:0;top:0;will-change:transform}
.rk-cur-d{width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:currentColor;transition:opacity .2s}
.rk-cur.hot .rk-cur-d{opacity:0}
.rk-cur-r{width:40px;height:40px;margin:-20px 0 0 -20px;display:flex;align-items:center;justify-content:center}
.rk-cur-r:before{content:"";position:absolute;inset:0;border-radius:50%;border:1px solid currentColor;opacity:.5;transition:scale .45s var(--rk-ease),opacity .3s,background-color .3s,border-color .3s}
.rk-cur.hot .rk-cur-r:before{scale:1.6;opacity:1}
.rk-cur.lab .rk-cur-r:before{scale:2.3;opacity:1;background:var(--a);border-color:var(--a)}
.rk-cur-r b{position:relative;font:600 11px/1 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;color:var(--ink);opacity:0;transition:opacity .2s}
.rk-cur.lab .rk-cur-r b{opacity:1}
html.rk-nocur,html.rk-nocur :not(input,textarea,select){cursor:none!important}
@media (hover:none),(pointer:coarse){.rk-cur{display:none}}

/* marquee belt */
[data-mq]{overflow:hidden}
.rk-mq{display:flex;width:max-content;will-change:transform}
.rk-mq>*{flex:none}

/* pinned stages: .rk-pin (--len screens of scroll) > .rk-stick; plain stacked sections where nothing scrubs */
.rk-pin{position:relative;height:calc(var(--len,3) * 100vh);height:calc(var(--len,3) * 100svh)}
.rk-pin>.rk-stick{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden}
html:is(.ed,.rk-q,.rk-fail) .rk-pin{height:auto}
html:is(.ed,.rk-q,.rk-fail) .rk-pin>.rk-stick{position:relative;height:auto;min-height:100svh}
@media (prefers-reduced-motion:reduce){.rk-pin{height:auto}.rk-pin>.rk-stick{position:relative;height:auto;min-height:100svh}}

/* Lenis 1.3 (its own lenis.css, plus no native smooth scrolling while it runs) */
html.lenis,html.lenis body{height:auto}
html.lenis{scroll-behavior:auto!important}
.lenis:not(.lenis-autoToggle).lenis-stopped{overflow:clip}
.lenis [data-lenis-prevent],.lenis [data-lenis-prevent-wheel],.lenis [data-lenis-prevent-touch],.lenis [data-lenis-prevent-vertical],.lenis [data-lenis-prevent-horizontal]{overscroll-behavior:contain}
.lenis.lenis-smooth iframe{pointer-events:none}
.lenis.lenis-autoToggle{transition-property:overflow;transition-duration:1ms;transition-behavior:allow-discrete}
