/* ============================================
   VISITORS FLEA MARKET — homepage scroll scenes
   Applies only while <html> has the `motion` class (scroll-engine.js). Each
   scene reads --p, its scroll progress from 0 to 1, or the variables its hook
   in home-scenes.js sets. Only transform, opacity and clip-path are animated.
   ============================================ */

/* ---- Rise in once ---- */
html.motion [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 36px, 0);
    transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out);
}

html.motion [data-reveal].is-in { opacity: 1; transform: none; }
html.motion [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
html.motion [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
html.motion [data-reveal]:nth-child(4) { transition-delay: 0.24s; }

/* ============================================
   1. THE TOUR — hero, dive through the door, walk the aisle
   ============================================ */
html.motion .tour { height: 610vh; height: calc(100lvh * 6.1); }

html.motion .tour__stage {
    position: sticky;
    top: 0;
    display: block;
    height: 100vh;
    height: 100lvh;
    min-height: 0;
    overflow: hidden;
    --unveil: 0;
    --dive: 0;
    --walk: 0;
    --loop: 0;
    --vp: 46%;
}

/* Once the scene is live the photo is a free layer the script moves. */
html.motion .tour.is-live .tour__photo { position: absolute; inset: 0; height: auto; z-index: 1; }

html.motion .tour.is-live .tour__img {
    position: absolute;
    left: 0;
    top: 0;
    object-fit: fill;
    transform-origin: 0 0;
    will-change: transform;
}

/* Darkens as the camera goes in. */
html.motion .tour.is-live .tour__photo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #05070A;
    opacity: calc(var(--dive) * 0.72);
    pointer-events: none;
}

html.motion .tour__photo::after { opacity: calc(1 - var(--unveil) * 1.5); }

/* The copy scrolls up at the page's own pace and slips under the photo, which
   is opening downward at the same time: a wipe, no cross-fade. */
html.motion .hero__copy {
    z-index: 0;
    transform: translate3d(0, calc(var(--unveil) * -56vh), 0);
}

/* Neon sign warms up once, like the real thing. */
html.motion .hero__neon { animation: neon-on 1.5s 0.25s both; }

@keyframes neon-on {
    0% { opacity: 0.12; }
    8% { opacity: 1; }
    11% { opacity: 0.2; }
    17% { opacity: 1; }
    21% { opacity: 0.35; }
    28%, 100% { opacity: 1; }
}

html.motion .hero__line { animation: line-up 0.8s var(--ease-out) both; }
html.motion .hero__line:nth-child(2) { animation-delay: 0.07s; }

@keyframes line-up {
    from { opacity: 0; transform: translate3d(0, 0.5em, 0); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 899px) {
    /* Phone first screen: photo band on top, copy below, all above the fold. */
    html.motion .tour__hero {
        display: flex;
        flex-direction: column;
        height: calc(100vh - var(--header-h) - var(--notice-h, 56px));
        height: calc(100svh - var(--header-h) - var(--notice-h, 56px));
        min-height: 430px;
    }

    html.motion .hero__band { display: block; flex: 1 1 0; height: auto; min-height: 92px; }
    html.motion .tour:not(.is-live) .tour__photo { height: 100%; }
    html.motion .hero__copy { position: relative; flex: none; background: var(--ink); padding-top: 14px; padding-bottom: 14px; }
}

@media (min-width: 900px) {
    html.motion .tour__hero { display: flex; align-items: center; height: 100%; }

    /* Laptop: the copy sits on the photo, so it lifts and fades instead of wiping. */
    html.motion .hero__copy {
        width: 100%;
        z-index: 2;
        transform: translate3d(0, calc(var(--unveil) * -30vh), 0);
        opacity: calc(1 - var(--unveil) * 1.8);
    }

    html.motion .tour__cue {
        position: absolute;
        left: 50%;
        bottom: 34px;
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        transform: translateX(-50%);
        font-family: var(--font-display);
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: #fff;
        opacity: calc(1 - var(--unveil) * 4);
    }

    html.motion .tour__cue .icon { animation: cue 1.6s ease-in-out infinite; }
}

@keyframes cue {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(7px); }
}

/* "STEP / INSIDE" parts around the door as it opens. */
html.motion .tour__step {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--vp);
    z-index: 1;
    display: block;
    height: 0;
    font-family: var(--font-display);
    font-size: clamp(5rem, 26vw, 15rem);
    font-weight: 900;
    line-height: 0.8;
    text-align: center;
    text-transform: uppercase;
    color: #fff;
    pointer-events: none;
    opacity: min(clamp(0, calc((var(--dive) - 0.04) / 0.16), 1), clamp(0, calc((0.78 - var(--dive)) / 0.2), 1));
}

