/* =========================================================
   MULTISERVICIOS DARIAN S.L.
   HERO CON MARCAS ANIMADAS
   Servicios / Acerca de / Trabajos

   Responsive:
   - Escritorio
   - Portátil
   - Tablet
   - Móvil
   - Móvil pequeño

   No modifica el header ni el resto de la web.
========================================================= */


/* =========================================================
   HERO GENERAL
========================================================= */

.brand-hero {
    position: relative;

    width: 100%;

    overflow: hidden;

    color: #ffffff;

    background:
        radial-gradient(
            circle at 88% 20%,
            rgba(249, 115, 22, 0.16),
            transparent 28%
        ),
        radial-gradient(
            circle at 12% 85%,
            rgba(14, 165, 233, 0.14),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #082f49 0%,
            #075985 55%,
            #0369a1 100%
        );
}


/* Decoración sutil del fondo */

.brand-hero::before {
    position: absolute;

    right: -160px;
    bottom: -220px;

    width: 430px;
    height: 430px;

    content: "";

    pointer-events: none;

    background:
        rgba(249, 115, 22, 0.08);

    border-radius: 50%;
}


/* =========================================================
   FRANJA BLANCA DE MARCAS
========================================================= */

.brand-hero__brands {
    position: relative;

    z-index: 3;

    width: 100%;

    overflow: hidden;

    padding:
        20px 0;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbfdff 100%
        );

    border-top:
        1px solid
        rgba(203, 213, 225, 0.65);

    border-bottom:
        1px solid
        rgba(203, 213, 225, 0.9);

    box-shadow:
        0 8px 25px
        rgba(15, 23, 42, 0.06);
}


/* =========================================================
   DIFUMINADO DE LOS EXTREMOS
========================================================= */

.brand-hero__brands::before,
.brand-hero__brands::after {
    position: absolute;

    top: 0;
    bottom: 0;

    z-index: 5;

    width: 90px;

    content: "";

    pointer-events: none;
}


.brand-hero__brands::before {
    left: 0;

    background:
        linear-gradient(
            90deg,
            #ffffff 0%,
            rgba(255, 255, 255, 0.94) 30%,
            rgba(255, 255, 255, 0) 100%
        );
}


.brand-hero__brands::after {
    right: 0;

    background:
        linear-gradient(
            270deg,
            #ffffff 0%,
            rgba(255, 255, 255, 0.94) 30%,
            rgba(255, 255, 255, 0) 100%
        );
}


/* =========================================================
   PISTA ANIMADA
========================================================= */

.brand-hero__track {
    display: flex;

    width: max-content;

    align-items: center;

    will-change: transform;

    animation:
        darian-brand-scroll
        48s
        linear
        infinite;
}


/* =========================================================
   CADA GRUPO

   Hay dos grupos idénticos en el HTML.
   Esto permite crear un bucle continuo.
========================================================= */

.brand-hero__group {
    display: flex;

    flex: 0 0 auto;

    align-items: center;

    gap: 54px;

    padding-right: 54px;
}


/* =========================================================
   CAJA INDIVIDUAL DEL LOGO
========================================================= */

.brand-hero__logo {
    display: flex;

    width: 145px;
    height: 62px;

    flex: 0 0 145px;

    align-items: center;
    justify-content: center;
}


/* =========================================================
   IMÁGENES / SVG
========================================================= */

.brand-hero__logo img {
    display: block;

    width: auto;
    height: auto;

    max-width: 138px;
    max-height: 48px;

    object-fit: contain;

    object-position: center;

    filter:
        saturate(0.96);

    transform:
        translateZ(0);

    transition:
        transform 0.25s ease,
        filter 0.25s ease,
        opacity 0.25s ease;
}


/* Pequeña interacción en escritorio */

.brand-hero__logo:hover img {
    filter:
        saturate(1.08);

    transform:
        scale(1.06);
}


/* =========================================================
   AJUSTES POR MARCA

   Algunos logotipos tienen proporciones distintas.
   Esto evita que unos parezcan enormes y otros minúsculos.
========================================================= */

.brand-hero__logo img[src*="mitsubishi-electric"] {
    max-width: 155px;
}


.brand-hero__logo img[src*="saunier-duval"] {
    max-width: 150px;
}


.brand-hero__logo img[src*="geberit"] {
    max-width: 135px;
}


.brand-hero__logo img[src*="grohe"] {
    max-width: 130px;
}


