/* OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO VARIABLES OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO */
:root {
  --smallFont: 14px / 18px 'Univers';
  --mainFont: 20px / 25px 'Univers';
  --mainColour: #00bb00;
}

/* OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO MAIN STYLES OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO */
/* - - - - - - - - - - - - - - - - - - - - - - - -  BODY  - - - - - - - - - - - - - - - - - - - - - - - - */
html {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

*,
body {
  font-family: 'Univers', Arial, Helvetica, sans-serif;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  height: 100%;
  width: 100%;
  background-color: #fff;
  font: var(--smallFont);
  overflow: hidden;
}

img {
  vertical-align: top;
}
/* - - - - - - - - - - - - - - - - - - - - - - - -  GENERAL  - - - - - - - - - - - - - - - - - - - - - - - - */
p {
  margin: 30px 0 0;
}

.aboutRow {
  display: grid;
  grid-template-columns: 2fr 3fr;
  column-gap: 30px;

  &:last-child {
    margin-bottom: 0;
  }
}

/* - - - - - - - - - - - - - - - - - - - - - - - -  LINKS  - - - - - - - - - - - - - - - - - - - - - - - - */
a,
a:visited,
a:focus,
a.noHover:hover {
  color: #000;
  text-decoration: none;
  outline: none;
}

a:hover,
.about a,
.about a:visited {
  color: var(--mainColour);
}

a.hoverEffect,
a.noHover.hoverEffect {
  color: var(--mainColour);
}

/* - - - - - - - - - - - - - - - - - - - - - - - -  CONTAINER  - - - - - - - - - - - - - - - - - - - - - - - - */
#container {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.215, 0.61, 0.355, 1);
  transform: translate3d(0, 0, 0);
}

/* - - - - - - - - - - - - - - - - - - - - - - - -  REUSABLE  - - - - - - - - - - - - - - - - - - - - - - - - */
p.noMargin {
  margin: 0 !important;
}

/* - - - - - - - - - - - - - - - - - - - - - - - -  MENU  - - - - - - - - - - - - - - - - - - - - - - - - */
.menuOuter {
  position: absolute;
  top: 0;
  left: 0;
  right: 30px;
  z-index: 10;
  pointer-events: none;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  font: var(--mainFont);
  transition: background-color 0.4s ease;

  & #projectInfo,
  & .projectTitle,
  & a {
    pointer-events: auto;
  }
}

.menuOuterFixed {
  position: fixed;
}

.headMenuLeft {
  margin-right: auto;
}

#projectView .menuOuter {
  position: relative;
  margin-right: 30px;
}

.headMenu {
  display: flex;
  padding: 30px 0 30px 30px;
  position: relative;
  flex-wrap: wrap;
  column-gap: 30px;
}

.hidden {
  visibility: hidden;
  opacity: 0;
}

/* - - - - - - - - - - - - - - - - - - - - - - - -  SLIDESHOW  - - - - - - - - - - - - - - - - - - - - - - - - */
.flickity-prev-next-button {
  width: 60px;
  height: 60px;
  background: transparent;
  padding: 0;
}

#projectSlideshow .flickity-prev-next-button {
  margin-top: -20px;
}

.flickity-prev-next-button:hover {
  background: transparent;
}

/* arrow color */
.flickity-prev-next-button .arrow {
  fill: black;
}
.flickity-prev-next-button.no-svg {
  color: black;
}

.flickity-prev-next-button svg {
  position: relative;
  left: auto;
  top: auto;
  width: 60%;
  height: 60%;
}

.flickity-prev-next-button.previous {
  text-align: left;
  left: 30px;
}

.flickity-prev-next-button.next {
  text-align: right;
  right: 30px;
}

#slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.carouselHidden {
  opacity: 0;
  transition: opacity 0.3s;
}

.carousel {
  z-index: 2;
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
}

#slideshow img {
  width: auto;
  height: 100%;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  float: left;
  z-index: 1;
  cursor: pointer;
}

#slideshow .landscape img {
  position: relative;
  max-height: 75vh;
  max-width: 100vw;
  height: auto;
  top: 50%;
  transform: translate3d(0, -50%, 0);
}

