:root {
    --heading-col: #E9AF6E;
    --page-bg-col: #FFFAF2;
    --section-bg-col: #391F0D;
}

@keyframes rotate180 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(180deg);
    }
}

@keyframes rotate180rev {
    from {
        transform: rotate(180deg);
    }

    to {
        transform: rotate(0deg);
    }
}

body {
    background-color: #FFFAF2;
    line-height: 1.5rem;
}

p,
a,
figcaption {
    font-family: "Faculty Glyphic", sans-serif;
    font-size: 1rem;
}

.left-offset {
    padding-left: 2rem;
}

h2 {
    font-family: "Cormorant SC", serif;
    font-weight: 500;
    font-style: normal;
}

h3 {
    font-family: "EB Garamond", serif;
}

img {
    height: 263px;
    width: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    box-shadow: 0px 4px 2px rgba(0, 0, 0, .25);
}

.section-div-line {
    width: 100%;
    margin-top: 4rem;
}

.section-div-line svg {
    width: 50%;
    height: auto;
    margin: 0 auto;
    fill: var(--heading-col);
}

.section-diamond {
    width: 100%;
    fill: var(--heading-col);
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.section-diamond svg {
    width: 20px;
    height: fit-content;
}

.visually-hidden {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: 0;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.container {
    width: 90%;
    margin: 0 5%;
}

.hero {
    background-image: url(/img/manor-in-green-field.webp);
    background-size: cover;
    background-position: center;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

.hero-content {
    width: 100%;
    height: 100%;
    backdrop-filter: grayscale(80%) contrast(80%) saturate(40%) brightness(70%);
    background: linear-gradient(rgba(102, 102, 102, 0), rgba(18, 10, 4, 0.8));
}

.nav-toggle,
.side-nav-toggle {
    cursor: pointer;
    background: none;
    border: none;
}

.nav-toggle svg {
    filter: drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.5));
}


.header-nav {
    padding-top: 1rem;
    transition: background-color 0.2s ease 0.3s;
}

.header-nav>div {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 5% 1rem 5%;
    z-index: 1;
    align-items: center;
}

.header-nav>div>a {
    font-family: "Lobster", sans-serif;
    font-size: 1.44rem;
    text-decoration: none;
    color: var(--heading-col);
    text-shadow: 0 1px black;
}

.popup ul {
    height: min-content;
}

.popup {
    position: absolute;
    top: max-content;
    left: 0;
    width: 100%;
    background-color: inherit;
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #391F0D;
    background-image: linear-gradient(to right, rgba(150, 68, 12, 0.4) 0%, rgba(57, 31, 13, 0.4) 100%);

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s linear;
    text-align: center;
}

.popup.show-nav {
    max-height: 400px;
}

.popup li:last-of-type {
    margin-bottom: 2rem;
}

.popup a {
    font-family: 'EB Garamond', serif;
    font-size: 1.44rem;
    text-decoration: underline dashed;
    text-underline-offset: 1.25rem;
    text-decoration-thickness: 1px;
    color: var(--heading-col);
    display: block;
    width: 100%;
    height: 100%;
    padding: 1.1rem 0 1rem 0;
    transition: background-color 0.1s ease-in-out, color 0.2s ease-in-out;
}
@media(hover: hover) {
    .popup a:hover {
        background-color: var(--heading-col);
        color: var(--section-bg-col);
        text-decoration: none;
    }
}

.header-nav.show-nav {
    background-color: #391F0D;
    background-image: linear-gradient(to right, rgba(150, 68, 12, 0.4) 0%, rgba(57, 31, 13, 0.4) 100%);
    transition: background-color 0.1s ease-in-out, color 0.2s ease-in-out;
}

.hero-content .container {
    height: 80%;
    display: flex;
    flex-direction: column-reverse;
    padding-bottom: 2rem;
}

.hero-content h2 {
    color: var(--heading-col);
    font-weight: 500;
    font-size: 2.986rem;
    line-height: 3rem;
    text-align: center;
}

.hero-content p {
    margin-top: 0.5rem;
    color: var(--heading-col);
    text-align: center;
}

.hero-content>.container a {
    display: block;
    background-color: #41483C;
    color: #D3D2CE;
    width: max-content;
    text-decoration: none;
    padding: 0.5rem 2rem;
    margin: 0 auto;
    text-align: center;
    border-radius: 10px;
    margin-top: 3rem;
    box-shadow: inset 0 2px rgba(158, 175, 146, 0.3), 0 1px black;
    transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
}

@media(hover: hover) {
    .hero-content>.container a:hover {
        background-color: var(--heading-col);
        color: var(--section-bg-col);
    }
}

.side-nav {
    position: fixed;
    width: 100vw;
    left: 0;
    bottom: -100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--heading-col);
    transition: bottom 0.2s ease;
    z-index: 1;
}

.side-nav.active {
    bottom: 0;
}

.side-nav h2 {
    margin: 2rem 0 1rem 0;
    text-align: center;
    color: var(--page-bg-col);
}

.side-nav>div {
    margin: 0 auto;
    width: 100%;
    background-color: var(--section-bg-col);

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s linear;
}

.side-nav>div.show-nav {
    max-height: 350px;
}

.side-nav button {
    background-color: var(--section-bg-col);
    color: var(--heading-col);
    width: 40%;
    border-radius: 10px 10px 0 0;
}

.side-nav button svg {
    width: 40px;
    margin: 0 auto;
}

