
@font-face {
    font-family: 'Montserrat';
    src: url("../assets/Montserrat-Regular.ttf");
    font-weight: 400;
}

@font-face {
    font-family: 'Montserrat';
    src: url("../assets/Montserrat-SemiBold.ttf");
    font-weight: 600;
}


/* Hintergrund: rgb(232, 238, 235)
Schrift: rgb(75, 85, 99) */

html {
	font-family: 'Montserrat', serif;
	line-height: 1.15;
	-ms-text-size-adjust: 100%;
	-webkit-text-size-adjust: 100%;
}

* {
	box-sizing: border-box;
}


h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	color: rgb(75, 85, 99);
}


h1, .h1 {
	font-size: 2.1875rem;
	line-height: 1;
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-weight: 400;

}

h2, .h2 {
	font-size: calc(7.5px + 1vw);
	line-height: 1;
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-weight: 300;
}

h3, .h3 {
	font-size: calc(8px + 2vw);
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-weight: 300;
}

h4, .h4 {
	font-size: calc(8px + 1vw);
	line-height: 1;
	margin-top: 0;
	margin-bottom: 0.5rem; 
	font-weight: 300;
}


html, body {
	height: 100%;
	width: 100%;
	font-family: 'Montserrat', sans-serif;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	background-color: rgb(232, 238, 235);
}

body {
	margin: 0;
	padding: 0;
	line-height: 1.25;
	color: rgb(75, 85, 99);
	-moz-osx-font-smoothing: grayscale;
}

.wrap {
	position: relative;
	height: 100%;
	min-height: 500px;
	padding-bottom: 20px;
}

.game {
	transform-style: preserve-3d;
	perspective: 500px;
	overflow: auto;
	overflow-x: hidden;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	padding-top: 4vw;
}

.card24 .card {
	width: calc(100% /8);
	height: 12.5vw;
}
.card12 .card {
	width: calc(100% /6.05);
	height: 16.52vw;
}
.card6 .card {
	width: calc(100% /4);
	height: 25vw;
}

.card24 .special, .card12 .special, .card6 .special {
	width: 33%;
	height: 25vw;
}

.card {
	width: 25vw;
	height: 25vw;
	padding: 5px;
	text-align: center;
	overflow: hidden;
	display: inline-block;
	perspective: 500px;
	position: relative;
	cursor: pointer;
	z-index: 50;
	-webkit-tap-highlight-color: rgb(75, 85, 99);
}

.card.playcard.final {
	height: auto;
	float: none;

}

.card .inside {
	width: 100%;
	height: 100%;
	display: block;
	transform-style: preserve-3d;
	color: rgb(75, 85, 99);
	font-size: calc(7.5px + 1vw);
	font-weight: 300;
}


.card .inside.final {
	height: auto;
}

.card .inside h2 {
	color: rgb(75, 85, 99);
	font-weight: 600;
	font-size: calc(10px + 1.1vw);
}

div.card.num.special > div > h2 {
	margin-top: 0 !important;
}

.card .inside.picked.matched {
	animation: 1s matchAnim ease-in-out;
	animation-delay: .4s;
}

.card .front,
.card .back {
	border: 1px solid black;
	backface-visibility: hidden;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
}
.card .front.data {
	padding: 5px;
}
.card .front img,.card .back img {
	max-width: 100%;
	display: nblock;
	margin: 0 auto;
	max-height: 100%;
}

.card .front {
	transform: rotateY(-90deg);
	transition: .2s ease-in-out;
	transition-delay: 0s;

}
.inside.picked .front,
.inside.matched .front {
	transform: rotateY(0deg);
	transition-delay: 0.2s;
}

.card .front.data {
	transform: rotateY(0);
}

.card .back{
	transform: rotateY(0deg);
	transform-style: preserve-3d;
	transition: .2s ease-in-out;
	transition-delay: 0.2s;
	padding: 10px;
	background: rgb(75, 85, 99);
}
.inside.picked .back,
.inside.matched .back {
	transform: rotateY(90deg);
	transition-delay: 0s;
}

.card .picked {
	opacity: 1;
	transition: opacity 2s;
}
.card .picked .back,
.card .matched .back {
	opacity: 0;
}


.AsgameScreen {
	display : none;
	width: 100%;
	min-height: 100%;
}

