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

:root {
	font-size: 18px;
	--color-text: #fff;
	--color-bg: #000;
	--color-link: #ffa700;
	--color-link-hover: #fff;
}

body {
	margin: 0;
	color: var(--color-text);
	background-color: var(--color-bg);
	font-family: ballinger-mono, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-transform: uppercase;
}

/* 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: #ffa700;
	color: var(--color-link);
	outline: none;
	cursor: pointer;
}

a:not(.frame__title-back) {
	white-space: nowrap;
	overflow: hidden;

}

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 red;
	background: transparent;
}

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

.unbutton:focus {
	outline: none;
}

main {
	height: 100vh;
	display: flex;
	flex-direction: column;
}

.frame {
	color: var(--color-title);
	padding: 1rem 2rem;
	margin-bottom: 3rem;
	grid-gap: 2rem;
	align-items: start;
	text-transform: lowercase;
	font-size: 0.75rem;
}

.frame a:not(.frame__title-back)::before {
	height: 1px;
	width: 100%;
	background: currentColor;
	position: absolute;
	top: 90%;
	transition: transform 0.3s;
	transform-origin: 0% 50%;
}

.frame a:not(.frame__title-back):hover::before {
	transform: scaleX(0);
	transform-origin: 100% 50%;
}

.frame__title {
	grid-area: title;
	display: flex;
}

.frame__title-main {
	font-size: inherit;
	margin: 0;
	font-weight: inherit;
}

.frame__title-back {
	position: relative;
	display: flex;
	align-items: flex-end;
}

.frame__title-back span {
	display: none;
}

.frame__title-back svg {
	fill: currentColor;
}

.frame__prev {
	grid-area: prev;
	align-self: start;
}

.ascii {

    color: #ffa700;
    opacity: 0.8;
    position: absolute;
    right: 10rem; /* Adjust the right spacing as needed */
    top: 1rem; /* Adjust the top spacing as needed */
    pointer-events: none;
    z-index: 1000; /* Set a high z-index to ensure it's above other elements */
    font-size: 10px; /* Adjust the font size as needed */
}

/* Add a media query for responsiveness on smaller screens */
@media screen and (max-width: 600px) {
    .ascii {
        font-size: 10px; /* Adjust the font size for mobile */
        right: 0.5rem; /* Adjust the right spacing for mobile */
        top: 0.5rem; /* Adjust the top spacing for mobile */
    }
}

.content {

	display: grid;
	gap: 1rem;
	max-width: 830px;
	padding: 7vh 2rem 0;
}

dt {
	font-weight: bold;
}

dd {
	margin: 0;
}

.effects {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

#cdawrap {
    visibility: hidden !important;
}

.effects button {
	border: 0;
	color: inherit;
	white-space: nowrap;
	background: none;
	text-transform: inherit;
	font: inherit;
	cursor: pointer;
	color: var(--color-link);
	font-size: 0.75rem;
	text-transform: uppercase;
}

.effects button:before {
    content: "[";
    margin-right: .5rem;
    display: inline-block
}

.effects button:after {
    content: "]";
    margin-left: .5rem;
    display: inline-block
}

.effects button:hover {
    color: var(--color-link-hover)
}

.splitting .words .word {
    white-space: nowrap
}

@media screen and (min-width: 53em) {
    .frame {
        grid-template:"title prev sponsor"/auto auto 1fr;
        justify-content: start;
        display: grid
    }

    .content {
        grid-template-columns: 15ch 1fr
    }
}

.splitting .word,.splitting .char {
    display: inline-block
}

.splitting .char {
    position: relative
}

.splitting .char:before,.splitting .char:after {
    content: attr(data-char);
    visibility: hidden;
    -webkit-user-select: none;
    user-select: none;
    transition: inherit;
    position: absolute;
    top: 0;
    left: 0
}

.splitting {
    --word-center: calc((var(--word-total) - 1)/2);
    --char-center: calc((var(--char-total) - 1)/2);
    --line-center: calc((var(--line-total) - 1)/2)
}

.splitting .word {
    --word-percent: calc(var(--word-index)/var(--word-total));
    --line-percent: calc(var(--line-index)/var(--line-total))
}

.splitting .char {
    --char-percent: calc(var(--char-index)/var(--char-total));
    --char-offset: calc(var(--char-index) - var(--char-center));
    --distance: calc((var(--char-offset)*var(--char-offset))/var(--char-center));
    --distance-sine: calc(var(--char-offset)/var(--char-center));
    --distance-percent: calc((var(--distance)/var(--char-center)))
}

.splitting.cells img {
    width: 100%;
    display: block
}

@supports (display: grid ) {
    .splitting.cells {
        visibility:hidden;
        background-size: cover;
        position: relative;
        overflow: hidden
    }

    .splitting .cell-grid {
        background: inherit;
        width: 100%;
        height: 100%;
        grid-template: repeat(var(--row-total),1fr)/repeat(var(--col-total),1fr);
        display: grid;
        position: absolute;
        top: 0;
        left: 0
    }

    .splitting .cell {
        background: inherit;
        position: relative;
        overflow: hidden
    }

    .splitting .cell-inner {
        background: inherit;
        visibility: visible;
        width: calc(100%*var(--col-total));
        height: calc(100%*var(--row-total));
        left: calc(-100%*var(--col-index));
        top: calc(-100%*var(--row-index));
        position: absolute
    }

    .splitting .cell {
        --center-x: calc((var(--col-total) - 1)/2);
        --center-y: calc((var(--row-total) - 1)/2);
        --offset-x: calc(var(--col-index) - var(--center-x));
        --offset-y: calc(var(--row-index) - var(--center-y));
        --distance-x: calc((var(--offset-x)*var(--offset-x))/var(--center-x));
        --distance-y: calc((var(--offset-y)*var(--offset-y))/var(--center-y))
    }
}

@media screen and (min-width: 53em) {
	.frame {
		display: grid;
		grid-template-columns: auto auto 1fr;
		grid-template-rows: auto;
		grid-template-areas: 'title prev sponsor';
		justify-content: start;
	}
	.content {
		grid-template-columns: 15ch 1fr;
	}
}

.cursor {
	--color-text: #234acd;
	--color-bg: #000;
	--color-link: #6fd74e;
	--color-link-hover: #fff;
	--cursor-bg: #db970b;
	--cursor-blend-mode: overlay;
	--gradient-text-1: #1728eb;
	--gradient-text-2: rgb(95 238 56);
	background-image: url(../img/bg3.jpg);
	height: 100%;
	position: fixed;
	width: 100%;
	left: 0;
	top: 0;
	pointer-events: none;
	z-index: 99;
	mix-blend-mode: var(--cursor-blend-mode);
	--size: calc(100vw / var(--columns));
}

.cursor__inner {
	display: grid;
	grid-template-columns: repeat(var(--columns), var(--size));
}

.cursor__inner-box {
	width: var(--size);
	height: var(--size);
	background: var(--cursor-bg);
	opacity: 0;
	border-radius: var(--cursor-radius);
}

