@import "../fonts/fonts.css";

/* ============================================================
   BASE
   ============================================================ */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  font-size: .875rem;
  line-height: 1rem;
  font-feature-settings: "calt", "kern", "rclt", "rlig", "rvrn", "tnum", "ss02", "liga" 0;
  letter-spacing: normal;
  text-align: left;
  direction: ltr;
}

main {
  flex: 1;
  margin-top: 3rem;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: underline;
  color: inherit;
}

/* ============================================================
   NAV
   ============================================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  font-family: PPNeueMontreal, sans-serif;
  font-weight: 600;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 0.25rem 1rem;
  z-index: 2;
  padding: 1rem 2rem;
  box-sizing: border-box;
  transition: color 0.2s ease;
}

nav .mainButton {
  grid-column: 1/4;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-align: center;
  padding-bottom: 1rem;
  padding-top: 1rem;
  font-family: PPNeueMontreal, sans-serif;
  font-weight: 600;
  margin-top: auto;
  z-index: 2;
}

footer .links {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 0.25rem 1rem;
  padding: .5rem 1rem;
  text-transform: uppercase;
}

footer .links a:nth-child(1) { grid-column: 3; }
footer .links a:nth-child(2) { grid-column: 4; }
footer .links a:nth-child(3) { grid-column: 5; }

footer p {
  text-transform: uppercase;
}

/* ============================================================
   BLACKBOXES
   ============================================================ */

.blackboxes {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  transition: color 0.2s ease;
}

.blackbox {
  height: auto;
  width: 2rem;
  background-color: black;
  transition: background-color 0.2s ease;
}

/* ============================================================
   TITLE
   ============================================================ */

.title h1,
.title h2 {
  font-family: BoogyBrutPoster, serif;
  text-transform: lowercase;
  font-size: 6rem;
  text-align: center;
  line-height: 5rem;
}

/* ============================================================
   OVERVIEW
   ============================================================ */

#overview {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  transition: background-color 0.2s ease;
}

#overview .carousel-cell {
  width: 100%;
  height: 60%;
  position: relative;
  top: 20%;
  overflow: hidden;
}

#overview .carousel-cell img,
#overview .carousel-cell video {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
  display: block;
}

#overview + .overview-info {
  box-sizing: border-box;
  position: fixed;
  width: 100%;
  padding: 1rem 2rem;
  bottom: 0;
  font-family: PPNeueMontreal, sans-serif;
  font-weight: 600;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 0.25rem 1rem;
  z-index: 3;
  transition: color 0.2s ease;
}

#overview + .overview-info .see-project {
  color: inherit;
  grid-column: 6;
}

/* ============================================================
   CAROUSEL PROJET
   ============================================================ */

.projectDisplay {
  padding-bottom: 1rem;
}

.projectDisplay .carousel {
  width: 100%;
  height: 85vh;
  overflow: hidden;
  position: relative;
}

.projectDisplay .carousel-cell {
  position: relative;
  height: 100%;
  max-width: 90%;
}

.projectDisplay .carousel-cell img,
.projectDisplay .carousel-cell video {
  display: block;
  max-height: 100%;
  max-width: 100%;
  height: auto;
  width: auto;
}

.projectDisplay .carousel + .project {
  padding: .5rem 2rem 0 2rem;
}

/* ============================================================
   FLICKITY
   ============================================================ */