html.motion .tour__step span { position: absolute; left: 0; right: 0; text-shadow: 0 6px 30px rgba(0,0,0,0.6); }
html.motion .tour__step span:first-child { bottom: 0; transform: translate3d(0, calc(-7vh - var(--dive) * 26vh), 0); }
html.motion .tour__step span:last-child { top: 0; transform: translate3d(0, calc(7vh + var(--dive) * 26vh), 0); }

/* ---- The aisle ---- */
html.motion .aisle {
    --pn: 640;
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 0;
    overflow: hidden;
    visibility: hidden;
    background: radial-gradient(120% 70% at 50% var(--vp), #141B26 0%, #080B10 55%, #05070A 100%);
}

html.motion .aisle__head {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--header-h) + 5vh);
    z-index: 4;
    max-width: none;
    margin: 0;
    text-align: center;
    pointer-events: none;
    opacity: min(clamp(0, calc((var(--dive) - 0.72) / 0.2), 1), clamp(0, calc((520 - var(--walk)) / 300), 1));
    transform: translate3d(0, calc(var(--walk) * -0.14px), 0);
}

html.motion .aisle__head h2 { font-size: clamp(2.7rem, 12.6vw, 6rem); }
html.motion .aisle__head p { display: none; }

/* Wireframe of the hall, built by the script: floor seams, roof beams with
   string lights, booth posts and the lines that run to the vanishing point. */
html.motion .aisle__world { display: block; position: absolute; inset: 0; pointer-events: none; }

html.motion .seam,
html.motion .post {
    --d: calc(var(--i) * 240 - var(--loop));
    --s: calc(var(--pn) / (var(--pn) + var(--d)));
    position: absolute;
    left: 50%;
    top: var(--vp);
    opacity: clamp(0, calc(var(--s) * 1.7 - 0.26), 1);
    will-change: transform;
}

html.motion .seam {
    width: calc(var(--half) * 2);
    height: 2px;
    margin-left: calc(var(--half) * -1);
    background: rgba(255,255,255,0.2);
    transform: translate3d(0, calc(var(--drop) * var(--s)), 0) scaleX(var(--s));
}

html.motion .seam--roof {
    height: 22px;
    margin-top: -11px;
    background:
        radial-gradient(circle, #FFF1C9 0 3px, rgba(255, 196, 92, 0.55) 4px, transparent 10px) 0 0 / 20% 100%,
        linear-gradient(180deg, transparent 10px, rgba(255,255,255,0.16) 10px 12px, transparent 12px);
    transform: translate3d(0, calc(var(--rise) * -1 * var(--s)), 0) scale(var(--s));
}

html.motion .post {
    width: 3px;
    height: calc(var(--rise) + var(--drop));
    margin: calc(var(--rise) * -1) 0 0 -1.5px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.3) 30%, rgba(255,255,255,0.12));
    transform-origin: 50% var(--rise);
    transform: translate3d(calc(var(--half) * var(--side) * var(--s)), 0, 0) scaleY(var(--s));
}

html.motion .ray {
    position: absolute;
    left: 50%;
    top: var(--vp);
    width: 220vmax;
    height: 2px;
    margin-top: -1px;
    transform-origin: 0 50%;
    transform: rotate(var(--a));
    background: linear-gradient(90deg, transparent 0, rgba(255,255,255,0.16) 9%, rgba(255,255,255,0.16));
}

html.motion .ray--tape { background: linear-gradient(90deg, transparent 0, rgba(255,208,0,0.5) 7%, rgba(255,208,0,0.5)); }
html.motion .ray--awning { background: linear-gradient(90deg, transparent 0, rgba(240,64,58,0.55) 10%, rgba(240,64,58,0.55)); }

