:root {
	--black: #000000;
	--white: #FFFFFF;
	--color: #8A69BF;
	--accent: #DD5B3E;

	--light0: #F0E9FB;
	--lightbg: #DBCBEF;
	--light1: #A98ACB;
	--light2: #7557A2;

	--dark0: #5B5B66;
	--darkbg: #313139;
	--dark1: #24242A;
	--dark2: #16161A;

	font-size: 1vh;
}

@font-face {
	font-family: "Caveat";
	src: url(/100kards/fonts/Caveat-Regular.woff2);
}

@font-face {
	font-family: "Courier Complete";
	font-weight: normal;
	src: url(/100kards/fonts/CourierNew.woff2);
}

@font-face {
	font-family: "Courier Complete";
	font-weight: bold;
	src: url(/100kards/fonts/CourierNew-Bold.woff2);
}

@media (max-aspect-ratio: 10/18) {
	:root {
		font-size: 1.8vw;
	}
}

html, body {
	margin: 0;
	width: 100%;
	overflow-x: hidden;
	overscroll-behavior-y: none;
}

::selection {
	background-color: var(--black);
	color: var(--white);
}

button {
	background: none;
	border: none;
	padding: 0;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance:textfield;
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* BACKGROUND IMAGE */

#backgroundimage {
	width: 90%; 
	height: 75%;
	object-fit: cover;
	z-index: -1;
	position: fixed;
	bottom: 0;
	left: 5%;
}

@media (max-aspect-ratio: 3/4) {
	#backgroundimage  {
		width: 100%;
		left: 0;
	}
}

/* CARD CONTAINERS */

.contentWrapper {
    height: 100vh;
}

#contentContainer {
	height: 85rem;
	width: 85rem;
	max-width: 100%;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: row-reverse;
	justify-content: center;
	transform-style: preserve-3d;
  	perspective: 200rem;
}

#flexSpacer {
	width: 18rem;
	flex-shrink: 1;
}

.anotherWrapper {
	height: 100%;
  	display: flex;
  	transform-style: preserve-3d;
}

#containerButton {
	transform-style: preserve-3d;
	width: fit-content;
	align-self: center;
	border-radius: 5rem;
}
#containerButton:focus-visible {
	outline: 4px solid var(--black);
	box-shadow: 0 0 0 8px var(--white);
}

#containerButton.polaroidShown {
	border-radius: 0;
}

#containerButton.polaroidShown:focus-visible {
	outline: 4px solid var(--white);
	box-shadow: 0 0 0 8px var(--black);
}

/* FLIP ANIMATION */

.flipcard {
	animation: spinning 2.1s cubic-bezier(0.7, 0.1, 0.0, 0.9);
}

@keyframes spinning {
	from { transform: rotateY(0deg); }
	to { transform: rotateY(360deg); }
}

/* SHIMMER ANIMATION */

#shimmerOverlay {
	position: relative;
	height: 200%;
	width: 100%;
	top: 200%;
}
.shimmerVertical {
	background-image: linear-gradient(35deg, transparent 0%, transparent 20%, var(--white) 35%, var(--white) 65%, transparent 80%, transparent 100%);
	animation-name: shimmer;
	animation-duration: 1.4s;
}
@keyframes shimmer {
	0%   { top: 100%; }
	100%  { top: -300%; }
}

/* SPARKLE OVERLAY */

#sparkleWrapper {
	height: 0;
	width: 100%;
}

#sparkleOverlay {
	position: relative;
	height: 3rem;
	aspect-ratio: 1/1;
	background-color: var(--white);
	border: var(--color) 0.25rem solid;
	opacity: 0.2;
	animation: sparkle 2s cubic-bezier(0.7, 0.1, 0.0, 0.9);
	transform: translate(-50%, -50%);
	border-radius: 100%;
	filter: blur(1rem);
	display: none;
}

@keyframes sparkle {
	0% { left: 0%; height: 0rem; filter: blur(0.25rem); border-width: 0.25rem;}
	15% { left: 0%; height: 1rem; filter: blur(0.25rem); border-width: 0.25rem;}
	70% { left: 93%; height: 8rem; filter: blur(0.75rem); border-width: 0.75rem;}
	72% { left: 93%; height: 0rem; filter: blur(0); border-width: 0;}
}

