@font-face {
    font-family: 'Cy';
    src: url('fonts/cy.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Scandia';
    src: url('fonts/Scandia-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/lora.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Base Page Layout */

:root {
    --black: #24272a;
    --grey: #9daba9;
    --orange: #ee7623;
    --blue: #4197cb;
    font-family: "Lora", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
    font-size: 16px;
    font-variant-ligatures: no-contextual;
    line-height: 1.5;
    color: var(--black);
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-flow: column nowrap;
    margin: 0;
    min-width: 500px;
    max-width: 100%;
}

main {
    flex: 1 0 auto;
}

h1 {
    font-family: "Cy", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
    font-weight: bold;
    font-size: 3em;
    text-transform: uppercase;
    border-bottom: solid 2px;
}

h2,
h3,
h4 {
    font-family: "Scandia", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
    font-weight: bold;
}

a {
    text-decoration: none;
    color: var(--blue);

    h2 {
        color: var(--black);
    }
}

img {
    max-width: 100%;
}

/* Header */
header {
    top: 0;
    background: var(--black);
    color: var(--grey);
    padding: 0 10em;
    z-index: 99999;
}

#empty {
    width: 10em;
}

#logo {
    order: 0;

    img {
        height: 150px;
        transition: 200ms ease;
    }
}

#stickyHeader {
    width: 100%;
    display: inline-flex;
    justify-content: space-between;
}

header.scrolled {
    position: sticky;

    #logo {
        order: -1;

        img {
            height: 50px;
            transition: 200ms ease;
        }

        margin-left: 0;
    }
}

nav {
    padding-top: 20px;
    font-family: "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;

    a {
        margin: 0 5px;
        padding: 10px 4px;
        color: white;
        border-top: 1px solid;
    }

    a:hover {
        border-bottom: 1px solid;
    }
}

#blurb {
    width: 100%;
    background: var(--black);
    color: var(--grey);
    h2 {
        text-align: center;
        margin: 0;
        padding-bottom: 1ch;
    }
}

/* Footer */

footer {
    background-color: var(--black);
    width: 100%;
    margin: 40px 0 0;
    padding: 10px 0;
    color: white;
    flex-shrink: 0;

    p {
        text-align: center;
    }
}

/* Content */
main {
    padding: 0 1em;
    color: var(--black);
    display: flex;
    flex-flow: column nowrap;
    align-items: stretch;
    align-content: stretch;
    width: fit-content;
    margin: 0 auto;
    max-width: 75em;
}

.item {
    max-width: 30em;
    border-radius: 10px;

    img {
        object-fit: cover;
        height: 150px;
        width: 100%;
    }

    h1 {
        font-size: 1.6em;
    }

    h2 {
        text-align: unset;
        font-size: 1.2em;
    }
}

.item:hover {
    background-color: rgba(65, 151, 203, 0.1);
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 10px;
    justify-content: center;
    
    h1 {
        font-size: 1.5em;
    }

    h1, h2 {
        text-align: center;
    }

    p {
        text-align: justify;
    }
    
    img {
        object-fit: cover;
        height: 150px;
        width: 100%;
    }
    .item {
        margin: 0 auto;
        padding: 0.5em;
    }
}

section {
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

#map {
    height: 500px;
    width: 100%;
    margin: 0 auto;
}

#project-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 10px;
}

#project {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto auto;
    gap: 10px 30px;
    grid-template-areas:
        "heading sidebar"
        "content sidebar";
}

.short {
    grid-area: heading;
}

#sidebar {
    grid-area: sidebar;

    h3 {
        margin: 1em 0 0;
    }

    p {
        margin: 0;
    }

    #map {
        height: 350px;
        margin: 0;
        width: 100%;
    }
}

#content {
    grid-area: content;
}

@media screen and (max-width: 900px) {

    /* Header */
    header {
        padding: 0 1em;
        transition: 200ms ease;
    }

    #logo img {
        height: 100px;
    }

    #empty {
        display: none;
    }

    /* Content */
    .row {
        grid-template-columns: 1fr;
        margin: 0 20px;
    }

    #project-list {
        grid-template-columns: 1fr;
    }

    #project {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "heading"
            "content"
            "sidebar";
    }
}

@media screen and (min-width: 1600px) {
    #project-list {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Gallery */
.gallery-wrapper {
    position: relative;
    overflow: hidden;
}

.gallery-container {
    width: 100%;
    aspect-ratio: 16 / 10;
    display: flex;
    overflow: scroll;
    scroll-behavior: smooth;
    list-style: none;
    margin: 0;
    padding: 0;
    scrollbar-width: none;

    img {
        object-fit: cover;
        width: 95%;
        height: 100%;
        flex: 1 0 100%;
    }
}

.slide-arrow {
    position: absolute;
    display: flex;
    top: 0;
    bottom: 0;
    margin: auto;
    height: 4rem;
    background-color: white;
    border: none;
    width: 2rem;
    font-size: 3rem;
    padding: 0;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 100ms;
}

.slide-arrow:hover,
.slide-arrow:focus {
    opacity: 1;
}

#slide-arrow-prev {
    left: 0;
    padding-left: 0.25rem;
    border-radius: 0 2rem 2rem 0;
}

#slide-arrow-next {
    right: 0;
    padding-left: 0.75rem;
    border-radius: 2rem 0 0 2rem;
}

/* Contact Form */

#contact {
    label, input, textarea {
        width: 100%;
    }
    input, textarea {
        border: var(--grey) solid 1px;
        border-radius: 5px;
        padding: 10px;
    }
    button {
        border: var(--grey) solid 3px;
        background: none;
        padding: 10px;
        width: 100%;
    }
    button:hover {
        background: rgba(65, 151, 203, 0.1);
    }
}

.user-cannot-see {
    visibility: hidden;
    font-size: 0;
}