:root {
	--title-color: #4f38c2;
	--title-font-size: 3em;
	--title-font: 'Segmented';
	--body-font: 'Alef';
	
	--body-font-color: #342d5c;
	--body-font-color-link: #2a244a;
	--inverse-color: #e9e8ee;
	--box-color: #dddce3;
	--box-border-color: #373062;
	--accent-color: #342d5c;
	--hover-color: #d14a43;

	--bg-image: url('_img/bg.webp');
	--bg-image-mobile: url('_img/bg-mobile.webp');
	--box-bg-image: url('_img/dots.bmp');
	
	--filmography-button: url('_img/filmography.gif');
	--contact-button: url('_img/contact.gif');
	--dropoff-button: url('_img/dropoff.gif');
	--pimst-button: url('_img/pimst.gif');
}

img {
	image-rendering: optimizeSpeed;
	image-rendering: -moz-crisp-edges;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: optimize-contrast;
	image-rendering: pixelated;
	-ms-interpolation-mode: nearest-neighbor;
}

body, html {
	scroll-behavior: smooth;
	margin: 0;
	padding: 0;
}

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

body {
	height: 100vh;
	background: var(--bg-image);
	background-repeat: repeat;
	background-size: 1600px;
	overscroll-behavior: contain;
	font: 0.9em var(--body-font);
	color: var(--body-font-color);
}

/* Mobile background*/
@media (max-width: 720px) {
	body {
		background: var(--bg-image-mobile) center / cover;
		background-repeat: no-repeat;
		background-size: 390%;
	}
}

@font-face {
	font-family: 'Alef';
	src: url('_fonts/alef-reg.ttf') format("truetype"); 
}

@font-face {
	font-family: 'Alef'; font-weight:bold;
	src: url('_fonts/alef-bold.ttf') format("truetype");
}

@font-face {
	font-family:'Segmented';
	src: url('_fonts/segmented.ttf') format("truetype");
}

a {
	color: var(--body-font-color-link);
}

a:hover {
    color: var(--hover-color);
}

p {
    margin-block-start: 0em;
    margin-block-end: 1.3em;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--title-font);
	color: var(--inverse-color);
	text-shadow: 1px 1px var(--body-font-color);
}

::selection {
	color: var(--inverse-color);
	background: var(--accent-color);
}

code {
	background-color: var(--accent-color);
	color: var(--body-font-color);
	padding: 0 5px;
	border: 1px solid  var(--accent-color);
	border-radius: 5px;
}

#header {
	height: 45vh;
	max-width: 100%;
	margin: 1em;
	background: var(--header-image) center / contain no-repeat;
}

::-webkit-scrollbar {
	width: 0.5em;
}

::-webkit-scrollbar-thumb {
	background-color: var(--accent-color);
	outline: 1px solid var(--accent-color);
}

.container {
	max-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 1em;
	padding: 0.75em;
}

.container > div {
	flex: 0 1 auto;
}

.inner-container {
    display: flex;
}

#middle {
	width: 21.5vw;
}

#middle {
	display: flex;
	flex-direction: column;
	align-items: center;
}

#box {
	background-color: var(--box-color);
	background: var(--box-bg-image);
	background-repeat: repeat;
  	background-size: 12px;
	border: 2px dashed var(--box-border-color);
	overflow-y: visible;
	width: 19.98vw;
	min-width: 25.5em;
	max-width: 30em;
	padding: 0em 1em;
	margin-top: 10%;
}

#svg img {
	display: block;
	width: 100%;
	max-width: 16.9rem;
	height: auto;
	margin: 0 auto;
	margin-top: 1.4rem;
	margin-bottom: 0.1rem;
}

#contact-button, #filmography-button, #dropoff-button, #pimst-button {
	width: 4.8em;
	height: 4.8em;
}

#button-grid {
	display: grid;
	grid-template-columns: repeat(2, 6.5em);
	justify-content: center;
	margin-top: 1em;
	margin-left: 0.8em;
}

#contact-button {
	background: var(--contact-button) center / contain no-repeat;
}

#pimst-button {
	background: var(--pimst-button) center / contain no-repeat;
}

#filmography-button {
	background: var(--filmography-button) center / contain no-repeat;
}

#dropoff-button {
	background: var(--dropoff-button) center / contain no-repeat;
}

#contact-button > p, #filmography-button > p, #pimst-button > p, #dropoff-button > p {
	text-align: center;
	font-style: italic;
	background-color: var(--box-color);
}

.modal {
	display: none;
	position: fixed;
	z-index: 1;
	padding: 10em 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: #d6d6d697;
}

.modal-content {
	position: relative;
	background-color: var(--box-color);
	background: var(--box-bg-image);
	background-repeat: repeat;
  	background-size: 12px;
	margin: auto;
	overflow: auto;
	padding: 0;
	border: 2px solid var(--box-border-color);
	width: 36vw;
	box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
	-webkit-animation-name: animatetop;
	-webkit-animation-duration: 0.4s;
	animation-name: animatetop;
	animation-duration: 0.4s;
}

@-webkit-keyframes animatetop {
	from {
		top: -30vh;
		opacity: 0;
	}

	to {
		top: 0;
		opacity: 1;
	}
}

@keyframes animatetop {
	from {
		top: -30vh;
		opacity: 0;
	}

	to {
		top: 0;
		opacity: 1;
	}
}

.modal-header {
	padding-left: 1.5em;
	padding-right: 1.5em;
	padding-top: 0.4em;
	padding-bottom: 0;
	border-bottom: 0.1px solid var(--box-border-color);
	background-color: var(--accent-color);
}

.modal-body {
	padding: 1em;
	padding-top: 1.7em;
	padding-bottom: 0.8em;
	max-height: 45vh;
}

.modal-button {
    padding: 1em;
	background: none;
	color: inherit;
	outline: inherit;
	border: none;
	cursor: pointer;
	height: inherit;
	width: inherit;
}

.url-button {
    padding: 1em;
	background: none;
	color: inherit;
	outline: inherit;
	border: none;
	cursor: pointer;
	height: inherit;
	width: inherit;
}

.modal-img {
	max-height: 30vh;
	max-width: 100%;
	padding: 5px;
	float: right;
}

.close {
	color: var(--inverse-color);
	float: right;
	font-size: 2.5em;
	font-weight: bold;
}

.close:hover, .close:focus {
	color: var(--hover-color);
	text-decoration: none;
	cursor: pointer;
}

  /* MOBILE */
@media only screen and (max-width: 800px) {
	.container {
		max-width: 100%;
		padding: 1em;
		margin: 0 auto;
		flex-wrap: wrap;
	}

    .inner-container {
        display: flex;
    }

    .modal-content {
        width: 90vw;
    }

    .modal-img {
	height: 100%;
	max-width: 35vw;
	}

	#header {
		max-height: 30vh;
		max-width: 100%;
	}
	#box {
		width: 85vw;
		min-width: auto
	}

	#middle {
		width: 90vw;
	}

}