
/* =========================================================
   LM IMPIANTI — VIDEO HERO
   Editorial / Industrial / Architectural
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Instrument+Sans:wght@400;500;600&display=swap');


/* =========================================================
   01 — HERO FOUNDATION
   ========================================================= */

.lmv-hero {
    --hero-width: 1180px;
    --hero-side: 30px;

    --hero-mono: "IBM Plex Mono", monospace;
    --hero-body: "Instrument Sans", sans-serif;

    position: relative;
    z-index: 1;

    isolation: isolate;

    display: flex;
    flex-direction: column;

    min-height: 100vh;
    min-height: 100svh;

    color: #fff;
    background: #1b2021;
}


/* =========================================================
   02 — BACKGROUND VIDEO
   ========================================================= */

.lmv-hero__media {
    position: absolute;
    inset: 0;

    z-index: -1;

    overflow: hidden;
    pointer-events: none;
}

.lmv-hero__poster,
.lmv-hero__video {
    position: absolute;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}

.lmv-hero__poster {
    z-index: 0;
}

.lmv-hero__video {
    z-index: 1;
}


/* =========================================================
   03 — VIDEO OVERLAY

   Contrasto distribuito senza oscurare
   eccessivamente il video.
   ========================================================= */

.lmv-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;

    background: rgba(8, 12, 14, .32);

    pointer-events: none;
}


/* =========================================================
   04 — PROGRESSIVE BOTTOM BLUR

   Manteniamo la dissolvenza inferiore.
   ========================================================= */

.lmv-hero::before {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 38%;

    z-index: 0;

    pointer-events: none;

    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, .08) 20%,
            rgba(0, 0, 0, .48) 57%,
            #000 100%
        );

    mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, .08) 20%,
            rgba(0, 0, 0, .48) 57%,
            #000 100%
        );
}

.lmv-hero::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 35%;

    z-index: 0;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(12, 16, 17, .10) 35%,
            rgba(12, 16, 17, .50) 100%
        );
}


/* =========================================================
   05 — MAIN LAYOUT
   ========================================================= */

.lmv-hero__main {
    position: relative;
    z-index: 2;

    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;

    width: 80%;

    padding:
        115px
        var(--hero-side)
        155px;
}


/* =========================================================
   06 — LOCALIZED TEXT CONTRAST

   Una sfumatura morbida dietro al testo.
   Non è un riquadro e non scurisce tutta
   l'immagine.
   ========================================================= */


@media (max-width: 700px) {
    .lmv-hero__main {
        width: 100%;
    }
}

.lmv-hero__container {
    position: relative;

    width: 100%;
    max-width: var(--hero-width);

    margin-inline: auto;
}


/* =========================================================
   07 — HEADLINE

   IBM Plex Mono.
   Più controllata, leggibile e compatta.
   ========================================================= */

.lmv-hero__title {
    position: relative;

    max-width: 1080px;

    margin: 0;

    font-family: var(--hero-mono);

    font-size: clamp(36px, 3.05vw, 56px);
    font-weight: 500;

    line-height: 1.13;
    letter-spacing: -.055em;

    text-transform: uppercase;
    text-wrap: balance;

    color: #fff;

    text-shadow:
        0 2px 20px rgba(0, 0, 0, .12);
}


/* Piccolo quadrato editoriale */

.lmv-hero__title::before {
    content: "";

    position: absolute;

    left: -23px;
    top: .57em;

    width: 7px;
    height: 7px;

    background: #fff;
}


/* =========================================================
   08 — DIVIDER
   ========================================================= */

.lmv-hero__divider {
    width: 100%;
    height: 1px;

    margin: 28px 0 27px;

    background:
        rgba(255, 255, 255, .78);
}


/* =========================================================
   09 — INFORMATION ROW
   ========================================================= */

.lmv-hero__info {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: start;

    column-gap: 50px;
}


/* Descrizione */

