/* css reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    hanging-punctuation: first allow-end last;
}

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* global variables */
:root {
    --accent: rgb(81, 89, 151);
    --highlight: rgb(253, 194, 105);
    --text: rgb(51,51,51);
    --shade: rgb(240, 240, 240);
}

/* general formatting & structure */
body {
    font-family: 'Sen', sans-serif;
    font-size: 18px;
    font-weight: 400;
    font-optical-sizing: auto;
    font-style: normal;
    line-height: 28px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

main {
    flex: 1;
    align-self: center;
    width: 100%;
    max-width: 1200px;
}

a {
    color: var(--accent);
    text-decoration: 2px underline;
    text-underline-offset: 5px;
}

a:hover {
    text-decoration: 2px underline var(--highlight);
}

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

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 3% 10%;

    .logo {
        width: 40%;

        img {
            max-width: 500px;
        }
    }

    nav {
        font-size: 1.5rem;
        width: 30%;
        text-align: right;

        a {
            text-decoration: none;
        }
    }

    @media screen and (max-width: 500px) {
        nav {
            font-size: 1rem;
        }
    }
}

footer {
    background-color: var(--shade);
    padding: 3% 10%;
    text-align: center;

    .copyright {
        font-size: .9rem;
    }
}

/* homepage */
#landing {
    display: flex;
    margin-bottom: 2%;
    background-position: center;
    background-color: rgba(0,0,0,.35);
    background-blend-mode: overlay;
    padding: 4% 2%;
    border-radius: 10px;
    color: #fff;

    a {
        color: var(--highlight);
    }

    .art {
        flex-basis: 25%;
        margin-right: 2%;

        img {
            width: 150px;
            height: fit-content;
            border-radius: 10px;
            box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }
    }

    .info {
        font-size: .95rem;
        line-height: 1.3;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.5);

        p:not(:last-of-type) {
            margin-bottom: 1.5%;
        }
    }

    @media screen and (max-width: 600px) {
        .art {
          display: none;
        }

        .info {
            flex-basis: 100%;
        }
    }
}

.episodesBook {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
    margin-top: 2%;

    li {
        width: 32.5%;
        min-height: 150px;
        background-size: cover;
        background-position: center center;
        border-radius: 10px;
        transition: box-shadow .25s ease-in-out;
        padding: 20px;
        font-size: 1.5rem;
        font-weight: 900;
        text-transform: uppercase;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.6);

        a {
            text-decoration: none;
            color: #fff;
            display: flex;
            align-items: flex-end;
            justify-content: flex-start;
            width: 100%;
            height: 100%;
        }
    }

    li:hover {
        box-shadow: inset 0 0 0 2000px rgba(81, 89, 151,.5);
    }

    @media screen and (max-width: 900px) {
        li {
            width: 100%;
            margin-bottom: 1%;
        }
    }
}

/* book pages */
.chapters {
    list-style-type: none;
    display: flex;
    gap: 1%;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    margin-top: 2%;

    li {
        box-sizing: border-box;
        width: calc(50% - .5%);
        margin-bottom: 1%;
        min-height: 150px;
        background-size: cover;
        background-position: center center;
        background-color: rgba(0,0,0,.35);
        background-blend-mode: overlay;
        border-radius: 10px;
        transition: box-shadow .25s ease-in-out;
        padding: 20px;
        font-size: 1.5rem;
        font-weight: 900;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.6);

        a {
            text-decoration: none;
            color: #fff;
            display: flex;
            justify-content: flex-end;
            flex-direction: column;
            width: 100%;
            height: 100%;

            time {
                font-weight: 700;
                font-size: .9rem;
            }
        }
    }

    li:hover {
        box-shadow: inset 0 0 0 2000px rgba(81, 89, 151,.5);
    }

    @media screen and (max-width: 600px) {
        li {
            width: 100%;
        }
    }
}

/* episode page */
#landing.episode {
    flex-direction: column;
    justify-content: flex-end;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    min-height: 250px;
    padding: 2%;

    h1 {
        font-weight: 900;
        color: #fff;
        font-size: 2.5rem;
        margin-bottom: 1%;
        line-height: 1;
    }

    ul {
        list-style-type: none;
        display: flex;
        gap: 1%;
        font-size: .9rem;
        margin-top: 1%;
        margin-left: 0;
        margin-bottom: 0;

        li {
            background-color: rgba(81, 89, 151,.5);
            box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            border-radius: 10px;
            padding: 1%;
            display: flex;
            align-items: center;
            margin-bottom: 0;

            a {
                display: flex;
                align-items: center;
                text-decoration: none;
                color: #fff;
            }

            svg {
                width: 16px;
                box-sizing: border-box;
                margin-right: 5px;
            }
        }
    }

    @media screen and (max-width: 550px) {
        ul {
            flex-wrap: wrap;

            li {
                margin-bottom: 1%;
                width: 49%;
            }
        }
    }
}

audio {
    width: 100%;
    filter: invert(1) hue-rotate(180deg);
    margin-bottom: 1%;
}

.chapterArt {
    width: 150px;
    display: block;
    margin: 2.5% auto;
}

.layouts-episode-njk {
    p {
        margin-bottom: 1.5%;
    }

    ul, ol {
        margin-left: 30px;

        li {
            margin-bottom: 1.5%;
        }

        li::marker {
            color: var(--accent);
        }
    }
}

.jump {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2%;

    a {
        border: 1px solid var(--accent);
        border-radius: 10px;
        padding: 2% 4%;
        text-decoration: none;
    }

    a:hover {
        background-color: rgba(81, 89, 151,.05);
    }

    .next, .prev {
        display: flex;
        gap: 5px;
    }

    @media screen and (max-width: 550px) {
        .next, .prev {
            width: 49%;
        }
    }
}