/* CHICKENMAN96 walk-in scene — the whole site is one Los Pollos joint:
   page top = storefront seen from the parking lot, scrolling down = walking
   inside the diner. Two fixed photo layers live at body level (z:0), BELOW
   #scroll-content (z:1); while the scene is on (home view only) the cream
   paint on #scroll-content goes transparent so the layers show through.
   chickenman-scene.js drives the layer transforms off #scroll-content.scrollTop. */

#cm-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    display: none;
}
body.cm-scene-on #cm-scene { display: block; }

/* Scene on: let the backdrop show through the scroller. The second selector
   out-guns chickenman-light.css's body.mw-skin.mw-light #scroll-content on
   specificity; config.js writes an inline background WITHOUT !important so it
   loses to these !important rules too. */
body.cm-scene-on #scroll-content,
body.mw-skin.mw-light.cm-scene-on #scroll-content { background: transparent !important; }

/* theme-sun's volcanic corona/ember pseudo layers are dark-era leftovers that
   would smear over the photo backdrop — off while the scene is running. */
body.cm-scene-on::before,
body.cm-scene-on::after { display: none !important; }

/* Base fill: sky-to-asphalt gradient, covers image load gap + extreme ratios. */
#cm-scene .cm-sky {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #7db3e8 0%, #a9cef0 32%, #d8cdb8 58%, #93897a 100%);
}

/* Photo layers. Slight overscan so scale/translate never exposes an edge. */
#cm-scene .cm-layer {
    position: absolute;
    inset: -5% -3%;
    background-size: cover;
    background-position: center 60%;
    will-change: transform, opacity;
}
#cm-scene .cm-facade { background-image: url('/images/scene/facade-m.webp?v=2'); }
#cm-scene .cm-interior { background-image: url('/images/scene/interior-m.webp?v=1'); opacity: 0; }

/* Readability veil over the interior — just enough haze that text stays legible,
   the diner must remain clearly visible (v1's .9 fog whited the whole store out). */
#cm-scene .cm-veil {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg,
        rgba(247, 244, 238, .66) 0%,
        rgba(247, 244, 238, .38) 24%,
        rgba(247, 244, 238, .34) 70%,
        rgba(242, 239, 232, .70) 100%);
}

@media (min-width: 900px) {
    #cm-scene .cm-facade { background-image: url('/images/scene/facade-w.webp?v=1'); background-position: center 55%; }
    #cm-scene .cm-interior { background-image: url('/images/scene/interior-w.webp?v=1'); }
}

/* Establishing shot: mobile stacks the first screen as a poster - hero copy in
   the sky band at the very top (absolutely positioned, out of flow), the
   signboard below it, and the first in-flow card starts under the sign. */
body.cm-scene-on #view-home.mw-skinned-m { padding-top: 36vh; padding-top: 36svh; position: relative; }
@media (min-width: 900px) {
    body.cm-scene-on #view-home.mw-reflowed { padding-top: 22vh; }
}

/* ---- Hero carousel as part of the storefront (mobile scene state) ----
   Client call: the dark hero box hanging under the sign looked bolted-on.
   In the scene the carousel loses its panel entirely - no box, no slide art,
   no scrim - and becomes centered copy floating on the building wall right
   under the signboard, like the store's own promo board. The art slides
   still exist untouched everywhere else (desktop column, scene off). */
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    aspect-ratio: auto !important;
    /* out of flow: pinned to the very top of the view, floating in the sky */
    position: absolute !important;
    top: 4px;
    left: 0;
    right: 0;
    height: 160px;
    max-height: none !important;
    overflow: visible;
}
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr .mw-bnr-slide {
    background-image: none !important;
}
/* theme-sun snipes the banner's structural children: > div:first-child gets the
   volcanic 135deg gradient (:243) and > div:nth-child(2) a lava texture (:257).
   Those land on .mw-bnr-track / .mw-bnr-dots here. Off in the scene. */
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr .mw-bnr-track,
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr .mw-bnr-dots {
    background: none !important;
}
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr .mw-bnr-slide::before {
    content: none !important;
}
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr .mw-bnr-text {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 88%;
    max-width: 88% !important;
}
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr .mw-bnr-eyebrow {
    background: rgba(64, 22, 10, .55);
    border-color: rgba(252, 182, 26, .65);
}
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr .mw-bnr-title {
    color: #fff;
    font-size: 30px;
    /* Hard menu-board outline, not soft blur: the title floats on the BRIGHT sky
       band of the storefront scene (measured 3.57:1 with the old soft shadows -
       white on rgb(83,142,177)). An opaque deep-brown outline keeps it readable
       no matter how bright the sky art is, and matches the baked lettering on
       the category menu-board tiles. */
    text-shadow:
        -2px -2px 0 rgba(30, 10, 4, .9), 2px -2px 0 rgba(30, 10, 4, .9),
        -2px 2px 0 rgba(30, 10, 4, .9), 2px 2px 0 rgba(30, 10, 4, .9),
        -2px 0 0 rgba(30, 10, 4, .9), 2px 0 0 rgba(30, 10, 4, .9),
        0 -2px 0 rgba(30, 10, 4, .9), 0 2px 0 rgba(30, 10, 4, .9),
        0 4px 14px rgba(30, 10, 4, .6);
}
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr .mw-bnr-sub {
    color: #fff;
    opacity: .96;
    text-shadow:
        -1px -1px 0 rgba(30, 10, 4, .85), 1px -1px 0 rgba(30, 10, 4, .85),
        -1px 1px 0 rgba(30, 10, 4, .85), 1px 1px 0 rgba(30, 10, 4, .85),
        0 2px 8px rgba(30, 10, 4, .6);
}
body.cm-scene-on #view-home.mw-skinned-m #home-banner.mw-bnr .mw-bnr-dots {
    bottom: -4px;
}

/* Reduced motion: skip the ride, park everyone inside the diner. */
@media (prefers-reduced-motion: reduce) {
    #cm-scene .cm-facade { display: none; }
    #cm-scene .cm-interior { opacity: 1 !important; transform: none !important; }
    #cm-scene .cm-veil { opacity: 1 !important; }
}