html.motion .aisle__fog {
    position: absolute;
    inset: 0;
    background: radial-gradient(46% 30% at 50% var(--vp), #0A0E14 0%, rgba(10,14,20,0.82) 34%, transparent 100%);
}

/* Signs and photos are projected by hand: scale = P / (P - z) about the
   vanishing point, the same sum CSS perspective does, written out so every
   browser draws exactly the same frame. */
html.motion .aisle__props { display: block; position: absolute; inset: 0; pointer-events: none; }

html.motion .booth {
    --t: calc(var(--walk) - var(--z0) - var(--k) * var(--gap));
    --side: 1;
    --glow: var(--neon);
    position: absolute;
    inset: 0;
    z-index: calc(20 - var(--k));
}

html.motion .booth:nth-child(even) { --side: -1; }
html.motion .booth:nth-child(3n + 2) { --glow: var(--accent); }
html.motion .booth:nth-child(3n) { --glow: var(--neon-blue); }

html.motion .booth__sign {
    --ia: var(--glow);
    --w: clamp(210px, 25vw, 350px);
    --s: calc(var(--pn) / (var(--pn) - min(var(--t), 300)));
    position: absolute;
    left: 50%;
    top: var(--vp);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: var(--w);
    margin-left: calc(var(--w) / -2);
    padding: 18px 14px 16px;
    border-radius: 20px;
    border: 3px solid var(--glow);
    background: rgba(8, 11, 16, 0.86);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset, 0 0 26px -2px var(--glow), 0 0 80px -10px var(--glow);
    color: #fff;
    transform-origin: 50% 0;
    transform: translate3d(calc(var(--half) * 0.27 * var(--side) * var(--s)), calc(var(--rise) * -0.6 * var(--s)), 0) scale(var(--s));
    opacity: min(clamp(0, calc((var(--t) + 2700) / 900), 1), clamp(0, calc((300 - var(--t)) / 180), 1));
    will-change: transform, opacity;
}

/* The wires it hangs from. */
html.motion .booth__sign::before,
html.motion .booth__sign::after {
    content: '';
    position: absolute;
    bottom: 100%;
    width: 2px;
    height: 60vh;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.35));
}

html.motion .booth__sign::before { left: 16%; }
html.motion .booth__sign::after { right: 16%; }
html.motion .booth__sign .icon { width: clamp(60px, 8.4vw, 92px); height: clamp(60px, 8.4vw, 92px); }

html.motion .booth__sign span {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 4.2vw, 3.8rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--glow), 0 0 28px var(--glow);
}

/* A real photo from the market's Instagram on the opposite side, turned
   a little toward the aisle. */
