@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.overlay{
    display: none;
}

.navbar{
    display: none;
}

@keyframes load{
    0%{opacity: 100%;}
    50%{opacity: 50%;}
    100%{opacity: 0%;}
}

@keyframes main{
    0%{opacity: 0%;}
    100%{opacity: 100%;}
}

@keyframes change{
    0%{background-color: black;}
    100%{background-color: #fff;}
}
@keyframes on{
    100%{display: none;}
}

.popBox{
    position: fixed;
    background-color: black;
    height: 100%;
    width: 100%;
    animation: 0.5s on forwards;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pop{
    position: fixed;
    object-fit: cover;
    animation: 3s load forwards;
}

.GiantBox{
    animation: 3s main forwards;
}

body{
    height: 200vh;

}


html{
    scroll-behavior: smooth;
}

.header{
    position: relative;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-image: url('Tesla-Fleet-Group-Cars-S3XY.jpg');
    transition: background-image 0.5s ease;
    z-index: 4;
}

.header::after {
    content: "";
    position: absolute;
    filter: brightness(70%);
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

header{
    position: fixed;
    top: 0;
    width: 100%;
    height: 120px;
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content:space-around;
    transition: all 0.3s ease;
    animation: startup 1s ease-in-out;
    z-index: 10;
}

@keyframes startup{
    0% {transform: translateY(-105px);}
    100% {transform: translateY(0);}

}

.nav2{
    display: none;
}

.logo{
    width: 200px;
    cursor: pointer;
}

nav ul{
    display: flex;
    justify-content: end;
    flex: 1;
    text-align: center;
    padding-right: 10px;
}

nav ul li{
    display: inline-block;
    margin: 10px 20px;
}
nav a {
    color: white;
    text-decoration: none;
    position: relative;
    display: inline-block; 
    cursor: pointer;
    transition: all 0.3s ease;
  }

  nav a.scrolled{
    color: rgb(255, 45, 45);
  }
  
 nav a:hover{
    color: rgb(255, 45, 45);
  }
  
 nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }
  
  nav a:hover::after {
    color: rgb(255, 45, 45);
    transform: scaleX(1);
  }

.yiu{
    position: absolute;
    width: 500px;
    height: 320px;
}

.box{
    display: flex;
    justify-content: center;
}

section{
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    padding-top: 100px;
    
}

section div{
    width: 50%;
    display: flex;
    align-items: center;
    flex-direction: column;
}

section div p{
    text-align: center;
    width: 58%;
}


section .holder{
    position: relative;
    overflow: visible;
}

section .holder img{
    position: sticky;
    transition: opacity 0.2s ease;
    top: 40%;
}

section div h1{
    margin-bottom: 15px;
}


.fade-up-img3{
    margin-bottom: 78%;
  }

  
.fade-up-img{
    margin-bottom: 78%;
  }

  
.fade-up-img2{
    margin-bottom: 78%;
  }
  
.fade-up-img4{
    margin-bottom: 50%;
  }
   
#img1 { opacity: 1; z-index: 5; width: 50%; }
#img2 { opacity: 0; z-index: 4; width: 50%; }
#img3 { opacity: 0; z-index: 3; width: 45%; }
#img4 { opacity: 0; z-index: 2;width: 43%; }
#img5 { opacity: 0; z-index: 1; width: 55%; }

.fade-up .fade-up-img{
    margin-bottom: 50%;
}

.fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  }

  .fade-up.show {
    opacity: 1;
    transform: translateY(0);
  }

footer{
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 2px solid rgba(0, 0, 0, 0.053);
    background-color: #fff;
    height: 300px; 
    margin-top: 10%;
}

footer div{
    display: flex;
    flex-direction: column;

}

footer div h4{
    color: black;
    margin-bottom: 10px;
    border-bottom: 1px solid black;
}

footer div a{
    text-decoration: none;
    color: #00000055;
    transition: 0.5s;
}

footer div a:hover{
    text-decoration: none;
    color: black;
}

@media screen and (max-width: 767px) {

    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Poppins', sans-serif;
    
    }
    
    @keyframes load{
        0%{opacity: 100%;}
        50%{opacity: 50%;}
        100%{opacity: 0%;}
    }
    
    @keyframes main{
        0%{opacity: 0%;}
        100%{opacity: 100%;}
    }
    
    @keyframes change{
        0%{background-color: black;}
        100%{background-color: #fff;}
    }
    @keyframes on{
        100%{display: none;}
    }
    
    .popBox{
        position: fixed;
        background-color: black;
        height: 100%;
        width: 100%;
        animation: 0.5s on forwards;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .pop{
        position: fixed;
        object-fit: cover;
        animation: 3s load forwards;
    }
    
    .GiantBox{
        animation: 3s main forwards;
    }
    
    body{
     height: 90%;
     width: 100%;
     overflow-x: hidden;
    }
    
    html{
        scroll-behavior: smooth;
    }
    
    .header{
        position: relative;
        width: 100vw;
        height: 50vh;
        background-size: cover;
        background-position: center;
        background-image: url('Tesla-Fleet-Group-Cars-S3XY.jpg');
        transition: background-image 0.5s ease;
    }
    
    .header::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: cover;
        background-position: center;
        opacity: 0;
        transition: opacity 1s ease;
    }
    
    html{
        scroll-behavior: smooth;
    }
    
    .nav2{
        display:block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        display: flex;
        align-items: center;
        height: 160px;
        z-index: 999;
    }
    
    .nav2 .burger-bar {
        width: 100px;
        height: 100px;
        object-fit: contain;
        cursor: pointer;
        transition: transform 0.4s ease;
      }
    
      .nav2 .burger-bar.rotate {
        transform: rotate(180deg);
      }
    
    nav{
        display: none;
        visibility: none;
    }
    
    .logo{
        width: 170px;
        cursor: pointer;
    }
    
    nav ul{
        display: flex;
        justify-content: end;
        align-items: center;
        flex: 1;
        text-align: center;
    }
    
    .nav2 ul{
        padding-right: 0px;
        height: 160px;
    }
    
    nav ul li{
        display: inline-block;
        margin: 10px 20px;
    }
    
    nav ul li a{
        text-decoration: none;
        color: #fff;
        transition: color 0.5s ease;
        font-size: 30px;
    }
    
    nav .btn{
        color: #fff;
        text-decoration: none;
        border: 3px solid #fff;
        padding: 10px 30px;
        border-radius: 30px;
        margin-right: 7%;
        font-size: 20px;
        transition: 0.5s;
        transition: color 0.5s ease;
    }
    
    nav .btn:hover{
        color: #fff;
        text-decoration: none;
        border: 3px solid #fff;
        padding: 10px 30px;
        border-radius: 30px;
        margin-right: 7%;
        font-size: 20px;
        transform: scale(1.1);
        transition: color 0.5s ease;
    }


    
.overlay{
    display: block;
    position: fixed;
    width: 40%;
    height: 100%;
    background-color: #0a0a0a;
    z-index: 1000;
    opacity: 0;
    transform: translateX(-100%);
    transition: transform 0.6s ease-in-out, opacity 0.4s ease-in-out;
}

.overlay.show{
    opacity: 0.4;
    transform: translateX(0);
}
    .smt{
        padding: relative;
        z-index: 1000;
    }
    
      .navbar {
        position: fixed;
        top: 0;
        right: 0;
        width: 60%;
        height: 100vh;
        background-color: red;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: transform 0.6s ease-in-out, opacity 0.4s ease-in-out;
        transform: translateX(100%);
        opacity: 1;
        z-index: 100;
      }
    
      .navbar.show {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
      }
    
      ul {
        list-style: none;
      }
    
       
      .navbar li{
        margin: 30px 0;
        transition: all 0.3s ease 0.2s;
      }

      .navbar li:hover {
        transform: skew(-15deg, 0deg);
      }
    
      header{
        display: none;
       }

      a {
        color: #fff;
        text-decoration: none;
        font-size: 20px;
        transition: 0.3s;
      }
    .yiu{
        position: absolute;
        width: 500px;
        height: 320px;
    }
    
    .box{
        display: flex;
        justify-content: center;
    }
    
    section{
        width: 100%;
        height: 100%;
        display: flex;
        flex-wrap: wrap;
        padding-top: 100px;
        margin-bottom: 35%;
        
    }
    
    section div{
        width: 50%;
        display: flex;
        align-items: center;
        flex-direction: column;
    }
    
    section div p{
        text-align: center;
        width: 58%;
        font-size: 10px;
    }

    section div h1{
        text-align: center;
        font-size: 15px;
    }
    
    
    section .holder{
        position: relative;
        overflow: visible;
        z-index: 1;
    }
    
    section .holder img{
        position: sticky;
        transition: opacity 0.2s ease;
        top: 40%;
    }
    
    section div h1{
        margin-bottom: 15px;
    }
    
    
    
    #img1 { opacity: 1; z-index: 5;  width: 90%;}
    #img2 { opacity: 0; z-index: 4; width: 90%;}
    #img3 { opacity: 0; z-index: 3; width: 80%;}
    #img4 { opacity: 0; z-index: 2; width: 80%;}
    #img5 { opacity: 0; z-index: 1; width: 90%;}
    
    #key{
        margin-top: 100%;
    }

    #nai{
        margin-top:100%;
    }

#battery{
    margin-top: 100%;
}

 #part{
    margin-top: 65%;
 }
 
    .fade-up {
        opacity: 0;
        transform: translateY(50px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
      }

       .fade-up-img{
        margin-bottom: 100%;
      }

      
      .fade-up-img2{
        margin-bottom: 100%;
      }

      .fade-up-img3{
        margin-bottom: 100%;
      }

      .fade-up-img4{
        margin-bottom: 100%;
      }
    
      .fade-up.show {
        opacity: 1;
        transform: translateY(0);
      }
    
    footer{
        display: flex;
        justify-content: space-around;
        align-items: center;
        border-top: 2px solid rgba(0, 0, 0, 0.053);
        background-color: #fff;
        height: 300px; 
        transform: translateY(-25%);
    }
    
    footer div{
        display: flex;
        flex-direction: column;
    
    }
    
    footer div h4{
        color: black;
        margin-bottom: 10px;
        font-size: 13px;
        border-bottom: 1px solid black;
    }
    
    footer div a{
        text-decoration: none;
        color: #00000055;
        transition: 0.5s;
        font-size: 12px;
    }
    
    footer div a:hover{
        text-decoration: none;
        color: black;
    }
}
