/**
 * Editorial — shared behavioural primitives.
 *
 * The cross-cutting effects that the project / blog / brand snippets each
 * carried their own copy of: reveal-on-scroll, parallax baseline, the drag
 * carousel mechanics, and the lightbox overlay. Unified here so the matching
 * JS modules (reveal/parallax/carousel/lightbox) drive every editorial
 * template from one source. Per-vertical layout lives in project/blog/brand
 * stylesheets; this file only holds what is genuinely common.
 */

/* ── Reveal-on-scroll (paired with reveal.js) ── */
.rv {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .9s cubic-bezier(.22, 1, .36, 1),
                transform .9s cubic-bezier(.22, 1, .36, 1);
}
.rv.in {
    opacity: 1;
    transform: none;
}
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }

/* ── Parallax baseline (paired with parallax.js) ──
 * The scaled-up start state lives here so there is no un-scaled flash before
 * JS first runs; parallax.js then animates translateY within scale(1.18). The
 * parent must clip overflow — each template sets that on its own container. */
.js-parallax {
    transform: scale(1.18);
    transform-origin: center;
    will-change: transform;
}

/* ── Drag carousel mechanics (paired with carousel.js) ──
 * Horizontal padding stays template-owned (it varies per layout). */
.mk-carousel {
    overflow: hidden;
    cursor: grab;
    user-select: none;
}
.mk-carousel:active {
    cursor: grabbing;
}
.mk-carousel__track {
    display: flex;
    gap: 20px;
    will-change: transform;
    transition: transform .75s cubic-bezier(.22, 1, .36, 1);
}
.mk-carousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}
.mk-carousel__dot {
    width: 24px;
    height: 2px;
    background: rgba(14, 14, 12, .15);
    cursor: pointer;
    transition: background .3s, width .4s cubic-bezier(.22, 1, .36, 1);
}
.mk-carousel__dot.on {
    width: 44px;
    background: var(--black);
}

/* ── Lightbox overlay (paired with lightbox.js, injected once) ── */
.mk-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(14, 14, 12, .96);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.mk-lightbox.open {
    display: flex;
}
.mk-lightbox__img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}
.mk-lightbox__close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.mk-lightbox__close:hover {
    background: rgba(255, 255, 255, .1);
}