html.motion .booth__photo {
    --w: clamp(170px, 19vw, 280px);
    --s: calc(var(--pn) / (var(--pn) - min(var(--t) - 360, 210)));
    position: absolute;
    left: 50%;
    top: var(--vp);
    display: block;
    width: var(--w);
    aspect-ratio: 4 / 5;
    margin-left: calc(var(--w) / -2);
    border-radius: 16px;
    border: 3px solid #fff;
    overflow: hidden;
    background: linear-gradient(135deg, #1B2330, #0E131B);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    transform-origin: 50% 0;
    transform: translate3d(calc(var(--half) * -0.5 * var(--side) * var(--s)), calc(var(--drop) * -0.12 * var(--s)), 0) scale(var(--s)) perspective(900px) rotateY(calc(var(--side) * 22deg));
    opacity: min(clamp(0, calc((var(--t) + 2300) / 800), 1), clamp(0, calc((570 - var(--t)) / 180), 1));
    will-change: transform, opacity;
}

html.motion .booth__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

html.motion .booth__photo.is-loaded img { opacity: 1; }

/* Captions sit in their own layer above everything you walk past. */
html.motion .aisle__list { position: absolute; inset: 0; z-index: 26; display: block; max-width: none; margin: 0; padding: 0; pointer-events: none; }

html.motion .booth-cap {
    --t: calc(var(--walk) - var(--z0) - var(--k) * var(--gap));
    --on: min(clamp(0, calc((var(--t) + 440) / 170), 1), clamp(0, calc((220 - var(--t)) / 110), 1));
    position: absolute;
    left: 50%;
    bottom: calc(100vh - 100svh + 92px);
    bottom: calc(100lvh - 100svh + 92px);
    width: min(100% - 32px, 560px);
    height: auto;
    padding: 16px 18px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(8, 11, 16, 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: var(--on);
    transform: translate3d(-50%, calc((1 - var(--on)) * 26px), 0);
}

html.motion .booth-cap .booth__no .icon { width: 28px; height: 28px; }
html.motion .booth-cap h3 { margin-top: 8px; font-size: clamp(1.7rem, 7vw, 2.3rem); }
html.motion .booth-cap > p:not(.booth__no) { margin-top: 6px; font-size: 0.94rem; line-height: 1.45; color: var(--gray-300); }
html.motion .booth-cap .booth__tags { margin-top: 10px; }

/* End of the aisle. */
html.motion .aisle__end {
    --t: calc(var(--walk) - var(--z-end));
    position: absolute;
    inset: 0;
    z-index: 30;
    max-width: none;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

html.motion .end-card {
    --s: calc(var(--pn) / (var(--pn) - min(var(--t), 0)));
    position: absolute;
    left: 50%;
    top: var(--vp);
    width: min(100% - 40px, 540px);
    pointer-events: auto;
    transform: translate3d(-50%, -50%, 0) scale(var(--s));
    opacity: clamp(0, calc((var(--t) + 2300) / 900), 1);
    will-change: transform, opacity;
}

/* Where you are in the walk, and a way out of it. */
html.motion .aisle__hud {
    position: absolute;
    left: 20px;
    right: 20px;
    top: calc(var(--header-h) + 14px);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    opacity: min(clamp(0, calc((var(--walk) - 180) / 200), 1), clamp(0, calc((var(--z-end) - 500 - var(--walk)) / 300), 1));
}

html.motion .aisle__count b { color: var(--accent); }
html.motion .aisle__bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.18); overflow: hidden; }
html.motion .aisle__bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(calc(var(--walk) / var(--z-end))); }

html.motion .aisle__skip {
    position: absolute;
    right: 20px;
    top: calc(var(--header-h) + 44px);
    z-index: 40;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(8, 11, 16, 0.6);
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    opacity: min(clamp(0, calc((var(--walk) - 180) / 200), 1), clamp(0, calc((var(--z-end) - 900 - var(--walk)) / 300), 1));
}

/* ============================================
   2. NUMBERS — odometer reels, then a two-way marquee
   ============================================ */
html.motion .reel__strip {
    transform: translate3d(0, 0, 0);
    transition: transform 1.7s var(--ease-out);
    transition-delay: calc(var(--order) * 90ms);
}

html.motion [data-count].is-in .reel__strip { transform: translate3d(0, calc(var(--d) * -10%), 0); }
html.motion .marquee__row { transform: translate3d(calc(var(--p, 0.5) * -36%), 0, 0); will-change: transform; }
html.motion .marquee__row--back { transform: translate3d(calc(var(--p, 0.5) * 36% - 40%), 0, 0); }

/* ============================================
   3. WHY — headline lights word by word, cards stack
   ============================================ */
html.motion .word {
    opacity: clamp(0.14, calc((var(--p, 1) - 0.13) / 0.27 * var(--n) - var(--i)), 1);
}

html.motion .why__stack { display: block; max-width: 900px; }

html.motion .why-card {
    position: sticky;
    top: calc(var(--header-h) + 14px + var(--i) * 14px);
    min-height: min(58vh, 430px);
    margin-bottom: 26px;
    transform-origin: 50% 0;
    transform: scale(calc(1 - var(--covered, 0) * 0.07));
    box-shadow: 0 -16px 40px -20px rgba(21, 24, 30, 0.5);
    will-change: transform;
}

html.motion .why-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #15181E;
    opacity: calc(var(--covered, 0) * 0.34);
    pointer-events: none;
}

html.motion .why-card:last-child { margin-bottom: 0; }

