@import 'fonts.css';
@import 'variables.css';

.leaflet-control-attribution {
  display: none;
}

html {
  font-family: 'Favorit';
  font-size: 20px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-bottom: 0.5rem;
  box-sizing: border-box;
}

body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

a, a:link, a:visited,
a:hover, a:link:hover, a:visited:hover {
  cursor: pointer;
}

a:hover, a:link:hover, a:visited:hover {
  color: var(--blue);
}

h1 {
  text-transform: uppercase;
  color: var(--blue);
  font-size: 1rem;
  letter-spacing: 0em;
  display: inline-block;
  cursor: pointer;
  padding-top: 0.6rem;
  padding-bottom: 0.5rem;
}

header {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 100;
  border-bottom: 1px solid black;
  line-height: 1;
  display: flex;
  justify-content: space-between;
}

nav ul {
  display: flex;
  gap: 0.75rem
}

nav li a {
  cursor: pointer;
  display: block;
  line-height: 0;
}

nav svg {
  width: 1.5rem;
  height: 2rem;
}

/* interactive rows */

#interactive-rows {
  display: flex;
  flex-direction: column;
  height: calc(100svh - 0.5rem);
}

/* container */

.container {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.container::-webkit-scrollbar {
  display: none;
}

#thumbnail {
  display: none;
  position: fixed;
  top: 100px;
  left: 100px;
  width: 33vw;
  aspect-ratio: 3/2;
  pointer-events: none;
  z-index: 100;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.container:hover + #thumbnail {
  display: block;
}

/* filter */

#index-filter {
  border-bottom: 1px solid black;
  font-size: 0.75rem;
  text-transform: uppercase;
  overflow-x: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
  position: sticky;
  top: calc(2.1rem + 1px);
  background-color: white;
  z-index: 100;
}

#index-filter::-webkit-scrollbar {
  display: none;
}

.index-filter-collection {
  display: flex;
  gap: 1rem;
}

.index-filter-item {
  padding: 0.35rem;
  padding-left: 0;
  cursor: pointer;
  white-space: nowrap;
}

.project .index-filter-item {
  cursor: default;
  opacity: 0.25;
}

.project .index-filter-item.active {
  opacity: 1;
}

.index-filter-item.active {
  color: blue;
}

/* 1. index */

#index-container {
  box-sizing: border-box;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

.index-item {
  height: 2rem;
  border-bottom: 1px solid black;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 2rem 1fr 1fr 1fr 1fr;
  gap: 0.5rem;
  scroll-snap-align: start;
  margin-top: 1px;
  position: relative;
  transition: background-color 0.6s;
  cursor: pointer;
}

.index-item.inactive {
  display: none;
}

.index-item:hover {
  color: var(--blue);
}

.index-item li {
  display: flex;
  align-items: center
}

.index-item * {
  white-space: nowrap;
  overflow: hidden; 
  text-overflow: ellipsis;
}

.index-item .project-number .dot {
  color: var(--blue);
}

.index-item .project-title {
  text-transform: uppercase;
}

.index-item .project-state {
  display: flex;
  justify-content: space-between;
}

.index-item .project-current {
  flex-grow: 1;
}

.index-item .project-year {
  flex-grow: 2;
  text-align: right;
  white-space: nowrap;
  overflow: hidden; 
  text-overflow: unset;
}

.index-item.footer {
  grid-template-columns: 1fr;
  border-bottom: none;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: -1rem;
  cursor: inherit;
  justify-content: end;
}

.index-item.footer * {
  width: 100%;
  text-align: right;
}

/* 2. tiles */

#tile-container {
  width: 100%;
  height: calc(100vh - 4.5rem);
  position: relative;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding-top: 0.5rem;
}

.tile-item {
  position: relative;
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tile-item.inactive {
  display: none;
}

.tile-item figure {
  width: 100%;
  height: 100%;
}

.tile-item img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.tile-item.active img {
  mix-blend-mode: screen;
}

.active .tile-item {
  pointer-events: all;
}

#tile-container.related {
  display: grid;
  grid-template-columns: repeat(4, 1fr)!important;
  height: auto;
  overflow: visible;
}

.related .tile-item {
  padding-bottom: 0;
  position: static;
}

.related .tile-item figure {
  height: auto;
  aspect-ratio: 3/2;
} 

.related .tile-item img:hover {
  filter: grayscale(0)!important;
}

#tile-container .prev {
  position: absolute;
  top: 0;
  left: 0;
  width: 25vw;
  height: 100%;
  opacity: 0;
  cursor: w-resize;
  transition: all 0.25s;
  background: linear-gradient(to right, white, transparent);

}

#tile-container .next {
  position: absolute;
  top: 0;
  right: 0;
  width: 25vw;
  height: 100%;
  opacity: 0;
  cursor: e-resize;
  transition: all 0.25s;
  background: linear-gradient(to left, white, transparent);
}

#tile-container .prev:hover {
  opacity: 0.5;
}

#tile-container .next:hover {
  opacity: 0.5;
}

.arrow {
  position: fixed;
  z-index: 100;
  background-color: var(--blue);
  width: 3rem;
  height: 3rem;
  text-align: center;
  top: 0;
  left: 0;
  font-size: 3rem;
  line-height: 1.1;
}

.prev:hover .arrow {
 display: block;
}

.next:hover .arrow {
  display: block;
 }
 
/* 3. map */

body.map {
  overflow: hidden;
}

#map-container {
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.5rem;
  position: relative;
}

#map {
  width: 100%;
  height: calc(100svh - 3.75rem - 3.15rem);
}

.filter-collection {
  position: absolute;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  display: none;
}

.filter-single {
  padding: 0.1em;
  cursor: pointer;
}

.feature {
  transition: opacity 1s;
}

