:root {
    --primary-color: #886e53;
    --menu-color: #a50404;
    --link-color: #0058b5;
    --accent-color: #2a6685;
}


* {
    box-sizing: border-box;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

body {
    background: linear-gradient(130deg, #fafafa, #fff);
    display: flex;
    flex-direction: column;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    margin: 0;
    min-height: 100vh;
    padding: 0;
}

main {
    line-height: 1.3;
    font-size: 1.2em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
}

nav {
    font-family: 'Libre Baskerville', serif;
    font-weight: 300;
    font-size: .9em;
}

h1 {
    color: #444;
    margin-bottom: 2em;
    position: relative;
}

h1 ~ * {
    animation: fadeInUp .8s ease-in-out;
}

@media (min-width: 768px) {
    h1::before {
        content: "";
        border-bottom: .05em solid var(--menu-color);
        border-left: .05em solid var(--menu-color);
        position: absolute;
        bottom: 0;
        left: -.3em;
        width: calc(100% + .62em);
        height: 40%;
    }

    h1::after {
        --height: 6em;
        content: "";
        border-right: .05em solid var(--menu-color);
        position: absolute;
        bottom: calc(var(--height) * -1);
        right: -.35em;
        height: var(--height);
    }
}

h2 {
    color: var(--primary-color);
}

header.main {
    background: #fff;
    box-shadow: 0 0 3em rgba(0, 0, 0, .1);
    color: var(--primary-color);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.5rem, 2vw, 1rem);
    min-height: 0;
}

header.main .wrapper {
    display: grid;
    column-gap: 2em;
    grid-template-areas:
        "title coins"
        "subtitle coins";
    grid-template-rows: auto 1fr;
    padding-block: 2em 0;
}

header.main .title {
    align-self: end;
    grid-area: title;
    font-size: 5em;
    font-weight: 700;
    text-shadow: 0 .1em .3em rgba(0, 0, 0, .1);
}

header.main .subtitle {
    align-self: start;
    color: #333;
    font-size: 1.5em;
    font-weight: 500;
    grid-area: subtitle;
    margin-bottom: 1em;
    margin-left: .8em;
}

header.main .coins {
    flex-shrink: 1;
    grid-area: coins;
    justify-self: end;
    position: relative;
}

header.main .coins img {
    width: 100%;
}

nav.main {
    margin-block: 3em;
}

nav.main a {
    color: var(--menu-color);
    position: relative;
    text-decoration: none;
}

nav.main a.active {
    cursor: default;
    text-shadow: 0 0 .4em rgba(0, 0, 0, .2);
}

nav.main a::before,
nav.main a::after {
    content: "";
    transition: width .5s ease-out,
    height .5s ease-out;
    width: 0;
    height: 0;
}


nav.main a:hover::before,
nav.main a.active::before {
    content: "";
    border-top: .1em solid var(--menu-color);
    border-left: .1em solid var(--menu-color);
    position: absolute;
    top: -.4em;
    left: -.6em;
    width: 60%;
    height: 40%;
}

nav.main a:hover::after,
nav.main a.active::after {
    content: "";
    border-bottom: .1em solid var(--menu-color);
    border-right: .1em solid var(--menu-color);
    position: absolute;
    bottom: -.4em;
    right: -.6em;
    width: 30%;
    height: 90%;
}

nav.main ::first-letter {
    font-size: 1.2em;
}

nav.main ol {
    display: flex;
    flex-wrap: wrap;
    font-size: 1.3em;
    gap: 2em;
    justify-content: space-around;
    margin: 0;
    padding: 0;
}

nav.main li {
    list-style: none;
    margin: 0;
    padding: 0;
}

main {
    margin-top: 6em;
}

footer.main {
    background: #6b1d1d;
    border-top: 3em solid var(--primary-color);
    color: #aaa;
    box-shadow: 0 0 3em rgba(0, 0, 0, .3);
    padding: 1em 0;
    z-index: 10;
}

footer.main a {
    color: inherit;
    text-decoration: underline;
}

nav.footer ol {
    display: flex;
    font-size: 1.4em;
    gap: 2em;
    justify-content: center;
    list-style: none;
    margin: 2em 0;
    padding: 0;
}

nav.footer li {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav.footer a {
    /*color: var(--menu-color);*/
    text-decoration: none;
}

nav.footer a:hover {
    text-decoration: underline;
}

footer.main .copy {
    text-align: center;
    font-size: .9em;
    font-weight: 400;
}

footer.main .copy > * {
    margin: .5em 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(4em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

div.page {
    flex-grow: 1;
    width: 100%;
    padding-bottom: 5em;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1em;
}
