@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,700;1,400&display=swap');
@font-face {
    font-family: 'AvQest';
    src: url('/fonts/AvQest.woff2') format('woff2'),
        url('/fonts/AvQest.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* CSS RESET */
:where(:not(html,iframe,canvas,img,svg,video,audio):not(svg *,symbol *)){all:unset;display:revert}*,::after,::before{box-sizing:border-box}a,button{cursor:revert}menu,ol,ul{list-style:none}img{max-width:100%}table{border-collapse:collapse}input,textarea{-webkit-user-select:auto}textarea{white-space:revert}meter{-webkit-appearance:revert;appearance:revert}::placeholder{color:unset}:where([hidden]){display:none}:where([contenteditable]:not([contenteditable=false])){-moz-user-modify:read-write;-webkit-user-modify:read-write;overflow-wrap:break-word;-webkit-line-break:after-white-space;-webkit-user-select:auto}:where([draggable=true]){-webkit-user-drag:element}

/* TYPOGRAPHY */
body {
    font-family: "Crimson Text", serif
}

h1, h2, h3, h4, h5 {
    text-transform: uppercase;
    font-family: "AvQest", serif;
    letter-spacing: 0.1em;    
}

h2 {
    font-size: calc(1.5em + 1.5vw)
}

p {
    margin-bottom: 1em;
    text-align: justify;
}

.cta { /* buttons, etc - hovering text with a spinny sigil background on hover */
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    padding: 1em;
    font-size: calc(1em + 1vw);
    text-transform: uppercase;
    font-family: "AvQest", serif;
    letter-spacing: 0.1em;
    transition: all 400ms ease-in-out;
    margin: 0.5em;
    color: #6d0376;
    cursor: pointer;
}

.cta::after, .cursecover::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url(/img/seal2.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.1;
    animation: SPIN 10s linear infinite;
    animation-play-state: paused;
    transition: opacity 400ms ease-in-out;
}  

.cta:hover, .cta-glow .cta, .cta.cta-glow {
    color: white;
    text-shadow: 0px 0px 5px #6d0376;
    filter: drop-shadow(0 0 10px red);
}

.cta:hover::after, .cursecover:hover::after, .cta-glow .cta::after, .cta.cta-glow::after {
    animation-play-state: running;
    opacity: 1;
}

.socials .cta {
    padding: 0.5em;
    margin: 0.5em 0;
    color: white;
}

@media only screen and (min-width: 800px) {
    .split {
        display: flex;
        gap: 1em;
        align-items: center;
    }

    .split > * {
        flex-basis: 50%;
    }
}

/* OBERON LAYOUT */
body {
    min-height: 100vh;
    background-image: url(/img/wood.jpg);
    background-size: 100% auto;
    background-repeat: repeat-y;
    background-position: top center;
    max-width: 100%;
    overflow-x: hidden;
}

body::before {
    background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(255,255,255,0) 85%);
}

main > section {
    width: 96vw;
    max-width: 1250px;
}

main > section ~ section {
    margin-top: 1em
}

footer {
    padding: 5vh 0;
}

#copyright {
    font-family: "AvQest", serif;
    color: white;
}

/* helpers */
[class*="flex"] {
    display: flex;
    justify-content: center;
    align-items: center;
}

[class*="vflex"] {
    flex-direction: column;
}

[class*="flex"].space-between {
    justify-content: space-between
}

.center {
    text-align: center;
    justify-content: center;
    align-items: center;
}

/* OBERON HEADER */
header {
    padding: calc(5vh + 2em) 0 2vh;
}

header h1 {
    color: white;
    text-align: center;
    margin: 0.75em auto 0.5em;
    font-size: calc(1em + 3vw);
}  

header > .bookmark {
    position: absolute;
    top: 0;
}
  
header > .bookmark.right {
    right: 0;
}

@media only screen and (min-width: 600px) {
    header {
        padding: 5vh 0;
    }

    header h1 {
        font-size: calc(1em + 1vw);
    }

    header > .bookmark {
        position: relative;
        top: initial;
        right: initial;
        top: 1vh;
    }
}

/* OBERON NAV */
nav {
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 10;
    transform: translateX(-100%);
    transition: transform 400ms ease-in-out;
}

nav::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 150%;
    height: 100vh;
    background: linear-gradient(90deg, black, rgba(0, 0, 0, 0.9) 70%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    transition: opacity 400ms ease-in-out;
    opacity: 0;
}

.nav-open nav, .nav-open nav::after {
    transform: translateX(0);
    opacity: 1;
}

/* EFFECTS */
:root { --baseTransform: rotate(0deg) } /* used in combination with some animations occasionally */

 /* fadebg adds a pseudoelement that puts a dark overlay over the background of the content */
.fadebg, body {
    position: relative;
    z-index: 1;
}

.fadebg::after, body::after, body::before { 
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
    background: black;
    opacity: 0.5;
}

 /* parch adds a repeating parchment type backing to sections with a top and bottom , add .tear to have it end in a torn off part */
.parch {
    padding: 10vw 12vw;
    position: relative;
    z-index: 1;
    background-image: url(/img/parchinfinite.png);
    background-size: 100% auto;
    background-repeat: repeat-y;
}

.parch::before, .parch::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: url(/img/parchtop.png);
    background-repeat: no-repeat;
    background-size: 100% auto;
}

.parch::after {
  background-image: url(/img/parchbottom.png);
  background-position: bottom;
}

.parch.tear {
    padding-bottom: 0;
    margin-bottom: 10vmax;
}

