html {
    overflow-x: hidden;
}
body {
    padding-top: 60px;
}
.top {
    display: flex;
    background-image: url(pictures/homepage.jpg);
    background-position: right;
    background-size: 45% auto;
    background-repeat: no-repeat;
    padding: 5% 0;
    background-attachment: fixed;
    border-radius: 20px 20px 300px 300px;
}
.top .txt {
    margin-left: 15%;
    display: flex;
}
.top h1 {
    /* border: solid 1px black; */
    font-size: 12vmin;
    writing-mode: vertical-rl;
    letter-spacing: 1.6rem;
}
.top p {
    font-size: 3vmin;
    letter-spacing: 0.3rem;
    color: var(--color_gray);
    position: absolute;
    display: inline-block;
    left: 25%;
    top: 50%;
}
.wrap {
    position: relative;
    display: flex;
    overflow-x: scroll;
    padding-top: 25%;
}
.wrap::-webkit-scrollbar {
    height: 8px;
}
.wrap::-webkit-scrollbar-track {
    background-color: transparent;
}
.wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #d5e4dc, #e6ebe9);
}
.top .wrap a {
    margin: 15px;
}
.top .wrap .card {
    width: 230px;
    height: 200px;
}
.top .card .item {
    margin: 5% auto;
}
.card {
    backdrop-filter: blur(4px);
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    box-shadow: 0 0 10px #d9d9d9;
    padding: 3% 0;
}
.card img {
    transition: 1.5s;
    vertical-align: middle;
    user-select: none;
}
.card:hover img {
    transform: scale(1.05);
}
.top .card p {
    font-size: 1rem;
    position: relative;
    top: 5%;
    opacity: 0;
    transition: 1s;
    margin-left: 5%;
}
.top .card:hover p {
    opacity: 1;
}
.space {
    max-width: 1200px;
    margin: auto;
    margin-top: 10%;
    display: flex;
}
.space .img {
    width: 40%;
    background-image: url(pictures/verdical.png);
    background-size: 35% auto;
    background-position: 10%;
    background-attachment: fixed;
    background-repeat: no-repeat;
}
.space .txt {
    font-size: 1.4rem;
    width: 50%;
}
.space .txt p {
    line-height: 1.6;
    margin: 5%;
}
.space .txt strong {
    font-family: "Noto Serif TC", serif;
    writing-mode: vertical-lr;
    margin-top: 10%;
    letter-spacing: 1.5rem;
    font-weight: 700;
}
main {
    margin-top: 100px;
}
h2 {
    font-size: 5vmin;
    margin: 20px;
}
.background {
    display: flex;
    position: sticky;
}
.background img {
    width: 55%;
    animation: backgroundMove 10s infinite;
}
.background img:nth-child(1) {
    margin-left: -20%;
    transform: rotate(-10deg);
}
.background img:nth-child(2) {
    margin-left: 20%;
    height: 65%;
}

@keyframes backgroundMove {
    0% {
        transform: translate(20px, 30px);
        /* transform: rotate(-5deg); */
    }
    50% {
        transform: translate(50px, 10px);
        /* transform: rotate(5deg); */
    }
    100% {
        transform: translate(20px, 30px);
        /* transform: rotate(-5deg); */
    }
}

main .container {
    max-width: 1200px;
    margin: auto;
    text-align: center;
    margin-top: -100%;
    transform: translate(0, 100%);
}
main .card {
    padding: 10% 10% 0 10%;
    height: 70%;
}

.card .item {
    height: 80%;
}
.item .img {
    width: 100%;
    height: 90%;
}
.item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card:hover {
    box-shadow: 0 0 10px #ababab;
}

