/* ========================================
   基本設定
======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;

  font-family: "Noto Serif JP", serif;

  background-color: #15331e;
  color: #111111;
}


/* ========================================
   固定ヘッダー
======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

  width: 100%;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  padding: 18px 24px;

  pointer-events: none;
}

.home-logo,
.menu-button {
  pointer-events: auto;
}


/* ロゴ */

.home-logo {
  color: #ffffff;

  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;

  text-decoration: none;
}


/* ハンバーガーボタン */

.menu-button {
  position: relative;
  z-index: 1100;

  width: 34px;
  height: 28px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 3px 0;

  border: none;
  background: transparent;

  cursor: pointer;
  pointer-events: auto;

  transform: translateX(
    var(--menu-shift, 0px)
  );

  transition: transform 0.08s linear;
}

.menu-button span {
  width: 100%;
  height: 2px;

  display: block;

  background-color: #ffffff;

  transform-origin: center;

  transition:
    transform 0.4s ease,
    opacity 0.25s ease;
}

.menu-button.is-open span:nth-child(1) {
  transform:
    translateY(10px)
    rotate(45deg);
}

.menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-button.is-open span:nth-child(3) {
  transform:
    translateY(-10px)
    rotate(-45deg);
}


/* ========================================
   メニュー背景
======================================== */

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;

  background-color: rgba(0, 0, 0, 0.55);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}


/* ========================================
   グローバルメニュー
======================================== */

.global-menu {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  z-index: 950;

  width: 25vw;
  height: calc(100svh * 4 / 7);

  min-width: 320px;
  min-height: 430px;

  padding:
    85px
    22px
    40px;

  color: #ffffff;
  background-color: #000000;

  transform: translateX(105%);
  visibility: hidden;

  transition:
    transform 0.6s cubic-bezier(0.76, 0, 0.24, 1),
    visibility 0.6s ease;
}

.global-menu.is-open {
  transform: translateX(0);
  visibility: visible;
}

.global-menu__list {
  list-style: none;

  border-top:
    1px solid rgba(255, 255, 255, 0.8);
}

.global-menu__list li {
  border-bottom:
    1px solid rgba(255, 255, 255, 0.8);
}

.global-menu__link {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 14px 4px;

  color: #ffffff;

  font-size: clamp(15px, 1.35vw, 22px);
  white-space: nowrap;

  text-decoration: none;
}

.global-menu__arrow {
  width: 0;
  height: 0;

  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 20px solid #ffffff;

  margin-left: 12px;
  flex-shrink: 0;

  transition:
    transform 0.35s ease;
}

.global-menu__link:hover
.global-menu__arrow {
  transform: translateX(7px);
}

/* ========================================
   横スクロール全体
======================================== */

.horizontal-gallery {
  width: 100vw;
  height: 100svh;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;

  scrollbar-width: none;
}

.horizontal-gallery::-webkit-scrollbar {
  display: none;
}


/* 横一列になる部分 */

.gallery-track {
  width: max-content;
  height: 100%;

  display: flex;

  background:
    radial-gradient(
      ellipse at 34% 48%,
      #4d6984 0%,
      #23293d 30%,
      #232f3f 58%,
      #141d2c 82%,
      #0c1621 100%
    );
}

.gallery-track::before {
  content: "";

  position: fixed;
  inset: 0;
  z-index: -1;

  pointer-events: none;

  background:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.04),
      rgba(0, 0, 0, 0.18)
    );
}


/* 各パネル共通 */

.gallery-panel {
  position: relative;

  flex: 0 0 auto;

  height: 100svh;

  display: flex;
  justify-content: center;
  align-items: center;

  scroll-snap-align: start;
  scroll-snap-stop: always;
}


/* ========================================
   Section紹介パネル
======================================== */

.text-panel {
  width: 62vw;
  min-width: 760px;
}


/* 白い紹介用紙 */

.text-panel::before {
  content: "";

  position: absolute;
  z-index: 0;

  width: 290px;
  height: 520px;

  background-color: #ffffff;

  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.22);
}

.text-panel > * {
  position: relative;
  z-index: 1;
}


/* Section番号 */

