@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&display=swap');

/* Splash Page */
.splash-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease;
}

.splash-page.fade-out {
    pointer-events: none;
    animation: fadeOutUp 1s ease forwards;
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.title img {
    width: 250px;
    height: auto;
}

.subtitle {
    font-size: 20px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .subtitle {
        font-size: 16px;
        text-align: center;
    }
}

.main-content {
    visibility: hidden;
    opacity: 0;
    transition: opacity 1s ease;
    display: none !important;
}

.main-content.show-content {
    visibility: visible;
    opacity: 1;
}

/* Main Page */
:root {
    color: #212322;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noto Sans KR", sans-serif;
}

:root {
    --item1-transform: translateX(-100%) translateY(-5%) scale(1.5);
    --item1-filter: blur(30px);
    --item1-zIndex: 11;
    --item1-opacity: 0;

    --item2-transform: translateX(0);
    --item2-filter: blur(0px);
    --item2-zIndex: 10;
    --item2-opacity: 1;

    --item3-transform: translate(50%,10%) scale(0.8);
    --item3-filter: blur(10px);
    --item3-zIndex: 9;
    --item3-opacity: 1;

    --item4-transform: translate(90%,20%) scale(0.5);
    --item4-filter: blur(30px);
    --item4-zIndex: 8;
    --item4-opacity: 1;
    
    --item5-transform: translate(120%,30%) scale(0.3);
    --item5-filter: blur(40px);
    --item5-zIndex: 7;
    --item5-opacity: 0;
}

html, body {
    height: 80vh;
    margin: 0;
}

.wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Carousel */
.home-main-section {
    margin-top: 80px;
}

.carousel {
    position: relative;
    height: 800px;
    overflow: hidden;
}

.carousel .list {
    position: absolute;
    width: 1140px;
    max-width: 100%;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.carousel .list .item {
    position: absolute;
    left: 0%;
    width: 90%;
    height: 100%;
    font-size: 15px;
    transition: left 0.5s, opacity 0.5s, width 0.5s;
}

.carousel .list .item:nth-child(n + 6) {
    opacity: 0;
}

.carousel .list .item:nth-child(2) {
    z-index: 10;
    transform: translateX(0);
}

.carousel .list .item img {
    width: 60%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: right 1.5s;
}

.carousel .list .item .introduce {
    opacity: 0;
    pointer-events: none;
}

.carousel .list .item:nth-child(2) .introduce {
    opacity: 1;
    pointer-events: auto;
    width: 400px;
    position: absolute;
    top: 50%;
    transform:  translateY(-50%);
    transition: opacity 0.5s;
}

.carousel .list .item .introduce .title {
    font-size: 1.5em;
    font-weight: 400;
    line-height: 1em;
    color: #aaa;
}

.carousel .list .item .introduce .topic {
    font-size: 2.5em;
    font-weight: 500;
}

.carousel .list .item .introduce .des {
    font-size: 1em;
    color: #555;
    margin-top: 10px;
}

.carousel .list .item .introduce .seeMore {
    margin-top: 1.5em;
    padding: 5px 20px;
    border: none;
    border-bottom: 1px solid #aaa;
    font-size: 14px;
    background-color: transparent;
    font-weight: 500;
    letter-spacing: 3px;
    transition: transform 0.5s ease;
}

.carousel .list .item .introduce .seeMore:hover {
    color: #212322;
    transform: translateY(-10%);
    cursor: pointer;
}

.carousel .list .item:nth-child(1) {
    transform: var(--item1-transform);
    filter: var(--item1-filter);
    z-index: var(--item1-zIndex);
    opacity: var(--item1-opacity);
    pointer-events: none;
}

.carousel .list .item:nth-child(3) {
    transform: var(--item3-transform);
    filter: var(--item3-filter);
    z-index: var(--item3-zIndex);
}

.carousel .list .item:nth-child(4) {
    transform: var(--item4-transform);
    filter: var(--item4-filter);
    z-index: var(--item4-zIndex);
}

.carousel .list .item:nth-child(5) {
    transform: var(--item5-transform);
    filter: var(--item5-filter);
    opacity: var(--item5-opacity);
    pointer-events: none;
}

/* animation text in item2 */
.carousel .list .item:nth-child(2) .introduce .title,
.carousel .list .item:nth-child(2) .introduce .topic,
.carousel .list .item:nth-child(2) .introduce .des,
.carousel .list .item:nth-child(2) .introduce .seeMore {
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
}

@keyframes showContent {
    from {
        transform: translateY(-30px);
        filter: blur(10px);
    }to {
        transform: translateY(0);
        opacity: 1;
        filter: blur(0px);
    }
}

.carousel .list .item:nth-child(2) .introduce .topic {
    animation-delay: 1s;
}

.carousel .list .item:nth-child(2) .introduce .des {
    animation-delay: 1.2s;
}

.carousel .list .item:nth-child(2) .introduce .seeMore {
    animation-delay: 1.4s;
}

/* next click */
.carousel.next .item:nth-child(1) {
    animation: transformFromPosition2 0.5s ease-in-out 1 forwards;
}

@keyframes transformFromPosition2 {
    from {
        transform: var(--item2-transform);
        filter: var(--item2-filter);
        opacity: var(--item2-opacity);
    }
}

.carousel.next .item:nth-child(2) {
    animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}

@keyframes transformFromPosition3 {
    from {
        transform: var(--item3-transform);
        filter: var(--item3-filter);
        opacity: var(--item3-opacity);
    }
}

.carousel.next .item:nth-child(3) {
    animation: transformFromPosition4 0.9s ease-in-out 1 forwards;
}

@keyframes transformFromPosition4 {
    from {
        transform: var(--item4-transform);
        filter: var(--item4-filter);
        opacity: var(--item4-opacity);
    }
}

.carousel.next .item:nth-child(4) {
    animation: transformFromPosition5 1.1s ease-in-out 1 forwards;
}

@keyframes transformFromPosition5 {
    from {
        transform: var(--item5-transform);
        filter: var(--item5-filter);
        opacity: var(--item5-opacity);
    }
}

/* previous */
.carousel.prev .list .item:nth-child(5) {
    animation: transformFromPosition4 0.5s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(4) {
    animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(3) {
    animation: transformFromPosition2 0.9s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(2) {
    animation: transformFromPosition1 1.1s ease-in-out 1 forwards;
}

@keyframes transformFromPosition1 {
    from {
        transform: var(--item1-transform);
        filter: var(--item1-filter);
        opacity: var(--item1-opacity);        
    }
}

/* detail  */
.carousel .list .item .detail {
    opacity: 0;
    pointer-events: none;
}

.detail .title  {
    font-size: 2em !important;
}


/* showDetail */
.carousel.showDetail .list .item:nth-child(3),
.carousel.showDetail .list .item:nth-child(4) {
    left: 100%;
    opacity: 0;
    pointer-events: none;
}

.carousel.showDetail .list .item:nth-child(2) {
    width: 100%;
}

.carousel.showDetail .list .item:nth-child(2) .introduce {
    opacity: 0;
    pointer-events: none;
}

.carousel.showDetail .list .item:nth-child(2) img {
    right: 50%;
}

.carousel.showDetail .list .item:nth-child(2) .detail {
    opacity: 1;
    width: 50%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
    pointer-events: auto;
}

.carousel.showDetail .list .item:nth-child(2) .detail .title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 10px;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications {
    font-size: 12px;
    font-weight: 400;
    color: #555;
    display: flex;
    gap: 15px;
    width: 100%;
    border-top: 1px solid #aaa;
    margin-top: 20px;
    justify-content: end;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications div {
    width: 90px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 10px;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications div p:nth-child(1) {
    font-weight: bold;
}

.carousel.carousel.showDetail .list .item:nth-child(2) .checkout button {
    margin-top: 30px;
    background-color: #009ADE;
    border: 1px solid #009ADE;
    border-radius: 30px;
    color: #fff;
    margin-left: 5px;
    padding: 5px 10px;
    letter-spacing: 2px;
    font-weight: 500;
    transition: .4s ease;
    cursor: pointer;
}

.carousel.carousel.showDetail .list .item:nth-child(2) .checkout button:hover {
    border: 1px solid #009ADE;
    border-radius: 30px;
    color: #333;
    background-color: transparent;
    transform: translateY(-5px);
    scale: 1.1;
}

.carousel.carousel.showDetail .list .item:nth-child(2) .checkout button:nth-child(2) {
    background-color: #693EFF;
    color: #eee;
}

.carousel.showDetail .list .item:nth-child(2) .detail  .title,
.carousel.showDetail .list .item:nth-child(2) .detail  .des,
.carousel.showDetail .list .item:nth-child(2) .detail .specifications,
.carousel.showDetail .list .item:nth-child(2) .detail .checkout {
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
}

.carousel.showDetail .list .item:nth-child(2) .detail  .des {
    animation-delay: 1.2s;
    font-size: 14px;
    margin: 10px 0;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications {
    animation-delay: 1.4s;
    align-items: center;
    margin: 10px 0;
}

.carousel.showDetail .list .item:nth-child(2) .detail .checkout {
    animation-delay: 1.6s;
}

.arrows {
    position: absolute;
    bottom: 50%;
    width: 1200px;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    left: 50%;
    transform: translateX(-50%);
}

#prev,
#next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #eee;
    font-size: 20px;
    color: #aaa;
    background-color: white;
    opacity: .5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: static;
}

#prev:hover,
#next:hover  {
    border: 1px solid #aaa;
    color: #212322;
    opacity: 1;
    transition: 0.4s;
    box-shadow: 0 0 2px #aaa;
}

#next {
    left: unset;
    right: 10%;
}

#back {
    position: absolute;
    z-index: 100;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    border: none;
    border-bottom: 1px solid #555;
    font-weight: bold;
    letter-spacing: 3px;
    background-color: transparent;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.5s;
    cursor: pointer;
}

#back:hover {
    color: #212322;
}

.carousel.showDetail #back {
    opacity: 1;
}

.carousel.showDetail #prev,
.carousel.showDetail #next {
    opacity: 0;
    pointer-events: none;
}

.carousel::before {
    width: 500px;
    height: 300px;
    content: '';
    background-image: linear-gradient(70deg, #009ADE, blue);
    position: absolute;
    z-index: -1;
    border-radius: 20% 30% 80% 10%;
    filter: blur(150px);
    top: 50%;
    left: 50%;
    transform: translate(-10%, -50%);
    transition: 1s;
}

.carousel.showDetail::before {
    transform: translate(-100%, -50%) rotate(90deg);
    filter: blur(130px);
}

@media screen and (max-width: 768px) {
    .home-main-section {
        margin-top: 50px;
    }

    html, body {
        height: auto;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    .carousel .list {
        flex-direction: column;
    }

    .carousel .list .item img {
        width: 100%;
        height: auto;
        margin-bottom: 10px;
    }

    .carousel .list .item {
        flex-direction: column;
        display: flex;
        align-items: center;
        text-align: center;
        width: 100%;
        padding: 0 10px;
    }

    .carousel .list .item img {
        position: relative;
        top: 200px;
        width: 100%;
        height: auto;
        margin-bottom: 10px;
    }

    .carousel .list .item .introduce {
        width: 100%;
        margin-top: 70px;
    }

    .carousel .list .item .introduce .title {
        font-size: 16px;
        color: white;
    }

    .carousel .list .item .introduce .topic {
        font-size: 20px;
    }

    .carousel .list .item .introduce .des {
        font-size: 14px;
    }

    .carousel .list .item .introduce .seeMore {
        border-bottom: none;
    }

    .carousel.showDetail .list .item .detail {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: left;
        width: 100%;
        padding: 0 10px;
        backdrop-filter: blur(10px);
        font-size: small;
    }

    .carousel.showDetail .list .item:nth-child(2) {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .carousel.showDetail .list .item:nth-child(2) img {
        position: relative;
        top: 150px;
        left: 0;
        width: 100%;
        height: auto;
        margin-bottom: 15px;
    }

    .carousel.showDetail .list .item:nth-child(2) .detail .title {
        font-size: 20px !important;
        font-weight: 500;
    }

    .carousel.showDetail .list .item:nth-child(2) .detail {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        text-align: left;
        padding: 0 16px;
        margin-top: 100px;
    }

    .carousel.showDetail .list .item .detail .specifications {
        display: flex;
        flex-direction: row;
        gap: 5px !important;
    }

    .carousel.showDetail .list .item:nth-child(2) .detail .specifications {
        font-size: 10px;
    }

    .carousel .list .item .detail {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: left;
        padding: 0 10px;
    }

    .carousel .detail .specifications {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .carousel .list .item .detail .checkout {
        align-self: center;
    }

    .carousel .detail .specifications > div {
        border: 1px solid #ccc;
        padding: 2px;
        border-radius: 4px;
    }

    .carousel .detail .checkout button {
        width: 100%;
    }

    .carousel.showDetail .item {
        flex-direction: column;
    }

    .arrows {
        position: absolute;
        bottom: 70%;
        opacity: .8;
        max-width: 95%;
    }

    #back {
        margin-bottom: 15px;
        font-weight: 400;
    }
}