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


.main-wrap {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: 100vh;
	background-color: #333;
	background-repeat: no-repeat;
	background-position: 50% 10em;
	background-size: 75% auto;
}


/* Buttons */

.btn {
	margin: 0;
	padding: 0;
	cursor: pointer;
	border: none;
	background: none;
}

.btn:focus {
	outline: none;
}

.btn--search {
	font-size: 1.5em;
}

.btn--hidden {
	pointer-events: none;
	opacity: 0;
}


/* Reset Search Input */

.search__input {
	border: 0;
	background: transparent;
	border-radius: 0;
	-webkit-appearance: none;
}

.search__input:focus {
	outline: none;
}


/* Links */

a,
.btn {
	text-decoration: none;
	color: #fff;
	outline: none;
}


.btn:hover{
	color: #FA6F24
}

.hidden {
	position: absolute;
	overflow: hidden;
	width: 0;
	height: 0;
	pointer-events: none;
}


/* Icons */

.icon {
	display: block;
	width: 1.5em;
	height: 1.5em;
	margin: 0 auto;
	fill: currentColor;
}


/* Header */

.memovic-header {
    position: absolute;
    right: 15px;
    z-index: 9;
    top: 15px;
}

.memovic-header__title {
	font-size: 1em;
	margin: 0;
	padding: 0 0.75em;
}

.memovic-header__side,
.search-wrap {
	margin: 0 0 0 auto;
}


/* Bottom nav */

.bottom-nav {
	position: relative;
	width: 100%;
	margin: auto 0 0 0;
	padding: 2.5em 2.75em 2.5em 2em;
}


/* Demo links */

.memovic-demos {
	font-weight: bold;
	padding: 1.25em 0;
	text-align: right;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

.memovic-demos span {
	display: inline-block;
	margin: 0 1em 0 0;
	vertical-align: bottom;
}

.memovic-demos a {
	position: relative;
	display: inline-block;
	margin: 0 0.1em;
	padding: 0 0.4em;
}

.memovic-demos a.current-demo::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 2.25em;
	height: 2.25em;
	margin: -1.125em 0 0 -1.125em;
	border: 2px solid;
	border-radius: 50%;
}


/* Top Navigation Style */

.memovic-links {
	position: relative;
	display: flex;
	justify-content: center;
	text-align: center;
	white-space: nowrap;
}

.memovic-links::after {
	content: '';
	position: absolute;
	top: 15%;
	left: 50%;
	width: 2px;
	height: 70%;
	opacity: 0.1;
	background: currentColor;
	transform: rotate3d(0, 0, 1, 22.5deg);
}

.memovic-icon {
	display: inline-block;
	margin: 0.5em;
	padding: 0.5em;
}


/* Deco lines */

.decolines {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	pointer-events: none;
}

.decoline {
	position: absolute;
	width: 1px;
	height: 100%;
	background: #ddd;
}

.decoline:first-child {
	right: 88em;
}

.decoline:nth-child(2) {
	right: 68em;
}

.decoline:nth-child(3) {
	right: 48em;
}

.decoline:nth-child(4) {
	right: 28em;
}

.decoline:nth-child(5) {
	right: 8em;
}


