@charset "UTF-8"; 

.works {
    display: flex;
    width: 100%;
    height: auto;
    gap: 25vw;
    flex-direction: column;
    align-items: center;
    position: relative;
    background-color: #FFF;
}

.main {
    display: flex;
    width: 100%;
    height: auto;
    padding: 3vw;
    gap: 5vw;
    align-items: center;
    position: relative;
}

.main-img1area {
    display: flex;
    width: 100%;
    height: auto;
    align-items: center;
    position: relative;
}

.main-img1 {
    display: flex;
    width: 100%;
    height: 50vw;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    animation: fade 25s infinite;
    opacity: 0;
}

.main-img1:first-of-type {
    animation-delay: 0s;
    background-image: url(../images/works/mainimg1-1.jpg);
}
.main-img1:nth-of-type(2) {
    animation-delay: 5s;
    background-image: url(../images/works/mainimg1-2.jpg);
}
.main-img1:nth-of-type(3) {
    animation-delay: 10s;
    background-image: url(../images/works/mainimg1-3.jpg);
}
.main-img1:nth-of-type(4) {
    animation-delay: 15s;
    background-image: url(../images/works/mainimg1-4.jpg);
}
.main-img1:nth-of-type(5) {
    animation-delay: 20s;
    background-image: url(../images/works/mainimg1-2.jpg);
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  16.66% {
    opacity: 1;
  }
  33.33% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.mainsection {
    display: flex;
    width: auto;
    height: 50vw;
    gap: 2vw;
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mainsection p {
    font-size: 1.6rem;
    letter-spacing: 1vw;
    font-weight: 700;
}

.main-img2area {
    display: flex;
    width: 80%;
    height: 30vw;
    position: relative;
}

.main-img2 {
    display: flex;
    width: 100%;
    height: 30vw;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    animation: fade2 25s infinite;
    opacity: 0;
}

.main-img2:first-of-type {
    animation-delay: 0s;
    background-image: url(../images/works/mainimg2-1.jpg);
}
.main-img2:nth-of-type(2) {
    animation-delay: 5s;
    background-image: url(../images/works/mainimg2-2.jpg);
}
.main-img2:nth-of-type(3) {
    animation-delay: 10s;
    background-image: url(../images/works/mainimg2-3.jpg);
}
.main-img2:nth-of-type(4) {
    animation-delay: 15s;
    background-image: url(../images/works/mainimg2-4.jpg);
}
.main-img2:nth-of-type(5) {
    animation-delay: 20s;
    background-image: url(../images/works/mainimg2-2.jpg);
}

@keyframes fade2 {
  0% {
    opacity: 0;
  }
  16.66% {
    opacity: 1;
  }
  33.33% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.product {
    display: flex;
    width: 100%;
    gap: 5vw;
    padding: 5vw;
    flex-direction: column;
    justify-content: center;
}

.product-title {
    display: flex;
    width: 100%;
    height: auto;
    gap: 3vw;
    flex-direction: column;
    align-items: flex-end;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 1vw;
}

.product-title p {
    font-size: 1.2rem;
    letter-spacing: 0.3rem;
}

.productarea,
.gallerytarea {   
    display: flex;
    width: 100%;
    gap: 5vw;
    flex-direction: row;
    align-items: center;
    position: relative;
    overflow-x: auto;
    white-space: nowrap;
    scroll-snap-type: x mandatory;
    cursor: ew-resize;
}

.content {
    display: flex;
    width: 100%;
    height: auto;
    gap: 3vw;
    flex-direction: column;
    align-items: center;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1vw;
}

h3 {
    font-size: 1.2rem;
}

.content-box {
    display: flex;
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 1vw;
}

.content-img {
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    display: flex;
    width: 90vw;
    height: 30vw;
}
.gallery-img {
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    display: flex;
    width: 90vw;
    height: 50vw;
}

/* content-img */
.content:first-of-type .content-box .content-img {
    background-image: url(../images/works/amber.jpg);
}
.content:nth-of-type(2) .content-box .content-img {
    background-image: url(../images/works/apparel.jpg);
}
.content:nth-of-type(3) .content-box .content-img {
    background-image: url(../images/works/dejilig.jpg);
}
.content:nth-of-type(4) .content-box .content-img {
    background-image: url(../images/works/sugutabe.jpg);
}
.content:nth-of-type(5) .content-box .content-img {
    background-image: url(../images/works/portfolio.jpg);
}

/* gallery-img */
.content:first-of-type .content-box .gallery-img {
    background-image: url(../images/works/thesauna.jpg);
}
.content:nth-of-type(2) .content-box .gallery-img {
    background-image: url(../images/works/seahorse.jpg);
}
.content:nth-of-type(3) .content-box .gallery-img {
    background-image: url(../images/works/amberlogo.jpg);
}

.gallery-img {
    cursor: pointer;
    transition: transform 0.3s ease;
    transform: scale(0.8);
}
.gallery-img:hover {
    transform: scale(1);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal.show {
    display: flex;
    opacity: 1;
    padding: 10vw;
}

.modal-content {
    display: flex;
    padding: 10vw 2vw;
    background: #FFF;
    position: relative;
    animation: fadeUp 0.4s ease;
    border-radius: 15px;
}

@keyframes fadeUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mock-box {
    display: flex;
    width: 100%;
    height: auto;
    gap: 4vw;
    flex-direction: column;
    align-items: center;
}

.mock {
    display: flex;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    width: 50vw;
    height: 50vw;
}

#modal1 .modal-content .mock-box .mock {
    background-image: url(../images/works/modal/thesauna.png);
}
#modal2 .modal-content .mock-box .mock {
    background-image: url(../images/works/modal/seahorse.jpg);
}
#modal2 .modal-content .mock-box .mock:nth-last-of-type(2) {
    background-image: url(../images/works/modal/seahosenamecard.png);
}
#modal3 .modal-content .mock-box .mock {
    background-image: url(../images/works/modal/amber.png);
}

