/* #region variables */

:root {
	--color: rgb(14, 180, 154);
	--bg: rgb(5, 22, 19);
	--link: rgb(219, 67, 181);
	--linkhover: rgb(57, 219, 57);
	--BS-dark-green: #011417;
	--BS-light-green: rgb(14, 180, 154);
	--BS-light-blue: #3465a4;
	--red: #c9312c;
}

/* #endregion */

/* #region FONTS */
@font-face {
	font-display: swap;
	font-family: Punk;
	font-style: normal;
	src: url('/fonts/punk_typewriter-webfont.woff2') format('woff2');
}

@font-face {
	font-display: swap;
	font-family: APPLEII;
	src: url('/fonts/AppleII-Pro.woff2');
}

@font-face {
	font-display: swap;
	font-family: 'Chakra Petch';
	font-style: normal;
	font-weight: 300;
	src: url('/fonts/chakra-petch-v11-latin-300.woff2') format('woff2');
}

@font-face {
	font-display: swap; 
	font-family: 'Chakra Petch';
	font-style: italic;
	font-weight: 300;
	src: url('/fonts/chakra-petch-v11-latin-300italic.woff2') format('woff2'); 
}

@font-face {
	font-display: swap; 
	font-family: 'Chakra Petch';
	font-style: normal;
	font-weight: 400;
	src: url('/fonts/chakra-petch-v11-latin-regular.woff2') format('woff2'); 
}

@font-face {
	font-display: swap;
	font-family: 'Chakra Petch';
	font-style: italic;
	font-weight: 400;
	src: url('/fonts/chakra-petch-v11-latin-italic.woff2') format('woff2');
}

@font-face {
	font-display: swap;
	font-family: 'Chakra Petch';
	font-style: normal;
	font-weight: 500;
	src: url('/fonts/chakra-petch-v11-latin-500.woff2') format('woff2');
}

@font-face {
	font-display: swap;
	font-family: 'Chakra Petch';
	font-style: italic;
	font-weight: 500;
	src: url('/fonts/chakra-petch-v11-latin-500italic.woff2') format('woff2');
}

@font-face {
	font-display: swap;
	font-family: 'Chakra Petch';
	font-style: normal;
	font-weight: 600;
	src: url('/fonts/chakra-petch-v11-latin-600.woff2') format('woff2');
}

@font-face {
	font-display: swap;
	font-family: 'Chakra Petch';
	font-style: italic;
	font-weight: 600;
	src: url('/fonts/chakra-petch-v11-latin-600italic.woff2') format('woff2');
}

@font-face {
	font-display: swap;
	font-family: 'Chakra Petch';
	font-style: normal;
	font-weight: 700;
	src: url('/fonts/chakra-petch-v11-latin-700.woff2') format('woff2');
}

@font-face {
	font-display: swap;
	font-family: 'Chakra Petch';
	font-style: italic;
	font-weight: 700;
	src: url('/fonts/chakra-petch-v11-latin-700italic.woff2') format('woff2');
}

@font-face {
	font-display: swap;
	font-family: Sector17;
	font-style: normal;
	src: url('/fonts/Sector-017.woff2') format('woff2');
}

@font-face {
	font-display: swap;
	font-family: TallDark;
	font-style: normal;
	src: url('/fonts/TallDarkAndHandsome-Condensed.woff2') format('woff2');
}

 /* #endregion */

 *, *::before, *::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}


html {
	font-family: "Chakra Petch", sans-serif;
	font-size: 16px;
	width: 100%;
	height: 100%;
	position: relative;
}

body {
    color: var(--color);
	background-color: #050505;
	position: absolute;
	width: 100%;
	height: 100%
}

a {
	color: var(--BS-light-green);
	text-decoration: none;
}

a:hover {
	color: var(--linkhover);
	text-decoration: none;
}

main {
	position: absolute;
	inset: 0;
	display: flex;
	flex-flow: column nowrap;
	justify-content: center;
	align-items: center;
}

