/*
    RESET
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

body {
    line-height: 1;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400..700;1,400..700&display=swap');

p, h1{
    transition: ease-in-out 100ms;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f4f4f1;
    color: #0d0d0d;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.loading-screen.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.loading-mark {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.loading-bracket {
    position: relative;
    display: inline-block;
    width: 0.7em;
    color: #0d0d0d;
    font-family: "Libre Baskerville", serif;
    font-size: clamp(1rem, 4vw, 1.35rem);
    line-height: 1;
    text-align: center;
}

.loading-bracket::before {
    position: absolute;
    inset: 0;
    color: #777;
    content: attr(data-glitch);
    pointer-events: none;
    animation: sigil-glitch-a 1.8s steps(1, end) infinite;
}

.loading-bracket::after {
    position: absolute;
    inset: 0;
    color: #444;
    content: attr(data-glitch);
    pointer-events: none;
    animation: sigil-glitch-b 2.6s steps(1, end) infinite;
}

.loading-word {
    display: grid;
    grid-template-columns: repeat(7, 1ch);
    font-family: monospace;
    font-size: clamp(1rem, 4vw, 1.35rem);
    letter-spacing: 0.08em;
}

.loading-word > span {
    text-align: center;
}

.loading-message {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
    border: 0;
}

.loading-screen.has-error .loading-word {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
}

.loading-screen.has-error .loading-bracket::before,
.loading-screen.has-error .loading-bracket::after {
    animation: none;
}

@keyframes sigil-glitch-a {
    0%, 12%, 23%, 100% {
        clip-path: inset(0 0 100%);
        transform: translateX(0);
    }
    13%, 18% {
        clip-path: inset(18% 0 56%);
        transform: translateX(-8px);
    }
    19%, 22% {
        clip-path: inset(66% 0 14%);
        transform: translateX(6px);
    }
}

@keyframes sigil-glitch-b {
    0%, 46%, 57%, 100% {
        clip-path: inset(0 0 100%);
        transform: translateX(0);
    }
    47%, 51% {
        clip-path: inset(42% 0 36%);
        transform: translateX(9px);
    }
    52%, 56% {
        clip-path: inset(10% 0 72%);
        transform: translateX(-7px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-bracket::before,
    .loading-bracket::after {
        animation: none;
    }
}

/*
    STYLES
*/
.main {
    display: flex;
    height: 50rem;
    margin-inline: auto;
    margin-top: 10rem;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1;
    position: relative;
    filter: drop-shadow(0px 0px 29px #0000005d);
}

h1 {
    color: rgb(13, 13, 13);
    font-size: 5em;
    font-family: "Libre Baskerville", serif;
}

.links {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-top: 2rem;
    font-family: "Libre Baskerville", serif;
}

a {
    text-decoration: none;
    color: rgb(13, 13, 13);
    font-size: 1.5rem;
    font-family: monospace;
}

.links a {
    position: relative;
    display: inline-block;
    margin: -0.15em;
    padding: 0.15em;
}

.scramble-original {
    display: inline-block;
}

.scramble-text {
    position: absolute;
    inset: 0.15em;
    display: grid;
    grid-template-columns: repeat(var(--character-count), minmax(0, 1fr));
    font-family: monospace;
    white-space: pre;
    pointer-events: none;
}

.scramble-text > span {
    overflow: hidden;
    text-align: center;
}

.links a.is-scrambling .scramble-original {
    visibility: hidden;
}

a:hover {
    color: rgb(255, 255, 255);
    background-color: black;
    text-decoration: underline;
    outline: 5px solid black;
}

.footer {
    position: fixed;
    left: 0;
    bottom: 10px;
    width: 100%;
    color: rgb(13, 13, 13);
    text-align: center;
    font-family: "Libre Baskerville", serif;
    font-size: 0.8rem;
    z-index: 2;
}

.asc-2 {
    position: fixed;
    bottom: -20px;
}

.asc-1 {
    position: fixed;
    top: 50px;
    right: 50px;
}

#three-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.bg-ovr {
    width: 100vw;
    height: 100vh;
    position: fixed;
    background-color: rgba(255, 255, 255, 0.574);
    z-index: 1;
}

body {
    position: absolute;
    top: 0;
}

.main-wrap {
    margin-inline: auto;
    width: 100vw;
}

@media (max-width: 800px) {
    .links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    h1{
        font-size: 2em;
        font-weight: bold;
    }
}