/*
Theme Name: BS+EMI Architekten
Theme URI: https://bs-emi.ch
Description: Custom Theme for BS+EMI Architekten
Author: Roger Burkhard
Author URI: http://www.rogerburkhard.com
*/

/*------------------------------------------------------
VARIABLES
------------------------------------------------------*/

:root {
  --offset: 20px;
  --offset-minus:  -20px;
  --max_width: 100%;
  --columns: 12;
  --gap: 16px;
  --baseline: 0;
  --baseline-offset: 0;
  --font_color: #000;
  --color_grey: #6D7278;
  --max_width:656px;
  --easing:cubic-bezier(0.33, 1, 0.68, 1);
  --logo_width:534px;
  --logo_width_minus:-267px;
  --logo_height:119px;
  --max_width:800px;
  --max_width_minus:-400px;
  --padding_content:250px;

  --grid_color: hsla(204, 80%, 72%, 0.25);
  --repeating_width: calc(100% / var(--columns));
  --column_width: calc((100% /  (var(--columns)) -  var(--gap)));
  --background_width: calc(100% +  var(--gap));
  --background_columns: repeating-linear-gradient(to right, var(--grid_color), var(--grid_color) var(--column_width), transparent var(--column_width), transparent var(--repeating_width));
  --background_baseline: repeating-linear-gradient(to bottom, var(--grid_color), var(--grid_color) 1px, transparent 1px, transparent var(--baseline));
}

/*------------------------------------------------------
THE BIG FAT RESET
------------------------------------------------------*/

* {
	min-height: 0;
	min-width: 0;
}


html, body, div, span, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote, pre, form, fieldset, table, th, td, header, footer {
	margin: 0;
	padding: 0;
}

sub, sup {
	line-height: 0;
}

/*------------------------------------------------------
IMPORT FONTS
------------------------------------------------------*/

