* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: #000;
}

body {
    overflow: hidden;
}

.landing {
    width: 100vw;
    height: 100vh;
    background: #000;
}

.hero {
    width: 100%;
    height: 60vh;

    display: flex;
    align-items: center;
    justify-content: center;
}

.hero img {
    display: block;

    height: 64vh;
    width: auto;

    max-width: 96vw;
    object-fit: contain;
}

.services {
    width: 100%;
    height: 40vh;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    align-items: center;
    justify-items: center;

    gap: clamp(8px, 1.5vw, 24px);
    padding: 0 2vw 2vh;
}

.service-link {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    text-decoration: none;
    cursor: pointer;

    transition:
        transform 180ms ease,
        filter 180ms ease;
}

.service-link img {
    display: block;

    height: 36vh;
    width: auto;

    max-width: 30vw;
    object-fit: contain;

    transition:
        transform 180ms ease,
        filter 180ms ease,
        opacity 180ms ease;
}

/*
 * Hover:
 * немного увеличиваем логотип и добавляем серебристое свечение.
 */
.service-link:hover img,
.service-link:focus-visible img {
    transform: scale(1.045);
    filter:
        brightness(1.18)
        contrast(1.06)
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.24))
        drop-shadow(0 0 24px rgba(255, 255, 255, 0.12));
}

.service-link:active img {
    transform: scale(1.015);
}

.service-link:focus-visible {
    outline: none;
}

@media (max-aspect-ratio: 4/3) {
    .hero img {
        height: auto;
        width: min(56vh, 86vw);
        max-width: 86vw;
    }

    .service-link img {
        height: auto;
        width: min(36vh, 29vw);
        max-width: 29vw;
    }
}

/* Mobile: make service logos readable instead of squeezing all 3 into one row */
@media (max-width: 700px) {
    body {
        overflow: hidden;
    }

    .hero {
        height: 55vh;
    }

    .hero img {
        height: auto;
        width: 88vw;
        max-width: 88vw;
        max-height: 52vh;
    }

    .services {
        height: 45vh;
        width: 100%;
        padding: 0 0 2vh;

        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 78vw;
        grid-template-columns: none;

        gap: 5vw;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        scroll-padding-left: 11vw;

        justify-items: stretch;
        align-items: center;

        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .services::-webkit-scrollbar {
        display: none;
    }

    .service-link {
        width: 78vw;
        height: 100%;

        scroll-snap-align: center;
        flex: 0 0 auto;
    }

    .service-link:first-child {
        margin-left: 11vw;
    }

    .service-link:last-child {
        margin-right: 11vw;
    }

    .service-link img {
        width: 72vw;
        height: auto;
        max-width: 72vw;
        max-height: 39vh;
    }

    /* On touch screens don't leave a hover-like enlargement behind */
    .service-link:hover img {
        transform: none;
        filter: none;
    }

    .service-link:active img {
        transform: scale(0.98);
        filter: brightness(1.15);
    }
}

/* Mobile scroll hints: fixed chevrons over the lower carousel */
@media (max-width: 700px) {
    .landing::before,
    .landing::after {
        content: "";
        position: fixed;
        top: 76vh;
        width: 18px;
        height: 18px;

        border-top: 2px solid rgba(255, 255, 255, 0.75);
        border-right: 2px solid rgba(255, 255, 255, 0.75);

        z-index: 20;
        pointer-events: none;

        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.25));
        opacity: 0.9;
    }

    .landing::before {
        left: 12px;
        transform: translateY(-50%) rotate(-135deg);
    }

    .landing::after {
        right: 12px;
        transform: translateY(-50%) rotate(45deg);
    }

    /* Slight edge fades reinforce that the row continues sideways */
    .services {
        -webkit-mask-image:
            linear-gradient(
                to right,
                transparent 0,
                #000 5vw,
                #000 calc(100% - 5vw),
                transparent 100%
            );
        mask-image:
            linear-gradient(
                to right,
                transparent 0,
                #000 5vw,
                #000 calc(100% - 5vw),
                transparent 100%
            );
    }
}