.displaywrapper {
	display: flex;
	position: relative;
	flex-flow: row;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	margin-top: 2rem;
	width: 100%;
	height: fit-content;
}

.pilotcolumn {
	display: flex;
	flex-flow: column nowrap;
	gap: 1rem;
	width: min(620px, calc(100% - 20px));
	height:100%;
}

.filler {
	flex-grow: 1;
	display: flex;
	flex-flow: column nowrap !important;
	font-family: APPLEII, monospace;
}

#typewriterDisplay {
	flex-grow: 1;
	width: 100%;
}

#stats {
	font-size: .5rem;
	display: grid;
	grid-template-columns: 2fr 1fr 2fr 1fr;
	gap: 0.5rem;
}

.statlabel {
	column-span: 2;
	/* text-align: right; */

}

.card {
	position: relative;
	display: flex;
	flex-flow: row nowrap;
	justify-content: flex-start;
	gap: 10px;
	height: 220px;
	width: min(620px, calc(100% - 20px));
	padding: 10px;
	margin: 10px;
	text-shadow: 
		0px 0px 2px rgba(255, 255, 255, 0.499),
		0px 0px 7px rgb(14, 180, 154),
		3px 2px 30px var(--BS-dark-green);
	opacity: 0;
}

.card::before {
	content: "";
	position: absolute;
	pointer-events: none;
	inset: -10px;
	--s: 50px; /* size of the corners */
	border: 2px solid var(--BS-light-green); 
  	mask: 
    conic-gradient(#000 0 0) content-box,
    conic-gradient(at var(--s) var(--s),#0000 75%,#000 0) 
    0 0/calc(100% - var(--s)) calc(100% - var(--s));
}

.awvcard {
	flex-direction: column;
	height: 753px;
	width: min(620px, calc(100% - 20px));
}

.awvcard::after {
	content: "";
	position: absolute;
	pointer-events: none;
	z-index: -1;
	inset: 75px 10px 78px 10px;

	--s1: 49.9px;  /* control the size of the grid */
	--n: 4;     /* control the granularity */
	--t: 1px;   /* the thickness */
	--g: 5px;  /* the gap between dashes */

	--c:rgba(14, 180, 154, .25) 25%, transparent 0;
	background: 
	conic-gradient(at var(--g) var(--t),var(--c)) calc((var(--s1)/var(--n) - var(--g) + var(--t))/2) 0/calc(var(--s1)/var(--n)) var(--s1),
	conic-gradient(from 180deg at var(--t) var(--g),var(--c)) 0 calc((var(--s1)/var(--n) - var(--g) + var(--t))/2)/var(--s1) calc(var(--s1)/var(--n));
}

.image {
	content: "";
	display: block;
	flex: 0 0 200px;
	height: 200px;
	width: 200px;
}

#portrait {
	background-image: url("img/placeholderpilot.webp");
	background-size: contain;
}

#awvportrait {
	align-self: center;
	background-image: url("img/placeholderawv.webp");
	flex: 0 0 min(600px, calc(100vw - 20px));
	background-size: contain;
	width: min(600px, calc(100vw - 20px));
	height: min(600px, calc(100vw - 20px));
	margin-bottom: 40px;
}

.info {
	display: flex;
	flex-flow: column nowrap;
	flex: 0 0 370px;
	padding: 10px;
}

.awvinfo {
	text-align: center;
	transform: translateY(-15px);
}

.name {
	font-family: AppleII, monospace;
	font-size: 2rem;
}

.awvname {
	font-size: 1.75rem;
	flex: 1 0 64px;
}

.playbook {
	font-size: 1.5rem;
}

.vehicle {
	font-size: 2rem;
}

.spacer {
	flex-grow: 5;
}

button {
	cursor: pointer;
	position: relative;
	background-color: rgba(14, 180, 154, .15);
	background-size: calc(100% - 10px) calc(100% - 10px);
	background-repeat: no-repeat;
	background-position: 50% 50%;
	border-color: var(--BS-light-green);
	border-radius: 3px;
	border-width: 1px;
	font-family: APPLEII;
	text-transform: uppercase;
	color: var(--BS-light-green);
	font-size: .75rem;
	padding: 7.5px;
	margin: 2px;
	transition: all .1s;
	opacity: 0;
}