.modal-content .text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3vw;
    padding: 0 15vw;
}

.modal-content h4 {
    font-size: 2rem;
}

.mock-box .text p {
    font-size: 1.4rem;
    line-height: auto;
}

.mockup {
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    display: flex;
    height: 50vw;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2.5rem;
  cursor: pointer;
  color: #000;
}

@media screen and (min-width:769px) {
    .works {
        gap: 0;
    }

    .main {
        height: 100vh;
        align-items: center;
    }

    .mainsection {
        width: 40vw;
        padding-top: 7vw;
    }

    .mainsection p {
        font-size: 3rem;
    }

    .product {
        height: auto;
        gap: 1vw;
    }

    .product-title {
        flex-direction: row;
    }

    .productarea,
    .gallerytarea {   
        height: 45vw;
    }
    .gallery-img {
        height: 35vw;
    }
    
    h1 {
        font-size: 4rem;
    }

    .product-title p {
        font-size: 1.4rem;
    }

    .content {
        gap: 2vw;
    }

    h2 {
        font-size: 2.5rem;
    }
    h3 {
        font-size: 2rem;
    }

    .content-img {
        height: 25vw;
    }

    .content-box a {
        width: 45%;
    }

    .modal {
        align-items: flex-start;
    }

    .modal.show {
        display: flex;
        opacity: 1;
        padding: 10vw;
    }

    .modal-content {
        display: flex;
        padding: 10vw 2vw;
        background: #FFF;
        position: relative;
        animation: fadeUp 0.4s ease;
        border-radius: 15px;
    }

    @keyframes fadeUp {
        from { transform: translateY(20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    .mock-box {
        display: flex;
        width: 100%;
        height: auto;
        gap: 4vw;
        flex-direction: column;
        align-items: center;
    }

    .mock {
        height: 40vw;
    }

    .modal-content h4 {
        font-size: 3rem;
        transition: ease-in-out .5s;
    }
    .modal-content a {
        transition: ease-in-out .5s;
    }
    .modal-content a:hover {
        filter: blur(10px);
    }

    .mock-box .text p {
        font-size: 1.8rem;
    }

    .close {
        font-size: 3.5rem;
    }
}

/* footer */

.content-box a {
    font-size: 1.6rem;
    letter-spacing: 0.3vw;
    width: 70%;
    text-align: end;
    transition: .8s;
}

.content-box a:hover {
    filter: blur(4px);
}

.copy {
    color: black;
    mix-blend-mode: unset !important;
}