/* global */

:root {
  --hue: 0;
  --huelightest: var(--hue) 0% 100%;
  --huelight: var(--hue) 0% 80%;
  --huemedium: var(--hue) 0% 50%;
  --huedark: var(--hue) 0% 20%;
  --huedarkest: var(--hue) 0% 0%;
  --fontsizesmall: clamp(0.4rem, 0.9vw, 1.2rem);
  --fontsizemedium: clamp(0.6rem, 1.0vw, 1.8rem);
  --fontsizelarge: clamp(1rem, 1.5vw, 2.4rem);
  --headerheight: 45px;
  --footerheight: 90px;
  --contentheight: calc(100vh - var(--headerheight) - var(--footerheight));
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  font-family:Georgia, 'Times New Roman', Times, serif;
}

.hidden {
  opacity: 0;
  pointer-events: none;
}

/* nav */

.nav-burger {
  position: absolute;
  top: 12px;
  right: 15px;
  z-index: 1;
}
.nav-burger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background: hsl(var(--huedark));
  transition: all 0.5s ease-in-out;
}
.nav-burger.is-active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-burger.is-active .bar:nth-child(2) {
  opacity: 0;
}
.nav-burger.is-active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
.nav-burger:hover {
  cursor: pointer;
}

.nav-container {
  z-index: 1;
  position: fixed;
  width: 100vw;
}

.nav-bar {
  position: absolute;
  display: none;
  flex-direction: column;
  margin-top: 15px;
  width: 100vw;
  background-color: hsl(var(--huelightest));
}
.nav-bar.is-active {
  display: flex;
}

.nav-menu {
  list-style: none;
  text-indent: 15px;
  font-size: var(--fontsizelarge);
}

.nav-submenu {
  display: block;
  list-style: none;
  text-indent: 30px;
}

.nav-link {
  display: block;
  color: hsl(var(--huedark));
  text-decoration: none;
  width: 100vw;
  height: 100%;
}
.nav-link:hover {
  background-color: hsl(var(--huelight));
}

/* body */

.main-container {
  display: flex;
  position: absolute;
  margin-top: var(--headerheight);
  height: var(--contentheight);
  width: 100vw;
}

.main-flex-left {
  justify-content: space-between;
  align-items: flex-start;
}

.main-flex-center {
  justify-content: center;
  align-items: center;
}

.grid-golden {
  display: grid;
  grid-template-areas:
    "left top-right"
    "left bottom-right";
  grid-template-columns: calc(min(100vh - 180px, 100vw * 0.618)) calc(min(100vh - 180px, 100vw * 0.618) * 0.618);
  grid-template-rows: calc(min(100vh - 180px, 100vw * 0.618) * 0.618) calc(min(100vh - 180px, 100vw * 0.618) * 0.382);
  gap: 0;
}
.content-1 {
  grid-area: left;
  height: calc(min(100vh - 180px, 100vw * 0.618));
  width: calc(min(100vh - 180px, 100vw * 0.618));
}
.content-2 {
  grid-area: top-right;
  height: calc(min(100vh - 180px, 100vw * 0.618) * 0.618);
  width: calc(min(100vh - 180px, 100vw * 0.618) * 0.618);
}
.content-3 {
  grid-area: bottom-right;
  height: calc(min(100vh - 180px, 100vw * 0.618) * 0.382);
  width: calc(min(100vh - 180px, 100vw * 0.618) * 0.618);
}

