/* =========================================================
   Raskoš motion system - styles
   (ported from design_handoff/raskos-motion.js)
   Easing E  = cubic-bezier(.2,.7,.2,1)   reveals
   Easing E2 = cubic-bezier(.76,0,.24,1)  curtains / wipes
   ========================================================= */

/* Masked image reveal */
[data-m-mask] {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.4s cubic-bezier(.2, .7, .2, 1);
}

[data-m-mask][data-in] {
    clip-path: inset(0 0 0 0);
}

[data-m-img] {
    scale: 1.24;
    transition: scale 2s cubic-bezier(.2, .7, .2, 1), transform 1.4s cubic-bezier(.2, .7, .2, 1), opacity .9s ease, filter 1s ease !important;
}

[data-m-mask][data-in] [data-m-img],
[data-m-img][data-in] {
    scale: 1.1;
}

/* Split-text headings */
.m-w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding: 0 .05em .1em 0;
    margin: 0 -.05em -.1em 0;
}

.m-w > .m-i {
    display: inline-block;
    translate: 0 112%;
    transition: translate 1.15s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0s);
}

[data-split][data-in] .m-w > .m-i {
    translate: 0 0;
}

/* Fade-up */
[data-m-up] {
    opacity: 0;
    translate: 0 32px;
    transition: opacity 1s ease var(--d, 0s), translate 1.2s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), background .3s, color .3s, border-color .3s !important;
}

[data-m-up][data-in] {
    opacity: 1;
    translate: 0 0;
}

/* Page-transition curtain */
#m-curtain {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: #0B0A08;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    clip-path: inset(0 0 0 0);
}

#m-curtain img {
    width: 78px;
    opacity: 0;
    scale: .9;
    transition: opacity .7s ease, scale 1.4s cubic-bezier(.2, .7, .2, 1);
}

#m-curtain[data-show] img {
    opacity: 1;
    scale: 1;
}

#m-curtain .m-line {
    position: absolute;
    left: 50%;
    bottom: 18%;
    width: 120px;
    height: 1px;
    background: rgba(194, 154, 102, .25);
    translate: -50% 0;
    overflow: hidden;
}

#m-curtain .m-line i {
    position: absolute;
    inset: 0;
    background: #C29A66;
    scale: 0 1;
    transform-origin: left;
    transition: scale .9s cubic-bezier(.2, .7, .2, 1);
}

#m-curtain[data-show] .m-line i {
    scale: 1 1;
}

/* Preloader */
#m-pre {
    position: fixed;
    inset: 0;
    z-index: 9992;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Jost, sans-serif;
}

#m-pre .p {
    position: absolute;
    left: 0;
    right: 0;
    height: 50.2%;
    background: #0B0A08;
    transition: translate 1.25s cubic-bezier(.76, 0, .24, 1);
}

#m-pre .p.t { top: 0; }
#m-pre .p.b { bottom: 0; }

#m-pre .p.t::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(194, 154, 102, .55), transparent);
    opacity: 0;
    transition: opacity .4s;
}

#m-pre[data-out] .p.t::after { opacity: 1; }
#m-pre[data-out] .p.t { translate: 0 -101%; }
#m-pre[data-out] .p.b { translate: 0 101%; }

#m-pre .core {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity .7s ease, translate 1s cubic-bezier(.2, .7, .2, 1), filter .7s ease;
}

#m-pre[data-out] .core {
    opacity: 0;
    translate: 0 -24px;
    filter: blur(6px);
}

#m-pre .mark {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.4s cubic-bezier(.2, .7, .2, 1);
}

#m-pre[data-s1] .mark {
    clip-path: inset(0 0 0 0);
}

#m-pre .mark img {
    display: block;
    width: 72px;
    scale: 1.25;
    filter: brightness(1.6) saturate(.6);
    transition: scale 2.2s cubic-bezier(.2, .7, .2, 1), filter 2s ease;
}

#m-pre[data-s1] .mark img {
    scale: 1;
    filter: none;
}

#m-pre .name {
    margin-top: 20px;
    clip-path: inset(0 50% 0 50%);
    transition: clip-path 1.4s cubic-bezier(.2, .7, .2, 1);
}

#m-pre[data-s2] .name {
    clip-path: inset(0 0 0 0);
}

#m-pre .name img {
    display: block;
    height: 51px;
    width: auto;
}

#m-pre .tag {
    margin-top: 18px;
    font-size: 10px;
    letter-spacing: .36em;
    text-transform: uppercase;
    color: rgba(239, 231, 216, .7);
    opacity: 0;
    translate: 0 8px;
    transition: opacity 1s ease, translate 1.2s cubic-bezier(.2, .7, .2, 1);
}

#m-pre[data-s3] .tag {
    opacity: 1;
    translate: 0 0;
}

#m-pre .bar {
    width: 240px;
    height: 1px;
    margin-top: 40px;
    background: rgba(194, 154, 102, .2);
    position: relative;
    overflow: hidden;
}

#m-pre .bar i {
    position: absolute;
    inset: 0;
    background: #C29A66;
    transform-origin: left;
    scale: var(--p, 0) 1;
}

#m-pre .meta {
    width: 240px;
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 10px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(239, 231, 216, .55);
    opacity: 0;
    transition: opacity .8s ease;
}

#m-pre[data-s1] .meta { opacity: 1; }

#m-pre .meta b {
    font-weight: 400;
    color: #D2AE7C;
    font-variant-numeric: tabular-nums;
}

#m-pre[data-short] .name,
#m-pre[data-short] .tag,
#m-pre[data-short] .bar,
#m-pre[data-short] .meta {
    display: none;
}

/* Shared-element morph (card image → next page hero) */
#m-morph {
    position: fixed;
    z-index: 9991;
    background: #0B0A08 center / cover no-repeat;
    pointer-events: none;
}

#m-morph::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(8, 7, 5, .35);
}

/* Custom cursor (fine pointers only) */
#m-cursor,
#m-dot {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9995;
    pointer-events: none;
    border-radius: 50%;
    translate: -50% -50%;
}

#m-dot {
    width: 5px;
    height: 5px;
    background: #C29A66;
    transition: opacity .3s, width .3s, height .3s;
}

#m-cursor {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(194, 154, 102, .7);
    display: flex;
    align-items: center;
    justify-content: center;
    font: 500 9px/1 Jost, sans-serif;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #0E0D0B;
    transition: width .45s cubic-bezier(.2, .7, .2, 1), height .45s cubic-bezier(.2, .7, .2, 1), background .35s, border-color .35s, opacity .3s;
}

#m-cursor span {
    opacity: 0;
    transition: opacity .25s;
}

#m-cursor[data-mode="link"] {
    width: 58px;
    height: 58px;
    border-color: #C29A66;
}

#m-cursor[data-mode="label"] {
    width: 96px;
    height: 96px;
    background: rgba(194, 154, 102, .92);
    border-color: transparent;
}

#m-cursor[data-mode="label"] span { opacity: 1; }
#m-cursor[data-mode="label"] ~ #m-dot { opacity: 0; }

html[data-m-hide-cursor] #m-cursor,
html[data-m-hide-cursor] #m-dot {
    opacity: 0;
}

[data-pin-progress] {
    transform-origin: left;
}

/* Everything off for reduced motion */
@media (prefers-reduced-motion: reduce) {
    #m-curtain,
    #m-morph,
    #m-pre,
    #m-cursor,
    #m-dot {
        display: none !important;
    }

    [data-m-mask],
    [data-m-up],
    .m-w > .m-i {
        clip-path: none !important;
        opacity: 1 !important;
        translate: none !important;
    }
}