.lmv-hero__description {
    max-width: 520px;

    margin: 0;

    font-family: var(--hero-body);

    font-size: 16px;
    font-weight: 500;

    line-height: 1.55;
    letter-spacing: -.012em;

    color: rgba(255, 255, 255, .98);

    text-shadow:
        0 1px 14px rgba(0, 0, 0, .24);
}


/* Posizione geografica */

.lmv-hero__location {
    margin-top: 4px;

    font-family: var(--hero-mono);

    font-size: 11px;
    font-weight: 500;

    line-height: 1.5;
    letter-spacing: .025em;

    white-space: nowrap;

    color: rgba(255, 255, 255, .92);
}



/* =========================================================
   10 — PREMIUM LOGO STRIP
   ========================================================= */

.lmv-hero__brands {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 3;

    width: 100%;

    background: transparent;

    pointer-events: none;

    opacity: 1;
    transform: translate3d(0, 0, 0);
}


/* Contenitore */

.lmv-hero__brands-inner {
    width: calc(100% - var(--hero-side) * 2);
    max-width: 1060px;

    min-height: 100px;

    margin-inline: auto;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    align-items: center;

    column-gap: 55px;
}


/* Singolo marchio */

.lmv-hero__brand {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* Tutti i loghi */

.lmv-hero__brand-logo,
.lmv-hero__brand img {
    display: block;

    width: auto;
    max-width: 128px;

    height: auto;
    max-height: 25px;

    object-fit: contain;

    filter: brightness(0) invert(1);

    opacity: .72;
}


/* Uniformità ottica dei quattro marchi */

.lmv-hero__brand:nth-child(1) img {
    max-width: 127px;
    max-height: 27px;
}

.lmv-hero__brand:nth-child(2) img {
    max-width: 112px;
    max-height: 23px;
}

.lmv-hero__brand:nth-child(3) img {
    max-width: 116px;
    max-height: 24px;
}

.lmv-hero__brand:nth-child(4) img {
    max-width: 118px;
    max-height: 23px;
}


/* =========================================================
   11 — PREMIUM SLOW SCROLL EXIT
   ========================================================= */

@keyframes lmv-brands-scroll {
    0%, 30% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }

    55% {
        opacity: .85;
        transform: translate3d(0, 3px, 0);
        filter: blur(0);
    }

    80% {
        opacity: .40;
        transform: translate3d(0, 8px, 0);
        filter: blur(1px);
    }

    100% {
        opacity: 0;
        transform: translate3d(0, 14px, 0);
        filter: blur(2px);
    }
}

@supports (animation-timeline: scroll()) {
    .lmv-hero__brands {
        animation: lmv-brands-scroll linear both;
        animation-timeline: scroll(root block);
        animation-range: 0px 650px;
    }
}

/* =========================================================
   12 — FOLLOWING SECTIONS
   ========================================================= */

.home-services {
    position: relative;
    z-index: 5;

    margin-top: 0;

    background: #f5f5f2;
}

.home-about,
.home-projects,
.home-trust,
.global-cta,
.site-footer {
    position: relative;
    z-index: 5;
}

.home-about {
    background: #f7f6f1;
}

.home-projects,
.home-trust {
    background: #f1f0eb;
}