.section-number {
  position: absolute;
  top: 155px;
  left: calc(50% + 35px);

  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.section-number span {
  margin-top: 6px;

  font-size: 12px;
}

.section-number strong {
  font-size: 34px;
  font-weight: 300;
}


/* 見出し */

.text-panel h1 {
  position: absolute;
  top: 220px;
  left: calc(50% - 105px);

  font-size: 52px;
  font-weight: 400;
}


/* サブタイトル */

.sub-title {
  position: absolute;
  top: 305px;
  left: calc(50% - 105px);

  font-size: 14px;
}


/* 紹介文 */

.description {
  position: absolute;
  top: 350px;
  left: calc(50% - 105px);

  width: 215px;

  font-size: 12px;
  line-height: 1.75;
}


/* ========================================
   各落とし物の展示パネル
======================================== */

.exhibit-panel {
  /*
    1展示につき画面の約90%分を使用。
    次の展示がすぐには見えすぎない横幅。
  */
  width: 90vw;
  min-width: 1050px;

  display: grid;
  grid-template-columns:
    minmax(390px, 1fr)
    minmax(260px, 0.65fr);

  column-gap:
    clamp(110px, 10vw, 190px);

  padding:
    0
    clamp(90px, 9vw, 160px);

  align-items: center;
}


/* 展示ごとの間に少し空間を追加 */

.exhibit-panel + .exhibit-panel {
  margin-left: 8vw;
}


/* 額縁側 */

.exhibit-artwork {
  width: 100%;

  display: flex;
  justify-content: flex-end;
  align-items: center;
}


/* ========================================
   額縁と写真
======================================== */

.picture-frame {
  position: relative;

  width: min(390px, 29vw);

  aspect-ratio: 3 / 4;

  filter:
    drop-shadow(
      0 20px 18px
      rgba(0, 0, 0, 0.4)
    );
}


/* 額縁の内側の写真 */

.picture-frame__photo {
  position: absolute;
  top: 11%;
  left: 13%;
  z-index: 1;

  width: 72%;
  height: 72%;

  display: block;

  object-fit: cover;
  object-position: center;

  pointer-events: none;
  user-select: none;
}


/* 額縁画像 */

.picture-frame__border {
  position: absolute;
  inset: 0;
  z-index: 2;

  width: 100%;
  height: 100%;

  display: block;

  object-fit: contain;

  pointer-events: none;
  user-select: none;
}


/* ========================================
   展示説明カード
======================================== */

.caption-card {
  width: 240px;
  min-height: 205px;

  padding: 28px 28px 24px;

  background-color: #ffffff;

  box-shadow:
    0 14px 28px
    rgba(0, 0, 0, 0.18);
}

.caption-card h2 {
  margin-bottom: 22px;

  font-size: 19px;
  font-weight: 400;
  line-height: 1.5;
}

.caption-card dl {
  display: flex;
  flex-direction: column;

  gap: 8px;
}

.caption-card dl div {
  display: grid;
  grid-template-columns:
    65px
    1fr;

  gap: 8px;
}

.caption-card dt,
.caption-card dd {
  font-size: 11px;
  line-height: 1.5;
}

.caption-card dd {
  margin: 0;
}


/* 詳細を見るボタン */

.item-detail-button {
  display: block;

  margin-top: 20px;
  margin-left: auto;

  padding: 0;

  border: none;
  background: transparent;

  color: #315ea8;

  font-family: inherit;
  font-size: 11px;
  text-align: right;
  text-decoration: none;

  cursor: pointer;
}

.item-detail-button:hover {
  text-decoration: underline;
}


/* ========================================
   メニュー表示中
======================================== */

body.menu-open {
  overflow: hidden;
}


/* ========================================
   最後の目次
======================================== */

.navigation-panel {
  position: relative;
  z-index: 1;

  flex: 0 0 auto;

  display: flex;
  justify-content: flex-start;
  align-items: stretch;

  width: auto;
  height: 100svh;

  /*
    4つ目の展示と目次の間に余白
  */
  margin-left: 20vw;

  padding: 0;

  scroll-snap-align: end;
}


/* 目次バー1本 */

.nav-column {
  position: relative;

  flex: 0 0 128px;

  width: 128px;
  height: 100svh;

  display: block;

  overflow: hidden;

  color: #ffffff;
  text-decoration: none;

  border-left:
    1px solid rgba(255, 255, 255, 0.55);

  transition:
    filter 0.35s ease,
    transform 0.35s ease;
}


/* バーの中身 */

.nav-inner {
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;

  align-items: flex-end;
  justify-content: flex-start;

  padding:
    clamp(150px, 20svh, 210px)
    16px
    30px;

  text-align: right;
}


/* Section表記 */

.nav-number {
  writing-mode: vertical-rl;
  text-orientation: mixed;

  margin-left: auto;

  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.06em;
}


/* 大見出し */

.nav-column h2 {
  writing-mode: vertical-rl;
  text-orientation: upright;

  margin-top: 28px;
  margin-left: auto;

  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
}


/* 説明文 */

.nav-column p {
  writing-mode: vertical-rl;
  text-orientation: upright;

  margin-top: 20px;
  margin-left: auto;

  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.08em;

  opacity: 0.82;
}


/* 矢印 */

.nav-arrow {
  display: block;

  margin-top: auto;
  margin-right: auto;
  margin-left: auto;

  font-size: 42px;
  line-height: 1;

  opacity: 0.75;

  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}


/* 目次ホバー */

.nav-column:not(.current):hover {
  filter: brightness(1.12);
}

.nav-column:not(.current):hover
.nav-arrow {
  transform: translateX(7px);
  opacity: 1;
}


/* 目次の色 */

.home {
  background-color: #202020;
}

.sec01 {
  background-color:#27482f;
}

.sec02 {
  background-color: #191f33;
}

.sec03 {
  background-color: #482727;
}

.sec04 {
  background-color: #a37c0e;
}

.sec05 {
  background-color: #66294f;
}


/* 現在のSection */

.current {
  pointer-events: none;
}

.current::after {
  content: "";

  position: absolute;
  inset: 0;

  background-color:
    rgba(255, 255, 255, 0.12);

  pointer-events: none;
}


/* ========================================
   詳細モーダルの暗い背景
======================================== */

.item-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;

  background-color:
    rgba(0, 0, 0, 0.58);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.item-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}