.feature.inactive {
  pointer-events: none!important;
  opacity: 0.1;
}

.map #index-container {
  height: 2rem;
  overflow: scroll;
  border-bottom: 1px solid black;
}

.map .index-item {
  border-bottom: none;
}

/* popup */

.leaflet-popup img {
  width: 100%;
  aspect-ratio: 3/2;
}

.leaflet-popup-content-wrapper {
  border-radius: 0;
  width: 100%;
  box-shadow: none;
  padding: 0;
}

.leaflet-popup-content {
  margin: 0;
  width: 33vw!important;
  max-width: 20rem;
}

.leaflet-popup-tip-container {
  display: none;
}

.leaflet-popup-close-button {
  display: none;
}

.popup-list {
  font-family: 'Favorit';
  padding: 0.3em;
  padding-top: 0.1em;
  box-sizing: border-box;
  width: 100%;
}

.popup-list li {
  list-style: disc;
  list-style-position: inside;
}

.popup-image {
  width: 100%;
}

/* 4. project page */

@keyframes cover {
  from {height: calc(100vh - 2.65rem)}
  to {height: calc(100svh - 6.4rem + 1px - 0.5rem - 2.1rem)}
}

.project-cover {
  width: 100%;
  top: 2.25rem;
  height: calc(100svh - 6.4rem + 1px - 0.5rem - 2.1rem);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  animation-name: cover;
  animation-duration: 0.5s;
  margin-top: 0.5rem;
}

.project .project-title {
  font-size: 4.5rem;
  letter-spacing: -0.02em;
  line-height: 0.8;
  padding-top: 0.5rem;
  padding-bottom: 0.1rem;
  text-transform: uppercase;
  border-bottom: 1px solid black;
  position: sticky;
  top: 2.15rem;
  background-color: white;
  z-index: 200;
}

/* 4.1 chapter layout */

.chapter-single {
  display: flex;
  gap: 0.5rem;
  flex-direction: row;
  margin-bottom: 5rem;
  justify-content: space-between;
}

.chapter-single:nth-of-type(2n) {
  flex-direction: row-reverse;
}

.chapter-text {
  position: sticky;
  top: 6.4rem;
  width: 50%;
  align-self: flex-start;
  padding-top: 0.25rem;
  z-index: 0;
}

.chapter-text a {
  color: var(--blue);
}

.chapter-text a:hover {
  text-decoration: underline;
}

.chapter-text p:not(:last-child),
.chapter-text ul:not(:last-child),
.chapter-text ol:not(:last-child) {
  margin-bottom: 0.6em;
}

.chapter-text ul  {
  padding-left: 1em;
}

.chapter-text ul li {
  list-style: disc;
  list-style-position: outside;
}

.chapter-text ol  {
  padding-left: 1.75em;
}

.chapter-text ol li {
  list-style: decimal;
  list-style-position: outside;
}

.chapter-images {
  display: flex;
  flex-direction: column;
  width: 50%;
  padding-top: 0.5rem;
  z-index: 5;
  align-items: end;
}

.chapter-images .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0.5rem;
}

.grid img {
  aspect-ratio: 4/3;
  object-fit: cover;
}

.chapter-single:nth-of-type(2n) .chapter-images {
  align-items: start;
}

.chapter-images figure {
  line-height: 0;
  display: block;
  margin-bottom: 0.5rem;
}

.chapter-images figure.landscape {
  width: 100%;
}

.chapter-images figure.portrait {
  width: 63%;
}

.chapter-images figure:last-child {
  margin-bottom: 0rem!important;
}

.chapter-images figcaption {
  line-height: 1.25;
  font-size: 0.75rem;
  max-width: 42em;
  padding-top: 0.2rem;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
  box-sizing: border-box;
  background-color: white;
} 

.chapter-images img {
  width: 100%;
  cursor: zoom-in;
}

.chapter-images video {
  width: 100%;
}

.chapter-images .external-video {
  width: 100%;
}

.chapter-images iframe {
  width: 100%!important;
  aspect-ratio: 16/9;
}

.chapter-images figure.full {
  line-height: 0;
  display: block;
  margin-bottom: 0.5rem;
  width: calc(200% + 0.5rem);
  margin-left: calc(-100% - 0.5rem);
  margin-top: 3rem;
  margin-bottom: 3rem;
  margin-left: calc(-100% - 0.5rem);
}

.chapter-single:nth-of-type(2n) .chapter-images figure.full {
  margin-left: 0;
}

.chapter-images figure.centered {
  display: block;
  margin-bottom: 0.5rem;
  width: calc(75% + 0.5rem);
  margin-top: 4rem;
  margin-bottom: 4rem;
  margin-right: calc(100% - 37.5%);
}

.chapter-single:nth-of-type(2n) .chapter-images figure.centered {
  margin-left: calc(100% - 37.5%);
}

.chapter-images figure.small {
  width: 100%;
}

.chapter-images figure.grayscale {
  filter: grayscale(1);
}

#lightbox {
  display: flex;
  position: fixed;
  top: 5rem;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
  box-sizing: border-box;
}

#lightbox.active {
  top: 0;
  opacity: 1;
  pointer-events: all;
  transition: 0.5s;

}

#lightbox img {
  object-fit: contain;
  width: 100%;
  height: 100%;
  cursor: zoom-out;
}

/* project data */

.data-item {
  display: grid;
  grid-template-columns: 15em auto;
  border-bottom: 1px solid black;
  padding-top: 0.2em;
  padding-bottom: 0.2em;
}

.data-item:last-child {
  border-bottom: none;
}

.data-title {
  width: 33vw;
  text-transform: uppercase;
}

.data-content li {
  list-style-type: disc;
  list-style-position: outside;
  margin-left: 1em;
}

.data-content p {
  display: inline;
}