.brand-hero__logo img[src*="vaillant"] {
    max-height: 50px;
}


.brand-hero__logo img[src*="lg.svg"] {
    max-height: 46px;
}


.brand-hero__logo img[src*="baxi"] {
    max-height: 50px;
}


.brand-hero__logo img[src*="htw"] {
    max-height: 50px;
}


.brand-hero__logo img[src*="thermor"] {
    max-height: 48px;
}


/* =========================================================
   ANIMACIÓN INFINITA

   El track contiene dos grupos idénticos.
   Al desplazarse exactamente un 50% entra el segundo
   grupo en la misma posición del primero.
========================================================= */

@keyframes darian-brand-scroll {

    from {
        transform:
            translate3d(
                0,
                0,
                0
            );
    }

    to {
        transform:
            translate3d(
                -50%,
                0,
                0
            );
    }

}


/* =========================================================
   PAUSA AL PASAR EL RATÓN

   Permite observar un logo si el usuario quiere.
========================================================= */

@media (hover: hover) {

    .brand-hero__brands:hover
    .brand-hero__track {
        animation-play-state:
            paused;
    }

}


/* =========================================================
   CONTENIDO DEL HERO
========================================================= */

.brand-hero__content {
    position: relative;

    z-index: 2;

    padding-top:
        clamp(
            68px,
            8vw,
            105px
        );

    padding-bottom:
        clamp(
            72px,
            9vw,
            115px
        );
}


/* =========================================================
   ETIQUETA
========================================================= */

.brand-hero__content
.section-label {
    display: inline-flex;

    width: fit-content;

    min-height: 34px;

    margin-bottom: 20px;

    padding:
        8px 15px;

    align-items: center;
    justify-content: center;

    color: #ffffff;

    background:
        #c2410c;

    border:
        1px solid
        rgba(255, 255, 255, 0.25);

    border-radius:
        999px;

    box-shadow:
        0 9px 22px
        rgba(124, 45, 18, 0.24);

    font-size:
        0.86rem;

    font-weight: 900;

    letter-spacing:
        0.075em;

    line-height: 1;

    text-transform:
        uppercase;
}


/* =========================================================
   H1
========================================================= */

.brand-hero__content h1 {
    max-width: 920px;

    margin:
        0 0 22px;

    color: #ffffff;

    font-size:
        clamp(
            2.4rem,
            5vw,
            4.15rem
        );

    font-weight: 900;

    line-height: 1.06;

    letter-spacing:
        -0.042em;

    text-shadow:
        0 3px 22px
        rgba(2, 6, 23, 0.18);
}


/* =========================================================
   DESCRIPCIÓN
========================================================= */

.brand-hero__description {
    max-width: 790px;

    margin: 0;

    color:
        rgba(
            255,
            255,
            255,
            0.88
        );

    font-size:
        clamp(
            1rem,
            1.5vw,
            1.16rem
        );

    line-height: 1.75;
}


/* =========================================================
   TABLET / PORTÁTIL
========================================================= */

@media (max-width: 1000px) {

    .brand-hero__brands {
        padding:
            18px 0;
    }


    .brand-hero__brands::before,
    .brand-hero__brands::after {
        width: 65px;
    }


    .brand-hero__track {
        animation-duration:
            43s;
    }


    .brand-hero__group {
        gap: 44px;

        padding-right: 44px;
    }


    .brand-hero__logo {
        width: 132px;
        height: 56px;

        flex-basis: 132px;
    }


    .brand-hero__logo img {
        max-width: 126px;
        max-height: 44px;
    }


    .brand-hero__content {
        padding-top: 70px;
        padding-bottom: 80px;
    }


    .brand-hero__content h1 {
        max-width: 850px;

        font-size:
            clamp(
                2.25rem,
                6vw,
                3.7rem
            );
    }

}


/* =========================================================
   TABLET Y MÓVIL
========================================================= */