@media (min-width: 1000px) {
    /* Laptop: the headline holds on the left while the cards stack on the right. */
    html.motion .why > .container { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); column-gap: 64px; align-items: start; }
    html.motion .why__head { position: sticky; top: calc(var(--header-h) + 44px); }
    html.motion .why__head h2 { font-size: clamp(2.8rem, 4.5vw, 4.3rem); }
    html.motion .why__stack { margin-top: 0; }
    html.motion .why__note { grid-column: 1 / -1; }
}

/* ============================================
   4. HOURS — the sky runs from 10 AM to 2 AM
   ============================================ */
html.motion .late { --q: 0; height: 320vh; height: calc(100lvh * 3.2); }

html.motion .late__stage {
    --night: clamp(0, calc((var(--q) - 0.5) / 0.16), 1);
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100lvh;
    padding: 0;
    background: var(--ink);
}

/* Sky window: day drone shot fading to the night one, sun out, moon in. */
html.motion .late__sky {
    position: relative;
    inset: auto;
    flex: 1 1 0;
    min-height: 150px;
    overflow: hidden;
    /* Same file the hero already loaded at this screen size: no second download. */
    background: url('/hero-portrait.webp') 50% 52% / cover no-repeat #6FB6E8;
}

html.motion .late__dusk,
html.motion .late__night { display: block; position: absolute; inset: 0; }

html.motion .late__dusk {
    background: linear-gradient(180deg, rgba(64, 44, 130, 0.72) 0%, rgba(214, 78, 110, 0.6) 46%, rgba(255, 158, 74, 0.62) 100%);
    opacity: min(clamp(0, calc((var(--q) - 0.3) / 0.16), 1), clamp(0, calc((0.7 - var(--q)) / 0.14), 1));
}

html.motion .late__night { background: #050816; opacity: calc(var(--night) * 0.94); }

html.motion .late__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: 50% 42%;
    opacity: clamp(0, calc((var(--q) - 0.52) / 0.16), 1);
    -webkit-mask-image: none;
    mask-image: none;
}

html.motion .late__stars { z-index: 1; opacity: clamp(0, calc((var(--q) - 0.6) / 0.14), 0.9); bottom: 45%; }

html.motion .late__sun,
html.motion .late__moon {
    display: block;
    position: absolute;
    left: 0;
    top: 12%;
    right: auto;
    z-index: 1;
    width: clamp(54px, 13vw, 92px);
    height: clamp(54px, 13vw, 92px);
    will-change: transform;
}

html.motion .late__sun {
    --u: clamp(0, calc(var(--q) / 0.58), 1);
    --ia: #FFD000;
    color: #FFF6D0;
    transform: translate3d(calc(4vw + var(--u) * 78vw), calc((var(--u) * 2 - 0.7) * (var(--u) * 2 - 0.7) * 16vh), 0);
    opacity: clamp(0, calc((0.6 - var(--q)) / 0.08), 1);
}

html.motion .late__moon {
    --v: clamp(0, calc((var(--q) - 0.56) / 0.44), 1);
    transform: translate3d(calc(8vw + var(--v) * 62vw), calc((1 - var(--v)) * (1 - var(--v)) * 18vh), 0);
    opacity: clamp(0, calc((var(--q) - 0.58) / 0.1), 1);
}

html.motion .late__sky::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, var(--ink));
}

html.motion .late__inner {
    flex: none;
    padding-bottom: calc(100vh - 100svh + 96px);
    padding-bottom: calc(100lvh - 100svh + 96px);
}

html.motion .late__head { position: relative; margin-top: -34px; }
html.motion .late__head h2 { font-size: clamp(2.2rem, 8.6vw, 4.4rem); }
html.motion .late__head p { display: none; }

html.motion .late__clock {
    display: block;
    position: absolute;
    right: 24px;
    bottom: 100%;
    margin-bottom: 44px;
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 17vw, 7.4rem);
    font-weight: 900;
    line-height: 0.8;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 4px 28px rgba(0,0,0,0.55);
}

