/* ==========================================================================
   motion.css - shared motion layer (cursor, progress, curtain, split text,
   reveals, marquees). Paired with js/motion.js. Safe on every page: all hidden
   starting states are scoped to html.js so no-JS visitors see everything.
   ========================================================================== */

/* ---------- scroll progress */
.scroll-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 2500;
    background: linear-gradient(90deg, #ff4d5c, var(--brand-red), #ffe14d);
    transform-origin: 0 50%;
    transform: scaleX(0);
    pointer-events: none;
    box-shadow: 0 0 12px rgba(255, 26, 43, 0.6);
}

/* ---------- custom cursor */
html.has-cursor, html.has-cursor body, html.has-cursor a, html.has-cursor button { cursor: none; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor select { cursor: text; }
.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    z-index: 4000;
    pointer-events: none;
    will-change: transform;
}
.cursor-dot {
    width: 6px; height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: var(--brand-red);
}
.cursor-ring {
    width: 38px; height: 38px;
    margin: -19px 0 0 -19px;
    display: grid;
    place-items: center;
}
.cursor-ring::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    transition: transform .45s var(--ease-premium), background-color .3s, border-color .3s;
}
.cursor-ring.is-link::before { transform: scale(1.7); border-color: var(--brand-red); background: rgba(255, 26, 43, 0.12); }
.cursor-ring.is-down::before { transform: scale(0.75); }
.cursor-ring.is-label::before { transform: scale(2.6); background: var(--brand-red); border-color: var(--brand-red); }
.cursor-label {
    position: relative;
    font: 800 10px/1 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    transition: opacity .25s;
    white-space: nowrap;
}
.cursor-ring.is-label .cursor-label { opacity: 1; }
html.cursor-out .cursor-dot, html.cursor-out .cursor-ring { opacity: 0; }

/* ---------- hover image preview */
.hover-reveal {
    position: fixed;
    top: 0; left: 0;
    width: 320px; height: 220px;
    margin: -110px 0 0 -160px;
    z-index: 1500;
    pointer-events: none;
}
.hover-reveal__inner {
    width: 100%; height: 100%;
    border-radius: 18px;
    overflow: hidden;
    clip-path: inset(50% 50% 50% 50% round 18px);
    transition: clip-path .55s var(--ease-premium);
    box-shadow: 0 30px 60px rgba(0,0,0,.5);
}
.hover-reveal__inner img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); transition: transform .8s var(--ease-premium); }
.hover-reveal.show .hover-reveal__inner { clip-path: inset(0 0 0 0 round 18px); }
.hover-reveal.show img { transform: scale(1); }

/* ---------- page transition curtain */
.page-curtain {
    position: fixed; inset: 0;
    z-index: 5000;
    pointer-events: none;
    display: flex;
}
.page-curtain span {
    flex: 1;
    background: var(--brand-red);
    transform: scaleY(0);
    transform-origin: 50% 0%;
    transition: transform .55s var(--ease-premium);
}
.page-curtain span:nth-child(2) { background: #c40018; transition-delay: .06s; }
.page-curtain span:nth-child(3) { background: #111116; transition-delay: .12s; }
html.is-leaving .page-curtain { pointer-events: all; }
html.is-leaving .page-curtain span { transform: scaleY(1); transform-origin: 50% 100%; }

/* ---------- split text */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.sc, .si { display: inline-block; will-change: transform; }
html.js [data-split] .sc,
html.js [data-split] .si {
    transform: translate3d(0, 110%, 0) rotate(6deg);
    transition: transform 1s var(--ease-premium);
    transition-delay: calc(var(--i) * 28ms + var(--delay, 0ms));
}
html.js [data-split][data-split="words"] .si { transition-delay: calc(var(--i) * 55ms + var(--delay, 0ms)); }
html.js [data-split].in .sc,
html.js [data-split].in .si { transform: none; }

/* ---------- reveals */
html.js [data-reveal] { transition: transform 1.1s var(--ease-premium), opacity 1s ease, clip-path 1.2s var(--ease-premium), filter 1s ease; transition-delay: var(--d, 0ms); }
html.js [data-reveal="up"] { transform: translate3d(0, 60px, 0); opacity: 0.001; }
html.js [data-reveal="left"] { transform: translate3d(-80px, 0, 0); opacity: 0.001; }
html.js [data-reveal="right"] { transform: translate3d(80px, 0, 0); opacity: 0.001; }
html.js [data-reveal="scale"] { transform: scale(.85); opacity: 0.001; }
html.js [data-reveal="clip"] { clip-path: inset(100% 0 0 0); }
html.js [data-reveal="wipe"] { clip-path: inset(0 100% 0 0); }
html.js [data-reveal="blur"] { filter: blur(14px); opacity: 0.001; transform: scale(1.06); }
html.js [data-reveal].in { transform: none; opacity: 1; clip-path: inset(0 0 0 0); filter: none; }

/* ---------- marquee primitives */
[data-marquee] { overflow: hidden; white-space: nowrap; }
.mq-track { display: inline-flex; will-change: transform; }
.mq-seq { display: inline-flex; align-items: center; flex-shrink: 0; }

/* ---------- reduced motion: everything visible, nothing loops */
html.reduced-motion [data-split] .sc,
html.reduced-motion [data-split] .si,
html.reduced-motion [data-reveal] { transform: none !important; opacity: 1 !important; clip-path: none !important; filter: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