/* CARD FACES */

.face {
	width: 45rem;
	height: 70rem;
	backface-visibility: hidden;
	border-radius: 5rem;
}
#question {
	display: grid;
    grid-template-columns: 15% 1fr 15%;
	height: 100%;
	overflow: hidden;
}
#frontface {
	background-color: var(--white);
	background-image: url(/100kards/images/frontside.png);
	background-size: auto 100%;
	background-position: center;
	box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px, rgba(0, 0, 0, 0.4) 0px 1px 2px;
	overflow: hidden;
	cursor: pointer;
}
#backface {
	background-image: url(/100kards/images/backside.png);
	background-size: auto 100%;
	background-position: center;
	transform: rotateY(180deg);
	position: absolute;
	top: 0;
}

/* COUNTER AND SYMBOL */

.topleft {
    grid-column: 1 / 2;
}
.bottomright {
	rotate: 180deg;
	grid-column: 3 / 4;
}
#counter1, #counter2 {
	font-size: 10rem;
	line-height: 9rem;
	color: var(--color);
	margin: 0;
	text-align: center;
	padding-top: 35%;
	transform: scale(0.5,1);
	font-weight: normal;
	width: 200%;
	position: relative;
	left: -50%;
	letter-spacing: -1rem;
}

/* MAIN TEXT */

#textbox {
    grid-column: 2 / 3;
}
#fronttext {
	font-family: "Courier Complete", monospace;
	font-weight: bold;
	text-align: left;
	font-size: 3rem;
	line-height: 6rem;
	overflow-wrap: break-word;
	margin: 0;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* POLAROID */

#polaroidContainer {
	height: 40rem;
	width: 49rem;
	display: none;
}

#polaroid {
	backface-visibility: hidden;
	overflow: hidden;
	padding:0;
	position: absolute;
	top: 50%;
	left: 50%;
 	transform: translate(-50%, -50%);
	margin: 0 auto;
	background-color: var(--black);
	box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px, rgba(0, 0, 0, 0.4) 0px 1px 2px;
	cursor: pointer;
	width: 100%;
}

#polaroidText {
	font-family: "Caveat";
	color: var(--white);
	rotate: -1deg;
	text-align: center;
	white-space: nowrap;
}
#polaroidPhoto {
	height: 30rem;
	width: 45rem;
	margin: 3rem 2rem 1rem 2rem;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	overflow: hidden;
}

#shimmerHorizontalOverlay {
	position: relative;
	height: 100%;
	width: 50%;
  	background-image: linear-gradient(82deg, #DD5B3E 0%, #DD5B3E22 30%, transparent 100%);
}

/* INFOBUTTON */

#infobutton {
	border-width: 1rem;
	border-style: solid;
	margin: 6rem 3rem 3rem 3rem;
	cursor: pointer;
	height: 12rem;
	width: 12rem;
}
#infobutton:focus-visible {
	outline: 4px solid var(--black);
	box-shadow: 0 0 0 8px var(--white);
}
@media (max-aspect-ratio: 3/4) {
	#contentContainer {
		flex-direction: column;
		align-items: center;
	}
	#infobutton {
		margin: 2rem 0 0 0;
	}
}
#infobuttonimage {
	margin: 0;
	padding: 1rem;
	width: 8rem;
	height: 8rem;
	image-rendering: pixelated;
}
#infobutton:active{
	outline: var(--black) solid 1px;
}

/* infoscreen */

#infoscreen {
	position: absolute;
  	top: 50%;
	left: 50%;
 	transform: translate(-50%, -50%);
	background-color: var(--black);
	padding: 3rem;
	border-radius: 5rem;
	transition: 0.2s;
	overflow: hidden;
}

.infoscreen-in {
	animation: infoscreen-in 0.5s linear;
}
@keyframes infoscreen-in {
	0% {
		height: 3rem;
		width: 0;
		padding: 0;
	}
	40% {
		width: unset;
		padding: 0 3rem 0 3rem;
	}
	100% {
		height: unset;
		padding: 3rem;
	}
}

.infoscreen-out {
	animation: infoscreen-out 0.5s linear;
}
@keyframes infoscreen-out {
	0% {
		height: unset;
		width: unset;
		padding: 3rem;
	}
	60% {
		height: 3rem;
		padding: 0 3rem 0 3rem;
	}
	100% {
		width: 0;
		padding: 0;
		height: 0;
	}
}

