/* base.css */
/* -------------------------------
   Falls du eigene Webfonts einbinden möchtest, 
   könntest du hier ggf. ein @import oder @font-face einbauen:
   
   @font-face {
     font-family: 'paragraph';
     src: url('fonts/paragraph.woff2') format('woff2');
     font-weight: normal;
     font-style: normal;
   }
   
   @font-face {
     font-family: 'title';
     src: url('fonts/title.woff2') format('woff2');
     font-weight: normal;
     font-style: normal;
   }
--------------------------------- */

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

:root {
	/* Grundgröße */
	font-size: 10px;
	
	/* Farben */
	--color-text: #111;       /* Textfarbe */
	--color-bg: #fff;         /* Hintergrundfarbe */
	--color-link: #aaa;       /* Linkfarbe */
	--color-link-hover: #000; /* Hover-Farbe für Links */
}

/* ------------------------------------------------
   Body-Styles
   ------------------------------------------------ */
body {
	margin: 0;
	color: var(--color-text);
	background-color: var(--color-bg);
	font-family: 'paragraph', paragraph, sans-serif;
	font-weight: normal;
	font-style: normal;
	position: relative;
	width: 100%;
	height: 100vh;
	overflow-x: hidden;
}

/* Die "Screen" und "Fold" Bereiche */
.screen {
	position: fixed;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100vh;
	pointer-events: none;
}

.fold-scroller {
	height: 100%;
}

.fold-content {
	pointer-events: all;
	width: 100%;
}

.fold-size-fix {
	width: 100%;
	height: 100%;
}

.fold-before .fold-size-fix {
	transform-origin: bottom center;
}

.fold-after .fold-size-fix {
	transform-origin: top center;
}

#base-content {
	display: none;
}

/* Debug-Hintergründe */
.debug .fold:nth-child(2n) {
	background: #dadada;
}
.debug .fold:nth-child(2n + 1) {
	background: #bababa;
}

.btn-debug {
	position: fixed;
	top: 10px;
	padding: 1rem;
	font-size: 16px;
	text-transform: uppercase;
	right: 10px;
	cursor: pointer;
	z-index: 100;
	display: none;
}

.square {
	width: 100%;
	padding-bottom: 100%;
	background: coral;
}

.rectangle {
	width: 100%;
	padding-bottom: 50%;
	background: coral;
	box-shadow: 1px 0 coral, 0 1px coral;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
	content: '';
	position: fixed;
	z-index: 1000;
}

.js .loading::before {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-bg);
}

.js .loading::after {
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	border-radius: 50%;
	opacity: 0.4;
	background: var(--color-link);
	animation: loaderAnim 0.7s linear infinite alternate forwards;
}

@keyframes loaderAnim {
	to {
		opacity: 1;
		transform: scale3d(0.5, 0.5, 1);
	}
}

/* Links */
a {
	text-decoration: none;
	color: var(--color-link);
	outline: none;
}

a:hover,
a:focus {
	color: var(--color-link-hover);
	outline: none;
}

/* Allgemeine Messages */
.message {
	background: var(--color-text);
	color: var(--color-bg);
	padding: 1rem;
	text-align: center;
	display: none;
}

/* Rahmen (Headerbereich) */
.frame {
	padding: 3rem 5vw;
	text-align: center;
	position: relative;
	z-index: 1000;
}

/* Haupt-Titel */
.frame__title {
	font-family: 'title', Arial, sans-serif;
	font-weight: normal;
	font-style: normal;
	font-size: 1rem;
	margin: 0 0 1rem;
}

/* Link-Bereich */
.frame__links {
	display: inline;
}
.frame__links a:not(:last-child),
.frame__demos a:not(:last-child) {
	margin-right: 1rem;
}

.frame__demos {
	margin: 1rem 0;
}

.frame__demo--current,
.frame__demo--current:hover {
	color: var(--color-text);
}

/* Content-Bereich */
.content {
	display: flex;
	flex-direction: column;
	width: 100vw;
	height: calc(100vh - 13rem);
	position: relative;
	justify-content: flex-start;
	align-items: center;
}

/* Responsive Layout */
@media screen and (min-width: 53em) {
	.message {
		display: none;
	}

	.frame {
		position: fixed;
		text-align: left;
		z-index: 100;
		top: 0;
		left: 0;
		display: grid;
		align-content: space-between;
		width: 100%;
		max-width: none;
		height: 100vh;
		padding: 3rem;
		pointer-events: none;
		grid-template-columns: 50% 50%;
		grid-template-rows: auto auto auto;
		grid-template-areas: 'title links'
		                     '... ...'
		                     '... demos';
	}

	.frame__title-wrap {
		grid-area: title;
		display: flex;
	}

	.frame__title {
		margin: 0;
	}

	.frame__tagline {
		position: relative;
		margin: 0 0 0 1rem;
		padding: 0 0 0 1rem;
		opacity: 0.5;
	}

	.frame__demos {
		margin: 0;
		grid-area: demos;
		justify-self: end;
	}

	.frame__links {
		grid-area: links;
		padding: 0;
		justify-self: end;
	}

	.frame a {
		pointer-events: auto;
	}

	.content {
		height: 100vh;
		justify-content: center;
	}
}
