@keyframes bannerTransition {
    0% {
        height: 100vh;
        max-height: 100vh;
    }

    80% {
        max-height: 100vh;
    }

    100% {
        max-height: 50vh;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0.1;
    }

    100% {
        opacity: 1;
    }
}


@keyframes waggle {
    0% {
        transform: none;
    }

    10% {
        transform: rotateZ(-20deg) scale(1.2);
    }

    12% {
        transform: rotateZ(25deg) scale(1.2);
    }

    13.5% {
        transform: rotateZ(-15deg) scale(1.2);
    }

    15% {
        transform: rotateZ(15deg) scale(1.2);
    }

    16.5% {
        transform: rotateZ(-12deg) scale(1.2);
    }

    17% {
        transform: rotateZ(0) scale(1.2);
    }

    20% {
        transform: rotateZ(0) scale(1);
    }
}


::selection {
    color: white;
    background-color: black;
}

.invert ::selection {
    color: black;
    background-color: white;
}


* {
    box-sizing: border-box;
}

.invert {
    background-color: black;
    color: white;
}

/* Fancy flash effect on load */
.banner,
section,
.contact {
    animation: fadeIn .5s;
}

h1,
h2,
h3,
h4,
h5,
h6,
h7,
p,
span,
svg {
    animation: fadeIn 1.5s;
}

h1,
h2,
h3 {
    color: black;
    background-color: white;
}

body {
    font-family: 'Work Sans', sans-serif;
}

.topbar {
    color: black;
    padding: 0 50px;
    font-weight: bold;
    font-size: 2.5em;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: calc(-1em);
    position: relative;
    z-index: 999;
}

/* Invert text colours */
.topbar .brand span {
    display: block;
    position: relative;
    transition: all 0.5s ease;
}

.topbar .brand:hover span {
    transform: translateY(1em);
    color: white;
    transition: all 0.5s ease;
}

.topbar .brand:hover span:nth-child(2) {
    transform: translateY(-1em);
    color: black;
}

.topbar .brand span:nth-child(2) {
    color: white;
}

/* Waggle resume link */
.idea {
    margin-top: -5px;
    animation: waggle 5s 3s infinite forwards ease-out;
}

.idea span {
    font-weight: normal;
    font-size: .5em;
    display: inline-block;
    border: 2px black solid;
    text-decoration: none;
    padding: 2px;
    background-color: white;
}

.idea span a {
    text-decoration: none;
}

.container {
    padding: 0;
    max-width: 1800px;
    margin: auto;
}

/* Animation banner to comfortable height */
.banner {
    height: calc(100vh - 5em);
    max-height: 50vh;
    position: relative;
    overflow: hidden;
    animation: fadeIn .5s, cubic-bezier(0.5, 0, 0.75, 0) bannerTransition 2s;
}

.banner h3 {
    padding: 8px;
}

.banner-backdrop {
    padding: 30px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 2;
    position: relative;
}

.banner .video-container {
    height: 100%;
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.banner video {
    min-height: 100%;
    min-width: 100%;
}

h1 {
    font-size: 3em;
    font-weight: bold;
    margin: .5em 0;
}

h2 {
    font-size: 3em;
    font-weight: bold;
    margin: .5em 0;
}

h3 {
    font-size: 2em;
    font-weight: bold;
}

h4 {
    font-size: 1.4em;
    margin: .5em 0;
}

strong {
    font-weight: bold;
}

section {
    margin: .5em 0;
    padding: 1em;
    text-align: center;
}

section {
    width: 100%;
}

.description {
    max-width: 750px;
}

.item-grid {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.item-grid .row {
    display: flex;
    flex-direction: column;
    text-align: center;
    min-height: 300px;
    padding: 10px 0 10px 10px;
    border-left: 3px solid #000;
    margin: 10px 0;
}


.item-grid .row .thumb {
    flex: 1;
    text-align: center;
}

.thumb h3 {
    position: sticky;
    top: 20px;   
}
.item-grid .row .description {
    flex: 2;
    padding: 0 10px 10px 10px;
}

.icon-group {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
}

.icon-group svg {
    width: 25%;
    min-width: 100px;
    margin: 10px;
}

a {
    color: #000;
    font-weight: bold;
    text-decoration: underline;
}

.contact {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contact form {
    width: 100%;
    max-width: 600px;
    max-height: 1000vh;
    transition: all .5s ease;
}

.contact.submitted form {
    max-height: 0px;
    overflow: hidden;
}

.contact .sentInfo {
    max-height: 0;
    transition: all 2s ease;
    overflow: hidden;
}

.contact.submitted .sentInfo {
    max-height: 1800px;
}

.field {
    position: relative;
    width: 100%;
}

.field label {
    position: absolute;
    top: .5em;
    left: 0;
    width: 100%;
    font-size: 1.2em;
    color: rgba(255, 255, 255, .5);
    transition: all 0.5s ease;
    pointer-events: none;
    text-align: left;
}

.field textarea,
.field input {
    background-color: transparent;
    z-index: 99;
    color: rgba(255, 255, 255, 0.7);
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 1.2em;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: none;
    transition: color 0.5s ease, border 0.5s ease;
    outline: none;
}

input:focus,
textarea:focus {
    border-bottom: 1px solid rgba(255, 255, 255, 1);
    color: #fff;
}

.field textarea {
    height: 200px;
    font-family: 'Work Sans', sans-serif;
}

.field input:focus~label,
.field textarea:focus~label,
.field input:valid~label,
.field textarea:valid~label {
    color: rgba(255, 255, 255, 1);
    transform: translateY(-1.2em);
    font-size: 1em;
}

.send-email {
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    border: 1px solid #fff;
    padding: 10px;
    transition: all 0.5s ease;
    cursor: pointer;
}

.send-email:hover {
    color: black;
    background-color: white;
    border-color: rgba(255, 255, 255, .5);
}

b {
    font-weight: bold;
}

footer {
    text-align: center;
    padding-bottom: 20px;
}

p,
h4 {
    line-height: 1.5;
}

b {
    font-weight: bold;
}

@media (min-width: 768px) {
    .container {
        padding: 45px 75px;
    }

    section {
        margin: 1.5em 0;
        padding: 1.5em 3em;
        text-align: left;
    }

    .idea span {
        display: inline;
    }

    h1 {
        font-size: 4em;
        font-weight: bold;
        margin: .5em 0;
    }

    h2 {
        font-size: 5.5em;
        font-weight: bold;
        margin: .5em 0;
    }

    h3 {
        font-size: 4em;
        font-weight: bold;
    }

    h3 {
        font-size: 4em;
        font-weight: bold;
    }

    section {
        width: 80%;
    }

    .item-grid .row {
        flex-direction: row;
        text-align: left;
    }

    .item-grid {
        padding: 80px;
    }
}
