/* Aurelius motion kit (premium-web-build v2.4.1). Patterns and markup: references/mechanics.md section 4.
   One easing family: expo out for entrances, expo in-out for swaps, linear when scroll drives the motion.
   Hidden start states apply only under html.mk, which motion.js sets once it runs and motion is allowed:
   without the script, or under reduced motion, every element shows its final state. */
:root{--mk-ease:cubic-bezier(.16,1,.3,1);--mk-swap:cubic-bezier(.87,0,.13,1);--mk-accent:currentColor}

/* 01 Lines behind a mask. Hero: words split before the first paint by mkWords (the head snippet), CSS only.
   Statements: [data-mk=lines], split into lines by SplitText in motion.js.
   Each mask reaches .26em above its line, so a caron (Š, Č, Ž) is never cut at rest (Ambient Car, v2.4.1); words start .4em below it. */
.mk-w,.mk-l-mask{display:inline-block;overflow:clip;vertical-align:top;padding-block:.26em .14em;margin-block:-.26em -.14em}
.mk-l-mask{display:inline-block!important;width:100%}  /* over SplitText's inline display:block: block masks would collapse their margins and spread the lines */
.mk-words-on .mk-w>span{display:inline-block;animation:mk-rise 1.15s var(--mk-ease) both;animation-delay:calc(var(--i) * 42ms)}
@keyframes mk-rise{from{transform:translateY(calc(100% + .4em))}}

/* 02 Unmask: an image opens from an inset as it enters, its picture settling from a slight zoom. */
[data-mk=unmask]{overflow:clip;clip-path:inset(0 round var(--mk-r,0px));transition:clip-path 1.4s var(--mk-ease)}
[data-mk=unmask] :is(img,video){transition:transform 1.8s var(--mk-ease)}
.mk [data-mk=unmask]:not(.in){clip-path:inset(12% 9% round var(--mk-r,0px))}
.mk [data-mk=unmask]:not(.in) :is(img,video){transform:scale(1.2)}

/* 03 Number roll: digits spin once to the real figure. The figure stays in the markup for readers and for no-JS. */
.mk-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.mk-n{display:inline-flex;line-height:1.15;font-variant-numeric:tabular-nums}
.mk-d{display:inline-block;position:relative;height:1.15em;overflow-x:visible;overflow-y:clip}
.mk-d>i{display:block;visibility:hidden;font-style:normal}   /* the final digit sizes its column: a 1 stays as narrow as a 1 */
.mk-d>span{position:absolute;inset:0 0 auto;transform:translateY(calc(var(--n) * -1.15em));transition:transform 2.1s var(--mk-ease);transition-delay:calc(var(--k) * 80ms)}
.mk-d b{display:flex;justify-content:center;height:1.15em;font-weight:inherit}
.mk [data-mk=count]:not(.in) .mk-d>span{transform:none}

/* 04 Pinned story: a sticky stage swaps with the step being read. Native sticky, no pinning script. */
[data-mk-stage]{display:grid}
[data-mk-item]{grid-area:1/1;opacity:0;transform:scale(1.05);transition:opacity .9s var(--mk-swap),transform 1.4s var(--mk-ease)}
[data-mk-item].is-on{opacity:1;transform:none}
[data-mk-step]{position:relative}
[data-mk-step]::before{content:"";position:absolute;left:calc(-1 * var(--mk-gutter,24px));top:.35em;bottom:0;width:2px;background:var(--mk-accent);transform:scaleY(0);transform-origin:top;transition:transform .9s var(--mk-ease)}
[data-mk-step].is-on::before{transform:none}

/* 05 Sideways gallery: vertical scroll drives the row while it is pinned (CSS scroll-driven, on the compositor).
   Without scroll-driven animations it is a swipeable row with snap points. */
[data-mk-track]{display:flex;gap:var(--mk-gap,16px);overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none}
[data-mk-track]::-webkit-scrollbar{display:none}
[data-mk-track]>*{flex:none;scroll-snap-align:start}
.mk-side-on{height:calc(100svh + var(--mk-dist,0px));view-timeline-name:--mk-side;view-timeline-axis:block}
.mk-side-on [data-mk-pin]{position:sticky;top:0;height:100svh;overflow:clip}
.mk-side-on [data-mk-track]{overflow:visible;width:max-content;animation:mk-side linear both;animation-timeline:--mk-side;animation-range:contain 0% contain 100%}
@keyframes mk-side{to{transform:translateX(calc(var(--mk-dist,0px) * -1))}}

/* 06 Surface tint: as a section comes in, it starts in the surface above it and turns to its own, once,
   so the room changes rather than a line passing. Triggered, not scrubbed: it can never stop half-way. */
[data-mk=tint]{transition:background-color 1.1s var(--mk-ease)}
.mk [data-mk=tint]:not(.in){background-color:var(--mk-from)}

/* 07 Depth: a full-bleed picture drifts slower than its frame. */
[data-mk=drift]{overflow:clip}
[data-mk=drift] :is(img,video){display:block;width:100%;height:100%;object-fit:cover}
@supports (animation-timeline:view()){@media (prefers-reduced-motion:no-preference){
  [data-mk=drift] :is(img,video){animation:mk-drift linear both;animation-timeline:view();animation-range:cover 0% cover 100%}
}}
@keyframes mk-drift{from{transform:translateY(-6%) scale(1.14)}to{transform:translateY(6%) scale(1.14)}}

