@import url("https://fonts.googleapis.com/css?family=Oswald:200,300,400,500,600,700");

/* general defaults */

:root {
	--nav-bar-height: 3rem;
	--display-font: Oswald, sans-serif;
	--text-font: sans-serif;
	font-family: var(--display-font);
	color: var(--primary-color);
}

@media not all and (prefers-color-scheme: dark) {
	:root {
		--page-background: #F2F2F6;
		--content-background: #FFFFFF;
		--primary-color: black;
	}

	.dark {
		display: none !important;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		--page-background: #000000;
		--content-background: #1C1C1D;
		--primary-color: white;
	}

	.light {
		display: none !important;
	}
}

h2,
h3,
h4,
h5,
h6 {
	opacity: 70%;
}

header img {
	margin: 1rem auto;
}

#content>header {
	color: var(--accent-color);
}

body {
	line-height: 1.4;
	font-weight: 400;
	font-size: 120%;
	margin: 0;
	word-wrap: break-word;
	text-align: center;
	background-color: var(--page-background);
	padding-top: var(--nav-bar-height);
}

p {
	font-family: var(--text-font);
}

#content>* {
	margin: 1rem auto 0 auto;
	max-width: 64rem;
	box-sizing: border-box;
	overflow: hidden;
}

header {
	margin-top: 2rem;
	margin-bottom: 2rem;
}

header,
section {
	padding-left: 1rem;
	padding-right: 1rem;
}

section {
	margin-top: 1rem;
	background-color: var(--content-background);
	overflow: hidden;
}

@media screen and (min-width: 32rem) {
	#content {
		padding: 1rem;
		padding-top: 0;
	}

	header,
	section {
		margin-left: 1rem;
		margin-right: 1rem;
	}

	section {
		margin-bottom: 1rem;
		border-radius: 1rem;
	}
}

section>* {
	margin-top: 1rem;
	margin-bottom: 1rem;
}

section>div,
header>div,
footer>div {
	margin-top: 1rem;
	margin-bottom: 1rem;
}

img {
	display: block;
	max-width: 100%;
	object-fit: contain;
}

a {
	color: var(--accent-color);
	font-family: var(--display-font);
	line-height: 0%;
	/* don't affect line height */
}

.centered {
	margin-left: auto;
	margin-right: auto;
}

/* navigation bar */

nav {
	position: fixed;
	top: 0;
	z-index: 50;
	width: 100%;
	height: var(--nav-bar-height);
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: rgba(25%, 25%, 25%, 25%);
	-webkit-backdrop-filter: blur(32px);
	backdrop-filter: blur(32px);
}

nav>* {
	margin-left: 1rem;
	margin-right: 1rem;
	/* fix oswald's weird vertical alignment */
	padding-bottom: 0.2em;
	position: relative;
}

nav a {
	color: #FFFFFF;
	text-decoration: none;
	white-space: nowrap;
	text-shadow: 0 0.1em 0.3em rgba(0, 0, 0, 25%);
	transition-duration: 0.5s;
	transition-property: opacity;
}

nav a:hover {
	transition-duration: 0.1s;
	opacity: 0.75;
}

/* screenshots */

.screenshots-stack {
	display: flex;
	flex-direction: row;
	overflow: scroll hidden;
	background-color: var(--page-background);
	border-left: 1px solid var(--page-background);
	border-right: 1px solid var(--page-background);
	border-radius: 2.5rem;
}

.screenshots-stack>* {
	flex-shrink: 0;
}

.screenshots-stack .screenshot {
	display: inline-block;
	max-height: 70vh;
	border-radius: 1.5rem;
	overflow: hidden;
	margin: 1rem;
	margin-right: 0;
	box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}

.screenshots-stack::after {
	display: block;
	content: "";
	min-width: 1rem;
}

@media (prefers-color-scheme: dark) {
	.screenshots-stack {
		background-color: rgba(0, 0, 0, 0.25);
	}
}

/* app store button */

.appstore {
	display: block;
	position: relative;
	width: 12rem;
	height: 4rem;
	margin-top: 2rem;
	margin-bottom: 2rem;
	background-image: url("res/AppStore.svg");
	background-size: cover;
	transition-duration: 0.5s;
	transition-property: transform;
}

.appstore:hover {
	transition-duration: 0.1s;
	transform: scale(1.02, 1.02);
}

.appstore>a {
	display: block;
	width: 100%;
	height: 100%;
}

/* miscellaneous */

.flex-break {
	flex-basis: 100%;
	/* fill container so next element has to be on next line */
}

.pixel {
	/* more speed = less smoothing */
	image-rendering: optimizeSpeed;
	/* Firefox */
	image-rendering: -moz-crisp-edges;
	/* Opera */
	image-rendering: -o-crisp-edges;
	/* Chrome (and eventually Safari) */
	image-rendering: -webkit-optimize-contrast;
	/* Chrome */
	image-rendering: pixelated;
	/* CSS3 Proposed */
	image-rendering: optimize-contrast;
	/* IE8+ */
	-ms-interpolation-mode: nearest-neighbor;
}

.initial-body {
	transition: none !important;
}