.parch.tear::after {
    content: "";
    position: absolute;
    top: unset;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10vmax;
    background-image: url(/img/parchtear.png);
    background-size: 100%;
    --baseTransform: translateY(20%);
    transform: var(--baseTransform);
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: -1;
}  

@media only screen and (min-width: 800px) {
    .parch {
        padding: 10vmax;
    }
}

/* bookmarks - intended to be used as larger navigation buttons (i.e. open nav, log in, etc) */
.bookmark {
  position: relative;
  color: white;
  font-family: AvQest, serif;
  padding: 1em 2em 1em 1em;
  font-size: calc(1em + 3vw);
  cursor: pointer;
  z-index: 1;
}

.bookmark::after {
  content: "";
  background: url(/img/booknavsmall.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

.bookmark.right {
  padding: 1em 1em 1em 2em;
}

.bookmark.right::after {
  transform: rotateY(180deg);
}

@media only screen and (min-width: 1200px) {
    .bookmark {
        font-size: calc(1em + 1vw);
    }
}

/* INNER PAGE TEMPLATE */
.pageflex {
    position: relative;
    z-index: 1;
    flex-direction: column;
    box-shadow: -10px 20px 10px;
    transition: transform 400ms ease-in-out;
}

.pageflex .parch {
    width: 100%;
}

.nav-open .pageflex {
    transform: translateX(25vw)
}

@media only screen and (min-width: 1200px) {
    .pageflex {
        flex-direction: row;
        align-items: stretch;
    }

    .pageflex .parch {
        padding: 5vmax 7vmax;
        flex-basis: 50%;
        width: 50%;
        min-height: 100vh;
    }

    .pageflex::after { /* adds a shadow to the page split */
        content: "";
        position: absolute;
        height: 100%;
        width: 10%;
        background: linear-gradient(90deg, rgba(0,0,0,0) 20%, rgba(0, 0, 0, 0.75) 50%, rgba(0,0,0,0) 80%);
        z-index: 1;
        pointer-events: none;
    }
}

/* HOMEPAGE STUFF */
#cover {
    position: relative;
    width: auto;
}

#grimoire {
    display: block;
    position: relative;
    height: 100%;
}

#grimoire h1 {
    all: unset;
    position: absolute;
    top: 8%;
    font-size: 8vw;
    width: 65%;
    left: 19.5%;
    text-transform: uppercase;
    font-family: "AvQest", serif;
    text-align: center;
    color: #000;
    filter: drop-shadow(1px 1px 1px);
    letter-spacing: 0.1em;
    transition: 1s ease-in-out;
}

#grimoire:hover h1 {
    color: white;
    text-shadow: 0px 0px 5px #6d0376;
    filter: drop-shadow(0 0 10px red);
}

.cursecover {
    display: block;
    position: relative;
    overflow: hidden;
    margin-top: 5vh;
    filter: drop-shadow(-10px 10px 10px) drop-shadow(-10px -10px 10px);
    transition: 3s ease-in-out;
}

.cursecover::after {
    left: 1%;
    background-size: 40%;
    z-index: 2;
    transition: opacity 2s ease-in-out;
    animation-duration: 20s;
}

.cursecover:hover::after {
    opacity: 0.25;
    filter: drop-shadow(0px 0px 10px red);
}

.cursecover .curse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    transition: 1s ease-in-out;
    opacity: 0;
    z-index: 10;
}

.cursecover .curse::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background-image: url(/img/curse.gif);
    background-size: auto 50%;
    background-position: center;
    z-index: 2;
    animation: CURSERISE 10s linear infinite;
    animation-play-state: paused;
}

.cursecover img {
    max-height: 90vh;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    object-fit: contain;
    z-index: -1;
    transition: all 1s ease-in-out;
}

.cursecover:hover .curse, .cursecover:hover .curse::after {
    animation-play-state: running;
    opacity: 1;
}

.cursecover:hover img {
    filter: grayscale(0.75);
}

@keyframes CURSERISE {
    0% { transform: translateY(0) rotate; opacity: 0;}
    25% { transform: translateY(-12.5%); opacity: 0.1;}
    50% { transform: translateY(-25%); opacity: 0.2;}
    75% { transform: translateY(-37.5%); opacity: 0.1;}
    100% { transform: translateY(-50%); opacity: 0;}
}

#splashinfo {
    margin-top: 5vh;
}

.details {
    font-size: 16px;
    filter: drop-shadow(-5px 10px 10px);
    transform: rotate(-1deg);
    text-align: center;
}

.details:nth-child(2n+1) {
    transform: rotate(1deg);
}

.details img {
    display: block;
    max-width: 90%;
    margin: auto;
}

#splashinfo h2 {
    margin-bottom: 0.5em;
    margin-top: -0.25em;
}

@media only screen and (min-width: 700px) {
    .details {
        font-size: calc(0.8em + 0.25em);
    }

    .cta {
        padding: 2em;
        font-size: 2em;
    }

    #grimoire h1 {
        font-size: 7vh;
    }

    #grimoire img {
        height: 90vh;
    }
}

/* ANIMATIONS */
@keyframes SPIN {
    000% { transform: rotate(0deg) }
    100% { transform: rotate(360deg) }
}















/* devnotes */

.devnotes {
    background: black;
    color: white;
    font-size: 12px;
    font-family: monospace;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.devnotes p {
    margin-bottom: 1em;
    width: 600px;
    max-width: 90%;
}

.devnotes a {
    text-decoration: underline;
    color:cyan;
}

.devnotes::before, .devnotes::after {
    content: "DEV NOTES";
    margin: 2em;
    width: 100%;
    text-align: center;
    padding: 5px;
    border-top: 1px dashed;
    border-bottom: 1px dashed;
    border-color: cyan;
}