:root {
    --navback: #39313d;
    --headerback: #e5bace;
    --headerfront: #126e80;
    --headershadow: #870335;
    --heading: #592039;
    --background: #eef7f8;
    --linkcolor: #126e80;
    --navlinkhover: #e5bace;

    direction: rtl;
}

html, body {
    height: 100%;
    background: var(--background);
}

body {
    display: grid;
    grid-template-areas:
        'nav nav nav'
        'header header header'
        'gutterstart main gutterend'
        'footer footer footer';

    grid-template-rows: auto auto 1fr auto;
    grid-template-columns: auto 760px auto;
}

nav, footer {
    display: flex;
    background: var(--navback);
    font-size: 1.6rem;
    padding: 0.5rem 2rem;
}

nav {
    grid-area: nav;
}

nav, nav a, nav a:visited, footer, footer a, footer a:visited {
    color: #fff;
    text-decoration: none;
}

nav a:hover, footer a:hover {
    color: var(--navlinkhover);
    text-decoration: none;
}

header {
    background: var(--headerback);
    grid-area: header;
    border-bottom: 1px solid var(--headershadow);
    border-top: 1px solid var(--headershadow);
}

h1 {
    color: var(--headerfront);
    text-shadow: var(--headershadow) -2px 2px;
    text-align: center;
    font-size: 4rem;
    padding: 4rem 1rem;
    margin: 0;
}

main {
    grid-area: main;

    font-size: 1.4rem;
    line-height: 1.4em;
}

h2, h3, h4, h5, h6 {
    color: var(--heading);
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 2.5rem;
}

h4 {
    font-size: 2rem;
}

main a, main a:visited {
    text-decoration: none;
    color: var(--linkcolor);
    font-weight: 700;
}

main a:hover {
    text-decoration: underline;
}

footer {
    grid-area: footer;
    justify-content: space-between;
}

#copyright {
    direction: ltr;
}

@media (max-width: 800px) {
    body {
        grid-template-columns: 0.25rem auto 0.25rem;
    }

    footer {
        flex-direction: column;
    }

    #copyright {
        padding-top: 2rem;
        font-size: 0.8rem;
    }
}
