@import "./common.css";
@import "./animate.css";
@import "./style.css";

.global {
    padding: 1.2rem var(--content-padding) 0;
    position: relative;
    background: linear-gradient(to bottom, #fafbff, #e9effd);
    margin-bottom: -3rem;
    transition: 2s;
    will-change: padding;
    overflow: hidden;
    width: 100vw;
}

.global .global-bg {
    width: 100%;
    min-width: 12rem;
    position: absolute;
    left: 0; top: -.8rem;
    z-index: 10; opacity: .2;
    height: calc(100% + .8rem);
}

.global .title {
    font-weight: bolder;
    text-transform: uppercase;
    position: relative; z-index: 2;
}

.global .sub-title {
    color: var(--text-color-secondary);
    margin: 0 auto;
    position: relative; z-index: 2;
    font-weight: lighter;
}

.global .reach-us {
    width: 2rem;
    line-height: .5rem;
    border-radius: .25rem;
    background: var(--theme);
    color: #fff;
    font-size: .2rem;
    margin: .6rem auto -.5rem;
    position: relative; z-index: 30;
    box-shadow: 0 4px 16px rgba(36, 96, 237, 0.3);
    transition: 
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.3s ease;
    overflow: hidden;
}

.global .reach-us::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.global.scrolled {
    padding-bottom: 4rem;
}

.global .reach-us:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 32px rgba(36, 96, 237, 0.4),
        0 0 0 4px rgba(36, 96, 237, 0.15);
    text-shadow: 1px 1px 2px rgba(50, 50, 50, .3);
}

.global .reach-us:hover::before {
    left: 100%;
}

.global .reach-us:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(36, 96, 237, 0.3);
}

#shapeCanvas {
    width: 19.2rem; height: 2rem;
    position: absolute; bottom: 100%; left: 0; z-index: 20;
    transition: 2s; will-change: bottom;
}

#shapeCanvas.scrolled {
    height: 1.2rem;
}

.earth-container {
    width: 12rem; height: 12rem;
    max-width: var(--content-width); max-height: var(--content-width);
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .2), rgba(255, 255, 255, .8));
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.earth-container::after {
    content: "";
    width: 15.56rem; height: 15.56rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .6));
    position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%,-50%);
}

.earth-container::before {
    content: "";
    width: 13.7rem; height: 6.03rem;
    position: absolute;
    top: .8rem; left: -1rem;
    background: url("../assets/2x/earth-outer.png") no-repeat center;
    background-size: cover;
}

.earth {
    width: 10.4rem; height: 10.4rem;
    position: relative; z-index: 20; margin: .8rem;
    padding-left: .1rem;
}

.fragment {
    padding: 0 var(--content-padding) 1.2rem;
    background: #fff;
    position: relative;
    z-index: 30;
    margin-top: 0;
    transition: 2s;
}

.fragment-list {
    max-width: var(--content-width);
    margin: .5rem auto 0;
}

.frag-menu {
    width: 6rem;
}

.frag-item {
    width: 7rem;
    height: 5.8rem;
    position: relative;
}

.frag-img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    padding: .2rem;
    border: 1px solid var(--border-color-light);
    border-radius: .14rem;
}

.menu-item .frag-img {
    display: none;
}