.AsgameScreen.Welcome {
	height: 100vh;
	overflow: hidden;
	flex-direction: column;
	justify-content: center;
	padding-bottom: 18vh;
}

.AsgameScreen.Welcome .contentpanel {
	padding: 0;
}

.ascol {
	display: inline-block;
	width: 25vw;
	height: 25vw;
	vertical-align: top;
	margin: 3vw;
}

.ascol.final {
	height: auto;
	margin: 1vw 1vw;
}


.descripton {
	width: calc(50vw + 3vw);
	margin: 3vw 0 0 3vw;
	height: auto;
}

.descripton.finalpage {
	width: 75vw;
}

.descripton.btns {
	width: 75vw;
	margin: 0 0 0 3vw;
}

.descripton h3 {
	color: rgb(75, 85, 99);
}

.winner {
	font-weight: 700;
}

.ascol.inputField {
	width: calc(50% - 0.2em);
}

.ascol.inputField input, select {
	margin-left: 5vw;
}

.ascol.level {
	background: rgb(200, 200, 200);
	cursor: pointer;
	background-size: 25vw;
	position: relative;
}

.ascol.level::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	pointer-events: none;
}

.ascol.level h3,
.ascol.level .highscore {
	position: relative;
	z-index: 1;
}

.ascol.level h3 {
	padding-top: 11vw;
	color: #ffffff !important;
	font-size: calc(12px + 2.5vw);
	font-weight: 600;
}

.ascol.level.first {
	background-image: url("../assets/level1.png");
}

.ascol.level.second {
	background-image: url('../assets/level2.png');
}

.ascol.level.third {
	background-image: url('../assets/level3.png');
}


.AsgameScreen.Welcome .contentpanel,
.AsgameScreen.Debrief .contentpanel,
.AsgameScreen.Explain .contentpanel,
.AsgameScreen.GameOver .contentpanel {
	padding : 2vh 0vw;
	padding-bottom: 0;
	text-align : center;
}

.button-white-link {
	text-align: left !important;
	background-color: none !important;
}


.AsgameScreen.GameScreen .contentpanel {
	text-align : center;
	/* width: 80%; */
	margin-left: auto;
	margin-right: auto;
}


.AsgameScreen.Welcome .headerlogo,
.AsgameScreen.Debrief .headerlogo,
.AsgameScreen.Explain .headerlogo,
.AsgameScreen.GameOver .headerlogo {
	padding: 1vh 8vw 0vh 8vw;
}

.AsgameScreen.GameOver .headerlogo.data {
	padding: 2vh 8vw 4vh 8vw;
}

.AsgameScreen.GameScreen {
	background-color: rgb(232, 238, 235);
	max-height: 100vh;
	max-width: 100vw;
}

.AsgameScreen.GameOver h1 {
	font-size: 4vw;
}


.logo {
	width: 20vw;
	height: 20vw;
}


@media screen and (min-width: 40em) {
	.section--default + .section--default,
	.section--dark:not(.section--border-top) + .section--dark:not(.section--border-top) {
		margin-top: 0px;
	}
}


select,
[type='text'],
[type='password'],
[type='date'],
[type='datetime'],
[type='datetime-local'],
[type='month'],
[type='week'],
[type='email'],
[type='number'],
[type='search'],
[type='tel'],
[type='time'],
[type='url'],
[type='color'],
textarea {
	font-size: 2vw;
	height: 4vw;
}

.back img {
	width: 40%;
	padding-top: 3.5vh;
}

.card .back {
	border: none;
	color: rgb(75, 85, 99);
	background-size: 80%;
}


.card .front {
	border: none;
}

.card {
	margin-bottom: 0;
}

.card .front {
	background-color: transparent;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
}

.card.special {
	padding-top: 1vh;
}
.card.special h1 {
	font-size: 4vw;
	margin-top: 2.5vw;
}

.card.special.gsethz {
	text-align: left;
	vertical-align: top;
	padding-top: 0;
	padding: 0;
}
.logoingame {
	padding: 1em 2em;
	background:#48494E;
}


.button.disabled {
	opacity: .5;
	cursor: default;
	pointer-events: none;
	color: #666;
}