@media (orientation: portrait) {
  .grid-golden {
    grid-template-areas:
      "top top"
      "bottom-left bottom-right";
    grid-template-columns: calc(min((100vh - 180px) * 0.618, 100vw) * 0.618) calc(min((100vh - 180px) * 0.618, 100vw) * 0.382);
    grid-template-rows: calc(min((100vh - 180px) * 0.618, 100vw)) calc(min((100vh - 180px) * 0.618, 100vw) * 0.618);
    gap: 0;
  }
  .content-1 {
    grid-area: top;
    height: calc(min((100vh - 180px) * 0.618, 100vw));
    width: calc(min((100vh - 180px) * 0.618, 100vw));
  }
  .content-2 {
    grid-area: bottom-left;
    height: calc(min((100vh - 180px) * 0.618, 100vw) * 0.618);
    width: calc(min((100vh - 180px) * 0.618, 100vw) * 0.618);
  }
  .content-3 {
    grid-area: bottom-right;
    height: calc(min((100vh - 180px) * 0.618, 100vw) * 0.618);
    width: calc(min((100vh - 180px) * 0.618, 100vw) * 0.382);
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .grid-golden {
    display: grid;
    grid-template-areas:
      "left top-right"
      "left bottom-right";
    grid-template-columns: calc(min(100vh - 180px, 100vw * 0.618)) calc(min(100vh - 180px, 100vw * 0.618) * 1.618);
    grid-template-rows: calc(min(100vh - 180px, 100vw * 0.618) * 0.618) calc(min(100vh - 180px, 100vw * 0.618) * 0.382);
    gap: 0;
  }
  .content-1 {
    grid-area: left;
    height: calc(min(100vh - 180px, 100vw * 0.618));
    width: calc(min(100vh - 180px, 100vw * 0.618));
  }
  .content-2 {
    grid-area: top-right;
    height: calc(min(100vh - 180px, 100vw * 0.618) * 0.618);
    width: calc(min(100vh - 180px, 100vw * 0.618) * 1.618);
  }
  .content-3 {
    grid-area: bottom-right;
    height: calc(min(100vh - 180px, 100vw * 0.618) * 0.382);
    width: calc(min(100vh - 180px, 100vw * 0.618) * 1.618);
  }
}

.content-1 {
  position: relative;
}
.content-1 img {
  transition: filter 0.5s ease-in-out;
}
.content-1.is-active img {
  filter: brightness(0.5);
  transition: filter 0.5s ease-in-out;
}
.content-1 .content-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: var(--fontsizemedium);
  color: hsl(var(--huelight));
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.content-1.is-active .content-overlay {
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.content-item {
  display: flex;
  justify-content: center;
  align-items: center;
  object-fit: contain;
  padding: 8px;
  border-top: 1px solid hsl(var(--huelight));
  border-bottom: 1px solid hsl(var(--huelight));
}

.content-paragraph {
  overflow: hidden;
  text-align: center;
  font-size: var(--fontsizemedium);
  font-style: italic;
}

.content-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-submenu {
  list-style: none;
  overflow-y: auto;
  text-align: center;
  font-size: var(--fontsizemedium);
  width: 100%;
  max-height: 100%;
}

.flex-adaptive {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--contentheight);
}

@media (orientation: portrait) {
  .flex-adaptive {
    flex-direction: column;
    width: 100vw;
  }
}

.image-adaptive {
  max-height: min(calc(var(--contentheight)), calc(100vw / 3));
  width: calc(100vw / 3);
  padding: 8px;
  object-fit: contain;
}

@media (orientation: portrait) {
  .image-adaptive {
    max-height: none;
    height: calc(var(--contentheight) / 3);
    max-width: min(100vw, calc(var(--contentheight) / 3));
    width: auto;
    padding: 0px;
  }
}

.flex-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow-x: auto;
  height: var(--contentheight);
  width: 100vw;
}

.flex-row::-webkit-scrollbar {
  display: none;
}

.image-row {
  max-height: min(calc(var(--contentheight)), calc(100vw / 2));
  max-width: calc(100vw / 2);
  object-fit: contain;
  padding: 8px;
}

@media (orientation: portrait) {
  .image-row {
    max-width: calc(100vw);
  }
}

.reveal-figcaption {
  position: relative;
  perspective: 1000px;
}
.reveal-figcaption img {
  transition: filter 0.5s ease-in-out;
}
.reveal-figcaption:hover img {
  filter: brightness(0.5);
  transition: filter 0.5s ease-in-out;
}
.reveal-figcaption figcaption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: hsl(var(--huelight));
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.reveal-figcaption:hover figcaption {
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

/* modal */

.modal {
  display: none;
  position: fixed;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  overflow: auto;
  background-color: hsl(var(--huelightest));
  z-index: 1;
}

.modal-content {
  margin: 8px;
  max-height: 90vh;
  max-width: 90vw;
}

.close {
  position: absolute;
  top: 2px;
  right: 18px;
  color: hsl(var(--huedark));
  font-size: 36px;
}

/* footer */

.form-container {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 60px;
  width: 100vw;
  font-size: var(--fontsizesmall);
}

.form {
  display: block;
  position: relative;
  width: 100vw;
}

input {
  position: relative;
  line-height: 40px;
  width: 100vw;
  padding: 0 20px;
  border: none;
  outline: none;
  cursor: pointer;
  background: transparent;
  color: hsl(var(--huelightest));
  transition: .3s all ease;
  z-index: 2;
}

.indicator:before {
  content: attr(data-content);
  position: absolute;
  top: -25px;
  left: 20px;
  right: 0;
  bottom: 0;
  color: hsl(var(--huelight));
  transition: .3s all ease;
  text-align: left;
  z-index: 3;
}

.indicator {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: hsl(var(--huedark) / .4);
  transition: .3s all ease;
  z-index: 1;
}

input:focus + .indicator {
  height: 100%
}
