.gallery-page {
  overflow-x: hidden;
}

.gallery-header {
  position: fixed;
  color: #f2f0e8;
  background: rgba(8, 8, 8, 0.9);
  mix-blend-mode: normal;
  backdrop-filter: blur(18px);
}

.gallery-hero {
  display: grid;
  grid-template-columns: 1fr 6fr 2fr;
  align-items: end;
  gap: 36px;
  min-height: 100svh;
  padding: 150px var(--side) 70px;
  color: #f2f0e8;
  background:
    radial-gradient(circle at 82% 18%, rgba(53, 76, 255, 0.4), transparent 28%),
    #080808;
}

.gallery-hero__index {
  align-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gallery-hero__index span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid currentColor;
  border-radius: 50%;
  letter-spacing: 0;
}

.gallery-hero__index p {
  margin: 0;
}

.gallery-hero__heading > p {
  margin: 0 0 34px 0.5vw;
  color: #aaa;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.gallery-hero h1 {
  margin: 0;
  font-size: clamp(5.4rem, 14.5vw, 16rem);
  font-weight: 950;
  letter-spacing: -0.09em;
  line-height: 0.7;
  text-transform: uppercase;
}

.gallery-hero h1 span,
.gallery-hero h1 em {
  display: block;
}

.gallery-hero h1 em {
  color: #d8ff31;
  font-style: normal;
}

.gallery-hero__foot {
  align-self: end;
}

.gallery-hero__foot > p {
  margin: 0 0 50px;
  color: #c6c6c6;
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  font-weight: 600;
  line-height: 2;
}

.gallery-hero__foot > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid #f2f0e8;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-hero__foot > a span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.gallery-list {
  color: #111;
  background: #f2f0e8;
}

.gallery-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 70svh;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.gallery-loading i {
  width: 42px;
  height: 2px;
  overflow: hidden;
  background: #aaa;
}

.gallery-loading i::after {
  display: block;
  width: 100%;
  height: 100%;
  background: #354cff;
  content: "";
  animation: gallery-loading 1.1s ease-in-out infinite alternate;
  transform-origin: left;
}

.gallery-loading.is-error i {
  display: none;
}

.gallery-item {
  --item-accent: #d8ff31;
  display: grid;
  grid-template-columns: minmax(0, 58%) minmax(0, 42%);
  min-height: 100svh;
  border-top: 1px solid #111;
}

.gallery-item__visual {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: #c8c5b9;
}

.gallery-item__visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 68%, rgba(0, 0, 0, 0.24));
  content: "";
  pointer-events: none;
}

.gallery-item__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.045);
  transition:
    opacity 800ms ease,
    transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item.is-visible .gallery-item__visual img {
  opacity: 1;
  transform: scale(1);
}

.gallery-item__visual-number {
  position: absolute;
  bottom: 28px;
  left: 28px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #080808;
  background: var(--item-accent);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.gallery-item__information {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: clamp(80px, 8vw, 140px) clamp(30px, 5vw, 86px);
  background: #f2f0e8;
  border-left: 1px solid #111;
}

.gallery-item__information::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  background: var(--item-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1) 180ms;
}

.gallery-item.is-visible .gallery-item__information::before {
  transform: scaleX(1);
}

.gallery-item:nth-child(even) .gallery-item__information {
  color: #f2f0e8;
  background: #111;
}

.gallery-item__information-inner {
  width: 100%;
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 700ms ease 160ms,
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1) 160ms;
}

.gallery-item.is-visible .gallery-item__information-inner {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(70px, 10vw, 150px);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.gallery-item__category,
.gallery-item__count {
  margin: 0;
}

.gallery-item__count {
  display: grid;
  place-items: center;
  min-width: 62px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.gallery-item__title {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(3.2rem, 6vw, 7.5rem);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 0.82;
  text-transform: uppercase;
}

.gallery-item__title-ja {
  margin: 22px 0 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.gallery-item__description {
  margin: clamp(55px, 7vw, 100px) 0 0;
  padding-top: 28px;
  border-top: 1px solid currentColor;
  font-size: clamp(0.82rem, 1vw, 1rem);
  font-weight: 600;
  line-height: 2;
}

.gallery-item__details {
  display: grid;
  gap: 14px;
  margin: 45px 0 0;
}

.gallery-item__details > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent);
}

.gallery-item__details dt,
.gallery-item__details dd {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.gallery-item__details dt {
  opacity: 0.55;
}

.gallery-item__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 46px;
  padding: 16px 0;
  border-bottom: 2px solid var(--item-accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-outro {
  min-height: 88svh;
  padding: clamp(90px, 10vw, 160px) var(--side) 70px;
  color: #080808;
  background: #d8ff31;
}

.gallery-outro > p {
  margin: 0;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.gallery-outro h2 {
  margin: clamp(120px, 14vw, 220px) 0 0;
  font-size: clamp(4.2rem, 12vw, 14rem);
  font-weight: 950;
  letter-spacing: -0.085em;
  line-height: 0.78;
}

.gallery-outro h2 em {
  color: #354cff;
  font-style: normal;
}

.gallery-outro > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(360px, 100%);
  margin: clamp(80px, 9vw, 140px) 0 0 auto;
  padding: 18px 0;
  border-bottom: 2px solid currentColor;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes gallery-loading {
  from {
    transform: scaleX(0.12);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 980px) {
  .gallery-hero {
    grid-template-columns: 1fr;
    align-content: end;
  }

  .gallery-hero__index {
    align-self: auto;
    margin-bottom: 40px;
  }

  .gallery-hero__foot {
    display: grid;
    grid-template-columns: 1fr 240px;
    align-items: end;
    gap: 40px;
    margin-top: 70px;
  }

  .gallery-hero__foot > p {
    margin: 0;
  }

  .gallery-item {
    grid-template-columns: minmax(0, 55%) minmax(0, 45%);
  }

  .gallery-item__information {
    padding-inline: 34px;
  }
}

@media (max-width: 680px) {
  .gallery-header {
    position: absolute;
  }

  .gallery-hero {
    min-height: 92svh;
    padding-top: 120px;
  }

  .gallery-hero h1 {
    font-size: clamp(5rem, 22vw, 8rem);
  }

  .gallery-hero__foot {
    display: block;
    margin-top: 80px;
  }

  .gallery-hero__foot > p {
    margin-bottom: 45px;
  }

  .gallery-item {
    display: block;
  }

  .gallery-item__visual {
    min-height: 64svh;
  }

  .gallery-item__information {
    min-height: auto;
    padding: 80px var(--side) 100px;
    border-left: 0;
  }

  .gallery-item__topline {
    margin-bottom: 80px;
  }

  .gallery-item__title {
    font-size: clamp(3.6rem, 17vw, 6rem);
  }

  .gallery-outro {
    min-height: auto;
    padding-bottom: 100px;
  }

  .gallery-outro h2 {
    margin-top: 120px;
    font-size: clamp(4rem, 19vw, 7rem);
  }

  .gallery-outro > a {
    margin-top: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item__visual img,
  .gallery-item__information::before,
  .gallery-item__information-inner {
    opacity: 1;
    transition: none;
    transform: none;
  }
}
