/* @import "master.css"; */

:root {
    --mass-x-speed: 8s;
    --mass-x-title-count: 6s;
}


html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-smooth: always;
}

body {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
    scroll-margin-top: 0;
    background: #FFF;
    color: #000;
    transition: 0.35s cubic-bezier(0, 0, 0, 1);
    scroll-behavior: auto; 
}

@supports (-webkit-touch-callout: none) and (not (overscroll-behavior: auto)) {
    body {
        scroll-snap-type: none !important;
    }

    section {
        scroll-snap-align: none !important;
    }
}

nav.top {
    /* background: linear-gradient(rgba(0,0,0,0.08), rgba(0,0,0,0.08)), url("../../resources/images/home/header-bg.png"); */
    /* background-size: cover; */
    background: none;
}

body {
    /* background: linear-gradient(to left, #095CFA, #7230BF); */
}

.dot-nav {
    /* mix-blend-mode: difference; */
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    /* background:rgba(0,0,0,0.3); */
}

.dot-container {
    position: relative;
}

.dot-warpper {
    /* mix-blend-mode: difference; */
    background: transparent;
    display: flex;
    flex-direction: row;
    border: none;
    justify-content: end;
    gap: 0.5rem;
    align-items: center;
    transition: 0.3s;
    position: absolute;
    translate: -100%;
    scale: 1;
}

.dot-warpper:focus {
    outline: none;
}

.dot-warpper span {
    /* mix-blend-mode: difference; */
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    transition: 0.3s;
    opacity: 0;
}

.dot {
    /* mix-blend-mode: difference; */
    width: 12px;
    height: 12px;
    border-radius: 50%;
    /* border: 2px solid var(--white); */
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0;
}

.dot-warpper:hover span {
    /* translate: -10px; */
}

.dot-warpper:hover .dot {
    /* translate: -10px; */

}

.dot-warpper.active span {
    /* mix-blend-mode: unset; */
    color: var(--primary-color);
    opacity: 1;
}

.dot-warpper.active .dot {
    /* mix-blend-mode: unset; */
    background: var(--primary-color);
    opacity: 1;
}

.dot-warpper.active {
    scale: 1;
    /* mix-blend-mode: unset; */
}

.dot-warpper:has(+ .dot-warpper.active){
    translate: -100% -24px;
}

.dot-warpper.active + .dot-warpper {
    translate: -100% 24px;
}

.dot-warpper:has(+ .dot-warpper.active) span,
.dot-warpper.active + .dot-warpper span {
    opacity: 0.7;
    font-size: 0.625rem;
}

.dot-warpper:has(+ .dot-warpper.active) .dot,
.dot-warpper.active + .dot-warpper .dot {
    opacity: 0.7;
    height: 8px;
    width: 8px;
}

body > section {
    position: relative;
    height: 100vh;
    scroll-snap-align: start;
}

body > section#header {
    --padding: 80px;
    height: 100vh;
    padding: var(--padding);
    padding-top: calc(var(--padding) + var(--navbar-height));
    margin-top: calc(0px - var(--navbar-height));
    /* background: linear-gradient(to left, #095CFA, #7230BF); */
    background: url("../../resources/images/home/header-banner.jpg") top right / cover;
    display: flex;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;
}

.head-warpper {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5vh;
}

.head-warpper .head {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3rem;
}

.head-warpper .head span {
    font-size: clamp(24px, calc(4.75vw + 0.01rem), 5.5rem);
    font-weight: 600;
    color: var(--text-white);
    text-align: center;
}

.head-warpper .head span b {
    font-weight: 600;
    background: linear-gradient(
        90deg,
        #DE3DEF 0%,
        #844BF7 33.33%,
        #2E5FFF 66.67%,
        #4AADFF 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    background-size: 100% 100%;
}

.head-warpper .content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-inline: 20vw;
}

.head-warpper .content p {
    font-size: clamp(1rem, calc(1.5vw + 0.01rem), 1.25rem);
    font-weight: 400;
    color: var(--text-white);
    text-align: center;
}

.head-warpper .exp-bottom {
    display: grid;
    grid-template-columns: repeat(5, auto);
    gap: 5rem;
}

.head-warpper .exp-bottom .exp-num {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;

    white-space: normal;
    word-wrap: break-word; 
    overflow-wrap: break-word;
    text-wrap: balance;
}

.head-warpper .exp-bottom .exp-num span {
    color: var(--text-white);
    text-align: center;
}

/* .head-warpper .exp-bottom .exp-num.baht span:first-child {
    position: relative;
} */
.head-warpper .exp-bottom .exp-num.baht span:first-child::after {
    content: 'B';
    color: var(--text-white);
}

