:root
{
	--page-bg:#FFFFF7;
	--page-text:#000000;
	--accent:#C8CEFF;
	
	--curve:cubic-bezier(.23,.34,.18,1);
	
	--content-start:580; /* 2x290 */
	
	--page-v-padding:40px;
	--page-h-padding:30px;
	--page-padding:var(--page-v-padding) var(--page-h-padding);
	
	--item-padding:22px;
	
	--row-project-height:102px;
	--row-min-height:64px;

	--row-reveal:1s ease 0s;
	--body-reveal:.7s ease 0s;
	--news-reveal:1s ease 0s;
	
	--menu-title-size:20px;
	--menu-title-line:26px;
}

html
{
	height:100%;
}

body
{
	margin:0;
	padding:0;
	
	font-family:'ff-din-paneuropean',sans-serif;
	font-size:16px;
	line-height:22px;
	font-weight:300;
	font-style:normal;

	background-color:var(--page-bg);
	color:var(--page-text);
	
	min-height:100%;
}
body *
{
	box-sizing: border-box;
  -moz-box-sizing: border-box;
}
.is-hidden
{
	display:none !important;
}
.no-pointer-events
{
	pointer-events:none;
}
.pointer-events
{
	pointer-events:all;
}
.no-transition
{
	transition:none !important;
}
.no-scrollbar
{
	scrollbar-width: none; /* FF */
	-ms-overflow-style: none; /* Edge */
}
.no-scrollbar::-webkit-scrollbar
{
	display: none;
}	
.flex-break
{
	flex-basis:100%;
	height:0;
}
.clear:after
{
	content:'';
	display:table;
	clear:both;
}
.full-width
{
	width:100% !important;
}
a
{
	color:var(--page-text);
	text-decoration: none;
}
.accent,
.text-accent
{
	color:var(--accent);
}
ul
{
	margin:0;
	padding:0;
	list-style:none;
}

.light
{
	font-family:'ff-din-paneuropean',sans-serif;
	font-weight:200;
}
.regular
{
	font-weight:300;
}
strong
{
	font-weight:500;
}
.uc
{
	text-transform:uppercase;
}
.cms-inline-media-thumb
{
	display:none;
}


/* header, animated text */

header
{
	position:relative;
	z-index:1000;
	
}
header
{
	padding:var(--page-padding);
}
header,
header h1
{
	font-weight:inherit;
	margin:0;
	font-size:30px;
	line-height:36px;
}
nav
{
	position:relative;
	z-index:1;
}
.menu:not(.lan)
{
	margin-top:30px;
	font-size:var(--menu-title-size);
	line-height:var(--menu-title-line);
}

header *
{
	transition:color .3s linear 0s;
}

.lan
{
	position:absolute;
	top:0;
	right:0;
	font-size:16px;
	line-height:27px;
}


/* 
.menu a:not(.active)
{
	border-bottom:1px solid black;
}
.menu a:hover
{
	border:none;
}
 */
.menu a
{
	position:relative;
}

.menu a::after
{
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(1);
  border-radius: 5px;
  height: 0.05em;
  bottom: 0;
  left: 0;
  background: currentcolor;
  transform-origin: bottom left;
  transition:transform .2s ease 0s;
}
a:hover::after,
a.active::after
{
  transform: scaleX(0);
  transform-origin: bottom right;
}

.about
{
	position:absolute;
	top:0;
	left:0;
	width:100%;
	z-index:0;
	background-color:var(--accent);
	
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows var(--body-reveal);
}
.about section
{
	max-width:1000px;
	
	overflow:hidden;
	padding:0 30px;

	font-size:16px;
	line-height:22px;
	font-weight:inherit;
	text-transform: none;
}
.about .cms-inline-media img
{
	max-width:100%;
}

body.page-about .about
{
  grid-template-rows:1fr;
}
.about section p:last-child
{
	margin-bottom:32px;
}

.reveal span
{
	transition:opacity .1s ease 0s;
}
.reveal span.hide
{
	opacity:0;
}


/* projects list */

.projects,
body > .body
{
	border-top:1px solid var(--page-text);
}
.projects
{
	padding-bottom:800px;
}

.project,
.row
{
	display:block;
	position:relative;
	background-color:var(--page-bg);
}
.projects .project
{
	height:var(--row-project-height);
}
.projects.stacked
{
	border:none;
}
.projects.stacked .row
{
	height:0px;
}

.project .left
{
	padding-top:var(--item-padding);
}

body:not(.page-about) .projects .project:hover
{
	background-color:var(--accent);
	z-index:1;
}
body:not(.page-about) .projects:not(.transition) .project:hover .left
{
	overflow:visible;
}


 
.row
{
	transition:height var(--row-reveal);
	will-change: height;
}
 
.row section
{
	display:flex;
	border-bottom:1px solid var(--page-text);
	height:100%;
}

.row section > div
{
	padding:32px var(--page-h-padding);
}
.row .left
{
	flex-basis:50%;
	padding-right:10px;
}
.row .right
{
	flex-basis:50%;
	padding-left:10px;
}
.row .full
{
	flex-basis:100%;
}
.projects .row section > div
{
	padding-bottom:0;
}

.row.project .left
{
	font-size:var(--menu-title-size);
}



.row.project .right
{
	padding-top:63px;
}
.row.project .right p:first-child
{
	margin-top:0;
}
.row > section > div
{
	overflow:hidden;
}

.row img
{
	display:block;
	width:100%;
	pointer-events:none;
}
.row.project .left img
{
	margin-top:var(--item-padding);
}