@media (max-width: 768px) {

    .brand-hero__brands {
        padding:
            14px 0;
    }


    .brand-hero__brands::before,
    .brand-hero__brands::after {
        width: 34px;
    }


    /*
       Un poco más rápido en móvil porque la pantalla
       muestra menos logos simultáneamente.
    */

    .brand-hero__track {
        animation-duration:
            38s;
    }


    .brand-hero__group {
        gap: 34px;

        padding-right: 34px;
    }


    .brand-hero__logo {
        width: 108px;
        height: 48px;

        flex-basis: 108px;
    }


    .brand-hero__logo img {
        max-width: 104px;
        max-height: 38px;
    }


    .brand-hero__logo img[src*="mitsubishi-electric"],
    .brand-hero__logo img[src*="saunier-duval"] {
        max-width: 112px;
    }


    .brand-hero__content {
        padding-top: 54px;
        padding-bottom: 62px;
    }


    .brand-hero__content
    .section-label {
        min-height: 32px;

        margin-bottom: 17px;

        padding:
            7px 12px;

        font-size:
            0.79rem;

        letter-spacing:
            0.065em;
    }


    .brand-hero__content h1 {
        max-width: 690px;

        margin-bottom: 18px;

        font-size:
            clamp(
                2.05rem,
                8vw,
                3rem
            );

        line-height: 1.08;

        letter-spacing:
            -0.036em;
    }


    .brand-hero__description {
        max-width: 640px;

        font-size: 1rem;

        line-height: 1.68;
    }

}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 520px) {

    .brand-hero__brands {
        padding:
            12px 0;
    }


    .brand-hero__brands::before,
    .brand-hero__brands::after {
        width: 22px;
    }


    .brand-hero__track {
        animation-duration:
            34s;
    }


    .brand-hero__group {
        gap: 27px;

        padding-right: 27px;
    }


    /*
       En un móvil se ven aproximadamente
       2,5 - 3 logos simultáneamente.
    */

    .brand-hero__logo {
        width: 94px;
        height: 44px;

        flex-basis: 94px;
    }


    .brand-hero__logo img {
        max-width: 92px;
        max-height: 34px;
    }


    .brand-hero__logo img[src*="mitsubishi-electric"],
    .brand-hero__logo img[src*="saunier-duval"] {
        max-width: 100px;
    }


    .brand-hero__content {
        padding-top: 46px;
        padding-bottom: 54px;
    }


    .brand-hero__content h1 {
        max-width: 100%;

        font-size:
            clamp(
                1.95rem,
                9.5vw,
                2.65rem
            );

        line-height: 1.09;
    }


    .brand-hero__description {
        font-size:
            0.96rem;

        line-height: 1.65;
    }

}


/* =========================================================
   MÓVILES MUY PEQUEÑOS
========================================================= */

@media (max-width: 390px) {

    .brand-hero__brands {
        padding:
            10px 0;
    }


    .brand-hero__group {
        gap: 23px;

        padding-right: 23px;
    }


    .brand-hero__logo {
        width: 86px;
        height: 40px;

        flex-basis: 86px;
    }


    .brand-hero__logo img {
        max-width: 84px;
        max-height: 31px;
    }


    .brand-hero__logo img[src*="mitsubishi-electric"],
    .brand-hero__logo img[src*="saunier-duval"] {
        max-width: 92px;
    }


    .brand-hero__content {
        padding-top: 42px;
        padding-bottom: 48px;
    }


    .brand-hero__content
    .section-label {
        margin-bottom: 15px;

        padding:
            7px 11px;

        font-size:
            0.75rem;
    }


    .brand-hero__content h1 {
        margin-bottom: 16px;

        font-size:
            clamp(
                1.85rem,
                10vw,
                2.35rem
            );
    }


    .brand-hero__description {
        font-size:
            0.93rem;

        line-height: 1.62;
    }

}


/* =========================================================
   ACCESIBILIDAD - MOVIMIENTO REDUCIDO

   Si el usuario tiene desactivadas las animaciones
   en Windows/iOS/Android, no obligamos al movimiento.
========================================================= */

@media (
    prefers-reduced-motion:
    reduce
) {

    .brand-hero__brands {
        overflow-x: auto;

        scrollbar-width: thin;
    }


    .brand-hero__track {
        animation: none !important;

        transform: none !important;
    }


    /*
       Como ya no necesitamos la segunda copia
       para la animación, la ocultamos.
    */

    .brand-hero__group[
        aria-hidden="true"
    ] {
        display: none;
    }


    .brand-hero__logo img {
        transition: none;
    }

}


/* =========================================================
   DISPOSITIVOS TÁCTILES

   Quitamos efectos hover innecesarios.
========================================================= */

@media (hover: none) {

    .brand-hero__logo:hover img {
        filter:
            saturate(0.96);

        transform: none;
    }

}