.side-nav button.been-activated svg {
    animation: rotate180rev 0.5s forwards;
}

.side-nav button.show-nav svg {
    animation: rotate180 0.5s forwards;
}

.side-nav ul {
    margin: 0 auto;
    padding: 0;
    list-style: none;
    padding-bottom: 1rem;
}

.side-nav a {
    padding: 0.8rem 0;
    display: block;
    text-decoration: none;
    color: var(--heading-col);
    font-family: 'EB Garamond', serif;
    font-size: 1.44rem;
    transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
}

@media(hover: hover) {
    .side-nav a:hover {
        background-color: var(--heading-col);
        color: var(--section-bg-col);
    }
}

.side-nav a div {
    width: 50%;
    margin: 0 auto;
}

article h2 {
    font-size: 2.488rem;
    text-align: center;
    margin: 3.5rem 0;
    color: var(--section-bg-col);
    line-height: 3rem;
}

article h3 {
    font-family: 'EB Garamond', serif;
    font-weight: 300;
    font-size: 1.728rem;
    text-align: center;
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
}

article p {
    margin-bottom: 2rem;
}

article figure,
article picture {
    margin-bottom: 2rem;
}

article figcaption {
    margin-top: 0.5rem;
    font-size: 0.833rem;
    text-align: center;
}

footer {
    margin-top: 6rem;
    background-color: var(--section-bg-col);
    color: var(--heading-col);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
}

footer .container>a {
    font-family: "Lobster", sans-serif;
    font-size: 1.44rem;
    text-decoration: none;
    color: var(--heading-col);
    text-align: center;
    display: block;
}

.footer-nav ul {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
}

.footer-nav li {
    width: 50%;
}

.footer-nav a {
    width: 100%;
    display: block;
    text-decoration: none;
    color: var(--heading-col);
    font-family: 'EB Garamond', serif;
    font-size: 1.2rem;
    text-align: center;
    padding: 0.5rem 0;
    transition: background-color 0.1s ease-in-out, color 0.2s ease-in-out;
    border-radius: 10px;
}

@media(hover: hover) {
    .footer-nav a:hover {
        background-color: var(--heading-col);
        color: var(--section-bg-col);
    }
}

footer p {
    font-size: 0.694rem;
    text-align: center;
}

@media screen and (min-width: 712px) {
    .popup {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }

    .popup.show-nav {
        max-height: 75px;
    }

    .popup li {
        flex-grow: 1;
        padding-bottom: 1rem;
    }

    .popup li:last-of-type {
        margin-bottom: 0;
    }

    .popup a {
        text-decoration: none;
        border-radius: 10px;
        font-size: 1.563rem;
    }

    .hero-content h2 {
        font-size: 3.815rem;
    }

    .header-nav>div a {
        font-size: 1.563rem;
    }

    article h2 {
        font-size: 3.052rem;
    }

    article h3 {
        font-size: 1.953rem;
        padding: 1rem 0 2rem 0;
    }

    .character-grid .section-diamond {
        padding-top: 0;
    }

    .character-grid section {
        margin-bottom: 2rem;
    }

    .plot-grid {
        display: grid;
        grid-template-columns: 1fr 2fr;
        column-gap: 5%;
    }

    .plot-grid .image-content {
        grid-column: 1;
    }

    .plot-grid .text-content {
        grid-column: 2;
        grid-row: 1;
    }

    .character-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 5%;
    }

    .footer-nav ul {
        flex-wrap: nowrap;
    }
}

@media screen and (min-width: 1440px) {

    .container,
    .header-nav {
        max-width: 1440px;
        margin: 0 auto;
    }

    .header-nav {
        display: flex;
        align-items: center;
        width: 90%;
    }

    .header-nav>div {
        padding: 0;
    }

    .header-nav .popup {
        position: static;
        max-height: max-content;
        left: auto;
        width: auto;
        margin-left: auto;
        background-image: none;
        background-color: transparent;
    }

    .header-nav .popup a {
        padding: 1rem 2rem;
        text-shadow: 1px 1px black;
    }

    @media(hover: hover) {
        .header-nav .popup a:hover {
            text-shadow: none;
        }
    }

    .popup {
        padding: 0;
    }

    .popup li {
        padding-bottom: 0;
    }

    .hero-content h2 {
        font-size: 5.61rem;
    }

    .hero-content h2+p {
        margin-top: 1rem;
    }

    .hero-content>.container a {
        padding: 0.5rem 5rem;
    }

    .nav-toggle,
    .side-nav-toggle {
        border: 0;
        clip-path: inset(50%);
        height: 1px;
        margin: 0;
        overflow: hidden;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }

    .side-nav {
        position: sticky;
        top: 0;
        width: inherit;
        height: 100vh;
        grid-column: 1;
    }

    .side-nav h2 {
        margin: 4rem 0 1rem 0;
    }

    .side-nav>div {
        max-height: max-content;
    }

    .side-nav ul{
        height: 100vh;
    }

    main.container {
        display: grid;
        grid-template-columns: 1fr 3fr;
    }

    .main-content {
        grid-column: 2;
    }

    .main-content article:last-of-type section:last-of-type {
        margin-bottom: 10rem;
    }

    .section-div-line {
        margin-top: 1rem;
    }

    .section-div-line svg {
        width: 30%;
    }

    footer {
        margin-top: 0;
        padding: 3rem 0;
    }

    footer .container>div {
        display: flex;
    }

    footer .footer-nav {
        margin-left: auto;
    }
}