#infoscreen, #infopage2 {
	display: none;
}

a, .infoscreenbutton {
	color:var(--white);
	font-size: 3rem;
	line-height: 3rem;
	text-transform: uppercase;
	font-family: "Courier Complete", monospace;
	white-space: pre;
}
a::selection {
	background-color: var(--white);
	color: var(--black);
}
.infoscreenbutton {
	color: var(--accent);
	cursor: pointer;
}
.infoscreenbutton::selection {
	color: var(--accent);
}
.infoscreenbutton:focus-visible {
	background-color: var(--white);
	color: var(--black);
	outline: none;
}
.selectedinfoscreenbutton {
	background-color: var(--accent);
	color: var(--black);
}
.selectedinfoscreenbutton::selection {
	color: var(--accent);
}
#inputform {
	color: var(--accent);
	font-size: 3rem;
}
.infoinput {
	color: var(--accent);
	font-size: 3rem;
	text-transform: uppercase;
	font-family: "Courier Complete", monospace;
	border: none;
	outline: none;
	background-color: transparent;
	padding: 0;
}

.infoinput:focus-visible {
	color: var(--white);
}

/* NOTE */

#note {
	backface-visibility: hidden;
	display: none;
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 5rem;
	box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px, rgba(0, 0, 0, 0.4) 0px 1px 2px;
	cursor: pointer;
	background-color: var(--white);
}

#quoteContainer {
	margin: 0;
  	overflow-y: scroll;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	height: 55rem;
}

#noteQuote {
	margin: 4rem 4rem 2rem 4rem;
	text-align: justify;
	font-size: 2.5rem;
	font-family: "Courier Complete", monospace;
	letter-spacing: 0.3rem;
	line-height: 2.5rem;
	white-space: break-spaces;
	font-weight: bold;
}

#noteAuthor {
	margin: 2rem 4rem 4rem 4rem;
	font-size: 2rem;
	font-family: "Courier Complete", monospace;
	letter-spacing: 0.3rem;
	line-height: 1.8rem;
	color: var(--accent);
	white-space: break-spaces;
}

#topScrollGradient {
	width: 100%;
	height: 15rem;
	position: absolute;
	top: 0;
	background-image: linear-gradient(white, transparent);
	opacity: 0;
	transition: all 0.2s linear;
	pointer-events: none;
	border-radius: 5rem 5rem 0 0;
}

#bottomScrollGradient {
	width: 100%;
	height: 15rem;
	position: absolute;
	bottom: 15rem;
	background-image: linear-gradient(transparent, white);
	transition: all 0.2s linear;
	pointer-events: none;
}

#scrollNotice {
	position: absolute;
	bottom: 0;
	width: 100%;
	text-align: center;
	font-size: 2rem;
	font-family: "Courier Complete", monospace;
	color: var(--accent);
	font-weight: bold;
	height: 2rem;
	overflow: hidden;
	margin: 0;
  	padding: 8px 0;
}

#quoteContainer:focus-visible #scrollNotice {
	color: var(--white);
	background: var(--black);
}

#quoteContainer:focus-visible #bottomScrollGradient {
	opacity: 1 !important;
	background-image: none;
}

#quoteContainer:focus-visible #topScrollGradient {
	background-image: none;
}

#quoteContainer:focus-visible #noteAuthor {
	margin-bottom: 6rem;
}

.hintContainer {
	margin: 0;
	height: 15rem;
	background: var(--accent);
	border-radius: 0 0 5rem 5rem;
}

#noteHint {
	margin: 1rem 5rem;
	text-align: center;
	font-size: 2rem;
	font-family: "Courier Complete", monospace;
	line-height: 2rem;
	color: var(--white);
}

/* BACKGROUND NOISE */

#noise {
	pointer-events: none;
	transform: scale(4);
	transform-origin: top left;
	mix-blend-mode: overlay;
	opacity: 0.1;
}

/* FOOTER LINKS */

.footerLinks {
	display: flex;
  	gap: 2rem;
  	justify-content: center;
}

.footerLinks a {
	font-size: 2rem;
	color: var(--color);
}