:root {
	--color-accent: rgb(45, 220, 175);
	--text-primary-color: #fff;
	--text-secondary-color: #000;
	--bg-primary-color: #000;
	--bg-secondary-color: #fff;
	--icon-color: #929292;
	--size-nav: 0.8rem;
	--size-text: 1rem;
	--size-title: 2rem;
	--size-subtitle: 1.5rem;
	--size-smalltitle: 1.25rem;
	--line-height: 1.5rem;
}
*,
* ::before,
* ::after {
	box-sizing: border-box;
	font-family: Omori-2;
}

@font-face {
	font-family: Omori;
	src: url('/fonts/OMORI_GAME.ttf');
}
@font-face {
	font-family: Omori-2;
	src: url('/fonts/OMORI_GAME2.ttf');
}
::-webkit-scrollbar {
	width: 0px;
}
h1 {
	font-size: var(--size-title);
	margin-top: 0;
	margin-bottom: 1.25rem;
}
h2 {
	font-size: var(--size-subtitle);
	margin-top: 0;
	margin-bottom: 0.75rem;
}
h3 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-size: var(--size-smalltitle);
}
p {
	margin-top: 0;
	margin-bottom: 0.5rem;
}
a {
	text-decoration: underline;
	cursor: url('/img/site/cursor.png'), auto;
}
a:link {
	color: var(--color-accent);
	cursor: url('/img/site/cursor.png'), auto;
}
a:visited {
	color: var(--color-accent);
}
.accent {
	color: var(--color-accent);
}
ul {
	margin-block: 0;
	padding-left: 1.5rem;
	list-style-type: square;
	list-style-position: outside;
	image-rendering: pixelated;
}
li {
	margin-bottom: 0.5rem;
}
body {
	color: var(--text-primary-color);
	display: flex;
	justify-content: center;
	margin: 0;
	font-size: var(--size-text);
	line-height: var(--line-height);
	font-family: 'Omori-2', system-ui, sans-serif;
	background-image: url('/img/site/bg.png');
	background-color: var(--bg-primary-color);
	background-size: cover;
	background-repeat: no-repeat;
	overscroll-behavior: none;
}
.panel {
	display: flex;
	flex-direction: column;
	width: 45vw;
	height: 100svh;
	padding: 5px 15px;
	background-color: var(--bg-secondary-color);
	box-shadow: inset 0 0 0 2px #000, inset 0 0 0 4px #fff, inset 0 0 0 6px #000;
}
header {
	position: relative;
	margin-block: 8px;
}
nav {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 1em;
	justify-content: center;
}
.section-btn {
	position: relative;
	width: 5.5em;
	padding: 0.2em 0.5em 0.6em 0.5em;
	color: var(--text-primary-color);
	background-color: var(--bg-primary-color);
	box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px #fff;
	font-size: var(--size-nav);
	text-transform: uppercase;
	cursor: url('/img/site/cursor.png'), auto;
	border-style: none;
	top: 0px;
	transition: top 0.5s;
}
.section-btn.active::before {
	content: '';
	position: absolute;
	background: url(/img/site/right-hand.png);
	top: 30%;
	left: -1rem;
	width: 29px;
	height: 14px;
	background-repeat: no-repeat;
	background-size: contain;
	image-rendering: pixelated;
	animation: drift-left-button 0.5s steps(4) infinite alternate;
}
.section-btn.active,
.section-btn:hover,
.section-btn:focus {
	top: -5px;
}
.lan-btn {
	display: flex;
	position: absolute;
	top: 5px;
	right: 10px;
	z-index: 1;
	background: none;
	border: none;
	align-items: center;
	font-size: var(--size-nav);
	color: var(--icon-color);
	-webkit-text-stroke: 1px;
	cursor: url('/img/site/cursor.png'), auto;
	image-rendering: pixelated;
}
.es::before {
	content: 'ES';
}
.en::before {
	content: 'EN';
}
.lan-btn:active,
.lan-btn:hover,
.lan-btn:focus {
	color: var(--bg-primary-color);
}
main {
	flex: 1 1 0;
	margin-bottom: 1rem;
	padding: 1rem;
	background-color: var(--bg-primary-color);
	border: 3px solid #fff;
	outline: 1px solid #000;
	container-type: inline-size;
	overflow: scroll;
	scrollbar-width: none;
}
.gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: min-content;
	grid-auto-flow: row;
	padding: 0;
	margin: 0;
	align-items: center;
	list-style: none;
	gap: 0.5rem;
	overflow-y: scroll;
	scrollbar-width: none;
}
.gallery img {
	width: 100%;
	aspect-ratio: 1/1;
	display: flex;
	object-fit: contain;
	margin: 0;
	box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px #fff;
	background-image: url('/img/site/paper.avif');
	padding: 5px;
	cursor: url('/img/site/cursor.png'), auto;
}
.favs {
	display: grid;
	grid-template-columns: repeat(var(--nb-cols), 1fr);
	grid-auto-flow: row;
	margin-bottom: 1rem;
	gap: var(--gap);
	overflow-y: scroll;
	scroll-snap-stop: always;
	scroll-snap-type: y mandatory;

	--gap: 0.5rem;
	--nb-cols: 4;
	--col-width: calc(100cqw / var(--nb-cols));
	--remove-gap: (var(--gap) / (var(--nb-cols) - 1));
	--item-aspect-ratio: 350 / 240;

	max-height: calc((var(--col-width) - var(--remove-gap)) * var(--item-aspect-ratio));
}
.games {
	--item-aspect-ratio: 350 / 270;
}
.favs img {
	width: 100%;
	border: 2px solid var(--bg-secondary-color);
	scroll-snap-align: start;
	pointer-events: auto;
}
.post-wrapper {
	margin-bottom: 0.5rem;
	flex-direction: column;
}
.post-wrapper p,
.post-wrapper h3 {
	margin-bottom: 0;
}
.post-stats {
	margin-top: 5px;
	font-size: var(--size-nav);
}
.post-stats img {
	position: relative;
	top: 4px;
	width: 1rem;
	display: inline-block;
	image-rendering: pixelated;
}
.socials-list {
	margin-top: 1.25rem;
}
.socials-list,
.friends-list {
	list-style: none;
	padding-left: 0;
}
.social-card {
	margin-left: 1.5rem;
	margin-bottom: 1rem;
	max-width: fit-content;
	display: flex;
	flex-direction: row;
	flex-shrink: 1;
}
.social-card h3 {
	font-size: var(--size-text);
	text-transform: unset;
	margin-left: 4px;
	font-weight: lighter;
}
.friend-card {
	display: flex;
	flex: 1 1 0;
	box-shadow: 0 0 0 2px #000, 0 0 0 4px #fff;
	max-width: fit-content;
	background-color: var(--bg-secondary-color);
	margin-left: 1.5rem;
	margin-block: 1.5rem;
}
.friend-card img {
	width: calc(88px * 2);
	image-rendering: pixelated;
}
footer {
	position: relative;
	width: 100%;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
}
.door {
	position: absolute;
	display: block;
	margin-block: 0;
	top: -8px;
	width: 22px;
	height: 34px;
	image-rendering: pixelated;
	background-image: url('/img/site/door.png');
	background-size: cover;
	background-repeat: no-repeat;
	align-items: flex-start;
	cursor: url('/img/site/cursor.png'), auto;
}
.door:hover {
	left: -4px;
	width: 26px;
	height: 45px;
	background-image: url('/img/site/door_open.png');
}
.license {
	width: fit-content;
	margin-top: auto;
	margin-inline: auto;
	margin-bottom: 15px;
	height: 2em;
	display: flex;
	justify-content: center;
	text-align: center;
	flex-direction: row;
	flex-shrink: 1;
	font-size: 0.6em;
}
.license p {
	max-width: 100%;
	display: inline-block;
	flex-wrap: wrap;
	margin-block: 0;
	margin-inline: auto;
	line-height: 1rem;
	color: var(--text-secondary-color);
}
#fullscreen {
	display: none;
	position: fixed;
	z-index: 99;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	background-color: rgba(0, 0, 0, 0.8);
}
.arrow {
	width: 58px;
	height: 28px;
	content: '';
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-size: contain;
	background-repeat: no-repeat;
	padding: 10px;
	cursor: url('/img/site/cursor.png'), auto;
	image-rendering: pixelated;
	z-index: 10;
}
.left-arrow {
	left: 5px;
	background-image: url('/img/site/left-hand.png');
	animation: drift-left 0.5s steps(4) infinite alternate;
}
.right-arrow {
	right: 5px;
	background-image: url('/img/site/right-hand.png');
	animation: drift-right 0.5s steps(4) infinite alternate;
}
@keyframes drift-right {
	from {
		right: 15px;
	}
	to {
		right: 5px;
	}
}
@keyframes drift-left {
	from {
		left: 15px;
	}
	to {
		left: 5px;
	}
}
@keyframes drift-left-button {
	from {
		left: -2em;
	}
	to {
		left: -1.5em;
	}
}
@media (max-width: 1250px) {
	.panel {
		width: 60vw;
	}
}
@media (max-width: 900px) {
	.panel {
		width: 100%;
	}
	.section-btn.active::before {
		width: 29px;
		height: 14px;
	}
	.arrow {
		width: 28px;
		height: 14px;
	}
}
@media (max-width: 800px) {
	nav {
		gap: 0.75em;
		margin-bottom: 0;
	}
	.es::before {
		content: '';
	}
	.en::before {
		content: '';
	}
	.gallery {
		grid-template-columns: repeat(2, 1fr);
	}
	.favs {
		--nb-cols: 3;
	}
	.lan-btn {
		right: 5px;
		transform: scale(1.5);
		image-rendering: pixelated;
	}
}
@media (max-width: 600px) {
	:root {
		--color-accent: rgb(45, 220, 175);
		--size-nav: 0.7rem;
		--size-text: 0.8rem;
		--size-title: 1.5rem;
		--size-subtitle: 1.125rem;
		--size-smalltitle: 1rem;
		--line-height: 1.25rem;
	}
	li {
		margin-bottom: 0.25rem;
	}
	body {
		line-height: var(--line-height);
	}
	main {
		max-height: 88svh;
	}
	.lan-btn {
		position: fixed;
		right: 18px;
		top: unset;
		bottom: 18px;
	}
	.social-card {
		margin-bottom: 0;
	}
	.social-card img {
		position: relative;
		top: -4px;
	}
	.license p {
		margin-inline: 25px;
		margin-top: -6px;
	}
}
