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

:root {
	font-size: 14px;
}

html, body {
	width: 100%;
	height: 100%;
}

body {
	margin: 0;
	--color-text: #000;
	--color-text-alt: #000;
	--color-bg: #40bade;
	--color-link: #000;
	--color-link-hover: #000;
	--color-link-alt: #000;
	--color-type: #000;
	--type-line-opacity: 0.05;
	color: var(--color-text);
	background-color: var(--color-bg);
	font-family: "Sofia Sans", sans-serif;
	font-weight: normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
body.pink {
	background-color: #edb4bf;
}

::-webkit-scrollbar {
	display: none;
}

/* 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);
	}
}

a {
	text-decoration: underline;
	color: var(--color-link);
	outline: none;
}

a:hover {
	text-decoration: none;
	color: var(--color-link-hover);
	outline: none;
}

a.link-alt {
	text-decoration: none;
	color: var(--color-link-alt);
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
	/* Provide a fallback style for browsers
	 that don't support :focus-visible */
	 outline: none;
	 background: lightgrey;
	}

	a:focus:not(:focus-visible) {
	/* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
	 background: transparent;
	}

	a:focus-visible {
	/* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
	 outline: 2px solid red;
	 background: transparent;
	}

	main {
		position: relative;
		overflow: hidden;
	}

	.unbutton {
		background: none;
		border: 0;
		padding: 0;
		margin: 0;
		font: inherit;
	}

	.unbutton:focus {
		outline: none;
	}

	.frame {
		padding: 1rem;
		margin-bottom: 2rem;
		display: flex;
		flex-wrap: wrap;
		position: relative;
		z-index: 1000;
		text-transform: uppercase;
	}

	.frame__title {
		font-size: 1rem;
		margin: 0 0 1rem;
	}
	.frame__title i {
		font-size: 14px;
		text-transform: none;
	}

	.frame__tagline {
		color: var(--color-text-alt);
	}

	.frame__links {
		display: inline;
	}

	.frame__links a:not(:last-child) {
		margin-right: 1rem;
	}

	.frame__author {
		display: block;
		width: 100%;
		margin-bottom: 1rem;
		text-align: center;
	}

	.item-wrap {
		text-transform: uppercase;

		display: grid;
		grid-template-columns: 50% 50%;
	}

	.item {
		--base: 7vh;
		--interval: 9vh;
		padding: 1rem;
		margin: 1rem 0;
		cursor: pointer;
		width: 100%;
		position: relative;
		flex: none;
		will-change: transform, opacity;
	}

	.item__img {
		width: 100%;
		border-radius: 12px;
		will-change: transform;
	}

	.item__caption-title {
		font-size: inherit;
		font-size: 20px;
		font-weight: 700;
	}

	.item__caption-description {
		display: none;
	}

	.type {
		position: fixed;
		height: 100vmax;
		text-transform: uppercase;
		width: 100vmax;
		display: grid;
		justify-content: center;
		align-content: center;
		text-align: center;
		top: 50%;
		margin-top: -50vmax;
		will-change: transform;
	}

	.type__line {
		white-space: nowrap;
		font-size: 20vh;
		font-size: clamp(7rem,18.75vh,15rem);
		line-height: 0.75;
		font-weight: bold;
		font-family: "Rubik Mono One", monospace;
		font-weight: 400;
		font-style: normal;
		color: var(--color-type);
		opacity: var(--type-line-opacity);
		-webkit-touch-callout: none;
		-webkit-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		user-select: none;
		will-change: transform, opacity;
	}

	.article-wrap {
		position: absolute;
		top: 5vh;
		width: 100%;
		justify-self: center;
		align-self: end;
		padding: 1rem;
		pointer-events: none;
	}

	.article {
		position: absolute;
		opacity: 0;
		pointer-events: none;
		display: grid;
		grid-template-columns: 1rem 1fr;
		width: 100%;
		align-items: start;
		grid-template-areas: 'img img'
		'number title'
		'intro intro'
		'desc desc';

	}

	.article--current {
		opacity: 1;
		pointer-events: auto;
		position: relative;
	}

	.article__img-wrap {
		width: 100%;
		height: 250px;
		overflow: hidden;
		grid-area: img;
		transform-origin: 50% 100%;
		margin-bottom: 1rem;
		border-radius: 17px 17px 0 0;
	}

	.article__img {
		width: 100%;
		height: 100%;
		background-size: cover;
		background-position: 50% 35%;
	}

	.article__number {
		grid-area: number;
		font-weight: bold;
		color: #101010;
	}

	.article__title {
		grid-area: title;
		line-height: 1.1;
		font-size: 70px;
		text-transform: uppercase;
		font-weight: bold;
		font-family: quiche-sans, sans-serif;
		color: #fff;
		position: relative;
		margin: 1rem 0 0.5rem;
		pointer: default;
	}

	.article__intro {
		position: relative;
		grid-area: intro;
		font-size: 22px;
		padding-right: 2rem;
	}
	.article__intro:after {
		position: absolute;
		font-size: 22px;
		color: #101010;
		font-family: 'Caveat', sans-serif;
		bottom: -40px;
		right: 40px;
		white-space: nowrap;
		content: 'В. Христова';
	}

	.article__description {
		grid-area: desc;
		overflow: hidden;
		padding-right: 2rem;
	}

	.back {
		background: none;
		border: 0;
		padding: 0;
		margin: 0 0 1rem 0;
		top: 0;
		left: 0;
		opacity: 0;
		pointer-events: none;
		stroke: #000;
		z-index: 1000;
		cursor: pointer;
		width: 50px;
	}

	.back svg {
		stroke-linecap: round;
	}

	.back:hover,
	.back:focus {
		outline: none;
		stroke: #823725;
	}

	@media screen and (min-width: 53em) {
		:root {
			font-size: 16px;
		}
		html, body {
			overflow: hidden;
		}
		.frame {
			position: fixed;
			text-align: left;
			z-index: 100;
			top: 0;
			left: 0;
			display: grid;
			align-content: space-between;
			width: 100%;
			max-width: none;
			margin: 0;
			padding: 1rem 2vw;
			grid-template-columns: 40% 20% 40%;
			grid-template-areas: 'title author links';
		}
		.frame__title-wrap {
			grid-area: title;
			text-align: left;
		}
		.frame__title {
			margin: 0;
		}
		.frame__tagline {
			position: relative;
		}
		.frame__author {
			grid-area: author;
			justify-self: center;
		}
		.frame__links {
			grid-area: links;
			padding: 0;
			justify-self: end;
		}
		.item-wrap {
			height: 100vh;
			display: flex;
			overflow: scroll;
			position: relative;
			justify-content: flex-start;
			align-items: center;
		}
		.item,
		.item:nth-child(7) {
			width: 22vw;
			padding: 0;
			margin: auto 2vw var(--base);
		}
		.item:nth-child(2),
		.item:nth-child(6),
		.item:nth-child(8),
		.item:nth-child(12),
		.item:nth-child(14),
		.item:nth-child(18),
		.item:nth-child(20),
		.item:nth-child(24),
		.item:nth-child(26),
		.item:nth-child(30),
		.item:nth-child(32),
		.item:nth-child(36),
		.item:nth-child(38) {
			margin-bottom: calc(var(--base) + var(--interval));
		}
		.item:nth-child(3),
		.item:nth-child(5),
		.item:nth-child(9),
		.item:nth-child(11),
		.item:nth-child(15),
		.item:nth-child(17),
		.item:nth-child(21),
		.item:nth-child(23),
		.item:nth-child(27),
		.item:nth-child(29),
		.item:nth-child(33),
		.item:nth-child(35),
		.item:nth-child(39)
		{
			margin-bottom: calc(var(--base) + var(--interval) * 2);
		}
		.item:nth-child(4),
		.item:nth-child(10),
		.item:nth-child(16),
		.item:nth-child(22),
		.item:nth-child(28),
		.item:nth-child(34) {
			margin-bottom: calc(var(--base) + var(--interval) * 3);
		}

		.item__caption-description {
			display: block;
			font-size: 18px;
		}

		.back {
			position: absolute;
			left: calc(((100vw - (38vw + 280px)) / 2) + 1.5rem);
		}
		.article-wrap {
		top: 80px;
		height: 80vh;
		padding: 0;
}
.article {
	height: 100%;
	width: calc(38vw + 280px);
	margin: 0 auto;
	grid-template-rows: 7vw 2rem 9vw auto auto;
	grid-template-columns: 1.5rem 38% 1fr 1.5rem;
	grid-template-areas: '... ... img ...'
	'number ... img ...'
	'... title img ...'
	'... intro img ...'
	'... desc img ...';
}
.article__title {
	grid-column-end: 4; 
	margin: 0;
}
.article__intro {
	margin: 1.5rem 0;
}
.article__img-wrap {
	align-self: end;
	width: 100%;
	height: 100%;
	margin: 0;
}
.article__img {
	background-position: 50% 50%;
}
}

/*--------------------------------------------------------------
## S
--------------------------------------------------------------*/

:root {
	--animate-duration: 1s;
	--animate-delay: 1s;
	--animate-repeat: 1;
}

@-webkit-keyframes fadeIn {
	0% {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
@keyframes fadeIn {
	0% {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
.animate {
	-webkit-animation-duration: 1s;
	animation-duration: 1s;
	-webkit-animation-duration: var(--animate-duration);
	animation-duration: var(--animate-duration);
	-webkit-animation-fill-mode: both;
	animation-fill-mode: both;

	-webkit-animation-name: fadeIn;
	animation-name: fadeIn;
}
.btn-nav {
	position: fixed;
	display: none;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 99;
}
.btn-nav a {
	text-decoration: none;
	text-transform: uppercase;
	font-size: 16px;
	font-weight: bold;
	color: #fff;	
}
.btn-nav a.hide {
	display: none;
}
.btn-nav a + a {
	margin-left: 80px;
}


@media screen and (max-width: 768px) { 

	.btn-nav {
		top: 15px;
		right: 0;
		transform: none;
	}
	.btn-nav a + a {
		margin-left: 25px;
	}

}


.scroll-animations-example > .scrollsection {
	padding: 10vh 10vh 10vh 10vmax;
/*	min-width: 500vh;*/
/*	min-width: calc(430px * 20);*/
min-height: 102vh;
}

.item .item__img {
	position: relative;
	height: 300px;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	overflow: hidden;
/*	-webkit-filter: grayscale(100%); 
  filter: grayscale(100%);*/
  transition: .5s ease;

  -webkit-filter: contrast(1.3); 
  filter: contrast(1.3);
}
.item .item__img:hover {
	-webkit-filter: contrast(1); 
	filter: contrast(1);
}
.item .item__img:before {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background-color: rgba(46, 88, 120, 0.3);
	transition: .5s ease;
	opacity: 1;
	content: '';
}
body.pink .item .item__img:before {
	background-color: rgb(107 65 72 / 30%);

}
.item .item__img:hover:before {
	opacity: 0;
	visibility: hidden;
}

@media screen and (max-width: 848px) { 

/*	main.fixed {
		height: 100vh;
	}*/
	.article-wrap {
		position: fixed;
		top: 0;
	}

	.frame__author {
		text-align: left;
	}
	.scroll-animations-example > .scrollsection {
		min-width: auto;
		padding: 20px;
	}
	.item-wrap {
		display: block;
	}
	.article__title {
		font-size: 32px;
		text-align: center;
	}
	.article__intro {
		padding-right: 0;
		text-align: center;
	}

}


