/*****************************************************************************

    ███████╗██╗     ██╗██████╗ ███████╗███████╗██╗  ██╗ ██████╗ ██╗    ██╗
    ██╔════╝██║     ██║██╔══██╗██╔════╝██╔════╝██║  ██║██╔═══██╗██║    ██║
    ███████╗██║     ██║██║  ██║█████╗  ███████╗███████║██║   ██║██║ █╗ ██║
    ╚════██║██║     ██║██║  ██║██╔══╝  ╚════██║██╔══██║██║   ██║██║███╗██║
    ███████║███████╗██║██████╔╝███████╗███████║██║  ██║╚██████╔╝╚███╔███╔╝
    ╚══════╝╚══════╝╚═╝╚═════╝ ╚══════╝╚══════╝╚═╝  ╚═╝ ╚═════╝  ╚══╝╚══╝ 
                                                                                                                                                                                        
 *****************************************************************************/



    /* Make links non clickable in backend. */

    .is-root-container .nvm-slideshow .button {
        pointer-events: none;
    }



    /* Slideshow main container. */

    .nvm-slideshow {
        position: relative;
        z-index: 0;
        overflow: hidden;
    }



    /*
        No navigation, no bullets.

        The extra .responsiville-slideshow-enabled in the middle is load
        bearing. responsiville.slideshow.css turns both back on with

            .responsiville-slideshow-enabled .responsiville-slideshow-bullets
                { display: block }

        which has exactly the same specificity as a two class selector here,
        so which one wins comes down to stylesheet order. Matching its
        structure and adding the wrapper class puts these at three classes and
        settles it without !important.
    */

    .nvm-slideshow-no-navigation .responsiville-slideshow-enabled .responsiville-slideshow-navigation {
        display: none;
    }

    .nvm-slideshow-no-bullets .responsiville-slideshow-enabled .responsiville-slideshow-bullets {
        display: none;
    }



    /* Slideshow aspect ratios. */

    .nvm-slideshow-9x21 {
        aspect-ratio: 9/21;
    }

    .nvm-slideshow-9x16 {
        aspect-ratio: 9/16;
    }

    .nvm-slideshow-3x4 {
        aspect-ratio: 3/4;
    }

    .nvm-slideshow-2x3 {
        aspect-ratio: 2/3;
    }

    .nvm-slideshow-1x1 {
        aspect-ratio: 1/1;
    }

    .nvm-slideshow-3x2 {
        aspect-ratio: 3/2;
    }

    .nvm-slideshow-4x3 {
        aspect-ratio: 4/3;
    }

    .nvm-slideshow-16x9 {
        aspect-ratio: 16/9;
    }

    .nvm-slideshow-21x9 {
        aspect-ratio: 21/9;
    }

    /* The Maison hero is drawn at 1920 x 945, a ratio of roughly 2.03:1 that
       none of the stock presets match — 21x9 is 2.33 and 16x9 is 1.78, so
       either would crop or heighten the hero. The exact figures are used
       rather than a rounded 2/1. The matching choice is added to the ACF
       field in inc/functions/acf.php. */

    /*
        A ratio at every size, just not the same one.

        The drawn 2.03:1 is a letterbox strip on a phone, so narrow screens get
        a portrait ratio and tablets something in between. Ratios rather than
        vh deliberately: viewport height on a phone changes as the address bar
        slides in and out, so a hero measured in vh resizes while the reader
        scrolls, and is short to begin with in a short window. Width does not
        move, so a ratio does not either.

            phone  3:4   ... upright, fills the screen
            tablet 16:9
            desktop 1920:945, as drawn
    */

    .nvm-slideshow-1920x945 {
        aspect-ratio: 3 / 4;
    }

    .tablet .nvm-slideshow-1920x945 {
        aspect-ratio: 16 / 9;
    }

    .desktop .nvm-slideshow-1920x945 {
        aspect-ratio: 1920 / 945;
    }


    
    /* Slideshow buttons. */

    .nvm-slideshow .responsiville-slideshow-next, 
    .nvm-slideshow .responsiville-slideshow-previous,
    .nvm-slideshow .responsiville-slideshow-bullet {
        box-shadow: none !important;
    }

    .nvm-slideshow .responsiville-slideshow-next::after, 
    .nvm-slideshow .responsiville-slideshow-previous::after,
    .nvm-slideshow .responsiville-slideshow-bullet::after {
        display: none;
        box-shadow: none !important;
    }
    

    
    /*
        Slideshow slides — Maison B2C hero, Figma "Hero Section" 1920 x 945.

            image ....... full bleed, the header overlays it
            text ........ bottom left, 237 from the edge, 105 from the bottom
            eyebrow ..... Hauora ExtraBold 800, 30px, lh 41, uppercase, white
            title ....... Hauora ExtraBold 800, 120px, lh 132 (1.1), white
            gap ......... 50 between the two
            navigation .. none drawn

        Field mapping: the ACF "Title" holds the large heading and stays an
        <h2>, which is correct semantically, while "Message" holds the small
        uppercase eyebrow. The design puts the eyebrow above the heading, so
        the two are reordered visually with flexbox rather than swapping the
        markup and ending up with a 30px h2 above a 120px paragraph.

        Sizes are vw based so they resolve to the drawn values at 1920 and
        scale down: 120/1920 = 6.25vw, 30/1920 = 1.5625vw,
        237/1920 = 12.34vw, 105/1920 = 5.47vw, 50/1920 = 2.6vw.
    */

    /* Before the script has run there is no slideshow — only three articles
       one under the other, every one of them the full height of a slide, and
       the page three times taller than it should be. Responsiville stacks and
       hides them itself, but not until it has added
       `responsiville-slideshow-enabled` to the container and its own class to
       each slide, and on the home page that is after the first photograph has
       downloaded. Until then the visitor sees the pile, and then watches it
       collapse.

       So the pile is pre-empted here, by the one rule the browser can apply
       on its first pass. It is written against the absence of the enabled
       class, so it lifts the moment the script takes over and never fights
       it, and it leaves the first slide alone — if the script never runs at
       all, a visitor still gets a hero rather than an empty box. */

    .nvm-slideshow .responsiville-slideshow:not( .responsiville-slideshow-enabled ) .slide:not( :first-child ) {
        display: none;
    }

    .nvm-slideshow .slide {
        position: relative;
    }

        /* responsiville.moressette.css forces `height: auto !important` on
           every image, so covering the slide needs !important back. */

        .nvm-slideshow .slide-image img {
            display: block;
            width: 100%;
            height: 100% !important;
            object-fit: cover;
        }

        /*
            A slide with a mobile crop wraps its picture in a <picture>, and
            a <picture> is an inline element with no height of its own. The
            `height: 100%` on the image inside would then resolve against
            auto — which is to say it would not resolve at all — and the
            slide would be as tall as the photograph rather than as tall as
            the ratio asks. So the wrapper is made to fill the figure and the
            image goes on covering the wrapper, exactly as before.
        */

        .nvm-slideshow .slide-image picture {
            display: block;
            width: 100%;
            height: 100%;
        }

        /* A video slide fills its figure exactly as the photograph does, so
           the two are interchangeable and the ratio classes above keep
           working for both.

           The !important is not decoration. responsiville.moressette.css
           sets `height: auto !important` on a list of elements that has
           `video` in it alongside `img`, so without it the video kept its
           own proportions inside a figure drawn to someone else's — most
           visibly on a phone, where the figure is 3/4 and a landscape video
           left a gap under itself. */

        .nvm-slideshow .slide-image video {
            display: block;
            width: 100%;
            height: 100% !important;
            object-fit: cover;
        }

        /* The figure carries its own .image-box- ratio, so the mobile
           min-height has to be repeated here — the one on .nvm-slideshow only
           stretches the outer container and would leave the picture short. */

        /* The figure carries its own .image-box- ratio from theme.images.css,
           so it has to follow the container step for step. */

        .nvm-slideshow-1920x945 .slide-image {
            aspect-ratio: 3 / 4;
            min-height: 0;
        }

        .tablet .nvm-slideshow-1920x945 .slide-image {
            aspect-ratio: 16 / 9;
        }

        .desktop .nvm-slideshow-1920x945 .slide-image {
            aspect-ratio: 1920 / 945;
        }

    .nvm-slideshow .slide-text {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        gap: clamp(20px, 2.6vw, 50px);
        padding: 0 clamp(20px, 12.34vw, 237px) clamp(40px, 5.47vw, 105px);
        background: none;
        color: var(--nvm-color-white);
    }

        /* Eyebrow above the heading — see the note above. */

        .nvm-slideshow .slide-text-message {
            order: 1;
            max-width: none;
            margin: 0;
            font-size: clamp(16px, 1.5625vw, 30px);
            font-weight: 800;
            line-height: 1.366;
            text-transform: uppercase;
            color: inherit;
        }

        .nvm-slideshow .slide-text-title {
            order: 2;
            max-width: none;
            margin: 0;
            font-size: clamp(36px, 6.25vw, 120px);
            font-weight: 800;
            line-height: 1.1;
            color: inherit;
        }

        .nvm-slideshow .slide-buttons {
            order: 3;
            margin: 0;
        }

            /*
                The call to action, in the shop's gold.

                The slideshow block prints whatever the link field is given as
                `class="button nvm-button"`, and that is Vanilla's own default
                button: a grey fill over `--nvm-color-gray-6` with a hard black
                shadow under it. On an inner page nobody notices; lying on the
                hero photograph it reads as something left unfinished.

                Gold on ink is the pairing the rest of the site already uses
                for an accent that has to carry — the eye on a catalogue cover
                and the offer sticker are both that way round — and it is the
                one colour in the palette that holds its own against a
                photograph of any brightness.

                The geometry is the outline button's from theme.buttons.css,
                not a new shape: 40 tall, a 4px radius, 12px bold in capitals.
                So the hero's button is the same button as the one on a product
                card and the 404 page, wearing the gold. It is wider only
                because it stands alone over a picture rather than inside a
                card.

                The selector carries .responsiville because the base rules it
                overrides do, and theme.buttons.css is loaded after this file —
                without it the grey would win on both specificity and order.
            */

            .responsiville .nvm-slideshow .slide-buttons .nvm-button {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: 10px;
                min-width: 270px;
                max-width: 100%;
                height: 40px;
                padding: 0 30px;
                border: 1px solid var(--nvm-color-gold);
                border-radius: 4px;
                box-shadow: none;
                background: var(--nvm-color-gold);
                color: var(--nvm-color-ink);
                font-size: 12px;
                font-weight: 700;
                line-height: 1;
                text-transform: uppercase;
                transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
            }

            /*
                Hover turns it inside out, the way the outline button does:
                the gold moves to the text and the ink takes the fill. Keeping
                the border gold means the shape does not move by a pixel
                between the two states.
            */

            .responsiville .nvm-slideshow .slide-buttons .nvm-button:hover,
            .responsiville .nvm-slideshow .slide-buttons .nvm-button:focus,
            .responsiville .nvm-slideshow .slide-buttons .nvm-button:focus-visible {
                background: var(--nvm-color-ink);
                color: var(--nvm-color-gold);
                border-color: var(--nvm-color-gold);
                box-shadow: none;
            }
