
/* ================================================
   MARE NEVE — EXPERIMENTAL EDITION V1
   Gianmarco Spina
================================================ */

:root {
    --mnx-ivory: #f5f2eb;
    --mnx-gold: #d8b879;
    --mnx-black: #080808;
}

/* COMMON */

.mnx-experience {
    background: var(--mnx-black);
    color: var(--mnx-ivory);
}

.mnx-label {
    font: 400 9px/1.5 Helvetica, Arial, sans-serif;
    letter-spacing: .19em;
    color: var(--mnx-gold);
    text-transform: uppercase;
}

/* ================================================
   01 + 02 — SCROLL TO CINEMA / GIANT TYPOGRAPHY
================================================ */

.mnx-cinema-sequence {
    position: relative;
    height: 290vh;
    margin: 70px 0 100px;
    background: var(--mnx-black);
    isolation: isolate;
}

.mnx-cinema-sticky {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 450px;
    overflow: hidden;
    display: grid;
    place-items: center;
    isolation: isolate;
    background: var(--mnx-black);
}

.mnx-cinema-visual {
    position: absolute;
    inset: 0;
    overflow: hidden;
    transform-origin: center center;
    will-change: transform, opacity;
}

.mnx-cinema-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: scale(1.045);
    will-change: opacity, transform;
}

.mnx-cinema-frame:first-child {
    opacity: 1;
}

.mnx-cinema-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,.24),
        rgba(0,0,0,.03) 40%,
        rgba(0,0,0,.55)
    );
    pointer-events: none;
}

.mnx-cinema-graticule {
    position: absolute;
    inset: 5%;
    border: 1px solid rgba(245,242,235,.24);
    pointer-events: none;
    z-index: 4;
}

.mnx-cinema-top,
.mnx-cinema-bottom {
    position: absolute;
    left: 7%;
    right: 7%;
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mnx-cinema-top { top: 8%; }
.mnx-cinema-bottom { bottom: 8%; }

.mnx-cinema-top span:last-child,
.mnx-cinema-bottom span:last-child {
    font: 400 9px Helvetica, Arial, sans-serif;
    color: var(--mnx-ivory);
    letter-spacing: .14em;
    text-shadow: 0 1px 8px #000;
}

/* Oversized words moving in opposite directions */

.mnx-giant-type {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    z-index: 3;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transform: translateY(-50%);
    overflow: hidden;
    pointer-events: none;
}

.mnx-giant-word {
    display: block;
    width: max-content;
    max-width: none;

    font: 400 clamp(120px, 27vw, 470px)/.76
          Georgia, "Times New Roman", serif;

    letter-spacing: -.105em;
    text-transform: uppercase;
    white-space: nowrap;

    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,.76);

    mix-blend-mode: screen;
    will-change: transform, opacity;
}

.mnx-giant-word:nth-child(2) {
    margin-top: .08em;
    color: rgba(245,242,235,.14);
    -webkit-text-stroke: 1px rgba(245,242,235,.50);
}

.mnx-cinema-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    z-index: 9;
    background: rgba(255,255,255,.15);
}

.mnx-cinema-progress span {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--mnx-gold);
    transform: scaleX(0);
    transform-origin: left center;
    box-shadow: 0 0 12px rgba(216,184,121,.65);
}

/* ================================================
   03 — SPLIT REALITY
================================================ */

.mnx-split-section {
    width: 100%;
    padding: clamp(80px, 11vw, 160px) 5%;
    background: var(--mnx-black);
}

.mnx-split-heading {
    max-width: 1100px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mnx-split-heading p {
    margin: 0;
    color: rgba(245,242,235,.56);
    font: 400 10px Helvetica,Arial,sans-serif;
    letter-spacing: .12em;
}

.mnx-split {
    --mnx-split: 50%;
    position: relative;
    width: min(100%,1100px);
    height: clamp(330px,58vw,660px);
    margin: auto;
    overflow: hidden;
    background: #151515;
    isolation: isolate;
    user-select: none;
    touch-action: pan-y;
}

.mnx-split img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    pointer-events: none;
}

.mnx-split-top {
    clip-path: inset(
        0
        calc(100% - var(--mnx-split))
        0
        0
    );
}

.mnx-split::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,.18),
        transparent 25%,
        transparent 65%,
        rgba(0,0,0,.4)
    );
    pointer-events: none;
}

.mnx-split-divider {
    position: absolute;
    z-index: 4;
    left: var(--mnx-split);
    top: 0;
    height: 100%;
    width: 1px;
    background: var(--mnx-gold);
    box-shadow: 0 0 15px rgba(216,184,121,.55);
    transform: translateX(-50%);
    pointer-events: none;
}

.mnx-split-handle {
    position: absolute;
    z-index: 5;
    left: var(--mnx-split);
    top: 50%;
    width: 49px;
    height: 49px;
    transform: translate(-50%,-50%);
    border: 1px solid var(--mnx-gold);
    border-radius: 50%;
    background: rgba(5,5,5,.75);
    backdrop-filter: blur(6px);
    color: var(--mnx-ivory);
    display: flex;
    justify-content: center;
    align-items: center;
    font: 13px Helvetica,Arial,sans-serif;
    pointer-events: none;
}

.mnx-split-tag {
    position: absolute;
    z-index: 5;
    bottom: 24px;
    color: var(--mnx-ivory);
    font: 400 10px Helvetica,Arial,sans-serif;
    letter-spacing: .14em;
    pointer-events: none;
    text-shadow: 0 1px 7px #000;
}

.mnx-split-tag.left { left: 25px; }
.mnx-split-tag.right { right: 25px; }

.mnx-split-range {
    position: absolute;
    z-index: 7;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize !important;
}

/* ================================================
   04 — LIVING TIMECODE
================================================ */

.mnx-timecode {
    position: fixed;
    left: 5%;
    bottom: 27px;
    z-index: 9990;

    display: flex;
    align-items: baseline;
    gap: 12px;

    font: 400 10px/1 Helvetica,Arial,sans-serif;
    letter-spacing: .13em;
    pointer-events: none;

    color: var(--mnx-ivory);
    text-shadow: 0 1px 7px rgba(0,0,0,.9);

    opacity: 0;
    transition: opacity 250ms ease;
}

.mnx-timecode.is-visible { opacity: .85; }

.mnx-timecode b {
    color: var(--mnx-gold);
    font-weight: 400;
}

.mnx-timecode-value {
    font-variant-numeric: tabular-nums;
    min-width: 85px;
}

/* SMALL SCREENS */

@media(max-width:700px) {
    .mnx-cinema-sequence {
        height: 230vh;
        margin: 35px 0 60px;
    }

    .mnx-cinema-graticule { inset: 4%; }

    .mnx-giant-word {
        font-size: 30vw;
        -webkit-text-stroke-width: .65px;
    }

    .mnx-split-section { padding: 80px 5%; }

    .mnx-split-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .mnx-split {
        height: 54svh;
        min-height: 330px;
    }

    .mnx-timecode {
        left: 5%;
        bottom: 15px;
        font-size: 9px;
    }
}

/* MOTION ACCESSIBILITY */

@media(prefers-reduced-motion:reduce) {
    .mnx-cinema-sequence {
        height: 90svh;
        min-height: 450px;
    }

    .mnx-cinema-sticky { position: relative; }

    .mnx-cinema-frame:not(:first-child) {
        display: none;
    }

    .mnx-giant-word {
        transform: none !important;
        opacity: .6 !important;
    }

    .mnx-timecode { display: none; }

    .mnx-split * {
        animation: none !important;
        transition: none !important;
    }
}
