* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    font-family: 'Abril Fatface', serif;
}

html {
    background: #67004e;
}

h1, h2, h3, nav, figcaption, .title {
    font-family: 'Abril Fatface', serif;
}

h2 span {
    display: inline-block;
    transform: scaleY(1.2);
}

.page {
    max-width: 1260px;
    margin: 0 auto;
    overflow: hidden;
}

header {
    display: flex;
    padding: .75rem 1.5rem;
    align-items: center;
    background: white;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

header h1 {
    margin: 0 auto 0 0;
    transform: none;
}

header h1 a {
    text-decoration: none;
}

header h1 svg {
    height: 5rem;
    margin: 0;
}

header nav {
    margin: 0 1rem 0 auto
}

header ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

header li {
    font-size: 1.2em;
    margin-left: 1.5rem;
}

header li a {
    display: flex;
    place-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

header li a:hover {
    border-bottom: 2px solid black;
}

header li a:active {
    transform: scale(.9);
}

article {
    scroll-padding: 1rem;
}


article h2 svg {
    height: 4rem;
    width: auto;
    margin-bottom: -.75rem;
}

#form-success {
    padding: 1rem;
    background-color: #FFF;
}

#form-success p {
    color: #000;
    text-shadow: none;
}


.grid {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax(320px, 1fr));
    grid-auto-rows: minmax(auto, 360px);
    margin: 0;
}

.grid-item {
    position: relative;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.75);
    overflow: hidden;
}

.grid-item.services-heading {
    grid-row: span 2;
}

.portfolio-heading, .contact-heading {
    position: relative;
    z-index: 2;
    background: white;
    text-align: center;
    font-size: 3rem;
    margin: 0;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.grid-item figure {
    margin: 0;
    width: 100%;
    height: 100%;
}

.grid-item img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: all .8s ease-out;
}

.grid-item figcaption {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 1rem;
    font-size: 1.5rem;
    text-align: right;
    background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
}

.grid-item h2 {
    position: absolute;
    top: 0;
    left: 1rem;
    z-index: 2;
    font-size: 3rem;
}

.grid-item:hover img {
    transform: scale(1.02);
}

.contact-form {
    background: url("images/confetti.jpg");
    background-size: cover;
    padding: 2rem;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

form {
    max-width: 800px;
    margin: 0 auto;
}

label {
    display: flex;
    flex-direction: column;
    margin-bottom: 1em;
}

label, p {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.65);
}

input, textarea {
    margin-top: .5em;
    padding: .625em;
    border: 1px solid gray;
    font-size: 1em;
    border-radius: 2px;
}

input:focus {
    border: 1px solid red;
}

input:focus:valid {
    border: 1px solid seagreen;
}

.hp {display: none;}

form > button {
    font-family: 'Abril Fatface', serif;
    font-size: 1em;
    margin-top: 1.25em;
    padding: .625em;
    background: #67004E;
    color: white;
    border: 2px solid #67004E;
    border-radius: 2px;
    max-width: 120px;
    height: 3.25rem;
}

form > button:hover {
    background: white;
    color: #67004E;
}

footer {
    text-align: center;
    color: white;
    padding: .75rem 0;
}

@media screen and (max-width: 1260px) {
    .contact-form {
        border-radius: 0;
    }

    footer {
        background-color: #67004e;
    }
}

@media screen and (max-width: 639px) {
    .grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(auto, 240px);
    }

    .grid-item.services-heading {
        grid-row: span 1;
    }

    header {
        padding: .5rem 1rem 0;
    }


    header ul {
        flex-direction: column;
        margin: 0 0 .2em;
        align-items: flex-end;
    }
}

@media screen and (max-width: 400px) {

    header h1 svg {
        height: 3.25rem;
    }

    header li {
        font-size: .825em;
        margin-left: 0;
    }

    header li a:hover {
        border-bottom: 2px solid transparent;
    }

}