.frag-img.fadeInBottom {
    animation: fadeInBottom 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInBottom {
    from { 
        transform: translateY(.8rem) scale(0.95); 
        opacity: 0;
        filter: blur(4px);
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1;
        filter: blur(0);
    }
}

.frag-img.fadeOutUp {
    animation: fadeOutUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeOutUp {
    from { 
        transform: translateY(0) scale(1); 
        opacity: 1;
        filter: blur(0);
    }
    to { 
        transform: translateY(-.6rem) scale(0.95); 
        opacity: 0;
        filter: blur(4px);
    }
}

.frag-menu .menu-item {
    position: relative;
    margin-bottom: .46rem;
    padding-left: .56rem;
}

.frag-menu .menu-item .collapse-wrapper {
    height: 0;
    transition: height .4s ease-in-out;
    overflow: hidden;
}

.frag-menu .menu-item:not(:last-child)::before {
    content: "";
    width: 0;
    position: absolute;
    left: .2rem;
    top: .5rem;
    bottom: -.4rem;
    border-left: 1px dashed var(--border-color);
}

.frag-menu .menu-item .title {
    font-size: .3rem;
    color: var(--text-color-secondary);
    transition: color .2s;
}

.frag-menu .menu-item.active .title {
    font-weight: bolder;
}

.frag-menu .menu-item .sub-title {
    padding: .15rem 0 .2rem;
    position: relative;
    font-weight: lighter;
    opacity: 0;
}

.frag-menu .menu-item .sub-title.fadeIn {
    animation: fadeIn 1s ease-in-out forwards .3s;
}

.frag-menu .menu-item .deco {
    border-bottom: 1px solid var(--border-color-light);
    width: 100%;
    opacity: 0; transition: .2s;
}

.frag-menu .menu-item.active .deco {
    opacity: 1;
}

.frag-menu .menu-item .btn {
    width: 1.4rem;
    line-height: .38rem;
    border-radius: .19rem;
    background: var(--theme);
    color: #fff;
    font-size: .16rem;
    margin-bottom: .16rem;
    text-align: center;
    user-select: none;
    opacity: 0;
    transition: 
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.3s ease;
}

.frag-menu .menu-item .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(36, 96, 237, 0.35);
}

.frag-menu .menu-item .btn:active {
    transform: translateY(0);
}

.frag-menu .menu-item .btn.fadeIn {
    animation: btnFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.5s;
}

@keyframes btnFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.frag-menu .menu-item.active .title,
.frag-menu .menu-item:hover .title {
    color: var(--text-color);
}

.frag-menu .menu-item.active .sub-title {
    display: block;
}

.icon-step {
    position: absolute; left: 0; top: 0;
    width: .4rem; height: .4rem;
    background: url("../assets/2x/step-inactive.png") no-repeat;
    background-size: contain;
    transition: 
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease;
}

.menu-item:not(.active) .icon-step {
    transform: scale(1.3);
}

.menu-item:not(.active):hover .icon-step {
    transform: scale(1.4);
    opacity: 0.8;
}

.menu-item.active .icon-step {
    background: url("../assets/2x/step-active.png") no-repeat;
    background-size: contain;
    animation: iconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.service {
    padding: 1.2rem var(--content-padding) 0;
    margin-bottom: 1rem;
}

.service-list {
    max-width: var(--content-width);
    margin: .5rem auto 0;
    position: relative;
}

.service-menu {
    width: 4.5rem;
    background: #fff;
    border-radius: .2rem;
    padding: 0 .3rem;
}

.service-item {
    width: 9.18rem;
    height: 6.28rem;
    position: relative;
    padding: .2rem;
    border-radius: .14rem;
    overflow: hidden;
}

.service-item img {
    width: 100%; height: 100%; object-fit: cover; position: absolute;
}

.service-item .service-img {
    width: 100%; height: 100%;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    top: 0; left: 0;
}

.service-item .service-img.slideIn {
    animation: serviceSlideIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.service-item .service-img.slideOut {
    animation: serviceSlideOut 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes serviceSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes serviceSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px) scale(0.95);
        filter: blur(4px);
    }
}

.service-img .name {
    position: relative;
    padding-left: .38rem; color: #fff; font-size: .3rem; font-weight: bolder;
}

.service-img .desc {
    position: relative;
    padding-left: .38rem; color: #fff; font-size: .16rem; line-height: 1.5;
    margin: .2rem 0 1.1rem;
}

.service .btn {
    width: 1.4rem;
    line-height: .38rem;
    text-align: center;
    display: block;
    position: absolute;
    left: 5.2rem;
    bottom: .42rem; z-index: 20;
    cursor: pointer;
    background: var(--theme);
    border-radius: .19rem;
    color: #fff;
    font-size: .16rem;
    transition: 
        opacity 0.3s ease,
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(36, 96, 237, 0.25);
}

.service .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(36, 96, 237, 0.4);
}

.service .btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(36, 96, 237, 0.25);
}

.service-menu .menu-item {
    position: relative;
    height: .785rem;
    display: flex; align-items: center;
    gap: .22rem;
    transition: 
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.3s ease;
    border-radius: .1rem;
    padding-left: .1rem;
    margin-left: -.1rem;
}

.service-menu .menu-item:hover {
    background: rgba(36, 96, 237, 0.04);
    transform: translateX(4px);
}

/*.service-menu .menu-item.active {*/
/*    height: 1.02rem;*/
/*}*/

.service-menu .icon-step {
    position: relative;
    top: 0;
}

.service-menu .menu-item .title {
    font-size: .24rem;
    color: var(--text-color-secondary);
    transition: color .2s;
}

.service-menu .menu-item.active .title {
    font-size: .3rem;
    color: var(--text-color-secondary);
    transition: color .2s;
    font-weight: bolder;
}

.service-menu .menu-item .deco {
    border-bottom: 1px dashed var(--border-color-light);
    position: absolute;
    left: .56rem;
    bottom: 0;
    width: calc(100% - .56rem);
}

.service-menu .menu-item .deco::after {
    content: "";
    display: block;
    width: 6px; height: 6px;
    border-width: 0 1px 1px 0;
    border-style: solid;
    border-color: var(--border-color-light);
    position: absolute;
    right: 0; bottom: 0;
    transform: rotate(-45deg); transform-origin: 100% 100%;
}

.service-menu .menu-item.active .title,
.service-menu .menu-item:hover .title {
    color: var(--text-color);
}


@media (min-width: 576px) {
    .global .title {
        margin-bottom: .16rem;
    }
}

@media (min-width: 900px) {
    .global .title {
        font-size: .48rem;
        margin-bottom: .2rem;
    }

    .global .sub-title {
        width: 7.67rem;
        font-size: .16rem;
        line-height: 1.5;
    }
}