.carousel-cell,
.carousel {
  height: 100%;
}

.flickity-viewport {
  height: 100% !important;
}

.slideshowTitle {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 99;
  padding: 0px 20px 20px;
  display: none;
}

/* - - - - - - - - - - - - - - - - - - - - - - - -  PROJECT VIEW  - - - - - - - - - - - - - - - - - - - - - - - - */
#projectView {
  position: absolute;
  top: 200%;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.projectTitle {
  cursor: pointer;
  flex: 1;
  opacity: 0;
  visibility: hidden;
}

.alwaysHidden {
  opacity: 0 !important;
  visibility: hidden !important;
}

body[data-section='project'] .projectTitle {
  opacity: 1;
  visibility: visible;
}

#projectContainer {
  position: relative;
  flex: 2;
  overflow: hidden;
  width: 50%;
  height: 100%;
  will-change: transform;
}

#slideshowContainer {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
}

#loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#projectSlideshow {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: white;
}

.slideShowHidden {
  opacity: 0;
}

#projectSlideshowOuter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  bottom: 0;
}

.slide {
  height: 100%;
  width: 100%;
  padding: 0 60px 40px;
}

.slideInner {
  position: relative;
  height: 100%;
  width: 100%;
}

.slide img {
  max-height: 100%;
  max-width: 100%;
  height: auto;
  width: auto;
  top: 50%;
  left: 50%;
  position: absolute;
  transform: translate3d(-50%, -50%, 0);
}

.highLazy {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.loaded .highLazy {
  opacity: 1;
}

.caption {
  position: absolute;
  bottom: -30px;
  left: 0;
}

#projectInfo {
  padding: 0 30px 10px;
  display: none;
  margin-right: -30px;
  overflow: scroll;
  -webkit-overflow-scrolling: touch;
  font: var(--smallFont);

  p {
    margin: 0 0 15px;
  }
}

#projectInfo.visible {
  display: flex !important;
}

#projectInfoLeft {
  float: left;
  flex: 1;
  padding: 0 60px 0 0;
  max-width: 750px;
}

#projectInfoRight {
  float: right;
  width: 250px;
}

#projectContainer.projectSlideshowInfo {
  position: absolute;
  bottom: 0;
}

#credits a,
#projectInfoLeftInner a {
  color: var(--mainColour);
}

.arrowTitle {
  height: 15px;
  width: auto;
  transition: transform 0.3s;
  margin-left: 15px;
  vertical-align: middle;
}

.arrowRotated {
  transform: rotate(180deg);
}

/* - - - - - - - - - - - - - - - - - - - - - - - -  OVERVIEW  - - - - - - - - - - - - - - - - - - - - - - - - */
#overview {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body[data-section='work'] .link-overview {
  color: var(--mainColour);
}

.slidingContainer {
  position: relative;
  flex: 2;
  overflow: hidden;
  width: 200%;
  height: 100%;
  transition: transform 0.4s ease;
}

.singleProject {
  width: 20%;
  float: left;
  overflow: auto;
  margin: 0 0 50px;
  padding-left: 15px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.imageOuter {
  position: relative;
  margin-bottom: 5px;
}

.loadOuter {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  background-color: white;
  transform: translate3d(0, 0, 0);
}

.singleProject .loadOuter img {
  filter: blur(7px);
  position: absolute;
  width: 104%;
  height: 104%;
  left: -2%;
  top: -2%;
}

.lazy {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
}

.singleProject:nth-child(5n + 1) {
  clear: left;
}

.singleProject:hover img {
  opacity: 0.3;
}

.singleProject:hover {
  color: var(--mainColour);
}

#projects {
  position: absolute;
  height: 100%;
  width: 50%;
  top: 0;
  left: 0;
  overflow: scroll;
  -webkit-overflow-scrolling: touch;
  z-index: 8;
  padding: 85px 30px 0 15px;
}

/* - - - - - - - - - - - - - - - - - - - - - - - -  ABOUT  - - - - - - - - - - - - - - - - - - - - - - - - */
.about {
  position: absolute;
  top: 0;
  left: 50%;
  right: 0;
  bottom: 0;
  z-index: 7;
  overflow: scroll;
  -webkit-overflow-scrolling: touch;
  padding: 65px 30px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 30px;
  transition: transform 0.4s ease;
}

