/* basic setting */
*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: 1s;
    scroll-behavior: smooth;
}
body{
    min-height: 100vh;
    background-color: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;   
}
img{
    border: 0;
}

/* Heading Cover Section */
/* Set value for previous section's margin so the animation of next section won't be triggered early.*/
section{
    display: grid;
    position: relative;
    width: 100%;
    height: 100%;
    padding: 400px;
    place-items: center;
    align-items: center;
    margin: 2%;
}
.wrapper{
    position: absolute;
    width: 1650px;
    height: 820px;
    top: 50%;
    left: 50%;
    overflow: hidden;
    transform:translate(-50%, -50%);
    perspective: 1000px;
}
.video-container{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.video-container video{
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
} 
.building{
    position: inherit;
    pointer-events: none;
    bottom: 0%;
    z-index: 10;
}
.building1{
    left: 0%;
}
.building2{
    left:35%;
}
.smoke{
    position: inherit;
    pointer-events: none;
    width: 70%;
    height: 70%;
    left: 10%;
    bottom: -15%;
    z-index: 11;
}
.smoke_2{
    left: 35%;
}
.wrapper:hover .building{
    transform: translateX(15px) translateY(50px);
}
.wrapper:hover .smoke_1{
    transform: translateX(80px);
}
.wrapper:hover .smoke_2{
    transform: translateX(180px);
}
/* Glowing Text Loading Animation */
ul{
    position: absolute;
    top: 50%;
    left: 48%;
    transform:translate(-50%, -50%);
    margin: 0;
    padding: 0;
    display: flex;
}
ul li{
    list-style: none;
    color: #484848;
    font-family: Lucida Fax;
    font-size: 6rem;
    font-weight: bold;
    letter-spacing:16px;
    animation: animate 1.4s linear infinite;
}
@keyframes animate{
    0%
    {
        color: #484848;
        text-shadow: none;
    }
    90%
    {
        color: #484848;
        text-shadow: none;
    }
    100%
    {
        color: #ff0000;
        text-shadow: 0 0 7px #ff0000, 0 0 50px #ff6c00;
    }
}
ul li:nth-child(1)
{
    animation-delay: .2s;
}
ul li:nth-child(2)
{
    animation-delay: .3s;
}
ul li:nth-child(3)
{
    animation-delay: .4s;
}
ul li:nth-child(4)
{
    animation-delay: .5s;
}
h1{
    position: absolute;
    top: 40%;
    left: 52%;
    transform:translate(-50%, -50%);
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    color: #a5a5a5;
    font-family: Lucida Fax;
    font-size: 4rem;
    letter-spacing:5px;
}


/* For rest sections */
h2 { 
    font-size: 3rem;
    margin-top:10px;
    margin-bottom: 10px;
    color: #a2a2a2;
    left:50%;
}
p,ol{ 
    font-size: 1rem;
    margin-top: 40px;
    color: #8b8b8b;
    top: 40%;
    opacity: 1;
    animation: .3s swift-up ease-out forwards,
    .3s fade-in ease-out forwards;
}
ol li{
    padding-top: 10px;
}

/* Balcony fire safety section */
.img_steps{
    padding: 0;
}
.img_steps .images{
    margin: 0 auto;
    width: 1090px;/* Calculate the width and height of this <div> to center the position. */
    height: 660px;
}
.img_steps .images .mid{
    float: left;
    margin: 5px;
}
.img_steps .images .mid img{
    width: 350px;
    height: 320px;
}

/* https://youtu.be/yfg9ChTmuKM method: How to Create Image Hover Overlay Slide from Bottom to Top with HTML and CSS*/
.image{
    display: block;
    width: 100%;
    height: auto;
}
.img_steps .images .mid{
    position: relative;
}
.overlay{
    position:absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.75);
    overflow: hidden;
    width: 100%;
    height: 0;
    transition: .5s ease-out;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    font-size: 1.2vw;
    line-height: 1.5em;
}
.img_steps .images .mid:hover .overlay{
    height: 100%;
}

/* scroll-to-show animations */
.hidden{
    opacity: 0;
    transition: all 1.5s;
}
.show{
    opacity: 1;
    animation: expandY 0.8s linear;
    transition: transform 0.5s cubic-bezier(0.075, 0.82, 0.165, 1) ;
}
@keyframes expandY{
    0%
    {
        transform: scaleY(0.5);
    }
    80%
    {
        transform: scaleY(1.3);
    }
    100%
    {
        transform: scaleY(1);
    }
}

#ref{
    position: absolute;
    top: 88%;
    left: 50%;
    transform:translate(-50%, -50%);
    margin: 0;
    padding: 0;
    display: flex;
    bottom:0%;
}
#ref_pdf{
    position: absolute;
    top: 90%;
    left: 50%;
    transform:translate(-50%, -50%);
    margin: 0;
    padding: 0;
    display: flex;
    bottom:0%;
}
h3{
    position: absolute;
    top: 93%;
    left: 50%;
    transform:translate(-50%, -50%);
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    color: #9d9d9d;
    font-family:Arial, Helvetica, sans-serif;
    font-size: 1rem;
    letter-spacing:1px;
}
a{
    position: absolute;
    top: 95%;
    left: 50%;
    transform:translate(-50%, -50%);
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    color: #c00000;
    font-family:Arial, Helvetica, sans-serif;
    font-size: 1rem;
    letter-spacing:1px;
}

/* Problem: Show-some-text button only works when browsing first */
button{
    position: fixed;
    right: 0;
    top: 0;
    width: 150px;
    height: 20px;
}
:root{
    --col01: rgb(0,0,0);
    --col02: rgb(70, 70, 70);
    --col03: rgb(183, 183, 183);
    --col04: rgb(255, 255, 255);
    --border: solid 20px var(--col02);
  }
/* we can use the ::backdrop pseudo selecter on our dialog element to change the overlay colour */
#modalDialog::backdrop{
    background-color: rgba(0, 0, 0, 0.7);
  }
.citing{
    position:absolute;
    height: 150px;
    width: 100%;
  }
.citing a{
    position:absolute;
    list-style: none;
    color: #0036c0;
    font-family:Arial, Helvetica, sans-serif;
    font-size: 1rem;
    letter-spacing:1px;
    text-align: left;
}
#link1{
    top: 0;
}
#link2{
    top: 20%;
}
#link3{
    top: 40%;
}
#link4{
    top: 60%;
}
#link5{
    top: 80%;
}