/* =========================================================
   13 — TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .lmv-hero {
        --hero-side: 38px;
    }

    .lmv-hero__title {
        max-width: 950px;

        font-size: clamp(35px, 4.2vw, 48px);
    }

    .lmv-hero__description {
        max-width: 480px;

        font-size: 15px;
    }

    .lmv-hero__brands-inner {
        gap: 28px;
    }

    .lmv-hero__brand-logo,
    .lmv-hero__brand img {
        max-width: 125px;
        max-height: 26px;
    }

}


/* =========================================================
   14 — MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .lmv-hero {
        --hero-side: 22px;

        min-height: 100svh;
    }


    /* Video */

    .lmv-hero__poster,
    .lmv-hero__video {
        object-position: 60% center;
    }

    .lmv-hero__overlay {
        background:
            linear-gradient(
                to bottom,
                rgba(8, 12, 14, .18) 0%,
                rgba(8, 12, 14, .32) 35%,
                rgba(8, 12, 14, .48) 70%,
                rgba(8, 12, 14, .66) 100%
            );
    }


    /* Main */

    .lmv-hero__main {
        padding:
            120px
            var(--hero-side)
            130px;
    }




    /* Headline */

    .lmv-hero__title {
        max-width: 100%;

        font-size: clamp(28px, 7.15vw, 44px);

        font-weight: 500;

        line-height: 1.16;
        letter-spacing: -.055em;
    }

    .lmv-hero__title::before {
        left: -12px;

        width: 4px;
        height: 4px;
    }


    /* Divider */

    .lmv-hero__divider {
        margin: 23px 0;
    }


    /* Information */

    .lmv-hero__info {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .lmv-hero__description {
        max-width: 100%;

        font-size: 14px;
        line-height: 1.55;
    }

    .lmv-hero__location {
        display: none;
    }


    /* Bottom gradient */

    .lmv-hero::before,
    .lmv-hero::after {
        height: 35%;
    }


    /* Brand strip */

    .lmv-hero__brands-inner {
        min-height: 95px;

        justify-content: flex-start;

        gap: 35px;

        padding-block: 17px;

        overflow-x: auto;
        scrollbar-width: none;
    }

    .lmv-hero__brands-inner::-webkit-scrollbar {
        display: none;
    }

    .lmv-hero__brand {
        flex: 0 0 auto;

        min-width: 90px;

        justify-content: center;
    }

    .lmv-hero__brand:first-child,
    .lmv-hero__brand:last-child {
        justify-content: center;
    }

    .lmv-hero__brand-logo,
    .lmv-hero__brand img {
        max-width: 115px;
        max-height: 27px;
    }

}


/* =========================================================
   15 — SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

    .lmv-hero__main {
        padding-top: 105px;
        padding-bottom: 115px;
    }

    .lmv-hero__title {
        font-size: 28px;
    }

    .lmv-hero__description {
        font-size: 13px;
    }

    .lmv-hero__brands-inner {
        min-height: 85px;
    }

}


/* =========================================================
   16 — SHORT VIEWPORTS
   ========================================================= */

@media (max-height: 680px) and (min-width: 701px) {

    .lmv-hero__main {
        padding-top: 100px;
        padding-bottom: 125px;
    }

    .lmv-hero__title {
        font-size: clamp(36px, 3vw, 52px);
    }

    .lmv-hero__brands-inner {
        min-height: 85px;
    }

}


/* =========================================================
   17 — ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .lmv-hero__video {
        display: none;
    }

    .lmv-hero__brand img {
        transition: none;
    }

}


/* =========================================================
   HERO — MASKED TEXT REVEAL
   ========================================================= */

.lmv-hero__title-mask {
    display: block;
    overflow: hidden;
    padding-bottom: .12em;
    margin-bottom: -.12em;
}

.lmv-hero__title-line {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .lmv-hero.is-animating .lmv-hero__title-line {
        animation: lmvTitleReveal 1.15s
            cubic-bezier(.22, 1, .36, 1) both;
    }

    .lmv-hero.is-animating .lmv-hero__title-mask:nth-child(2) .lmv-hero__title-line {
        animation-delay: .16s;
    }

    .lmv-hero.is-animating .lmv-hero__divider {
        animation: lmvDividerReveal 1s
            cubic-bezier(.22, 1, .36, 1) .5s both;
        transform-origin: left center;
    }

    .lmv-hero.is-animating .lmv-hero__info {
        animation: lmvInfoReveal .8s ease-out .65s both;
    }
}

@keyframes lmvTitleReveal {
    from {
        transform: translateY(110%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes lmvDividerReveal {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes lmvInfoReveal {
    from {
        transform: translateY(16px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lmv-hero__title-line,
    .lmv-hero__divider,
    .lmv-hero__info {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}