.flickity-prev-next-button {
  top: 0 !important;
  transform: none !important;
  height: 100% !important;
  width: 50% !important;
  border-radius: 0 !important;
  background: transparent !important;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.flickity-prev-next-button:hover {
  opacity: 1;
}

.projectDisplay .flickity-prev-next-button.previous {
  cursor: url("../icons/Arrow_L.svg"), w-resize !important;
}
.projectDisplay .flickity-prev-next-button.next {
  cursor: url("../icons/Arrow_R.svg"), e-resize !important;
}

.flickity-prev-next-button .flickity-button-icon {
  display: none;
}

.carousel:hover .flickity-prev-next-button {
  pointer-events: auto;
}

.carousel-cell:has(video) .flickity-lazyload-spinner {
  display: none;
}

/* ============================================================
   IMAGES LAZY LOADING
   ============================================================ */

.carousel-cell-image {
  filter: blur(20px);
}

.carousel-cell-image.flickity-lazyloaded {
  filter: blur(0);
  animation: none;
  transition: 1s ease;
}

/* ============================================================
   PROJECT & INDEX INFO
   ============================================================ */

.project .info,
.index .info {
  font-family: PPNeueMontreal, sans-serif;
  font-weight: 600;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 0.5rem 1rem;
}

.project a {
  text-decoration: none;
  color: inherit;
}

.project .tag:hover {
  text-decoration: underline;
}

.project .info .date        { grid-column: 1; grid-row: 1; }
.project .info .client      { grid-column: 2; grid-row: 1; }
.project .info .name        { grid-column: 3; grid-row: 1; }
.project .info .tags        { grid-column: 4/6; grid-row: 1; }
.project .info .description { grid-column: 3/6; grid-row: 2; 
															font-size: 1.25rem;
															line-height: 1.4rem;
															font-weight: 500;
														}

.project .description a {
  text-decoration: underline;
}

.description:has(a:hover) span,
.description:has(a:hover) a {
  opacity: 0.3;
}

.description:has(a:hover) a:hover {
  opacity: 1;
}

/* ============================================================
   INDEX
   ============================================================ */

.index {
  padding: 0 2rem;
  margin-top: 5rem;
}

.index > .info {
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.index:hover .project {
  opacity: 0.2;
}

.index:hover .project:hover {
  opacity: 1;
}

.index .project .info .tags {
  grid-column: 5/7;
}

.thumb {
  position: fixed;
  height: 15vh;
  width: auto;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: none;
}

.project:hover .thumb {
  display: initial;
  z-index: -1;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about {
  margin-top: 5vh;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 0.25rem 1rem;
  background-color: white;
  z-index: 2;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

.about p.bio {
  font-family: PPNeueMontreal, serif;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1em;
  grid-row: 1;
  grid-column: 1/4;
}

.about p.contact,
.about p.services,
.about p.formation,
.about p.experience,
.about p.credits {
  grid-row: 2;
  font-family: PPNeueMontreal, serif;
  font-weight: 600;
  margin-top: 20vh;
}

/* ============================================================
   SPACING
   ============================================================ */

.spacer{
	margin-bottom: 10rem;
}

















/* ============================================================
   SMALLSCREENS
   ============================================================ */


@media (max-width: 768px), (orientation: portrait) {

	main{
		margin-top: 5rem;
	}

	nav {
	  grid-template-columns: repeat(6, 1fr);
	  padding: 0.75rem 1rem;
	}

	nav .mainButton {
	  grid-column: 1/4;
	}

	nav > a:not(.mainButton),
	nav > div {
	  grid-column: 4/7;
	}


  .blackbox {
    width: 1rem;
  }

  .title h1,
  .title h2 {
    font-size: 2.5rem;
    line-height: 2rem;
  }

  #overview .carousel-cell {
	  width: 100%;
	  height: 80%;
	  position: relative;
	  top: 10%;
	  overflow: hidden;
	}

  #overview .carousel-cell img,
  #overview .carousel-cell video {
    max-height: 80vh;
  }


  #overview + .overview-info {
    grid-template-columns: repeat(6, 1fr);
    padding: 0.75rem 1rem;
  }

  #overview + .overview-info .see-project {
    grid-column: 4/7;
  }

  #overview + .overview-info .overview-meta {
    grid-column: 1/4;
  }

  #overview + .overview-info .overview-pagination {
    grid-column: 1/4;
  }


  .index {
    padding: 0 1rem;
  }

  .project .info,
  .index .info {
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 0 1rem;
  }

  .index .info .date      { grid-column: 1; grid-row: 1; }
  .index .info .client    { grid-column: 2 / 4; grid-row: 1; }
  .index .info .name      { grid-column: 4 / 7; grid-row: 1; }

  .index .project .info .tags,
  .index .project .info .fields,
  .index .project .info .description,
  .index .info .tags,
  .index .info .fields { display: none; }



  .projectDisplay .carousel + .project {
    padding: 0.5rem 1rem 0 1rem;
  }

  .projectDisplay .project .info .date                 { grid-column: 1/7; grid-row: 1; }
  .projectDisplay .project .info .carousel-pagination  { grid-column: 4/7; grid-row: 1; }
  .projectDisplay .project .info .client               { grid-column: 1/7; grid-row: 2; }
  .projectDisplay .project .info .name                 { grid-column: 1/7; grid-row: 3; }
  .projectDisplay .project .info .tags                 { grid-column: 1/7; grid-row: 4; }
  .projectDisplay .project .info .description          { grid-column: 1/7; grid-row: 5; margin-top: 1rem;}




  .projectDisplay .carousel {
    width: 100%;
    height: auto;
  }

  .projectDisplay .carousel-cell {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
  }

  .projectDisplay .carousel-cell img,
  .projectDisplay .carousel-cell video {
    width: 100%;
    max-height: 100%;
    height: auto;
    display: block;
  }

	footer p {
	  width: 90%;
	}

	.about{
		padding: 1rem;
	}

  .about p.bio {
    grid-column: 1/7;
    grid-row: 1;
    font-size: 1.5rem;
  }

	.about p.contact,
	.about p.services,
	.about p.formation,
	.about p.experience,
	.about p.credits {
    grid-column: 1/7;
    grid-row: auto;
    margin-top: 2rem;
  }

}