*,
*::after,
*::before {
    box-sizing: border-box;
}

:root {
    font-size: 15px;
}

body {
    margin: 0;
    --color-text: #9f93b0;
    --color-bg: #1e1e2f;
    --color-link: rgba(255,255,255,0.7);
    --color-link-hover: #9f93b0;
    color: var(--color-text);
    background-color: var(--color-bg);
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
    content: '';
    position: fixed;
    z-index: 1000;
}

.js .loading::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

.js .loading::after {
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-radius: 50%;
    opacity: 0.4;
    background: var(--color-link);
    animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
    to {
        opacity: 1;
        transform: scale3d(0.5,0.5,1);
    }
}

a {
    text-decoration: none;
    color: var(--color-link);
    outline: none;
}

a:hover {
    color: var(--color-link-hover);
    outline: none;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
    /* Provide a fallback style for browsers
	 that don't support :focus-visible */
    outline: none;
    background: lightgrey;
}

a:focus:not(:focus-visible) {
    /* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
    background: transparent;
}

a:focus-visible {
    /* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
    outline: 2px solid #fff;
    background: transparent;
}

.unbutton {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

.unbutton:focus {
    outline: none;
}

body,
main {
    width: min-content;
}

.frame {
    z-index: 100;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 'title links sponsor' 'credits credits credits';
    grid-column-gap: 3vw;
    grid-row-gap: 1rem;
    justify-content: space-between;
    align-content: space-between;
    text-align: left;
}

.frame a {
    pointer-events: auto;
}

.frame__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    grid-area: title;
}

.frame__links {
    grid-area: links;
}

.frame__links a:not(:last-child) {
    margin-right: 1rem;
}

.frame__credits {
    grid-area: credits;
}

.grid {
    height: 65vh;
    margin-top: 17.5vh;
    display: grid;
    grid-auto-columns: 23.5vw; /* 25vw - gap - 1/2*gap */
    grid-auto-flow: column;
    width: min-content;
    gap: 2vw;
}

.grid__item {
    height: 100%;
    background-size: cover;
    background-position: 50% 50%;
    border-radius: 2rem;
}

@media screen and (min-width: 53em) {
    .frame {
        height: 100vh;
        align-items: space-between;
    }
}