/* Demo colors */
.demo-2 { color: #ffefb9; }
.demo-2 main { background-color: #2c312e; }
.demo-2 a, .demo-2 .btn { color: #e85454; }
.demo-2 .memovic-header { margin-top: auto; }

.demo-3 { color: #ffefb9; background-color: #2f2c2c; }
.demo-3 main { background-color: #e85454; background-image: url(../images/bg_2.svg); }
.demo-3 a, .demo-3 .btn { color: #ffefb9; }
.demo-3 .btn--search-close { color: #e85454; }

.demo-4 { color: #f44040; background-color: #f44040; }
.demo-4 main { background-color: #fff59a; background-image: url(../images/bg_4.svg); }
.demo-4 a, .demo-4 .btn { color: #a4a186; }
.demo-4 .btn--search-close { color: #ab3a3a; }

.demo-5 { color: #cecae0; background-color: #7d7d7d; }
.demo-5 main { background-color: transparent; background-image: url(../images/bg_2.svg); }
.demo-5 a, .demo-5 .btn { color: #eaba82; }

.demo-6 { color: #ff4848; }
.demo-6 main { background-color: #fff; background-image: url(../images/bg_5.svg); }
.demo-6 a, .demo-6 .btn { color: #000; }

.demo-7 { color: #6cbb37; }
.demo-7 main { background-color: #f5f5f5; background-image: url(../images/bg_7.svg); background-position: 100% 0; background-size: 1440px; }
.demo-7 a, .demo-7 .btn { color: #000; }

.demo-8 { color: #cecae0; background-color: #5562eb; }
.demo-8 main { background-color: transparent; background-image: url(../images/bg_8.svg); }
.demo-8 a, .demo-8 .btn { color: #eaba82; }

.demo-9 { color: #2d3535; background-color: #597571; }
.demo-9 main { background-color: transparent; background-image: url(../images/bg_6.svg); }
.demo-9 a, .demo-9 .btn { color: #22d2d2; }
.demo-9 .btn--search-close { color: #dce6e6; }

.demo-10 { color: #FA6F24; background-color: #c4d5e0; }
.demo-10 main { background-color: #fff; background-image: url(../images/bg_12.svg); }
.demo-10 a, .demo-10 .btn { color: #000; }
.demo-10 .btn--search-close { color: #FA6F24; }

.demo-11 { color: #fff; background-color: #212423; }
.demo-11 main { background-color: transparent; background-image: url(../images/bg_9.svg); }
.demo-11 a, .demo-11 .btn { color: #34fc47; }

@media screen and (max-width: 40em) {
	.memovic-header {
		display: block;
		padding: 4em 1em 0;
		text-align: center;
	}
	.memovic-header__side {
		margin: 0 auto;
	}
	.memovic-links {
		font-size: 0.85em;
		margin: 0 auto;
	}
	.search-wrap {
		font-size: 0.85em;
		position: absolute;
		top: 2.15em;
		right: 2em;
	}
	.bottom-nav {
		padding: 0.5em;
	}
	.memovic-demos {
		text-align: center;
	}
	.memovic-demos a {
		margin-bottom: 1em;
	}
	.memovic-demos span {
		display: block;
		margin: 0 auto 1em;
		text-align: center;
	}
}



/* Layout for search container */
.search {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.js .search {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.btn--search-close {
	font-size: 2em;
	position: absolute;
	top: 1.25em;
	right: 1.25em;
	display: none;
}

.js .btn--search-close {
	display: block;
}

.search__form {
	margin: 0 auto;
	padding: 0 1em;
	width: 80%
}

.search__input {
	font-family: inherit;
	font-size: 50px;
	line-height: 1;
	display: inline-block;
	box-sizing: border-box;
	width: 100%;
	max-width: 900px;
	padding: 0 0 0.1em;
	color: #FA6F24;
	border-bottom: 6px solid;
}

.search__input::-webkit-input-placeholder {
	/* WebKit, Blink, Edge */
	color: #FA6F24;
}

.search__input::-moz-placeholder {
	opacity: 1;
	/* Mozilla Firefox 19+ */
	color: #FA6F24;
}

.search__input:-ms-input-placeholder {
	/* Internet Explorer 10-11 */
	color: #FA6F24;
}

.search__input::-webkit-search-cancel-button,
.search__input::-webkit-search-decoration {
	-webkit-appearance: none;
}

.search__input::-ms-clear {
	display: none;
}

.search__info {
	font-size: 90%;
	font-weight: bold;
	display: block;
	width: 75%;
	margin: 0 auto;
	padding: 0.85em 0;
	text-align: right;
	color: #FA6F24;
}

/* Dummy pages behind the main element that will animate like cards */
.page {
	position: relative;
	perspective: 1000px;
}

.page__single--dummy {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #15171C;
	background-repeat: no-repeat;
	background-position: 50% 50%;
	background-size: 75% auto;
}

.page__single:first-child {
	background-image: url(../images/bg_7.svg);
}

.page__single:nth-child(2) {
	background-image: url(../images/bg_10.svg);
}

.page__single:nth-child(3) {
	background-image: url(../images/bg_3.svg);
}

.page__single:nth-child(4) {
	background-image: url(../images/bg_11.svg);
}

/************************/
/* Transitions 			*/
/************************/

.js .page--move {
	pointer-events: none;
}

.js .page__single {
	transition: transform 0.7s;
	transition-timing-function: cubic-bezier(0.4, 1, 0.3, 1);
}

.page--move .page__single {
	transition-duration: 1.5s;
}

.js .page__single--dummy {
	transform: translate3d(0, 0, -600px);
}

.page--move .page__single:first-child {
	transform: translate3d(-20%, 100%, -3000px) rotate3d(0,0,1, -22deg);
	transition-duration: 1.8s;
}

.page--move .page__single:nth-child(2) {
	transform: translate3d(100%, 15%, -3500px) rotate3d(0,0,1, 30deg);
	transition-duration: 2s;
}

.page--move .page__single:nth-child(3) {
	transform: translate3d(-160%, 0%, -4500px) rotate3d(0,0,1, 10deg);
	transition-duration: 2.3s;
}

.page--move .page__single:nth-child(4) {
	transform: translate3d(-70%, -150%, -5000px) rotate3d(0,0,1, -10deg);
	transition-duration: 1.7s;
}

.page--move .page__single:nth-child(5) {
	/* main wrap */
	transform: translate3d(0, 0, -2500px) rotate3d(0,0,1, 3deg);
}

.js .search {
	pointer-events: none;
	transform-style: preserve-3d;
}

.js .search--open {
	pointer-events: auto;
}

/* Close button */
.btn--search-close {
	opacity: 0;
	transform: scale3d(0.8, 0.8, 1);
	transition: opacity 0.5s, transform 0.5s;
}

.search--open .btn--search-close {
	opacity: 1;
	transform: scale3d(1, 1, 1);
}

/* Search input */
.js .search__form {
	opacity: 0;
	transform: translate3d(0,0,600px);
}

.js .search--open .search__form {
	opacity: 1;
	transform: translate3d(0,0,0);
	transition: opacity 1.2s, transform 1.2s;
	transition-delay: 0.3s;
	transition-timing-function: cubic-bezier(0.4, 1, 0.3, 1);
}


@media screen and (max-width: 40em) {
	.btn--search-close {
		font-size: 1.25em;
	}
	.search__input {
		font-size: 2em;
		width: 100%;
	}
	.search__info {
		width: 100%;
		text-align: center;
	}
}