/* ========================================
   詳細モーダル本体
======================================== */

.item-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2100;

  width: 75vw;
  height: 75svh;

  color: #111111;

  opacity: 0;
  visibility: hidden;

  transform:
    translate(-50%, -47%)
    scale(0.97);

  transition:
    opacity 0.4s ease,
    visibility 0.4s ease,
    transform 0.4s ease;
}

.item-modal.is-open {
  opacity: 1;
  visibility: visible;

  transform:
    translate(-50%, -50%)
    scale(1);
}


/* モーダル内側 */

.item-modal__content {
  width: 100%;
  height: 100%;

  display: grid;

  grid-template-columns:
    minmax(300px, 1fr)
    minmax(430px, 1.25fr);

  gap:
    clamp(50px, 7vw, 110px);

  align-items: center;
}


/* ========================================
   モーダルの閉じるボタン
======================================== */

.item-modal__close {
  position: fixed;
  top: 26px;
  right: 30px;
  z-index: 2200;

  width: 52px;
  height: 52px;

  padding: 0;

  border: none;
  background: transparent;

  cursor: pointer;
}

.item-modal__close span {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 48px;
  height: 2px;

  display: block;

  background-color: #000000;
}

.item-modal__close span:first-child {
  transform:
    translate(-50%, -50%)
    rotate(45deg);
}

.item-modal__close span:last-child {
  transform:
    translate(-50%, -50%)
    rotate(-45deg);
}


/* ========================================
   モーダル左側の額縁
======================================== */

.item-modal__art-area {
  display: flex;
  justify-content: center;
  align-items: center;
}

.item-modal__frame {
  position: relative;

  width: min(360px, 28vw);

  aspect-ratio: 3 / 4;

  filter:
    drop-shadow(
      0 18px 15px
      rgba(0, 0, 0, 0.35)
    );
}

.item-modal__photo {
  position: absolute;
  top: 11%;
  left: 13%;
  z-index: 1;

  width: 72%;
  height: 72%;

  display: block;

  object-fit: cover;
}

.item-modal__frame-image {
  position: absolute;
  inset: 0;
  z-index: 2;

  width: 100%;
  height: 100%;

  display: block;

  object-fit: contain;

  pointer-events: none;
}


/* ========================================
   モーダル右側の白い用紙
======================================== */

.item-modal__sheet {
  position: relative;

  width: 100%;
  height: min(610px, 72svh);

  padding:
    clamp(34px, 4vw, 60px)
    clamp(38px, 5vw, 70px);

  background-color:
    rgba(255, 255, 255, 0.96);

  box-shadow:
    0 18px 40px
    rgba(0, 0, 0, 0.2);

  overflow-y: auto;
}

.item-modal__section {
  text-align: right;

  font-size: 14px;
  letter-spacing: 0.04em;
}

.item-modal__sheet h2 {
  margin-top: 28px;

  font-size:
    clamp(30px, 3.2vw, 48px);

  font-weight: 400;
  letter-spacing: 0.04em;
}

.item-modal__information {
  margin-top: 28px;
}

.item-modal__information div {
  display: flex;
}

.item-modal__information dt,
.item-modal__information dd {
  font-size: 12px;
  line-height: 1.6;
}

.item-modal__information dd {
  margin: 0;
}


/* モーダル下部 */

.item-modal__lower {
  margin-top: 38px;

  display: grid;

  grid-template-columns:
    1fr
    160px;

  gap: 30px;

  align-items: start;
}

.item-modal__description {
  font-size: 14px;
  line-height: 2;
}

.item-modal__image-area img {
  width: 100%;

  aspect-ratio: 4 / 5;

  display: block;

  background-color: #d9d9d9;

  object-fit: cover;
}

.item-modal__image-area figcaption {
  margin-top: 8px;

  font-size: 11px;
  text-align: center;
}


/* モーダル表示中 */

body.item-modal-open {
  overflow: hidden;
}


/* ========================================
   少し小さい画面への対応
======================================== */

@media (max-width: 1100px) {

  .text-panel {
    width: 80vw;
    min-width: 700px;
  }

  .exhibit-panel {
    width: 1050px;
    min-width: 1050px;

    grid-template-columns:
      430px
      240px;

    column-gap: 110px;

    padding:
      0
      120px;
  }

  .picture-frame {
    width: 350px;
  }

  .item-modal {
    width: 88vw;
    height: 82svh;
  }

  .item-modal__content {
    grid-template-columns:
      minmax(260px, 0.8fr)
      minmax(400px, 1.2fr);

    gap: 40px;
  }
}