.head-warpper .exp-bottom .exp-num.year span:first-child::after {
    content: 'Y';
    color: var(--text-white);
}

.head-warpper .exp-bottom .exp-num span:first-child {
    font-size: clamp(2.5rem, calc(5.75vw + 0.01rem), 5rem);
    font-weight: 600;
}

/* .head-warpper .exp-bottom .exp-num.baht span:nth-last-child(2) {
    font-size: clamp(1rem, calc(1.5vw + 0.01rem), 1.25rem);
    font-weight: 600;
} */

.head-warpper .exp-bottom .exp-num span:last-child {
    font-size: clamp(1rem, calc(1.5vw + 0.01rem), 1.25rem);
    font-weight: 400;
}

body > section video {
  width: 100%;
  height: 100vh;
  -o-object-fit: cover;
  object-fit: cover;    
  display: block;
  vertical-align: center;
}

body > section#header video
{
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
}

video::-webkit-media-controls {
    display: none !important;
}

body > main {
    position: relative;
    scroll-snap-align: start;
    background-color: var(--black);
}

#logo-brand {
    padding: 8% 5%;
    
}
.logo-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 48px;
    justify-items: center;
    align-items: start;
    min-height: 50vh;

    .logo-wrapper {
        position: relative;
        display: inline-block;
        width: 230px;
        margin: 10px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.5s ease;

        a {
            display: block;
        }


        img {
            display: block;
            width: 100%;
            height: auto;
            opacity: 1;
            transition: opacity 0.4s ease;
            border-radius: 8px;
        }

        .logo-work {
            position: absolute;
            top: 0;
            left: 0;
            opacity: 0;
        }

        .filter-box {
            /* transition: all .2s ease-out; */
            width: 100%;
            aspect-ratio: 20 / 13;
            position: absolute;
            left: 0;
            top: 0;
            background: linear-gradient(
                    90deg,
                    /* var(--primary-color), */
                    var(--light-color),
                    var(--primary-color)    
                );
            /* background-size: 300% 300%;
            animation: logoGradient 5s linear infinite; */
            mix-blend-mode: overlay;
            pointer-events: none;
            mask-image: var(--image-mask);
            mask-repeat: no-repeat;
            mask-size: contain;
            mask-position: center;
            -webkit-mask-image: var(--image-mask);
            -webkit-mask-repeat: no-repeat;
            -webkit-mask-size: contain;
            -webkit-mask-position: center;
            background-position: 100% 50%;
        }
    
        &.show {
            opacity: 1;
            transform: translateY(0);

            .logo-icon {
                filter: brightness(0) invert(0);
                opacity: 0;
            }
        }

        &:hover {
            .logo-work {
                opacity: 1;
            }

            .logo-icon { 
                opacity: 0;
            }
        }
    }
}

#filter-box-toggle-text {
    font-size: 1.5rem;
    font-weight: 500;
    /* margin-left: 8px; */
    cursor: pointer;
}

#logo-brand .checkbox-container:has(#filter-box-toggle:checked) ~ .logo-group .logo-wrapper.show .filter-box {
    background: none;
    mask-image: none;
    -webkit-mask-image: none;
}

#logo-brand .checkbox-container:has(#filter-box-toggle:checked) ~ .logo-group .logo-wrapper.show .logo-icon {
    opacity: 1;
}

/*
#MARK: Other Services
 */

#other-services {
    padding: 3% 5%;
    background: var(--black);
    display: flex;
    flex-direction: column;
}

#other-services h1 {
    margin-bottom: 32px;
}   
    
.other-services-box {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 28px;
}