html.motion .late__chart { margin-top: 16px; padding: 16px 18px; }
html.motion .late__group + .late__group { margin-top: 12px; }
html.motion .late__group ul { gap: 5px; }
html.motion .late__group li { padding-bottom: 10px; opacity: 0.5; transition: opacity 0.3s ease; }
html.motion .late__group li::after { background: #6B7482; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
html.motion .late__group li.is-open { opacity: 1; }
html.motion .late__group li.is-open::after { background: var(--accent); box-shadow: 0 0 14px rgba(255, 208, 0, 0.7); }

/* The needle: where the clock is on the 10 AM to 2 AM scale. */
html.motion .late__chart::after {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 30px;
    left: 18px;
    right: 18px;
    width: 2px;
    background: #fff;
    box-shadow: 0 0 10px #fff;
    transform: translate3d(calc(var(--q) * (100vw - 86px)), 0, 0);
    transform: translate3d(calc(var(--q) * var(--chart-w, 300px)), 0, 0);
    pointer-events: none;
}

html.motion .late__foot { display: none; }

@media (min-width: 900px) {
    html.motion .late__sky { background-image: url('/hero-bg.webp'); background-position: 51% 46%; }
    html.motion .late__stage { flex-direction: row; align-items: center; gap: 56px; padding: 0 max(24px, calc((100vw - 1152px) / 2)); }
    html.motion .late__sky { order: 2; flex: 0 0 42%; height: min(74vh, 720px); border-radius: 999px 999px 26px 26px; border: 4px solid #fff; }
    html.motion .late__sky::after { display: none; }
    html.motion .late__inner { flex: 1 1 0; padding: 0; max-width: none; }
    html.motion .late__head { margin-top: 0; }
    html.motion .late__head p { display: block; }
    html.motion .late__clock { position: static; margin: 22px 0 0; text-shadow: none; }
    html.motion .late__sun { transform: translate3d(calc(2vw + var(--u) * 30vw), calc((var(--u) * 2 - 0.7) * (var(--u) * 2 - 0.7) * 16vh), 0); }
    html.motion .late__moon { transform: translate3d(calc(4vw + var(--v) * 24vw), calc((1 - var(--v)) * (1 - var(--v)) * 18vh), 0); }
    html.motion .late__foot { display: block; }
}

/* ============================================
   5. DIRECTIONS — the routes draw themselves in
   ============================================ */
html.motion .route__pin-wrap { height: 300vh; height: calc(100lvh * 3); }

html.motion .route__stage {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    height: 100vh;
    height: 100lvh;
    padding: calc(var(--header-h) + 8px) 0 calc(100vh - 100svh + 92px);
    padding: calc(var(--header-h) + 8px) 0 calc(100lvh - 100svh + 92px);
    overflow: hidden;
}

html.motion .route__stage .route__inner { width: 100%; gap: 12px; }
html.motion .route__head h2 { font-size: clamp(2.1rem, 8.4vw, 4.4rem); }
html.motion .route__map { max-height: 46vh; max-height: 46svh; }
html.motion .route__map svg { max-height: 46vh; max-height: 46svh; }

html.motion .route__line {
    --drawn: clamp(0, calc((var(--p, 1) - var(--from)) / 0.2), 1);
    stroke-dasharray: 1;
    stroke-dashoffset: calc(1 - var(--drawn));
    opacity: clamp(0, calc(var(--drawn) * 40), 1);
}

html.motion .route__place {
    --on: clamp(0, calc((var(--p, 1) - var(--from) + 0.03) / 0.05), 1);
    opacity: calc(0.3 + var(--on) * 0.7);
}

html.motion .route__mins {
    --on: clamp(0, calc((var(--p, 1) - var(--from) - 0.17) / 0.05), 1);
    opacity: var(--on);
}

html.motion .route__pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(0.5); opacity: 0.9; }
    100% { transform: scale(2.6); opacity: 0; }
}

@media (min-width: 900px) {
    html.motion .route__map, html.motion .route__map svg { max-height: 76vh; }
}

/* ============================================
   6. FINALE
   ============================================ */
html.motion .finale h2 { transform: scale(calc(0.72 + min(var(--p, 0.5), 0.36) / 0.36 * 0.28)); transform-origin: 50% 60%; will-change: transform; }