@font-face {
    font-family: 'Konstruktiv Beta Book';
    src: url('styles/fonts//KonstruktivBeta-Book.woff2') format('woff2'),
         url('styles/fonts//KonstruktivBeta-Book.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Konstruktiv Beta Medium';
    src: url('styles/fonts//KonstruktivBeta-Medium.woff2') format('woff2'),
         url('styles/fonts//KonstruktivBeta-Medium.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/*------------------------------------------------------
GRID HELPER
------------------------------------------------------*/

/* Grid */

/*
html::before {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	margin-right: auto;
	margin-left: auto;
	width: calc(100% - (2 * var(--offset)));
	max-width: var(--max_width);
	min-height: calc(100vh - 86px);
	content: '';
	background-image: var(--background_columns), var(--background_baseline);
	background-size: var(--background_width) 100%;
	background-position: 0 var(--baseline-offset);
	z-index: 1000;
	pointer-events: none;
}

/* Squares */

/*
$square: transparent 0 calc(20px - 1px),#ccc 0 20px;

body {
	width: 100%;
	height: 100%;
	margin: 0 auto;
	background: repeating-linear-gradient(to right, $square), repeating-linear-gradient(to bottom,$square) #fff;
}
*/

/*------------------------------------------------------
GENERAL
------------------------------------------------------*/

html {
	width: 100%;
	height: 100%;
	background: #fff;
	margin:0 !important;
	-webkit-text-size-adjust: 100%;
}

body {
	width: -moz-calc(100% - (var(--offset))*2);
	width: -webkit-calc(100% - (var(--offset))*2);
	width: -o-calc(100% - (var(--offset))*2);
	width: calc(100% - (var(--offset))*2);
	padding: 0 var(--offset);
	font: normal 17px/21px 'Konstruktiv Beta Book', Helvetica, Arial, Verdana, sans-serif;
	letter-spacing:0.018em;
	color: var(--font_color);
	overflow-x: hidden;
	min-width: 320px;
	-webkit-font-smoothing: antialiased;
	-moz-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-smoothing: antialiased;
}

body.noscroll {
	overflow: hidden;
}

body.wait, body.wait a {
	cursor:wait;
	overflow-y:hidden;
}

#wpadminbar {
	display:none !important;
}

div:focus {
	outline: none;
	ie-dummy: expression(this.hideFocus=true);
}

::selection {
  background: #000;
  color:#fff;
}

::-moz-selection {
  background: #000;
  color:#fff;
}

a::selection {
	color:#fff !important;
}

a::-moz-selection {
	color:#fff !important;
}

.ie_message {
	display: none;
	padding: 10px;
}

/*------------------------------------------------------
TYPOGRAPHY
------------------------------------------------------*/

h1, h2, h3, h4, h5, h6 {
	font-weight:normal;
}

h1 {
	font: normal 14px/18px 'Konstruktiv Beta Book', Helvetica, Arial, Verdana, sans-serif;
	letter-spacing:0.018em;
}

p {
	margin-bottom: 20px;
	hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
    hyphenate-limit-lines: 2;
    hyphenate-limit-last: always;   
    hyphenate-limit-zone: 8%;
}

b, strong {
	font-weight: normal;
	font-family:'Konstruktiv Beta Book';
}

/*------------------------------------------------------
GENERAL LINKS
------------------------------------------------------*/

a {
	outline: none;
	text-decoration: none;
	cursor: pointer;
	color: var(--color_grey);
	-webkit-transition:opacity 0.4s var(--easing), color 0.4s var(--easing);
	transition:opacity 0.4s var(--easing), color 0.4s var(--easing);
}

a:hover {
	opacity: 0.5;
}

:focus {
	-moz-outline-style: none;
}

/*------------------------------------------------------
IMAGES
------------------------------------------------------*/

img {
	display: block;
	border: none 0;
}

.lazyload, .lazyloading {
	opacity: 0;
}

.lazyloaded {
	opacity: 1;
	-webkit-transition:opacity 0.5s;
	transition: opacity 0.5s;
}

/*------------------------------------------------------
VIDEO
------------------------------------------------------*/

video {
	display:block;
	outline: 0;
	-moz-outline-style: none;
}

/* Responsive iFrame */

.video_wrap {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	padding-top: 25px;
	height: 0;
}

.video_wrap iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/*------------------------------------------------------
CLEAR
------------------------------------------------------*/

.clear {
	clear: both;
}

/*------------------------------------------------------
Focus Input & Textarea
------------------------------------------------------*/

input, textarea {
	-webkit-border-radius: 0px;
	-moz-border-radius: 0px;
	border-radius: 0px;
	resize: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { 
	display: none; 
}

textarea:focus, input:focus, select:focus {
    outline: 0;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="button"], button {
   outline:none !important;
}
input[type="button"]::-moz-focus-inner, button::-moz-focus-inner {
   border: 0 !important;
}

/*------------------------------------------------------
WYSIWIG CONTENT
------------------------------------------------------*/

.wysiwig_content img {
	display: block;
	width: 100%;
	height: auto;
}

.wysiwig_content ul {
    list-style: none;
    margin-left: 0;
    padding-left: 1em;
}

.wysiwig_content ul > li:before {
    display: inline-block;
    content: "–";
    width: 1em;
    margin-left: -1em;
}

.wysiwig_content strong,
.wysiwig_content b {
	font-weight:normal;
	letter-spacing:0.1em;
}

/*------------------------------------------------------
GRID
------------------------------------------------------*/

.grid {
	display: -ms-grid;
	display: grid;
	grid-gap: var(--gap);
	grid-row-gap: 0px;
	grid-template-columns: repeat(var(--columns), 1fr);
	align-items: start;
}

.full_columns {
	-ms-grid-columns: 1 / 13;
	grid-column:1 / 13;
}

/*------------------------------------------------------
LOGO
------------------------------------------------------*/

.logo {
	cursor:pointer;
	width:var(--logo_width);
	height:var(--logo_height);
	position:fixed;
	left:50%;
	margin-left:var(--logo_width_minus);
	z-index:100;
	top:0;
	-webkit-transform: translateY(calc((var(--vh, 1vh) * 100) - var(--logo_height) - var(--offset)));
	transform: translateY(calc((var(--vh, 1vh) * 100) - var(--logo_height) - var(--offset)));
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-transition: all 0.75s var(--easing), opacity 0.4s var(--easing), color 0.4s var(--easing), -webkit-transform 0.75s var(--easing);
	transition: all 0.75s var(--easing), opacity 0.4s var(--easing), color 0.4s var(--easing), transform 0.75s var(--easing);
}

.logo svg {
	width:var(--logo_width);
	height:var(--logo_height);
}

.logo svg,
.logo svg #logo_color {
	-webkit-transition:all 1s var(--easing), -webkit-transform 1s var(--easing);
	transition:all 1s var(--easing), transform 1s var(--easing);
}

.logo.is_schwarz svg #logo_color {
	fill:#000;
}

.logo.is_multiply {
	mix-blend-mode: difference;
}

.logo.go_away {
	-webkit-transform: translateY(calc(var(--logo_height) + var(--offset)));
	transform: translateY(calc(var(--logo_height) + var(--offset)));
	-webkit-transform: translateY(calc((var(--vh, 1vh) * 100) + var(--logo_height)));
	transform: translateY(calc((var(--vh, 1vh) * 100) + var(--logo_height)));

}

/* About */

.logo.active {
	mix-blend-mode: normal !important;
	-webkit-transform: translateY(var(--offset));
	transform: translateY(var(--offset));
}

.logo.active svg #logo_color {
	fill:#000 !important;
}

