@import url(./module/default.css);

body {
  timeline-scope: --content-view-timeline;
}

main {
  view-timeline-name: --content-view-timeline;
}

#title {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
  padding: min(10vh, 10vw) 10vw min(10vh, 10vw) 10vw;
  gap: 1em 2em;
  min-height: 50vh;
}

#title h1 {
  font-family: "Poppins";
  font-size: clamp(36px, 16vw, 100px);
  line-height: 1em;
  letter-spacing: -0.05em;
  margin: 0;
  writing-mode: vertical-lr;
  aspect-ratio: 1/1;
}

#title h1 span {
  display: block;
  font-family: "IBM Plex Sans JP";
  font-weight: 900;
  font-size: clamp(72px, 32vw, 200px);
  line-height: 1em;
  letter-spacing: -0.1em;
  transform: scale(1.33, 1);
  transform-origin: top left;
  padding-right: 0.33em;
  margin: -0.08em 0.05em 0 0.05em;
}

/* Firefox */
@-moz-document url-prefix() {
  #title h1 span {
    letter-spacing: 0;
    transform: scale(1.33, 0.98);
  }
}

#title h2 {
  display: block;
  font-family: "IBM Plex Sans";
  font-weight: 900;
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.15em;
  margin: 0;
  word-break: keep-all;
  letter-spacing: 0.02em;
  width: min(85%, 360px);
  max-width: 60vw;
}

#title h2 span.jp {
  display: block;
  font-family: "IBM Plex Sans JP";
  font-weight: 900;
  margin-top: clamp(12px, 2vw, 20px);
  font-size: clamp(16px, 2.5vw, 21px);
  line-height: 1.6em;
}

@keyframes parallax {
  from {
    margin-top: -20vh;
  }

  to {
    margin-top: 0;
  }
}

#artworks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: -10;
  background-color: #efefef;
  overflow: hidden;
  animation: parallax linear both;
  animation-timeline: --content-view-timeline;
  animation-range: contain 0% exit 133%;
}

#artworks>div {
  display: block;
  width: 100%;
  line-height: 0;
  text-align: center;
}

#artworks>div:nth-of-type(6n) {
  text-align: right;
}

#artworks>div:nth-of-type(5n) {
  text-align: left;
}

#artworks>div:nth-of-type(1),
#artworks>div:nth-of-type(2) {
  width: 120vw;
  text-align: left;
  max-height: 75vh;
  overflow-y: hidden;
  margin-left: -10vw;
}

#artworks>div:nth-of-type(3) {
  width: 70vw;
  margin-left: 30vw;
  text-align: right;
}

#artworks a {
  display: inline-block;
  position: relative;
  height: 13vw;
  max-height: 220px;
  min-height: 110px;
  margin: 1px 0;
}

#artworks>div:nth-of-type(1) a,
#artworks>div:nth-of-type(2) a {
  height: 10vw;
  max-height: 140px;
  min-height: 50px;
}

#artworks a div {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  padding: 1em;
  opacity: 0;
  backdrop-filter: blur(20px) contrast(50%) brightness(200%) saturate(200%);
  transition: opacity 300ms;
  z-index: 2;
  box-sizing: border-box;
}

@keyframes blur-switch {
  0% {
    backdrop-filter: blur(50px) contrast(50%) brightness(200%) saturate(200%) contrast(110%);
    opacity: 1;
  }

  75% {
    backdrop-filter: blur(0px) contrast(90%) brightness(120%) saturate(150%) contrast(100%);
    opacity: 1;
  }

  100% {
    backdrop-filter: blur(0px) contrast(100%) brightness(120%) saturate(100%) contrast(100%);
    opacity: 0;
  }
}

#artworks a div span {
  font-size: 13px;
  line-height: 1.1em;
}

#artworks a:hover {
  color: var(--main-text-color);
}

#artworks a:hover div {
  opacity: 1;
}

#artworks img {
  display: inline-block;
  object-fit: cover;
  margin: 0 1px;
  height: 100%;
  width: auto;
}

#blur {
  position: fixed;
  top: 0;
  width: 50vw;
  height: 50vh;
  z-index: -5;
  animation: blur-switch linear both;
  animation-timeline: --content-view-timeline;
  animation-range: contain 0% exit 133%;
  pointer-events: none;
  user-select: none;
  transform: scale(2);
  transform-origin: left top;
}

@media (dynamic-range: high) {

  _::-webkit-full-page-media,
  _:future,
  :root #blur {
    filter: brightness(85%) contrast(120%);
  }

  _::-webkit-full-page-media,
  _:future,
  :root #artworks a div {
    filter: brightness(80%) contrast(120%);
  }
}