button:hover {
	color: #222;
}

button::before {
	content: "";
	position: absolute;
	inset: 2px 50% 2px 50%;
	z-index: -1;
	background-color:rgba(14, 180, 154, 1);
	opacity: 0;
	transition: all .1s;
}

button:hover::before {
	opacity: 1;
	inset: 2px 2px 2px 2px;

}

.prev {
	margin-left: 10px;
}

.next {
	margin-right: 10px;
}

.buttonrow {
	display: flex;
	flex-flow: row nowrap;
	width: 100%;
}

.lilbutt {
	flex-grow: 1;
}

.buttwrapper {
	display: flex;
	flex-flow: column nowrap;
	width: 100%;
}

/* #region Beam Saber Logo */
#BeamSaber {
	margin-bottom: 2rem;
	display: block;
	position: relative;
	width: clamp(18rem, 22vw, 30rem);
	justify-self: center;
	font-size: clamp(2.5rem, 3vw, 4rem);
	line-height: clamp(1.5rem, 1.8vw, 2rem);
	font-family: Sector17;
	color: var(--BS-light-green);
	text-transform: uppercase;
	text-align: center;
	text-shadow: 0 0 5px var(--BS-light-green);
	opacity: .4;
}

#BeamSaber::after {
	content: "a forged in the dark game by Avalyn Ramsay";
	font-family: TallDark;
	font-size: clamp(1rem, 1.25vw, 1.7rem);
	line-height: clamp(.01rem, 0.25vw, .25rem);
	text-align: center;
	position: absolute;
	width: 100%;
	top: 110%;
	left: 0;
}

#BeamSaber::before {
	content: " ";
	background: var(--BS-light-green);
	position: absolute;
	height: 450%;
	width: 100%;
	top: 50%;
	left: 0%;
	clip-path: polygon(0% 0%, 5% 10%, 15% 10%, 20% 20%, 80% 20%, 85% 10%, 95% 10%, 100% 0%, 
	98.5% 0%, 94% 8.5%, 84% 8.5%, 79% 18.5%, 21% 18.5%, 16% 8.5%, 6% 8.5%, 1.5% 0%);
}

.stack {
	flex-grow: 1;
	display: grid;
	grid-template-columns: 1fr;
}

.stack span {
	grid-row-start: 1;
	grid-column-start: 1;
	--stack-height: calc(100% / var(--stacks) - 1px);
	--inverse-index: calc(calc(var(--stacks) - 1) - var(--index));
	--clip-top: calc(var(--stack-height) * var(--index));
	--clip-bottom: calc(var(--stack-height) * var(--inverse-index));
	clip-path: inset(var(--clip-top) 0 -100% 0);
	animation: 
	stack 340ms cubic-bezier(.46,.29,0,1.24) 1 backwards calc(var(--index) * 120ms), 
	glitch 2s ease infinite 2s alternate-reverse;
}

.stack span:nth-child(odd) { --glitch-translate: 8px; }
.stack span:nth-child(even) { --glitch-translate: -8px; }
  
@keyframes stack {
0% {
	opacity: 0;
	transform: translateX(-50%);
	text-shadow: -2px 3px 0 red, 2px -3px 0 blue;
};
60% {
	opacity: 0.5;
	transform: translateX(50%);
}
80% {
	transform: none;
	opacity: 1;
	text-shadow: 2px -3px 0 red, -2px 3px 0 blue;
}
100% {
	text-shadow: none;
}
}
  
@keyframes glitch {
0% {
	text-shadow: -2px 3px 0 red, 2px -3px 0 blue;
	transform: translate(var(--glitch-translate));
}
2% {
	text-shadow: 2px -3px 0 red, -2px 3px 0 blue;
}
4%, 100% {  text-shadow: none; transform: none; }
}

/* #endregion */

 /* #region NOWN LOGO */