.logo.active.go_away {
	-webkit-transform: translateY(calc((var(--vh, 1vh) * 100) - var(--logo_height) - var(--offset)));
	transform: translateY(calc((var(--vh, 1vh) * 100) - var(--logo_height) - var(--offset)));
	-webkit-transition: -webkit-transform 0.6s cubic-bezier(0.32, 0, 0.67, 0);
	transition: transform 0.6s cubic-bezier(0.32, 0, 0.67, 0);
}

/*------------------------------------------------------
SWIPER
------------------------------------------------------*/

.swiper {
	position:fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
}

.swiper .swiper-wrapper {
	width:100%;
	height:100%;
}

.swiper .swiper-slide {
	width:100vw;
	height: calc(var(--vh, 1vh) * 100);
	transform: translateZ(0); 
	backface-visibility: hidden;
}

.swiper .swiper-slide .project_video {
	display:none;
	opacity:1;
	width:100%;
	height:100%;
	-webkit-transition:opacity 0.8s var(--easing);
	transition:opacity 0.8s var(--easing);
}

.swiper .swiper-slide.active_info .project_video,
.swiper .swiper-slide.active_about .project_video {
	opacity:0.15;
}

.swiper .swiper-slide .project_video video {
	width:100%;
	height:100%;
	object-fit:cover;
	object-position:center center;
	-webkit-filter:0.8s var(--easing);
	filter:0.8s var(--easing);
	transform: translateZ(0); 
	backface-visibility: hidden;
}

.swiper .swiper-slide.active_about .project_video video,
.swiper .swiper-slide.active_info .project_video video {
	filter: grayscale(100%);
}

.swiper .swiper-button-prev,
.swiper .swiper-button-next {
	position:absolute;
	top:0;
	bottom:0;
	width:50%;
	height: calc(var(--vh, 1vh) * 100);
	margin:0;
	background:none;
	cursor:pointer;
	z-index:1;
}

.swiper .swiper-slide.active_info .swiper-button-prev,
.swiper .swiper-slide.active_info .swiper-button-next {
	pointer-events:none;
}

.swiper .swiper-button-prev {
	left:0;
}

.swiper .swiper-button-next {
	right:0;
}

.swiper-button-next::after, .swiper-button-prev::after {
	display:none;
}

/* Portrait */
@media screen and (orientation: portrait) {
	.swiper .swiper-slide .project_video.project_video_portrait {
		display:block;
	}
}

/* Landscape */
@media screen and (orientation: landscape) {
	.swiper .swiper-slide .project_video.project_video_landscape {
		display:block;
	}
}

/*------------------------------------------------------
PROJECT LEGEND
------------------------------------------------------*/