.other-service-card {
    display: grid;
    border-radius: 20px;
    padding-top: 240px;

    &:nth-child(1) {background: linear-gradient(#00000026, #00000026), url('../../resources/images/home/other-services-01.jpg') center/cover no-repeat;}
    &:nth-child(2) {background: linear-gradient(#00000026, #00000026), url('../../resources/images/home/other-services-02.jpg') right/cover no-repeat;}
    &:nth-child(3) {background: linear-gradient(#00000026, #00000026), url('../../resources/images/home/other-services-03.jpg') center/cover no-repeat;}
    &:nth-child(4) {background: linear-gradient(#00000026, #00000026), url('../../resources/images/home/other-services-04.jpg') center/cover no-repeat;}

}

.card-detail {
    --card-gap: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--card-gap);
    row-gap: var(--card-gap);
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;

}
.card-text {
    color: var(--text-white);
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    row-gap: var(--card-gap);
}

.card-text h2 {
    font-size: clamp(1.5rem, calc(2.5vw + 0.01rem), 2rem);
    line-height: 36px;

}

.card-text p {
    font-size: 1rem;
    line-height: 20px;
}

.card-btn {
    width: 100%;
    display: flex;
    justify-content: end;

}

.card-btn a {
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: 1px solid var(--white);
    border-radius: 100px;
    padding: 8px 24px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(5px);
    color: var(--text-white);

    &:hover, &:focus {
        outline: none;
        background: var(--white);
        backdrop-filter: blur(0px);
        color: var(--dark-color);
        /* font-weight: 600; */
    }
}

.other-services-indicator,
.other-services-nav {
    display: none;
}

/*
MARK: Bottom Banner 
*/

#bottom-banner {
    padding: 3% 5%;
    background-color: var(--black);
    height: 540px;
    position: relative;
}

#bottom-banner video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    height: 540px;
    transform: translate(-50%, -50%);
    border-radius: 24px;
    object-fit: cover;
    z-index: 0;
}

.bottom-banner {
    position: absolute;
    z-index: 1;
    height: 100%;
    /* background: url("../../resources/images/home/header-bg.png") left center / cover no-repeat; */
    /* background: url("../../resources/images/home/banner-bottom.gif") left center / cover no-repeat; */
    /* background-size: 130%; */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 24px;
    position: relative;
}

.bottom-banner h2 {
    display: flex;
    /* align-items: center; */
    font-size: clamp(calc(var(--fs-base) * 2), calc(6vw + 0.01rem), calc(var(--fs-base) * 10));
    font-weight: 500;
    color: var(--text-white);
    translate: -50%;

    span {margin: 0 clamp(0.75rem, calc(3vw + 0.01rem), 3rem);}

}

.bottom-banner-subheader {
    display: initial;
    /* overflow: hidden; */
    position: relative;
}

.bottom-banner-subheader span {
    opacity: 0;
    position: absolute;
    margin: 0 !important;
    width: max-content;
    top: 0;
    left: 0;
    
    &:nth-child(1) { animation: subheader2 8s infinite ease; }
    &:nth-child(2) { animation: subheader2 8s infinite ease calc(8s / 6 * 1); }
    &:nth-child(3) { animation: subheader2 8s infinite ease calc(8s / 6 * 2); }
    &:nth-child(4) { animation: subheader2 8s infinite ease calc(8s / 6 * 3); }
    &:nth-child(5) { animation: subheader2 8s infinite ease calc(8s / 6 * 4); }
    &:nth-child(6) { animation: subheader2 8s infinite ease calc(8s / 6 * 5); }
}

.bottom-banner-detail {
    position: absolute;
    display: flex;
    flex-direction: row;
    column-gap: 2rem;
    bottom: 5%;
    left: 50%;
    translate: -50%;
}

.bottom-banner-detail span {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 400;
    color: var(--text-white);
}

/* 
#MARK: @keyframes
 */

@keyframes logoGradient {
    0%   { background-position:   0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position:   0% 50%; }
}

@keyframes subheader {
    0% {
        translate: 0 -100%;
        opacity: 0;
    }

    22%, 33.33% {
        translate: 0 0;
        opacity: 1; 
    }

    55.55%,100% {
        translate: 0 100%;
        opacity: 0;
    }
}

@keyframes subheader2 {
    0% {
        translate: 0 -100%;
        opacity: 0;
    }

    11.11%, 16.67% {
        translate: 0 0;
        opacity: 1; 
    }

    27.78%,100% {
        translate: 0 100%;
        opacity: 0;
    }
}

/* @keyframes subheader3 {
    0%,66.67% {
        translate: 0 -100%;
        opacity: 0;
    }

    88.89%,100% {
        translate: 0 0;
        opacity: 1; 
    }

    100% {
        translate: 0 100%;
        opacity: 0;
    }
} */

/*
#MARK: @media
*/
@media  screen and (max-width: 1399px) {
    body > section#header {--padding: 60px;}

    .head-warpper .content {padding-inline: 15vw;}
}

@media screen and (max-width: 1199px) {  
    html, body {scroll-snap-type: none;}
    body > * {scroll-snap-align: none;}

    .head-warpper .content {padding-inline: 10vw;}
    

    body > section, body > section video {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    body > section#header {
        width: 100%;
        height: unset;
        min-height: 100vh;
        --padding: 40px;
        aspect-ratio: unset;
    }
    
    .other-services-wrapper {
        position: relative;
    }

    .other-services-box {
        display: flex;
        gap: 20px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding-bottom: 36px;

        scrollbar-width: none;
    }

    .other-services-box.no-snap {
        scroll-snap-type: none !important;
    }

    .other-services-box::-webkit-scrollbar {
        display: none;
    }

    .other-service-card {
        flex: 0 0 50%;
        scroll-snap-align: center;
        transition: transform 0.3s ease;
    }

    .other-service-card:first-child {scroll-snap-align: start;}
    .other-service-card:last-child {scroll-snap-align: end;}

    .other-services-indicator {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 12px;
        translate: 0 -12px;
    }

    .other-services-indicator span {
        width: 8px;
        height: 8px;
        border-radius: 4px;
        background: rgba(255,255,255,0.4);
        transition: 0.3s ease;
        cursor: pointer;
        position: relative;
    }

    .other-services-indicator span::before {
        content: '';
        background-color: #8F8F8F;
        width: 0;
        height: 100%;
        position: absolute;
        left: 25%;
        border-radius: 4px;
        transition: 0.3s ease;
    }

    .other-services-indicator span.active {
        width: 32px;
        background: var(--white);
    }

    .other-services-indicator span.active::before {
        width:50%;
    }

    .other-services-nav {
        display: flex;
        gap: 4px;
        position: absolute;
        right: 0;
        bottom: 0;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        border: 1px solid transparent;
        /* background: rgba(0,0,0,0.4); */
        background: transparent;
        color: var(--text-white);
        font-size: 1.5rem;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: 0.3s ease;
    }

    .nav-btn:hover {
        border: 1px solid rgba(255, 255, 255, 0.3);
        background: rgba(0,0,0,0.4);
    }

    .nav-btn svg {
        fill: var(--white);
        width: 16px;
        height: 16px;
    }

    .other-service-card.is-active {
        transform: scale(1.05);
    }

    .head-warpper {
        gap: 3rem;
    }

    .head-warpper .exp-bottom {
        grid-template-columns: repeat(3, auto);
        gap: 2rem;
    }
}

@media screen and (max-width: 991px) {
    .other-service-card {flex: 0 0 80%;}
    #bottom-banner {height: 360px;}
    #bottom-banner video {height: 360px;}
    body > section#header {
        --padding: 30px;
        background-position: center;
    }

    .head-warpper{gap: 2rem; align-items: start;}

    .head-warpper .head {align-items: start;}

    .head-warpper .head span {text-align: start;}

    .head-warpper .content {
        padding-inline: 0;
    }

    .head-warpper .content p {
        text-align: start;
    }
}

@media screen and (max-width: 768px) {
    body > section#header {--padding: 30px;}
    #logo-brand .logo-group {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        min-height: 100%;
    }

    .logo-brand-carousel {width: calc(12rem * 10);}
    .logo-brand-group a {flex: 0 0 12rem;}
    .other-service-card {padding-top: 160px;}
    #bottom-banner {height: 240px;}
    #bottom-banner video {height: 240px;}

    .head-warpper .exp-bottom {
        grid-template-columns: repeat(3, auto);
    }
}

@media screen and (max-width: 575px) {
    .head-warpper .head {order: 1;}
    .head-warpper .exp-bottom {
        width: 100%;
        grid-template-columns: auto;
        gap: 1rem;
        order: 2;
    }
    .head-warpper .content {order: 3;}

    body > section#header {--padding: 20px;}
    .logo-brand-carousel {width: calc(10rem * 10);}
    .logo-brand-group a {flex: 0 0 10rem;}
    .other-service-card {
        padding-top: 0;  
        min-width: 270px;
        height: 350px;
    }

    .card-detail {
        margin-top: auto;
        height: 60%;
    }

    .card-text h2 {
        font-size: 1rem;
        line-height: 18px;
    }

    .card-text p {
        font-size: 0.75rem;
        line-height: 15px;
    }

    #bottom-banner {
        height: 90px;
        margin-top: 32px;
    }
    #bottom-banner video {
        width: 90%;
        height: 90px;
        border-radius: 4px;
    }

    .bottom-banner {
        margin: 0 1.5rem;
        border-radius: 4px;
    }

    #other-services h1 {
        text-align: center;
        margin-top: 20px;
    }

    .other-services-indicator span {
        height: 5px;
        width: 5px;
        border-radius: 2.5px;
    }

    .other-services-indicator span.active {
        width: 44px;
        transform: scale(1);
    }

    .bottom-banner-detail {
        column-gap: 0.5rem;
    }

    .bottom-banner-detail span {
        font-size: 0.375rem;
    }

    .bottom-banner h2 {
        font-size: 1.25rem;
    }

    .head-warpper .exp-bottom .exp-num span {
        text-align: start;
    }

    .head-warpper .exp-bottom .exp-num.baht span:first-child::after {
        content: ' Billon Baht';
        color: var(--text-white);
    }

    .head-warpper .exp-bottom .exp-num.year span:first-child::after {
        content: ' Years';
        color: var(--text-white);
    }
}