:root {
    --background: rgba(0,0,0);
    --foreground: rgba(242, 237, 237);
    --emptyimage: rgb(152, 152, 152);
    --gridcolumns: 1fr 1fr 1fr;
    --gridrows: 1fr;
    --h1size: 70px;
    --psize: 20px;
    --selectionmargin: 25px;
    --boxh1size: 1.8em;
}

[data-orient="tallway"] {
    --gridcolumns: 1fr;
    --gridrows: 1fr 1fr 1fr;
    --h1size: 120px;
    --psize: 0px;
    --selectionmargin: 50px;
    --boxh1size: 4em;
}

[data-theme="light"] {
    --background: rgba(242, 237, 237);
    --foreground: rgba(0,0,0);
    --emptyimage: rgba(50,50,50);
}

body {
    background-color: var(--background);
    margin: 0;
}
h1 {
    color: var(--foreground);
    width: 100vw;
    text-align: center;
    font-size: var(--h1size);
    height: 10vh;
    margin: 0;
    margin-top: 15vh;
    margin-bottom: 5vh;
}
p {
    color: var(--foreground);
    width: 100vw;
    text-align: center;
    font-size: var(--psize);
    height: 5vh;
    margin: 0;
    margin-top: 5vh;
}

div#selectiondiv {
    width: auto;
    height: auto;
    margin: 0;
    margin-left: 10vw;
    margin-right: 10vw;
    display: grid;
    grid-template-columns: var(--gridcolumns);
    grid-template-rows: var(--gridrows);
    align-items: center;
}

#selectiondiv a {
    display: flex;
    flex-wrap: wrap;
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden;
    margin: var(--selectionmargin);
    justify-content: center;
    align-items: center;
    align-content: center;
    background-color: var(--emptyimage);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.1s linear;
    text-decoration: none;
    padding: 0;
    outline: var(--foreground) solid 0.25em;
}

#selectiondiv a:hover {
    margin: calc(var(--selectionmargin) / 5 * 4);
}

#selectiondiv a:active {
    margin: calc(var(--selectionmargin) / 4 * 5);
}

#selectiondiv a#firstpage {
    background-image: url(/images/lorempicsum.png);
    background-repeat: no-repeat;
    background-size: cover;
}

#selectiondiv a#secondpage {
    background-image: url(/images/lorempicsum.png);
    background-repeat: no-repeat;
    background-size: cover;
}

#selectiondiv a#thirdpage {
    background-image: url(/images/lorempicsum.png);
    background-repeat: no-repeat;
    background-size: cover;
}


#selectiondiv .transparencygradient {
    background: linear-gradient(rgba(0,0,0,0) 30%, var(--foreground) 100%);
    width: 100%;
    height: 100%;
    position: static;
}

#selectiondiv a h1 {
    color: var(--background);
    width: 100vw;
    text-align: center;
    font-size: var(--boxh1size);
    margin: 0;
    text-align: center;
    bottom: 0.6em;
    text-wrap: balance;
    position: absolute;
} 