/* project page */

.body a
{
	text-decoration: underline;
}
.body .row
{
  display:grid;
  grid-template-rows:1fr;
  transition:grid-template-rows var(--body-reveal);
  will-change:grid-template-rows;
}

.body.stacked .row,
.body .row.collapsed
{
  grid-template-rows: 0fr;
}
.body .row.project section
{
	min-height: var(--row-project-height);
}
.body .row section
{
	min-height:var(--row-min-height);
	overflow:hidden;
}
.body .row .media
{
	flex-grow:1;
}
.body .row .media:not(:first-child)
{
	padding-left:10px;
}
.body .row .media:not(:last-child)
{
	padding-right:10px;
}
.body .row section.multiple-media
{
	padding-left:20px;
	padding-right:20px;
}
.body .row section.multiple-media .media
{
	padding-left:10px;
	padding-right:10px;
}
.body .row .toggle-row
{
	position:absolute;
	display:block;
	right:11px;
	top:11px;
	width:13px;
	height:13px;
	background-image:url(../media/collapse.svg);
	background-position:50%;
	cursor:pointer;
}
.body .row.collapsed .toggle-row
{
	background-image:url(../media/expand.svg);
}
.body .video
{
	background-size:contain;
}
.body .video .youtube
{
	position:relative;
	aspect-ratio:16/9;
}
.body .video .youtube iframe
{
	position:absolute;
	left:0;
	top:0;
	width:100%;
	height:100%;
}
.body .caption
{
	margin-top:6px;
	font-family: 'ff-din-paneuropean',sans-serif;
	font-size:12px;
	text-transform:uppercase;
}

.body .full.text
{	
	max-width:1000px;
	margin:auto;
}
.body h2
{
	margin-top:0;
	font-size:36px;
	line-height:40px;
	font-weight:400;
}
.body .intro
{
	font-size:24px;
	line-height:30px;
}

.footer
{
	margin-top:0;
	padding:32px;
}
.footer a
{
	text-decoration: none;
}


/* news page */

body.page-news
{
/* 
	--page-bg:#000037;
	--page-text:#FFFFF7;
 */
}
body.page-news.page-about header *
{
	color:#000000 !important;
}
.news-items
{
	display:grid;
	grid-gap:var(--item-padding);

	
	padding:var(--page-padding);
	padding-top:0;
}
.news-items.stacked .news
{	
	grid-template-rows: 0fr;
}

.news
{
	position:relative;
  display:grid;
  grid-template-rows:1fr;
  transition:grid-template-rows var(--news-reveal);

  will-change:grid-template-rows;
}
.news::before
{
	position:absolute;
	left:-30px;
	width:100vw;
	height:1px;
	background-color:var(--page-text);
}
.news section
{
	overflow:hidden;
}
.news .title
{
	margin-top:var(--item-padding);
	font-size:var(--menu-title-size);
	line-height:var(--menu-title-line);
}
.news .media
{
	position:relative;
	margin-top:var(--item-padding);
	width:100%;
	aspect-ratio:16/9;
	background-size:cover;
	background-position:50%;
}
/* 
.news:not(:hover) .media
{
	filter:grayscale(100%) opacity(45%);
}
 */
/* 
.news:not(:hover) .media::before
{
	content:'';
	position:absolute;
	top:0;
	left:0;
	width:100%;
	background-color:rgba(0,0,37,.5);
	aspect-ratio:16/9;
	z-index: 1;
}
 */
.news .media img
{
	display:block;
	width:100%;
	aspect-ratio:16/9;
	object-fit:cover;
	object-position:50%;
}
.news .media .video
{
	background-size:cover;
}
.news .media .video iframe
{
	display:block;
	width:100%;
	aspect-ratio:16/9;
}
.news .media .video
.news .body
{
	margin-bottom:var(--item-padding);
}

@media (min-width:1450px)
{
	.news-items /* four-column */
	{
		grid-template-columns: repeat(4,1fr);
	}
	.news:nth-child(4n - 3)::before
	{
		content:'';
	}
}

@media (max-width:1450px)
{
	.news-items /* three-column */
	{
		grid-template-columns: repeat(3,1fr);
	}
	.news:nth-child(3n - 2)::before
	{	
		content:'';
	}
}

@media (max-width:1140px)
{
	.news-items /* two-column */
	{
		grid-template-columns: repeat(2,1fr);
	}
	.news:nth-child(2n - 1)::before
	{	
		content:'';
	}
}

@media (max-width:840px)
{
	:root
	{
		--page-v-padding:20px;
		--page-h-padding:15px;
	}

	body:not(.page-about) .projects:not(.transition) .project:hover .left /* do not show full image on tab */
	{
		overflow:hidden;
	}

	/* single column */
	
	.news-items 
	{
		grid-template-columns:1fr;
	}
	.news::before
	{
		content:'';
		left:-15px;
	}
	.row .left,
	.row .right
	{
		flex-basis:100%;
	}
	.page-home .row .right,
	.body .row .toggle-row
	{
		display:none;
	}
	.page-project .row section
	{
		flex-wrap:wrap;
	}
	.row section > div,
	.row .right,
	.about section
	{
		padding-left:15px;
		padding-right:15px;
	}
	.row .left
	{
		padding-right:15px;
	}
	.row .right
	{
		padding-top:0 !important;
	}
	.body .row section.multiple-media,
	.body .row section.multiple-media .media
	{
		padding-left:calc(15px /2);
		padding-right:calc(15px /2);
	}
	.body .caption
	{
		display:none;
	}
}
