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

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
    list-style: none;
}

/* Set core root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

html {
    overflow-y: scroll;
}

@supports (scrollbar-gutter: stable) {
    html {
        overflow-y: auto;
        scrollbar-gutter: stable;
    }
}

/* Set core body defaults */
body {
    min-height: 100vh;
    min-height: 100svh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
#main {
        font-family: system-ui, serif;
        font-size: 2rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        min-height: 100vh;
        min-height: 100svh;
    }

    .grid {
        --base: #f4aaf8;

        --dark: var(--base);
        --light: oklch(from var(--base) calc(l + 0.06) c h);
        --white: oklch(from var(--base) calc(l + 0.14) c h);
        --black: oklch(from var(--base) calc(l - 0.08) c h);

        --cell: 64px;
        --size: 512px 512px;

        position: fixed;
        inset: 0;
        z-index: -1;
        background-color: var(--dark);
        background-image:
            linear-gradient(
                45deg,
                var(--light) 0 25%,
                transparent 25% 75%,
                var(--light) 75%
            ),
            linear-gradient(
                45deg,
                var(--light) 0 25%,
                transparent 25% 75%,
                var(--light) 75%
            );
        background-size: calc(var(--cell) * 2) calc(var(--cell) * 2);
        background-position:
            0 0,
            var(--cell) var(--cell);
    }

    .grid::before,
    .grid::after {
        content: "";
        position: absolute;
        inset: 0;
        animation: analog-fade 10s linear infinite;
        will-change: opacity;
        background:
            var(--dash-white) repeat 448px 0px / var(--size),
            var(--dash-black) repeat 384px 0px / var(--size),
            var(--dash-white) repeat 320px 0px / var(--size),
            var(--dash-black) repeat 256px 0px / var(--size),
            var(--dash-black) repeat 192px 0px / var(--size),
            var(--dash-white) repeat 128px 0px / var(--size),
            var(--dash-black) repeat 64px 0px / var(--size),
            var(--dash-white) repeat 0px 0px / var(--size),
            var(--dash-white) repeat 384px 64px / var(--size),
            var(--dash-black) repeat 320px 64px / var(--size),
            var(--dash-white) repeat 256px 64px / var(--size),
            var(--dash-black) repeat 192px 64px / var(--size),
            var(--dash-black) repeat 128px 64px / var(--size),
            var(--dash-white) repeat 64px 64px / var(--size),
            var(--dash-black) repeat 0px 64px / var(--size),
            var(--dash-white) repeat -64px 64px / var(--size),
            var(--dash-white) repeat 320px 128px / var(--size),
            var(--dash-black) repeat 256px 128px / var(--size),
            var(--dash-white) repeat 192px 128px / var(--size),
            var(--dash-black) repeat 128px 128px / var(--size),
            var(--dash-black) repeat 64px 128px / var(--size),
            var(--dash-white) repeat 0px 128px / var(--size),
            var(--dash-black) repeat -64px 128px / var(--size),
            var(--dash-white) repeat -128px 128px / var(--size),
            var(--dash-white) repeat 256px 192px / var(--size),
            var(--dash-black) repeat 192px 192px / var(--size),
            var(--dash-white) repeat 128px 192px / var(--size),
            var(--dash-black) repeat 64px 192px / var(--size),
            var(--dash-black) repeat 0px 192px / var(--size),
            var(--dash-white) repeat -64px 192px / var(--size),
            var(--dash-black) repeat -128px 192px / var(--size),
            var(--dash-white) repeat -192px 192px / var(--size),
            var(--dash-white) repeat 192px 256px / var(--size),
            var(--dash-black) repeat 128px 256px / var(--size),
            var(--dash-white) repeat 64px 256px / var(--size),
            var(--dash-black) repeat 0px 256px / var(--size),
            var(--dash-black) repeat -64px 256px / var(--size),
            var(--dash-white) repeat -128px 256px / var(--size),
            var(--dash-black) repeat -192px 256px / var(--size),
            var(--dash-white) repeat -256px 256px / var(--size),
            var(--dash-white) repeat 128px 320px / var(--size),
            var(--dash-black) repeat 64px 320px / var(--size),
            var(--dash-white) repeat 0px 320px / var(--size),
            var(--dash-black) repeat -64px 320px / var(--size),
            var(--dash-black) repeat -128px 320px / var(--size),
            var(--dash-white) repeat -192px 320px / var(--size),
            var(--dash-black) repeat -256px 320px / var(--size),
            var(--dash-white) repeat -320px 320px / var(--size),
            var(--dash-white) repeat 64px 384px / var(--size),
            var(--dash-black) repeat 0px 384px / var(--size),
            var(--dash-white) repeat -64px 384px / var(--size),
            var(--dash-black) repeat -128px 384px / var(--size),
            var(--dash-black) repeat -192px 384px / var(--size),
            var(--dash-white) repeat -256px 384px / var(--size),
            var(--dash-black) repeat -320px 384px / var(--size),
            var(--dash-white) repeat -384px 384px / var(--size),
            var(--dash-white) repeat 0px 448px / var(--size),
            var(--dash-black) repeat -64px 448px / var(--size),
            var(--dash-white) repeat -128px 448px / var(--size),
            var(--dash-black) repeat -192px 448px / var(--size),
            var(--dash-black) repeat -256px 448px / var(--size),
            var(--dash-white) repeat -320px 448px / var(--size),
            var(--dash-black) repeat -384px 448px / var(--size),
            var(--dash-white) repeat -448px 448px / var(--size);
    }

    .grid::before {
        --dash-white: radial-gradient(
            15% 80% at center,
            var(--white) 0 3%,
            transparent 3%
        );
        --dash-black: radial-gradient(
            15% 80% at center,
            var(--black) 0 3%,
            transparent 3%
        );
    }

    .grid::after {
        --dash-white: radial-gradient(
            80% 15% at center,
            var(--white) 0 3%,
            transparent 3%
        );
        --dash-black: radial-gradient(
            80% 15% at center,
            var(--black) 0 3%,
            transparent 3%
        );
    }

    @keyframes analog-fade {
        0%,
        20%,
        80%,
        100% {
            opacity: 0;
        }
        30%,
        70% {
            opacity: 1;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .grid::before,
        .grid::after {
            animation: none;
            opacity: 0;
        }
    }

    .content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        flex-grow: 1;
        text-align: center;
        text-wrap: balance;
        max-width: 50ch;
    }

    .credits {
        font-size: 1rem;
        margin-top: auto;
    }