*, *::before, *::after{
    box-sizing: border-box;
}

body{
    margin: 0;
    line-height: 1.6;
    color: #404040;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;;
}

img{
  max-width: 100%;
}

/* ==================
    Typography
===================== */
h1, h2, strong{
    font-weight: 700;
}

.accent-color{
    color: #FFE600;
}

.hero-title {
    font-size: 1.5rem;
    line-height: 1.4;
}
.page-title,
.subtitle-template{
    grid-column: 2 / -2;
}

.page-title{
    font-size: 3rem;
    color: #000;
    justify-self: center;
}

.page-title::after{
    content: "";
    display: block;
    width: 100%;
    height: 35px;
    background:#FFE600 ;
    margin-top: -40px;
    margin-left: 15px;

}

.subtitle{
    font-size: 1.125rem;
    color: #fff;
}

.section-title{
    font-size: 1.125rem;
    color: #000;
    margin-top: 2em;
}

.section-title::after{
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: 10px 0 0 ;
    background: #FFE600;
}

.section-title-center::after{
    margin: 10px auto;
}

a{
    color: black;
}

/* buttons */
.btn{
    text-decoration: none;
    padding: .5em 1.75em;
    font-weight: 700;
}

.btn-primary{
    color:#000;
    background: #FFE600;
    justify-self: start;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #ffc400;
}

.btn-form{
    justify-self: right;
    border: none;
}

/* ==================
    general layout
===================== */
.main-grid{
    display: grid;
    grid-template-columns: minmax(1em, 1fr) minmax(0px, 500px) minmax(1em, 1fr);
    grid-column-gap: 2em;
}  

@media (min-width: 740px) {
    .main-grid{
        grid-template-columns: minmax(1em, 1fr) repeat(3,minmax(150px, 320px)) minmax(1em, 1fr);
        grid-column-gap: 4em;
    }
}

/* nav */
.header{
    background: #000;
    width: 100%;

}

.header-content{
    display: flex;
    grid-column: 2 / -2;
}

.header-link{
    background-color:#FFE600;
    padding-top: 2em;
}

.header-home{
    position: absolute;
    background: transparent;
    width: 100%;
}

.nav{
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 100%;
    background-color: #000;
    transform: translateX(0);
    transition: transform 500ms ease-in-out;

}

.nav-open{
    transform: translateX(-100%);
}

.nav-list{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 0;
    margin: 0;
    height: 100%;
    list-style: none;
}

.nav-link{
    color: #FFF;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
}

.nav-link:hover,
.nav-link:focus {
    color: #FFE600;
}

.close-nav, .open-nav{
    position: absolute;
    padding: .5em;
    font-size: 3rem;
    font-weight: 700;
    background:  0;
    border: 0;
    color: #FFE600;
    cursor: pointer;
}

.open-nav{
    font-size: 2rem;
    right:0;
    
}

.current{
    border-bottom: 2px solid #FFE600;
}

@media (min-width: 740px) {
    .open-nav,
    .close-nav{
        display: none;
    }
    
    .nav{
        position: initial;
    }

    .nav-list{
        flex-direction: row;
        justify-content: flex-start;

    }

    .list-item{
        margin-left: 2em;
    }

    .nav-link{
        font-size: 1rem;
    }

    .header-home .nav{
        background: transparent;
    }
}

/* footer */
.footer{
    background: #EbEbEb;
    padding: 4em 0;
    text-align: center;
    grid-template-areas: 
        ". social ."
        ". main .";
}

.footer-main,
.social-list{
    grid-column: 2 / -2;
}

.social-list{
    grid-area: social;
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0 0 2em;

}

.social-link{
    color: #000;
    font-size: 1.75rem;
    margin: 0 .5em;
}

.social-link:hover{
    color: #777;
}

.footer-main,
.footer-logo,
.footer-fineprint{
    opacity: .4;
}

.footer-main{
    grid-area: main;
}

.footer-fineprint{
    font-size: .85rem;
    margin-top: 4em;
}

@media (min-width: 740px) {
    .footer {
        grid-template-areas: 
            ". main main social .";
    }
    .footer-main{
        text-align: left;
    }

    .social-list{
        justify-self: right;
    }

}

/* ==================
    Hero section
===================== */

.hero{
    background: #000000 url(../img/hero-bg.jpg) no-repeat; 
    background-size: cover;
    background-position: center;
    color: #fff;
    object-fit: cover;
    padding: 8em 0 4em;
}

.hero > *{
    grid-column: 2 / -2;
}

@media (min-width: 400px) {
    .hero > *{
        margin-right: 20%;
    }
}

@media (min-width: 740px) {

    .hero{
        padding: 10em 0 6em;
    }

    .hero > *{
        grid-column: 2 / span 2;
    }
}

/* ==================
    Info section
===================== */
.info{
    padding: 4em 0;
}

.col{
    grid-column: 2 / -2;
    text-align: center;
}

@media (min-width: 740px) {
    .col{
        grid-column: span 1;
    }

    .col:first-child{
        grid-column: 2 / span 1; 
    }
}

/* ==================
    template page 
===================== */

.main-template{
    padding: 4em 0;
}


.main-template > *{
    grid-column: 2 / -2;
}

.page-title{
    font-size: 3em;
    margin: 0;
    text-align: center;
}

.subtitle-template{
    text-align: center;
    margin: 2em auto 5em;
    color: #000;
}

.section-title:first-child{
    margin-top: 0;
}

.main-image{
    margin: 0 auto 2em;
    box-shadow: .5em .5em 0 black, 1em 1em 0 #FFE600;
}

@media (min-width: 740px) {
    .main-image,
    .secondary-text{
        grid-column: 2;
    }

    .subtitle-template{
        width: 70%;
        justify-self: center;
    }

    .main-text{
        grid-column: 3 / span 2;
        grid-row: span 2;
    }
    .secondary-text{
        order: 2;
    }

          
}

/* ==================
    form 
===================== */
.contact-form{
    display: grid;
}

label{
    font-weight: 700;
}

input,
textarea {
    margin-bottom: .75em;
    padding: .4em;
    font-family: inherit;
}

textarea{
    resize: none;
    height: 100px;
}

@media (min-width: 740px){
    .contact-form{
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1em;
        grid-auto-flow: dense;
        
    }

    .fname-label,
    .fname-input{
        grid-column: 1;
    }

    .lname-label,
    .lname-input{
        grid-column: 2;
    }

    .message-label,
    .message-textarea{
        grid-column: span 2;
    }

    .btn-form{
        grid-column: 2;
    }

}