/* 08 Reading line: fills where the eye is (a band 55 to 60 % down the screen); each item's dot lights as it passes. */
[data-mk=read]{position:relative;view-timeline-name:--mk-read;view-timeline-inset:55% 40%}
[data-mk=read]::before,[data-mk=read]::after{content:"";position:absolute;left:var(--mk-read-x,0px);top:0;bottom:0;width:2px;transform-origin:top}
[data-mk=read]::before{background:var(--mk-track,rgb(127 127 127 / .3))}
[data-mk=read]::after{background:var(--mk-accent);transform:scaleY(var(--mk-p,1))}
[data-mk=read]>*{view-timeline-name:--mk-dot;view-timeline-inset:55% 40%}
@supports (animation-timeline:view()){@media (prefers-reduced-motion:no-preference){
  [data-mk=read]::after{animation:mk-fill linear both;animation-timeline:--mk-read;animation-range:cover 0% cover 100%}
  [data-mk=read]>*::before{animation:mk-dot linear both;animation-timeline:--mk-dot;animation-range:cover 0% cover 6%}
}}
@keyframes mk-fill{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes mk-dot{from{background-color:var(--mk-track,rgb(127 127 127 / .3))}}

/* 09 Tabs: the marker slides to the chosen tab, the panel rises in. */
[data-mk=tabs] [role=tablist]{position:relative}
.mk-ink{position:absolute;left:0;bottom:0;height:2px;width:var(--w,0px);transform:translateX(var(--x,0px));background:var(--mk-accent);pointer-events:none}
.mk-tabs-on .mk-ink{transition:transform .6s var(--mk-ease),width .6s var(--mk-ease)}
[role=tabpanel].mk-show{animation:mk-in .65s var(--mk-ease) both}
@keyframes mk-in{from{opacity:0;transform:translateY(12px)}}

/* 10 Accordion on <details>: height opens where the browser can animate it (Chrome), content rises everywhere.
   Give the group one name attribute and the browser keeps one open at a time. */
details.mk-acc>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;cursor:pointer;list-style:none}
details.mk-acc>summary::-webkit-details-marker{display:none}
details.mk-acc>summary::after{content:"";flex:none;width:14px;height:14px;background:linear-gradient(currentColor 0 0) center/100% 1.5px no-repeat,linear-gradient(currentColor 0 0) center/1.5px 100% no-repeat;transition:transform .55s var(--mk-ease)}
details.mk-acc[open]>summary::after{transform:rotate(135deg)}
details.mk-acc[open]>summary~*{animation:mk-in .6s var(--mk-ease) both}
@supports (interpolate-size:allow-keywords){
  details.mk-acc{interpolate-size:allow-keywords}
  details.mk-acc::details-content{height:0;overflow:clip;transition:height .6s var(--mk-ease),content-visibility .6s allow-discrete}
  details.mk-acc[open]::details-content{height:auto}
}

/* 11 Form steps and tiles (the starter's form: add data-mk="steps"; its show() sets data-dir).
   A step slides in from the side it comes from; a chosen tile gets a check that pops. */
form[data-mk=steps][data-dir] .step.on{animation:mk-step .65s var(--mk-ease) both}
form[data-mk=steps][data-dir=back] .step.on{animation-name:mk-step-back}
@keyframes mk-step{from{opacity:0;transform:translateX(32px)}}
@keyframes mk-step-back{from{opacity:0;transform:translateX(-32px)}}
form[data-mk=steps] .choice{transition:border-color .25s var(--mk-ease),background-color .25s var(--mk-ease),transform .2s var(--mk-ease)}
form[data-mk=steps] .choice:active{transform:scale(.985)}
form[data-mk=steps] .choice::after{content:"";flex:none;width:20px;height:20px;margin-left:auto;border-radius:50%;box-shadow:inset 0 0 0 1.5px currentColor;opacity:.4;transition:opacity .25s var(--mk-ease)}
form[data-mk=steps] .choice:has(input:checked)::after{opacity:1;box-shadow:none;background:var(--mk-accent);animation:mk-pop .5s var(--mk-ease);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M10 0a10 10 0 1 1 0 20a10 10 0 0 1 0-20zM5.4 10.2l1.4-1.4 2.2 2.2 4.2-4.2 1.4 1.4-5.6 5.6z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M10 0a10 10 0 1 1 0 20a10 10 0 0 1 0-20zM5.4 10.2l1.4-1.4 2.2 2.2 4.2-4.2 1.4 1.4-5.6 5.6z'/%3E%3C/svg%3E") center/contain no-repeat}
@keyframes mk-pop{from{transform:scale(.4)}}

/* 12 Buttons: a fill rises behind the label and the label rolls to its copy (pointer); press gives under the thumb (all). */
.mk-btn{position:relative;isolation:isolate;overflow:clip;transition:transform .2s var(--mk-ease),color .4s var(--mk-ease)}
.mk-btn::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--mk-btn-fill,rgb(255 255 255 / .16));transform:translateY(101%);transition:transform .6s var(--mk-ease)}
.mk-btn__l{display:inline-grid;overflow:clip}
.mk-btn__l>span,.mk-btn__l::after{grid-area:1/1;transition:transform .6s var(--mk-ease)}
.mk-btn__l::after{content:attr(data-t);content:attr(data-t) / "";transform:translateY(115%)}
@media (hover:hover){
  .mk-btn:hover::before{transform:none}
  .mk-btn:hover .mk-btn__l>span{transform:translateY(-115%)}
  .mk-btn:hover .mk-btn__l::after{transform:none}
}
.mk-btn:active{transform:scale(.97)}

/* The signature scene's hold (MK.scene with { hold }): the section grows by the hold and its stage sticks, native scroll. */
.mk-hold{height:calc(100svh + var(--mk-hold,100svh))!important}
.mk-hold>[data-mk-scene-stage]{position:sticky;top:0;height:100svh}

/* Reduced motion: every pattern at its final state. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}
}