.card .txt p {
    line-height: 1.6;
}
.card .txt p:nth-child(1) {
    font-size: 1.2rem;
    font-weight: 500;
}
.card .txt p:last-child {
    font-size: 1.6rem;
    color: var(--color_yellow);
    line-height: 1.6;
    font-weight: 900;
}
.more {
    display: flex;
    width: 15%;
    justify-content: flex-start;
    margin-left: 85%;
}
.more p {
    font-size: 1.2rem;
    font-weight: 500;
}
.more_go span {
    background-color: var(--color_yellow);
    color: white;
    padding: 10px;
    border-radius: 50%;
    transition: 0.5s;
    margin: 10px;
}
.more:hover .more_go {
    transform: translate(20%, 0) scale(1.1);
    transition: 0.3s;
}
.more:hover .more_go span {
    background-color: transparent;
    border: solid 2px var(--color_yellow);
    color: var(--color_yellow);
}
.more:hover p {
    color: var(--color_yellow);
}
.idea {
    margin-top: 60%;
}
.idea .txt {
    background-image: url(pictures/bgimage3.svg);
    background-repeat: no-repeat;
    background-position: top;
    padding: 10% 0;
    transform: translate(0, -50%);
}
.idea .txt > p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 10px 10% 10px 0;
    margin-left: 60%;
}
.ideaimg {
    width: 100%;
    z-index: 1;
    position: relative;
}
.ideaimg img:not(:nth-child(4)) {
    width: 10%;
    opacity: 1;
    visibility: hidden;
}
.idea img:nth-of-type(1) {
    transform: translate(55%, -100%) rotate(-20deg);
    animation: catfoot 3s alternate infinite;
}
.idea img:nth-of-type(2) {
    transform: translate(55%, -330%) rotate(20deg);
    animation: catfoot 3s 1s alternate infinite;
}
.idea img:nth-of-type(3) {
    transform: translate(85%, -180%) rotate(-10deg);
    animation: catfoot 3s 1.5s alternate infinite;
}
.idea img:nth-of-type(5) {
    transform: translate(65%, -530%) rotate(30deg);
    animation: catfoot 3s 3s alternate infinite;
}
.idea img:nth-of-type(6) {
    transform: translate(-85%, -330%) rotate(-15deg);
    animation: catfoot 3s 4s alternate infinite;
}
.idea img:nth-of-type(7) {
    transform: translate(-5%, -230%) rotate(20deg);
    animation: catfoot 3s 3.5s alternate infinite;
}
.idea img:nth-child(4) {
    transform: translate(25%, -15%);
    filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.5));
}
@keyframes catfoot {
    0% {
        visibility: hidden;
        opacity: 0;
    }
    100% {
        visibility: visible;
        opacity: 1;
    }
}
.design {
    text-align: center;
    margin: 10% 0;
    user-select: none;
}

.design p {
    font-size: 1.2rem;
    letter-spacing: 5px;
    margin: 20px;
    font-family: "Noto Serif TC", serif;
}

.slider {
    height: 100%;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}

.slider .slide-track {
    animation: scroll 40s linear infinite;
    display: flex;
    width: calc(360px * 16);
    justify-content: space-between;
}
.slider .slide-track:hover {
    animation-play-state: paused;
}
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-360px * 8));
    }
}
.slider::before,
.slider::after {
    background: linear-gradient(
        to right,
        white 0%,
        rgba(255, 255, 255, 0) 100%
    );
    content: "";
    height: 450px;
    position: absolute;
    width: 350px;
    z-index: 2;
}
.slider::after {
    right: 0;
    top: 0;
    transform: rotateZ(180deg);
}
.slider::before {
    left: 0;
    top: 0;
}
.slider .slide {
    height: 450px;
    width: 350px;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.reco .bgimg {
    background-image: url(pictures/catjump.gif);
    background-repeat: no-repeat;
    background-size: 100%;
    width: 100vw;
    height: 100vh;
}
.reco .txt {
    width: 90%;
    margin: auto;
    color: white;
}
.reco .txt .col-8 {
    padding-top: 40%;
}
.reco .txt .col-8 p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 20px;
    letter-spacing: 3px;
}
.reco .txt .col-4 p {
    font-size: 4vmin;
    line-height: 1.6;
    letter-spacing: 10px;
    writing-mode: vertical-rl;
    font-weight: 200;
    margin-top: 50%;
    font-family: "Noto Serif TC", serif;
}
.reco_cats {
    width: 100%;
    display: flex;
    text-align: center;
    user-select: none;
}
.reco_cats .img {
    width: 33%;
    height: 80vh;
    margin: 0.333333%;
    background-size: 100%;
    filter: grayscale(80%);
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    transition: 0.5s;
    position: relative;
    background-size: cover;
}
.reco_cats .img:hover {
    filter: grayscale(0);
    width: 35%;
}
.reco_cats .img:first-child {
    background-image: url(pictures/riri.jpg);
}
.reco_cats .img:nth-child(2) {
    background-image: url(pictures/milktea.jpg);
}
.reco_cats .img:last-child {
    background-image: url(pictures/nyonyo.jpg);
}
.reco_cats .txt {
    background-color: var(--color_gray);
    width: 25%;
    backdrop-filter: blur(4px);
    padding: 5%;
    opacity: 0;
    transition: 0.5s;
    transform: translate(0, 100%);
}
.reco_cats .img:hover .txt {
    opacity: 0.9;
}
.reco_cats .img:nth-child(2) .txt {
    transform: translate(0, -100%);
}
.reco_cats .txt p {
    font-weight: 300;
    line-height: 1.6;
}
.reco_cats h3 {
    display: inline-block;
    font-size: 1.2rem;
    color: white;
    padding: 15px 0;
}

