@import url('https://fonts.googleapis.com/css2?family=Bona+Nova+SC:ital,wght@0,400;0,700;1,400&display=swap');

.why, .why a {
    font-style: italic;
    vertical-align: super;
    color: var(--primary-color);
    transition: 0s;
    :hover {
        color: red;
        transition: 0s;
    }
}

header {
    position: relative;
}

#navmenu {
    position: absolute;
    bottom: 12%;
    left: 35%;
    rotate: 1.3deg;
}
#navmenu, #navmenu li, #navmenu a {
    font-size: 13px;
    li:hover, li:hover a {
        color: black;
            text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white;
            transition: ease 0.2s;
    }
}

.document .page-container {
    margin-top: -20px;
    margin-bottom: 32px;
    padding: 0.9in 0.75in;
    box-shadow: 0px 0px 5px rgba(0,0,0, 0.3);
    background-color: antiquewhite;
    background-image: url(assets/backgrounds/paperbglight.png);
    mask-image: url(assets/masks/paperbgmask.png);
    mask-composite: exclude;
    mask-size: 100%;
    mask-repeat: repeat-y;
    background-size: 100%;
    /* filter: blur(0.42px); */
    color: color-mix(in srgb, var(--inverted-font-color), transparent 13%);
    line-height: 1.7rem;
    h1, h2, h3, h4, h5, h6 {
        font-family: var(--base-font);
        color: color-mix(in srgb, var(--inverted-font-color), transparent 13%);
        line-height: 3rem;
    }
    #document-title {
        text-transform: uppercase;
    }
    #document-date {
        margin: 0 auto;
        margin-top: -20px;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    p {
        &::before {
            content: "\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0";
        }
    }
    &::before {
        content: "";
        display: block;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
    }
    padding-bottom: 150px;
    /* rotate: 0.05deg; */
    .narration {
        color: color-mix(in srgb, var(--inverted-font-color), transparent 13%);
        font-size: 0.7rem;
    }
    a:hover {
        color: red;
    }
}

.page-mask {
    --transition-mask: url(assets/transitions/paper.png);
    --transition-bottom-mask: url(assets/transitions/flippednegative/paper.png);
    --transition-bottom-width: 4914px;
    --transition-bottom-height: 400px;
    mask: var(--transition-mask) 0 0/var(--transition-mask-width) var(--transition-height), var(--transition-bottom-mask) 0 calc(100%)/var(--transition-bottom-mask-width) var(--transition-bottom-height), linear-gradient(black, black) 0% var(--transition-height)/100%;
    mask-composite: exclude;
    mask-repeat: repeat-x;
}

#return {
    position: absolute;
    text-decoration: none;
    color: #FF5500;
    background-color: transparent;
    font-size: 24px;
    transition: ease 0.2s;
    &:hover {
        color: red;
        transition: ease 0.2s;
    }
}
#document-title {
    margin: auto;
}
#return-bottom {
    text-decoration: none;
    color: #FF5500;
    background-color: transparent;
    transition: ease 0.2s;
    &:hover {
        color: red;
        transition: ease 0.2s;
    }
}

@media screen and (max-width: 850px) {
    .columns-6, .columns-7, .columns-8 {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }

    .columns-3, .columns-4, .columns-5 {
        grid-template-columns: 1fr;
        .stage {
            margin: 0 auto;
            width: 100%;
            font-size: 1.5rem;
            h5 {
                font-size: 2rem;
            }
        }
        .step .step-title {
            font-size: 2rem;
        }
    }

    .step {
        margin-bottom: var(--base-padding);
    }
}

@media screen and (max-width: 700px) {
    #navmenu {
        visibility: hidden;
    }
}

@media screen and (max-width: 500px) {
    #navmenu {
        visibility: hidden;
    }

    .columns-3, .columns-4, .columns-5, .columns-6, .columns-7, .columns-8 {
        grid-template-columns: 1fr;
        .step .step-title {
            font-size: 2rem;
        }
    }
}

.stage {
    background-color: black;
    border: 1px solid white;
    max-width: 400px;
    aspect-ratio: 1;
    padding: 4px 16px;
}

.stage-title {
    text-align: center;
    margin: auto;
    margin-bottom: 16px;
}

.stage.cur {
    border: 4px solid cornflowerblue;
    .stage-title, .stage-title h5 {
        color: cornflowerblue;
        font-weight: bold;
    }
}

.maybe {
    font-style: italic;
    color: var(--shade-1-color);
}

.step {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    .step-title {
        position: absolute;
        top: 0%;
        left: 50%;
        transform: translate(-50%, 0%);
        text-shadow: -1px -1px 0 var(--text-outline-secondary-color), 1px -1px 0 var(--text-outline-secondary-color), -1px 1px 0 var(--text-outline-secondary-color), 1px 1px 0 var(--text-outline-secondary-color), 0px 0px 10px rgba(0,0,0, 1);
        text-align: center;
        width: calc(100% - 10px);
    }
    .autoframe {
        max-width: 100%;
        max-height: 100%;
        box-shadow: 0px 0px 10px black;
        z-index: 0;
    }
    button {
        border-radius: 0;
        position: absolute;
        top: 0%;
        width: 100%;
        height: 100%;
        background-color: transparent;
    }
    .textbox {
        max-width: 600px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        h6 {
            text-align: center;
        }
        &::backdrop {
            background-color: rgb(127 127 127 / 50%);
          }
    }
}

.legend {
    margin: 0 auto;
    width: fit-content;
}

.placeholder {
    background-image: url(assets/images/dramatic.png);
    pointer-events: none;
    width: 100%;
    aspect-ratio: 1;
}

.contents {
    font-size: 0.8rem;
    line-height: 1rem;
}