article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section {display: block;}

a {outline: none;}

body {
  color: #111;
  font: 400 14px 'Lato', sans-serif;
  background: #fff;
  -webkit-text-size-adjust: none;
  padding: 0 40px;
  margin: 0;	
}

a {
  color: #111;
  text-decoration: none;
  transition: all 0.5s;
}
a:hover {color: #fc6e1a;}

img {
  width: 100%;
  height: auto;
}

section {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: auto;
  box-sizing: border-box;
}
section::after {
  content: "";
  display: table;
  clear: both;
}

header {
  position: absolute;
  top: 0;
  left: 0;
  width: 17.1428%;
  max-width: 240px;
  height: 100vh;
  padding: 40px 0;
  box-sizing: border-box;
}

#logo {
  display: block;
  width: 150px;
  margin-bottom: 40px;
}

nav a {
  float: left;
  clear: left;
  margin-bottom: 1em;
  font-family: 'Nunito Sans', sans-serif;
  text-transform: uppercase;
}
nav a.active {
  color: #fc6e1a;
  font-weight: 700;
  transform: scale(1.25);
  transform-origin: left center;
}

#contact {
  position: absolute;
  left: 0;
  bottom: 40px;
}
#contact p:last-child {margin-bottom: 0;}

main {
  width: 81.0714%;
  max-width: 1135px;
  padding: 40px 0;
  float: right;
}

#thumbnails {
  display: flex;
  justify-content: space-around;
  flex-flow: row wrap;
}

#thumbnails a {
  position: relative;
  display: block;
  width: 23.348%;
  height: 0;
  padding-bottom: 23.348%;
  background: rgba(0,0,0,1);
  overflow: hidden;
  box-sizing: border-box;
}

#thumbnails a:nth-child(n+5) {margin-top: 25px;}

#thumbnails a img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200%;
  height: auto;
  transition: all 2s;
}

.tmbTitle {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 60%;
  height: 60%;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  text-align: center;
  background: #fc6e1a;
  box-shadow: 0 0 10px #000;
  opacity: 0;
  box-sizing: border-box;
  transition: all 1s;
}
.inner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 90%;
}

#thumbnails a:hover .tmbTitle {
  opacity: 1;
}
#thumbnails a:hover img {
  opacity: 0.5;
  filter: blur(5px);
  transition: 0.5s;
}

.m .tmbTitle {
  left: 0;
  top: auto;
  bottom: 0;
  transform: translate(0,0);
  width: 100%;
  height: auto;
  padding: 5px;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
}
.m .inner {
  position: relative;
  left: auto;
  top: auto;
  transform: translate(0,0);
  width: 100%;
}
#thumbnails a.m:hover img {
  opacity: 1;
  filter: blur(0);
}


#mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
}
#mask #img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  box-shadow: 10px 10px 10px 5px #000;
}
#mask #img img {vertical-align: middle;}

#info {
  display: none;
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: url("../img/info_btn.svg") center center no-repeat;
  background-size: 100% auto;
  filter: drop-shadow(0 0 5px #000);
}

#desc_mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  outline: 10px solid #fd6f1a;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s;
}
#desc_mask.show_desc {opacity: 1; visibility: visible;}
#desc {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-height: 90%;
  padding-bottom: 60px;
  color: #fff;
  overflow: auto;
  box-sizing: border-box;
}
#desc a {color: #fd6f1a;}
#desc a:hover {text-decoration: underline;}

@media only screen and (max-width:1480px){	
	#thumbnails a:nth-child(n+5) {margin-top: 1.6891vw;}
}


@media only screen and (max-width:1000px){
	#logo {width: 100%; margin-bottom: 4vw;}
	#thumbnails a:nth-child(n+5) {margin-top: 0;}
	#thumbnails a:nth-child(n+4) {margin-top: 1.6891vw;}
	#thumbnails a {width: 30.3333%; padding-bottom: 30.3333%;}	
}

@media only screen and (max-width:800px){
	body {padding: 0 20px;}
	header {position: relative !important; top: auto !important; width: 100%; height: auto; max-width: 100%; padding: 20px 0;}
	#logo {width: 100px; margin-bottom: 10px;}
	#contact {left: auto; bottom: auto; top: 20px; right: 0; white-space: nowrap;}
	#contact p {margin: 5px 0;}
	#contact p:first-of-type {margin-top: 0;}
	nav {display: flex; justify-content: space-around;}
	nav a {float: none; margin-bottom: 0;}
	nav a.active {transform: scale(1); font-weight: 400;}
	main {width: 100%; float: none; padding: 0 0 20px;}
}

@media only screen and (max-width:600px){
	#logo {width: 75px;}
	#contact {float: right;}
	nav {display: block; padding-top: 10px; text-align: center; clear: right;}
	nav a {display: inline-block; margin: 5px 10px;}
}

@media only screen and (max-width:500px){
  #thumbnails a:nth-child(n+4) {margin-top: 0;}
  #thumbnails a:nth-child(n+3) {margin-top: 4vw;}
  #thumbnails a {width: 46%; padding-bottom: 46%;}
}