@media (max-width: 1200px) {
    .global .sub-title {
        width: 14rem;
        font-size: 16px;
        line-height: 1.5;
    }

    .frag-menu .menu-item .title {
        font-size: 16px;
    }

    .frag-menu .menu-item .sub-title {
        font-size: 12px;
    }

    .service-img .name {
        font-size: 16px;
    }

    .service-img .desc {
        font-size: 12px;
    }

    .service .btn {
        width: 90px;
        line-height: 24px;
        border-radius: 12px;
        font-size: 10px;
    }

    .service-img .desc {
        margin: 10px 0 60px;
    }
}

@media (max-width: 960px) {
    .global .title {
        font-size: 24px;
    }

    .global .sub-title {
        font-size: 14px;
        line-height: 20px;
        min-width: 80%;
    }

    .frag-menu .menu-item {
        padding-left: .76rem;
    }

    .frag-menu .menu-item .btn {
        width: 90px;
        line-height: 24px;
        font-size: 10px;
        border-radius: 12px;
    }

    .icon-step {
        width: .6rem;
        height: .6rem;
        top: -.1rem;
    }

    .frag-menu .menu-item:not(:last-child)::before {
        left: .3rem; top: .7rem; bottom: -.3rem;
    }
}

@media (max-width: 768px) {
    .fragment-list .frag-menu {
        width: 46%;
    }
    .fragment-list .frag-item {
        width: 50%;
    }

    .service-menu {
        width: 4.8rem;
    }

    .service-item {
        width: 68%;
    }

    .service .btn {
        left: 34%;
    }
}

@media (max-width: 576px) {
    .global {
        padding: 1.2rem 0 0;
    }

    .global .title {
        margin-bottom: 16px;
    }

    .global .sub-title {
        min-width: 100%;
        padding: 0 12px;
        font-weight: normal;
    }

    .global .reach-us {
        width: 162px;
        line-height: 40px;
        border-radius: 20px;
        font-size: 16px;
        margin: 36px auto 10px;
    }

    .earth-container {
        width: 120vw;
        height: 120vw;
        max-width: 120vw;
        max-height: 120vw;
        left: -10vw;
    }

    .earth-container::after {
        width: 120%; height: 120%;
        background: linear-gradient(to bottom, rgba(255, 255, 255, .2), rgba(255, 255, 255, .5));
    }

    .earth-container .earth {
        width: 112vw;
        height: 112vw;
        padding-left: 0;
    }

    .global.scrolled {
        padding-bottom: 20vw;
    }

    .earth-container::before {
        display: none;
    }

    .fragment-list {
        margin-top: 34px;
    }

    .fragment-list .frag-menu{
        width: 100%;
    }

    .fragment-list .frag-item {
        display: none;
    }

    .frag-menu .menu-item .sub-title {
        font-weight: normal;
    }

    .frag-menu .menu-item .sub-title.fadeIn {
        animation-delay: 0s;
    }

    .fragment-list .frag-menu .menu-item .btn {
        width: 325px;
        max-width: 100%;
        line-height: 40px;
        font-size: 16px;
        border-radius: 20px;
        margin: 24px auto 38px;
    }

    .frag-menu .menu-item .btn.fadeIn {
        animation-delay: 0s;
    }

    .frag-menu .menu-item:last-child .btn {
        margin-bottom: 0;
    }

    .frag-menu .menu-item:not(:last-child)::before {
        display: none;
    }

    .icon-step {
        width: 28px; height: 28px;
    }

    .frag-menu .menu-item {
        padding-left: 40px;
        margin-bottom: 30px;
    }

    .frag-menu .menu-item:last-child {
        margin-bottom: 0;
    }

    .frag-menu .menu-item:not(:last-child) .deco {
        opacity: 1;
    }

    .frag-menu .menu-item:last-child .deco {
        opacity: 0 !important;
    }

    .menu-item .frag-img {
        display: block;
        position: static;
        width: 325px;
        max-width: 100%;
        margin: 24px auto 0;
    }

    .frag-img.fadeOutUp {
        height: 0;
        margin-top: 16px;
    }

    .service .service-list {
        margin-top: 32px;
        width: 100vw;
        max-width: 100vw;
        display: block;
        margin-left: calc(-1 * var(--content-padding));
    }

    .service .service-menu {
        display: none;
    }

    .service .service-item {
        width: 100%;
        height: 61vw;
        padding: 0 0;
    }

    .service .service-img .name {
        font-size: 16px; font-weight: bolder;
        padding-left: 26px;
    }

    .service .service-img .desc {
        font-size: 12px;
        padding-left: 26px;
        margin: 10px 0 20px;
    }

    .service .service-item .service-img {
        position: relative; width: calc(100vw - 40px); height: 100%;
    }

    .service .service-item .service-img img {
        object-fit: contain;
    }

    .service .btn {
        position: relative;
        left: 0;
        width: 90%;
        max-width: 380px;
        line-height: 40px;
        border-radius: 20px;
        bottom: 0;
        margin: 20px auto;
        font-size: 16px;
    }
}