#titlebox {
	width: 75px;
	height: 75px;
	background-image: url('/titlebox.png');
	background-size: contain;
	z-index: 10000;
}

#title {
	display: inline-block;
	width: 100%;
	height: 100%;
	font-family: Punk;
	font-weight: 400;
	text-align: center;
	vertical-align: middle;
	color: var(--color);
	line-height: 1.25rem;
	font-size: 1.75rem;
	padding: 10% 0;
	color: ghostwhite;
}

#logobox {
	opacity: 0;
	mix-blend-mode: lighten;
}

#logoBox a {
	color: var(--color) !important;
}

#logoBox a:hover {
	color: var(--color) !important;
	text-decoration: none !important;
}

 /* #endregion */

/* #region BootUp animation */
.flicker {
	--boot: 0s;
	--bootDelay: 0s;
	opacity:0;
	animation: entrance var(--boot) var(--bootDelay) ease-in forwards;
}

  @keyframes entrance {
	0% {opacity: 0;}
	10% {opacity: 1;}
	30% {opacity: 0;}
	35% {opacity: 1;}
	50% {opacity: 0;}
	60% {opacity: 1;}
	70% {opacity: 0;}
	80% {opacity: 1;}
	90% {opacity: 0;}
	100% {opacity: 1;}
}

@keyframes entrance2 {
	0% {opacity: 0;}
	10% {opacity: .3;}
	30% {opacity: 0;}
	35% {opacity: .3;}
	50% {opacity: 0;}
	60% {opacity: .3;}
	70% {opacity: 0;}
	80% {opacity: .3;}
	90% {opacity: 0;}
	100% {opacity: .3;}
}
/* #endregion */

#crt {
	font-family: APPLEII, monospace;
	font-size: 1.6rem;
	text-shadow: 0 0 5px #c8c8c8;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background-image: radial-gradient(ellipse, var(--bg) 0%, #050505 90%);
	z-index: 999;
	animation: textShadow 4s infinite;
	transition: all 0.5s;
	background-attachment: fixed;
	overflow: hidden;
	z-index: -999;
}

#crt:before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(16, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%), linear-gradient(to right, rgba(255, 0, 0, 0.08), rgba(0, 255, 0, 0.04), rgba(0, 0, 255, 0.08));
    background-size: 100% 6px, 3px 100%;
    z-index: 2;
    pointer-events: none;
}

#crt:after {
	content: " ";
	opacity: 0;
	background-color: var(--off);
	display: block;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
}

::selection {
	background: var(--color);
	color: var(--bg);
	text-shadow: none;
}

/* BIG SCANLINE */
.scanline {
	pointer-events: none;
    width: 100%;
    height: 100px;
    z-index: 8;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(255, 255, 255, 0.2) 10%,
        rgba(0, 0, 0, 0.1) 100%
    );
    opacity: 0.1;
    position: absolute;
    bottom: 100%;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% {
        bottom: 100%;
    }
    80% {
        bottom: 100%;
    }
    100% {
        bottom: 0%;
    }
}

/* END BIG SCANLINE */

.footer {
	display: none;
}

  @media (max-width:1300px) {

	.footer {
		display: flex;
		padding:1rem;
	}

	main {
		justify-content: flex-start;
	}

	.displaywrapper {
		flex-flow: column nowrap;
		justify-content: flex-start;
		width: min(100%, calc(1280px +1rem));
		margin-bottom: 2rem;
	}

	.card {
	flex-flow: column nowrap;
	height: fit-content;
	padding: 0;
	}
	
	.card::before {
		--s: 25px; /* size of the corners */
		border: 3px solid var(--BS-light-green); 
	}

	.info {
	flex: 0 0 fit-content;
	padding: 0;
	}
	
	.name {
		height: 4rem;
	}

	.awvinfo {
		transform: translateY(0px);
	}

	.spacer {
		flex-grow: 0;
	}

	.filler {
		display: none;
	}


	#crt {
		display: none;
	}

	.scanline {
		display: none;
	}

}
  