/* Hero Section */
.hero{
    position: relative;
    height: 50svh;
    width: 100%;
}

.hero img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1{
    position: absolute;
    bottom: 1em;
    left: 0.5em;
    color: var(--white);
    text-shadow: 1px 1px var(--black);
    margin: 0;
}

/* Header Section */
.header{
    width: min(1100px, 90%);
    text-align: center;
    text-wrap: balance;
}

.header>p{
    font-size: 1.2em;
    font-weight: 300;
    font-style: italic;
}

/* Article */
[id]{
    scroll-margin-top: 18rem;
}

section.article{
    margin-inline: 5%;
}

section.article>h3,
section.article>h4{
    text-transform: none;
}

section.article>h3>img{
    height: 3rem;
    padding: 0.5em 1em;
}

.timeline{
    position: relative;
    width: 90vw;
    text-align: center;
    margin: 3em auto;
    z-index: -1;
}

.timeline::after{
    content: "";
    position: absolute;
    top: 0;
    left: calc(5vw - 1.5px);
    height: 100%;
    width: 3px;
    background-color: var(--blue);
}

.timeline>h4{
    position: relative;
    box-sizing: border-box;
    justify-self: right;
    width: 60vw;
    background-color: var(--grey);
    padding: 1em 0;
    margin: 1em 0;
}

.timeline>h4>.line{
    content: "";
    position: absolute;
    top: calc(50% - 1.5px);
    left: -25vw;
    height: 3px;
    width: 0;
    background-color: var(--blue);
    transition: 1s;
}

.timeline>h4>.line.show{
    width: 25vw;
}

.timeline>h4>.line::after{
    content: "";
    position: absolute;
    left: -8.5px;
    bottom: -8.5px;
    height: 20px;
    width: 20px;
    background-color: var(--blue);
}

/* Bar */
.bar{
    width: 100%;
    aspect-ratio: 3/2;
}

/* Contact From */
.contact-form{
    margin-inline: 5%;
}

.contact-form form{
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
}

.contact-form form div{
    position: relative;
}

.contact-form input, 
.contact-form textarea{
    box-sizing: border-box;
    width: 100%;
    font-family: "montserrat", sans-serif;
        font-weight: 500;
        font-style: normal;
    font-size: 1.2em;
    outline: none;
    background-color: transparent;
    color: var(--black);
    border: 3px solid var(--shadow-2);
    padding: 0.5em 1em;
    transition: all 100ms;
}

div.field:first-of-type>input{
    border-radius: 1em 1em 0 0;
}

.contact-form textarea{
    height: 12em;
    resize: none;
    border-radius: 0 0 1em 1em;
}

.contact-form textarea:placeholder-shown{
    font-family: "montserrat", sans-serif;
        font-weight: 600;
        font-style: normal;
    font-size: 1.2em;
}

.contact-form textarea:not(:placeholder-shown){
    border: 3px solid var(--blue);
    box-shadow: 0 5px 10px var(--blue);
}

.contact-form label{
    position: absolute;
    top: 50%;
    left: 1.5em;
    pointer-events: none;
    font-family: "montserrat", sans-serif;
        font-weight: 600;
        font-style: normal;
    font-size: 1.2em;
    color: var(--shadow-2);
    transform: translateY(-50%);
    transition: all 300ms ease-in-out;
}

.contact-form input:focus,
.contact-form input:valid,
.contact-form textarea:focus{
    border: 3px solid var(--blue);
}

.contact-form input:focus + label,
.contact-form input:valid + label,
.contact-form textarea:focus + label{
    top: -0.1em;
    left: 1em;
    font-size: 1em;
    padding: 0 0.5em;
    color: var(--blue);
    background: var(--white);
}

@media (min-width: 761px){
    /* Hero Section */
    .hero{
        height: 70svh;
    }

    .hero h1{
        left: 1em;
    }

    /* Article */
    [id]{
        scroll-margin-top: 17rem;
    }

    section.article>h3>img{
        height: 4rem;
    }

    .timeline::after{
        left: calc(50% - 1.5px);
    }

    .timeline>h4{
        justify-self: auto;
        width: 30vw;
        padding: 1em 2em;
        margin: 0;
    }

    .timeline>h4:nth-child(even){
        justify-self: end;
    }

    .timeline>h4>.line{
        left: unset;
        right: calc(1.5px - 15vw);
    }

    .timeline>h4:nth-child(even)>.line{
        left: calc(1.5px - 15vw);
        right: unset;
    }

    .timeline>h4>.line.show{
        width: calc(15vw - 1.5px);
    }

    .timeline>h4>.line::after{
        left: unset;
        right: -11.5px;
    }

    .timeline>h4:nth-child(even)>.line::after{
        left: -11.5px;
        right: unset;
    }

    /* Bar */
    .bar{
        aspect-ratio: 2/1;
    }

    /* Contact From */

    .contact-form form{
        grid-template-columns: 1fr 1fr;
    }

    div.field:first-of-type>input{
        border-radius: 1em 0 0 0;
    }

    div.field:nth-of-type(2)>input{
        border-radius: 0 1em 0 0;
    }

    div.field:nth-of-type(3){
        grid-column: span 2;
    }
}

@media (min-width: 1166px){
    /* Hero Section */
    .hero{
        height: 80svh;
    }

    .hero h1{
        left: 2em;
    }

    /* Article */
    [id]{
        scroll-margin-top: calc(98px + 1rem);
    }

    section.article{
        max-width: 1250px;
        padding-inline: 1em;
        margin-inline: auto;
    }

    section.article>h3>img{
        height: 2em;
        padding: 0;
    }

    .timeline{
        display: flex;
        height: 18.4em;
        width: 90%;
    }

    .timeline::after{
        top: calc(50% - 1.5px);
        left: 0;
        height: 3px;
        width: 100%;
    }

    .timeline>h4{
        flex: 1 1 10%;
        font-size: 100%;
        line-height: 1.2em;
        height: 4.2em;
        margin: 0 -3.25%;
    }

    .timeline>h4:nth-child(even){
        align-self: flex-end;
    }

    .timeline>h4>.line{
        top: unset;
        left: calc(50% - 1.5px);
        bottom: -5em;
        height: 0;
    }

    .timeline>h4:nth-child(even)>.line{
        top: -5em;
        left: calc(50% - 1.5px);
        bottom: unset;
    }

    .timeline>h4>.line.show{
        height: 5em;
        width: 3px;
    }

    .timeline>h4>.line::after{
        top: unset;
        bottom: -9.5px;
        right: -9.5px;
    }

    .timeline>h4:nth-child(even)>.line::after{
        top: -9.5px;
        bottom: unset;
        left: -9.5px;
    }

    /* Bar */
    .bar{
        aspect-ratio: 16/6;
    }

    /* Contact From */
    .contact-form{
        max-width: 1250px;
        padding-inline: 1em;
        margin-inline: auto;
    }
}