#projectView .about {
  width: 100%;
  transition: transform 0.4s ease;
  transform: translateX(100%);
  left: 0;
}

.about p {
  margin: 20px 0 0 0;
  max-width: 680px;
}

.aboutMap {
  width: 100%;
  height: 400px;
  margin: 30px 0 0;
}

.showAbout {
  & .about {
    transform: translateX(0);
  }

  & .slidingContainer {
    transform: translateX(-50%);
  }

  & #projectView .about {
    transform: translateX(0);
  }

  & .aboutButton {
    color: var(--mainColour) !important;
  }

  & .closeAboutButton {
    display: inline;
  }

  & .projectTitle,
  & .link-overview {
    display: none;
  }
}

.closeAboutButton {
  display: none;
}

/* OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO MEDIA QUERIES OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO */
@media screen and (max-width: 930px) {
  .singleProject {
    width: 25%;
  }

  .singleProject:nth-child(5n + 1) {
    clear: none;
  }

  .singleProject:nth-child(4n + 1) {
    clear: left;
  }
}

@media screen and (max-width: 769px) {
  :root {
    --mainFont: 14px / 18px 'Univers';
  }

  p {
    margin: 20px 0 0;
  }

  /* - - - - - - - - - - - - - - - - - - - - - - - -  MENU  - - - - - - - - - - - - - - - - - - - - - - - - */
  .menuOuter {
    right: 20px;
  }

  #projectView .menuOuter {
    margin-right: 20px;
  }

  /* - - - - - - - - - - - - - - - - - - - - - - - -  ABOUT  - - - - - - - - - - - - - - - - - - - - - - - - */
  .about {
    padding: 35px 20px 20px;
    grid-template-columns: 1fr;
  }

  .aboutMap {
    margin: 20px 0 0;
  }

  /* - - - - - - - - - - - - - - - - - - - - - - - -  PROJECT  - - - - - - - - - - - - - - - - - - - - - - - - */
  .singleProject {
    width: 33.333%;
    margin: 0 0 30px;
  }

  .singleProject:nth-child(4n + 1) {
    clear: none;
  }

  .singleProject:nth-child(3n + 1) {
    clear: left;
  }

  .flickity-prev-next-button {
    width: 40px;
    height: 40px;
  }

  #projectSlideshow .flickity-prev-next-button {
    margin-top: -10px;
  }

  .flickity-prev-next-button.previous {
    left: 25px;
  }

  .flickity-prev-next-button.next {
    right: 25px;
  }

  .headMenu {
    padding: 20px 0 20px 20px;
  }

  #projectInfo {
    padding: 0 20px 0;
    margin-right: -20px;
  }

  #projects {
    padding: 60px 20px 0 5px;
  }

  .slide {
    padding: 0 20px 20px;
  }

  .caption {
    bottom: -25px;
  }

  #projectInfo.visible {
    display: block !important;
  }

  #projectInfoLeft,
  #projectInfoRight {
    padding: 0;
    float: none;
  }

  #projectInfoRight {
    width: auto;
  }

  .arrowTitle {
    height: 11px;
  }

  .arrowRotated {
    transform: rotate(180deg) translateY(1px);
  }

  .closeAboutButton {
    right: 20px;
  }
}

@media screen and (max-width: 610px) {
  .projectTitle {
    min-width: 100%;
    order: 4;
  }

  .changeTitle {
    float: left;
  }

  .arrowTitle {
    clear: left;
    float: left;
    margin-left: 0;
    margin-top: 3px;
  }

  .headMenuLeft {
    flex: 1;
  }
}

@media screen and (max-width: 510px) {
  .singleProject {
    width: 50%;
  }

  .singleProject:nth-child(3n + 1) {
    clear: none;
  }

  .singleProject:nth-child(2n + 1) {
    clear: left;
  }

  .aboutRow {
    grid-template-columns: 1fr;
    margin-bottom: 10px;
  }
}