.project_legend {
	opacity:0;
	position:fixed;
	padding:var(--offset);
	top:0;
	width:var(--max_width);
	left:50%;
	margin-left:var(--max_width_minus);
	z-index:100;
	text-align:center;
	color:#fff;
	cursor:pointer;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none; 
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-transition:opacity 0.4s var(--easing), color 0.8s var(--easing);
	transition:opacity 0.4s var(--easing), color 0.8s var(--easing);
}

.swiper-slide.swiper-slide-active .project_legend {
	opacity:1;
}

.active_about .project_legend {
	display:none;
}

.swiper-slide.active_info .project_legend {
	color:#000;
	mix-blend-mode: none;
}

body.no_touch .project_legend:hover {
	opacity:0.5;
}

.project_legend.is_schwarz {
	color:#000;
}

.project_legend.is_multiply {
	mix-blend-mode: difference;
	transform: translate3d(0,0,0);
}

.project_legend span.arrow {
	display:inline-block;
	transform: rotate(0);
	-webkit-transform: -webkit-rotate(0);
	transform-origin: center center;
	-webkit-transform-origin: center center;
	-webkit-transition: -webkit-transform 0.4s var(--easing);
	transition: transform 0.4s var(--easing);
}

.project_legend.active span.arrow {
	transform: rotate(180deg);
	-webkit-transform: -webkit-rotate(180deg);
}

/*------------------------------------------------------
PROJECT INFO + ABOUT
------------------------------------------------------*/

.project_info,
.about {
	display:none;
	opacity:0;
	position:fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	overflow:auto;
	text-align:center;
	z-index:90;
	padding-bottom:10px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	touch-action: auto;
	pointer-events:all !important;
	-webkit-transform: translateY(calc((var(--vh, 1vh) * 100) - var(--logo_height) - var(--offset)));
	transform: translateY(calc((var(--vh, 1vh) * 100) - var(--logo_height) - var(--offset)));
	-webkit-transition: -webkit-transform 0.75s var(--easing), opacity 0.4s var(--easing);
	transition: transform 0.75s var(--easing), opacity 0.4s var(--easing);
}

.project_info.go_away,
.about.go_away {
	-webkit-transition: -webkit-transform 0.6s cubic-bezier(0.32, 0, 0.67, 0), opacity 0.6s cubic-bezier(0.32, 0, 0.67, 0);
	transition: transform 0.6s cubic-bezier(0.32, 0, 0.67, 0), opacity 0.6s cubic-bezier(0.32, 0, 0.67, 0);
}

.project_info.show,
.about.show {
	opacity:1;
	-webkit-transform: translateY(0);
	transform: translateY(0);
}

.project_info::-webkit-scrollbar,
.about::-webkit-scrollbar {
    display: none;
}

.project_info .project_info_inside,
.about .about_inside {
	display:block;
	touch-action: auto;
	pointer-events:all !important;
	margin:0 auto;
	width:var(--max_width);
	padding-top:var(--padding_content);
	text-align:left;
	color:var(--font_color);
	-webkit-overflow-scrolling: touch;
}

/*------------------------------------------------------
IE
------------------------------------------------------*/

.ie_message {
	display: none;
	padding: 10px;
}

.ie_message a {
	text-decoration: underline;
}

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {  
	.ie_message {
		display: block !important;
	}
   header, main, footer {
    display: none !important
   }
}

/*------------------------------------------------------
TABLET
------------------------------------------------------*/

@media all and (max-width: 1024px) and (min-width: 0) {

	:root {
	  --offset: 15px;
	  --offset-minus:  -15px;
	  --logo_width:336px;
	  --logo_width_minus:-168px;
	  --logo_height:75px;
	  --max_width:656px;
	  --max_width_minus:-328px;
	  --padding_content:166px;
	}

}

/*------------------------------------------------------
MOBILE
------------------------------------------------------*/

@media all and (max-width: 760px) and (min-width: 0) {

	:root {
	  --offset: 13px;
	  --offset-minus:  -13px;
	  --logo_width:198px;
	  --logo_width_minus:-99px;
	  --logo_height:44px;
	  --max_width:calc(100% - 40px);
	  --max_width_minus:0;
	  --padding_content:106px;
	}

	.project_legend span.location {
		display:block;
	}

	.project_legend {
		left:0;
	}

}