@media screen and (max-width: 1179px) {
    .top {
        background-size: contain;
        height: 30vh;
        background-position: top;
        z-index: -1;
        justify-content: space-between;
        /* background-attachment: unset; */
    }
    .top .txt {
        margin-left: 5%;
        margin-top: 100%;
        font-weight: 700;
    }
    .top h1 {
        /* display: none; */
        writing-mode: lr;
        letter-spacing: 5px;
        z-index: 1;
    }
    .top p:not(.card p) {
        font-size: 20vmin;
        top: 40%;
        left: 0;
        margin-left: 5%;
        width: 25%;
        letter-spacing: 1.2rem;
        color: var(--color_green);
        font-weight: 900;
        text-shadow: 1px 1px 1px rgb(212, 211, 211);
    }
    .wrap {
        flex-direction: column;
        width: 40%;
        height: 45vh;
        margin-top: 25%;
    }
    .space {
        height: 80vh;
        margin-top: 100%;
        flex-direction: column;
    }
    .space .img {
        background-attachment: unset;
        width: 100%;
        height: 550px;
        background-size: cover;
    }
    .space .txt {
        width: 100%;
        text-align: center;
    }
    .top .wrap .card {
        width: auto;
        height: 100px;
    }
    .top .card:active p {
        opacity: 1;
        margin-left: 0;
    }
    .space .txt strong {
        writing-mode: lr;
        margin-top: 0;
        letter-spacing: 0;
    }
    main .container {
        transform: translate(0, 60%);
    }
    .more {
        width: 20%;
        margin: 8%;
        margin-left: 40%;
        justify-content: space-evenly;
    }
    .idea {
        margin-top: 100%;
    }
    .idea img:nth-child(4) {
        width: 20%;
    }
    .idea .txt {
        background-size: 150%;
    }
    .idea .txt > p {
        margin-left: 5%;
    }
    .ideaimg img:not(:nth-child(4)) {
        width: 15%;
    }
    .idea img:nth-child(4) {
        width: 60%;
    }
    .design {
        margin-top: -30%;
    }
    .design p {
        letter-spacing: 0;
    }
    .slider::before,
    .slider::after {
        width: 40px;
    }
    .col-8 {
        padding-top: 40%;
    }
    .reco .bgimg {
        height: 70vh;
    }
    .reco_cats .img {
        height: 30vh;
    }
    .reco_cats .img:active {
        filter: grayscale(0);
        width: 35%;
    }
    .reco_cats .txt {
        width: 90%;
        transform: translate(0, 190%);
    }
}
@media screen and (max-width: 779px) {
    .more {
        width: 40%;
    }
    .col-8 {
        padding-top: 25%;
    }
    main .card {
        padding: 5% 5% 0 5%;
        height: 100%;
    }
    .slider .slide-track {
        width: calc(155px * 16);
    }
    .slider .slide {
        height: 200px;
        width: 150px;
    }
    @keyframes scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-155px * 8));
        }
    }
    .reco .txt h2 {
        margin: 10px 0;
        margin-top: 70px;
    }
    .reco .txt .col-8 p {
        font-size: 1rem;
        line-height: 1.2;
        margin: 0;
    }
    .reco .bgimg {
        height: 50vh;
    }
    .reco_cats .img {
        height: 25vh;
        /* filter: grayscale(0); */
    }
    .reco_cats h3 {
        font-size: 1rem;
    }
}
