@import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap");

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --third-color: #353a3e;
    --forth-color: #c4c4c4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Geist", sans-serif;
    width: 100%;
    height: auto;
    background-color: var(--secondary-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
}


.case-study {
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
    padding-bottom: 120px;
    color: var(--primary-color);
}


.case-hero {
    padding-top: 50px;
    margin-bottom: 110px;
}

.case-hero-image {
    width: 100%;
    height: min(65vw, 680px);
    min-height: 380px;
    overflow: hidden;
    background: #ededed;
    margin-bottom: 45px;
    border-radius: 30px;
}

.case-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-hero h1 {
    max-width: 1100px;
    font-size: clamp(42px, 7.5vw, 110px);
    line-height: 0.98;
    font-weight: 600;
    letter-spacing: -0.075em;
}

.case-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    padding: 55px 0;
    border-top: 1px solid #e5e5e5;
}

.case-section h2 {
    font-size: clamp(28px, 3.5vw, 46px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.055em;
}

.case-section>p {
    max-width: 780px;
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.9;
    color: #555;
    font-weight: 400;
}


.case-image {
    grid-column: 2;
    width: 100%;
    height: 520px;
    margin-top: 15px;
    overflow: hidden;
    background: #ededed;
    border-radius: 20px;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(.2, .7, .2, 1);
}

.case-image:hover img {
    transform: scale(1.035);
}

.case-videos {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 25px;
    margin-left: 30px;

}

.case-video {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.case-video-image {
    width: 100%;
    height: 440px;
    overflow: hidden;
    background: #ededed;
    border-radius: 20px;
}

.case-video-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(.2, .7, .2, 1);
}

.case-video:hover .case-video-image img {
    transform: scale(1.035);
}

.case-video p {
    max-width: 750px;
    font-size: 16px;
    line-height: 1.9;
    color: #555;
}

.case-video p a {
    display: inline-block;
    margin-left: 5px;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid #000;
    transition: opacity 0.3s ease;
}

.case-video p a:hover {
    opacity: 0.5;
}

.case-gallery {
    margin-top: 100px;
    padding-top: 45px;
    border-top: 1px solid #e5e5e5;

    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.case-gallery-item {
    flex: 1 1 calc(25% - 18px);
    aspect-ratio: 4 / 3;
    min-width: 0;
    overflow: hidden;
    background: #ededed;
    border-radius: 20px;
}

.case-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(.2, .7, .2, 1);
}

.case-gallery-item:hover img {
    transform: scale(1.04);
}

@media (max-width: 900px) {
    .case-gallery-item {
        flex: 1 1 calc(50% - 18px);
    }
}

@media (max-width: 600px) {
    .case-gallery {
        gap: 12px;
        margin-top: 60px;
        padding-top: 30px;
    }

    .case-gallery-item {
        flex: 1 1 100%;
        aspect-ratio: 16 / 10;
    }
}


@media (max-width: 900px) {

    .case-study {
        width: 92%;
    }

    .case-section {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 40px 0;
    }

    .case-section>p,
    .case-image,
    .case-videos {
        grid-column: 1;
    }

    .case-image {
        height: 400px;
    }

    .case-video-image {
        height: 380px;
    }

    .case-hero {
        margin-bottom: 75px;
    }

    .case-gallery {
        margin-top: 75px;
    }
}


@media (max-width: 600px) {

    .case-study {
        width: 92%;
        padding-bottom: 70px;
    }

    .case-hero {
        padding-top: 25px;
        margin-bottom: 60px;
    }

    .case-hero-image {
        height: 65vh;
        min-height: 300px;
        margin-bottom: 30px;
    }

    .case-hero h1 {
        font-size: clamp(40px, 11vw, 65px);
        line-height: 1;
    }

    .case-section {
        padding: 35px 0;
        gap: 12px;
    }

    .case-section h2 {
        font-size: 32px;
    }

    .case-section>p,
    .case-video p {
        font-size: 15px;
        line-height: 1.8;
    }

    .case-image {
        height: 300px;
    }

    .case-videos {
        gap: 15px;
    }

    .case-video-image {
        height: 270px;
    }

    .case-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 60px;
        padding-top: 25px;
    }

    .case-gallery-item:nth-child(n) {
        grid-column: span 1;
    }

    .case-gallery-item img {
        min-height: 180px;
    }

    .case-gallery-item:nth-child(1),
    .case-gallery-item:nth-child(4) {
        grid-column: span 2;
    }

}