body {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

img {
	-webkit-user-drag: none;
	-khtml-user-drag: none;
	-moz-user-drag: none;
	-o-user-drag: none;
	user-drag: none;
}

img {
	-webkit-user-drag: none;
}


.closeIcon {
	position: fixed;
	top: 1vw;
	right: 1vw;
	font-size: 4vw;
	z-index: 500;
	color: rgb(75, 85, 99);
	cursor: pointer;
}


button {
	font-family: inherit;
}

.button {
	background-image: none;
}

.button--default {
	vertical-align: top;
	margin: 0 0 1rem 0;
}

.button--default--reverse {
	margin: 0 0 1rem 0;
	padding: 0.6875rem 1.25rem 0.625rem 1.25rem;
	background-position: left center;
}

/* only for linked cards */
a.card:hover, a.card:focus {
	color: inherit;
}

.button {
	padding: 0.8438em 1em;
	padding: 0.5rem 0.8125rem 0.5rem 0.8125rem;
	letter-spacing: -0.3px;
	color: #000000;
	position: relative;
	display: inline-block;
	vertical-align: middle;
	-webkit-appearance: none;
	transition: color 0.15s ease-out;
	text-align: center;
	cursor: pointer;
	background-size: auto 100%;
	background-position: center center;
}


.section--dark {
	background-color: rgb(232, 238, 235);
	color: #ffffff;
}

.highscore {
	margin-top: 14vw;
}

.oldHighscore,
.oldHighscore1,
.oldHighscore2,
.oldHighscore3 {
	font-weight: 600;
	font-size: calc(10px + 1.1vw);
	margin-top: 1vw;
}


.data {
	position: relative;
	width: 100%;
	height: calc(25vw - 1vw);
	padding: 5px;
	text-align: center;
	border: none;
	background-color: transparent;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	font-size: calc(2px + 1vw);
	cursor: default;
}

.data.text {
	height: auto;
	margin-top: 5px;
	padding-left: 0;
	padding-right: 0;
	text-align: left;

}

.data.text p {
	margin: 0 0 2px;
}

.gsethzTitle {
	height: 2.8vw;
	font-size: calc(8px + 2vw);
	letter-spacing: -0.4px;
	color: rgb(75, 85, 99);
	font-weight: 300;
}

.preLoading img {
	height: 1px;
	opacity: 0;
}


.button-white-link,
.button-white-input {
	border: 1px solid #CECBCB;
	color: rgb(75, 85, 99);
	display: inline-block;
	font-size: calc(7px + 1vw);
	font-weight: 300;
	cursor: pointer;
	margin-right: 4vw;
}
.button-white-link:hover,
.button-white-input:hover {
	border: 1px solid rgb(75, 85, 99);
	color: #ffffff;
}

.button-grey-link,
.button-grey-input {
	background-color: #666666;
	border: none;
	color: #EEEEEE;
}

.button-grey-link,
.button-grey-input,
.button-white-link,
.button-white-input {
	padding: 1vw 2vw 0.7vw;
	border-radius: 6px;
	text-decoration: none !important;
}
.button-grey-link a,
.button-grey-input a,
.button-white-link a,
.button-white-input a {
	text-decoration: none !important;
}
.button-grey-link:hover,
.button-grey-input:hover,
.button-white-link:hover,
.button-white-input:hover {
	background-color: rgb(75, 85, 99) !important;
	color: #FFFFFF;
	text-decoration: none;
}

.button-grey-input,
.button-white-input {
	padding: 8px 24px;
}

/* iPad Landscape: alle Karten ohne Scrollen sichtbar */
@media (orientation: landscape) and (min-width: 768px) {
	.AsgameScreen.GameScreen {
		position: relative;
	}

	.game {
		padding-top: 1vh;
		overflow: hidden;
	}

	.wrap {
		padding-bottom: 5px;
		min-height: unset;
	}

	/* Level 1: 12 Karten, 4 pro Reihe = 3 Reihen — quadratisch */
	.card6 .card {
		width: 29vh;
		height: 29vh;
	}

	/* Level 2: 24 Karten, 6 pro Reihe = 4 Reihen — quadratisch */
	.card12 .card {
		width: 21vh;
		height: 21vh;
	}

	/* Level 3: 48 Karten, exakt 8×6 Raster — quadratisch */
	.card24 .game {
		display: grid;
		grid-template-columns: repeat(8, min(12.5vw, 15vh));
		justify-content: center;
	}

	.card24 .game .asrow {
		grid-column: 1 / -1;
		width: 100vw;
		position: relative;
		left: 50%;
		transform: translateX(-50%);
	}

	.card24 .card {
		width: min(12.5vw, 15vh);
		height: min(12.5vw, 15vh);
	}

	/* Sekundenzähler-Leiste kompakter */
	.card24 .special,
	.card12 .special,
	.card6 .special {
		height: 8vh;
		width: 33%;
	}

	.card .inside {
		font-size: calc(5px + 0.8vw);
	}

	.card .inside h2 {
		font-size: calc(8px + 0.8vw);
	}

	.closeIcon {
		position: fixed;
		top: 1vw;
		right: 1vw;
		z-index: 500;
	}
}

/* Smartphone Hochformat */
@media (max-width: 767px) and (orientation: portrait) {

	/* Startseite: kein Scrollen, zentriert */
	.AsgameScreen.Welcome {
		justify-content: center;
		padding-top: 10vw;
		padding-bottom: 4vh;
		overflow: hidden;
	}

	.AsgameScreen.Welcome > h1 {
		padding-left: 6vw;
		padding-right: 6vw;
	}

	.AsgameScreen.Welcome > p {
		padding-left: 6vw;
		padding-right: 6vw;
	}

	.AsgameScreen.Welcome .contentpanel {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 3vw;
		padding: 0;
	}

	/* Levelkacheln: Bild füllt Kachel (kann angeschnitten werden), alles auf einem Screen */
	.ascol.level {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		width: 82vw;
		height: 42vw;
		background-size: cover;
		background-repeat: no-repeat;
		background-position: center;
		margin: 0;
		color: #ffffff;
	}

	.ascol.level h2,
	.ascol.level h3 {
		color: #ffffff;
	}

	.ascol.level h3 {
		padding-top: 0;
		font-size: calc(14px + 3vw);
	}

	.highscore {
		margin-top: 0.5vh;
	}

	.highscore h2 {
		font-size: calc(6px + 2vw);
	}

	/* Spielfeld: kein Scrollen, X-Button als Anker */
	.AsgameScreen.GameScreen {
		height: 100vh;
		overflow: hidden;
		position: relative;
	}

	.wrap {
		padding-top: 12vw;
		padding-bottom: 0;
		min-height: unset;
	}

	.game {
		padding-top: 0;
		overflow: hidden;
	}

	.card .inside {
		font-size: calc(4px + 1.5vw);
	}

	.card .inside h2 {
		font-size: calc(6px + 1.8vw);
	}

	/* Karten: quadratisch, screen optimal füllen */
	/* Overhead: 12vw oben (X-Button) + 20vw unten (Stat-Leiste) = 32vw */

	/* Level 1: 3 Spalten × 4 Reihen = 12 Karten */
	.card6 .card {
		width: min(calc(100vw / 3), calc((100vh - 32vw) / 4));
		height: min(calc(100vw / 3), calc((100vh - 32vw) / 4));
	}

	/* Level 2: 4 Spalten × 6 Reihen = 24 Karten */
	.card12 .card {
		width: min(25vw, calc((100vh - 32vw) / 6));
		height: min(25vw, calc((100vh - 32vw) / 6));
	}

	/* Level 3: 6 Spalten × 8 Reihen = 48 Karten */
	.card24 .card {
		width: min(calc(100vw / 6), calc((100vh - 32vw) / 8));
		height: min(calc(100vw / 6), calc((100vh - 32vw) / 8));
	}

	/* Stat-Leiste: nach .card-Regeln → überschreibt für Special-Karten */
	.card24 .special,
	.card12 .special,
	.card6 .special {
		width: 33%;
		height: 20vw;
	}

	/* Newsletter-Formular: grössere Inputs */
	#mc-form-de input[type="email"],
	#mc-form-de input[type="text"] {
		font-size: calc(7px + 1vw) !important;
		padding: 0.9em 1em !important;
	}

	/* X-Button: gross, immer sichtbar */
	.closeIcon {
		position: fixed;
		top: 1vw;
		right: 3vw;
		font-size: 10vw;
		z-index: 500;
	}
}

.studio-credit {
	position: fixed;
	bottom: 0.8em;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 0.65em;
	color: rgba(75,85,99,0.45);
	pointer-events: none;
}

@media (min-width: 768px) {
	.studio-credit {
		color: rgba(75,85,99,0.7);
	}
}
