@charset "UTF-8";

/* =========================
   Works page
========================= */

.works-main {
  padding-top: 76px;
  padding-bottom: 64px;
  width: 100%;
}

/* Works title */
.works-heading {
  font-size: 28px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 36px;
    letter-spacing: 0.1em;
}

/* =========================
   Category navigation
========================= */

.works-categories {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;

  width: 100%;
  max-width: 1024px;
  margin: 0 auto 48px;
  box-sizing: border-box;
}

.works-category {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  width: auto;
  /* 190px */
  min-height: 40px;
  padding: 7px 12px;

  box-sizing: border-box;
  font-size: 16px;
  white-space: nowrap;

  font-family: var(--font-cantarell);
  border: 1px solid var(--color-line);
  border-radius: 50px;
  color: var(--color-text);
  transition: background-color 0.3s ease;
}

.works-category:hover {
  background-color: var(--color-hover);
}

.works-category.is-active {
  background-color: var(--color-line);
}
/* =========================
   Category Dropdown
========================= */

.works-category-group {
  position: relative;
}

/* Dropdown panel */
.works-dropdown {
  position: absolute;
  top: calc(100% + 12px);
    bottom: auto;
  left: 50%;
  transform: translateX(-50%);

  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 24px 12px;

  width: 640px;
  padding: 32px 32px;
  box-sizing: border-box;

  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);

  z-index: 20;
}

/* Art / Technology */
#art-dropdown,
#technology-dropdown {
  grid-template-columns: 1fr;
  width: 240px;
}

.works-dropdown a {
  display: block;
  font-family: var(--font-cantarell);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.works-dropdown a:hover {
  color: var(--color-muted);
}

/* Hidden */
.works-dropdown[hidden] {
  display: none;
}

/* =========================
   Selected works
========================= */

.selected-works {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 28px;

  position: relative;
  width: 100%;
  max-width: 980px;
  min-height: 100vh;
  margin-inline: auto;
}

/* =========================
   Main image
========================= */

.selected-main {
  position: sticky;
  top: 76px;

  width: 100%;
  height: calc(100vh - 76px);
  min-width: 0;
}

.selected-main-figure {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  background-color: #dbd9d5;
}

.selected-main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #fff;

  opacity: 1;
  transition: opacity 0.25s ease;
}

.selected-main-image.is-changing {
  opacity: 0;
}
/* =========================
   Arrows
========================= */

.selected-arrow {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 26px;
  height: 26px;
  padding: 0;

  border: none;
  background: none;
  cursor: pointer;
}

.selected-arrow span {
  width: 11px;
  height: 11px;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
}

/* Previous */
.selected-arrow-prev span {
  transform: rotate(45deg);
  margin-top: 8px;
}

/* Next */
.selected-arrow-next span {
  transform: rotate(225deg);
  margin-top: -8px;
}
/* =========================
   Selected counter
========================= */

.selected-counter {
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;

  color: #fff;
  font-family: var(--font-cantarell);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

/* Current number */
.selected-current {
  font-family: var(--font-cantarell);
  font-size: 16px;
}

/* Divider */
.selected-counter-divider {
  width: 20px;
  height: 1px;
  background-color: #fff;
  font-size: 0;
  transform: rotate(-50deg);
}

/* Total number */
.selected-total {
  font-family: var(--font-cantarell);
  font-size: 16px;
}
/* 選択中の項目 */
.works-dropdown-menu a.is-selected {
  background-color: #e8e6e0;
  color: #333;
}

/* =========================
   Thumbnails
========================= */

.selected-thumbnails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}
/* 選択中のサムネイル */
.selected-thumbnail.is-active {
  outline: 1px solid var(--color-text);
  outline-offset: -1px;
}

/* =========================
   SP Category Dropdown
========================= */

.works-category-dropdown {
  display: none;
}

@media screen and (max-width: 768px) {
    .works-main {
    padding-top: 0px;
  }

  .works-heading {
    margin-bottom: 24px;
      font-size: 24px;
  }

  /* PCカテゴリーを非表示 */
  .works-categories {
    display: none;
  }

  /* ドロップダウン全体 */
  .works-category-dropdown {
    display: block;
    position: relative;
    width: 100%;
    margin: 0 auto 32px;
    text-align: center;
    z-index: 10;
  }

  /* 選択中カテゴリーのボタン */
  .works-dropdown-trigger {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    min-width: 94px;
    padding: 7px 18px;

    border-radius: 30px;
    background-color: var(--color-white);

    font-family: var(--font-cantarell);
    font-size: 16px;
    color: var(--color-text);
  }

  /* ドロップダウンメニュー */
.works-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);

  width:200px;
  max-height: 21vh;
  overflow-y: auto;

  padding: 16px 20px;
  box-sizing: border-box;

  background-color: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);

  display: flex;
  flex-direction: column;
  gap: 14px;

  text-align: left;
}

.works-dropdown-menu[hidden] {
  display: none;
}
.dropdown-selected {
  font-family: var(--font-cantarell);
  font-size: 12px;
  color: var(--color-text);
  margin-bottom: 2px;
}
.dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dropdown-heading {
  font-family: var(--font-cantarell);
  font-size: 10px;
  color: var(--color-muted);
  margin-bottom: 2px;
}

.works-dropdown-menu a {
  display: block;
  padding: 2px 0;

  font-family: var(--font-cantarell);
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text);
}
  .works-dropdown-menu a.is-active {
    font-weight: 700;
  }
  /* 選択中の項目 */
.works-dropdown-menu a.is-selected {
  position: relative;
  padding-left: 18px;
}

/* チェックマーク */
.works-dropdown-menu a.is-selected::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 12px;
  color: var(--color-text);
}
/* =========================
   SP Category Grid
========================= */

/* 4つのボタンを2列×2段にする */
.works-category-grid {
    display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: center;
  align-items: center;
  gap: 8px 12px;

  width: 100%;
  margin: 30px auto ;
}

/* 各カテゴリー */
.works-sp-category-item {
  /* position: relative;
  min-width: 0; */
    position: relative;
  min-width: 0;
  justify-self: center;
}

/* ボタン */
.works-sp-category-item .works-dropdown-trigger {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 7px 10px;

  justify-content: center;
  white-space: nowrap;
}






/* 現在のカテゴリー */
.works-sp-category-item .works-dropdown-trigger.is-active {
  background-color: var(--color-line);
}
/* ボタン */
.works-category-dropdown .works-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: auto;
  min-width: 0;
  min-height: 32px;
  height: auto;

  padding: 5px 14px;
  white-space: nowrap;
  line-height: 1.2;
}

/* 各ドロップダウン */
.works-sp-category-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;

  width: 200px;
  max-height: 40vh;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 10px;

  padding: 16px 20px;
  box-sizing: border-box;

  background-color: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);

  text-align: left;
  z-index: 30;
}

/* 右側のボタンはメニューを右寄せ */
.works-sp-category-item:nth-child(even)
.works-sp-category-menu {
  left: auto;
  right: 0;
}

/* メニュー内リンク */
.works-sp-category-menu a {
  display: block;
  padding: 3px 0;

  font-family: var(--font-cantarell);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
}

/* 選択中のリンク */
.works-sp-category-menu a.is-selected {
  font-weight: 700;
}

/* 非表示 */
.works-sp-category-menu[hidden] {
  display: none;
}

/* =========================
   SP Selected Works
========================= */
  /* メイン画像とサムネイルを縦並びに */
  .selected-works {
    display: flex;
    flex-direction: column;
    gap: 12px;

    width: 100%;
    min-height: 0;
    margin: 0 auto;
  }

  /* メイン画像 */
  .selected-main {
    position: relative;
    top: auto;

    width: 100%;
    height: auto;
  }

  .selected-main-figure {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    background-color: #dbd9d5;
  }

  /* .selected-main-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  } */

  /* 作品番号 */
  .selected-counter {
    top: auto;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);

    flex-direction: row;
    gap: 5px;

    font-size: 11px;
  }

  .selected-arrow {
    width: 20px;
    height: 20px;
  }

  .selected-arrow-prev span {
    transform: rotate(-45deg);
    margin: 0;
  }

  .selected-arrow-next span {
    transform: rotate(135deg);
    margin: 0;
  }
  /* サムネイル：5列 */
  .selected-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
  }

  .selected-thumbnail {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  overflow: visible;
  }

  .selected-thumbnail img {
    display: block;
    width: 100%;
      height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }
.selected-main video {
  display: block;
      /* display: flex; */
    align-items: center;
  background-color: #fff;
  width: 100%;
  height: auto;
      aspect-ratio: auto; 
 object-fit: contain; 
}
  /* 選択中のサムネイル */
  .selected-thumbnail.is-active {
    outline: 1px solid var(--color-text);
    outline-offset: -1px;
  }
/* =========================
   Arrows
========================= */

.selected-arrow {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 22px;
  height: 22px;
  padding: 0;

  border: none;
  background: none;
  cursor: pointer;
}

.selected-arrow span {
  width: 8px;
  height: 8px;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
}

/* Previous */
.selected-arrow-prev span {
  transform: rotate(45deg);
  margin-top: 8px;
}

/* Next */
.selected-arrow-next span {
  transform: rotate(225deg);
  margin-top: -8px;
}
  /* =========================
   Selected counter
========================= */

.selected-counter {
  position: absolute;
  top: 50%;
  left: 0px;
  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;

  color: #fff;
  font-family: var(--font-cantarell);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}

/* Current number */
.selected-current {
  font-family: var(--font-cantarell);
  font-size: 13px;
}

/* Divider */
.selected-counter-divider {
  width: 14px;
  height: 1px;
  background-color: #fff;
  font-size: 0;
  transform: rotate(-50deg);
}

/* Total number */
.selected-total {
  font-family: var(--font-cantarell);
  font-size: 13px;
}
}

  /* =========================
   more-detail
========================= */
.more-detail {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
    max-width: 1024px;
  padding: 0 0 20px;
  /* border-bottom: 1px solid #c9c6be; */
  color: #333;
  text-decoration: none;
}

/* 文字部分だけに下線 */
.more-detail__text {
  font-size: 18px;
  font-weight: 400;
  border-bottom: 1px solid #c9c6be;
  padding-bottom: 3px;
}

/* 矢印 */
.more-detail__arrow {
  font-size: 20px;
  color: #333;
  transition: transform 0.35s ease;
}

.more-detail:hover .more-detail__arrow {
  transform: translateX(4px);
}

.more-detail__text:hover {
  color: var(--color-line-dark);
}

@media screen and (max-width: 768px) {
/* 文字部分だけに下線 */
.more-detail__text {
  font-size: 13px;
}

/* 矢印 */
.more-detail__arrow {
  font-size: 13px;
}
}
/* =========================
   Project Introduction
========================= */

.project-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;

  width: 100%;
  max-width: 980px;
  margin: 0 auto 36px;
}

/* 説明文 */
.project-intro__text {
  flex: 1;
  min-width: 0;
}

/* 見出し */
.project-intro__text h2 {
  font-family: var(--font-zen-old-mincho);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--color-text);
  margin-bottom: 8px;
}

/* 説明 */
.project-intro__text p {
  font-family: var(--font-noto-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

/* More detail */
.project-intro .more-detail {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;

  flex-shrink: 0;
  width: auto;
  max-width: none;
  padding: 0 0 3px;
  margin-bottom: 2px;
}

/* More detailの文字 */
.project-intro .more-detail__text {
  font-size: 16px;
  padding-bottom: 3px;
}

/* 矢印 */
.project-intro .more-detail__arrow {
  font-size: 18px;
}
@media screen and (max-width: 768px) {

  .project-intro {
    width: 90%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  .project-intro__text h2 {
    font-size: 16px;
    line-height: 1.8;
  }

  .project-intro__text p {
    font-size: 14px;
    line-height: 1.9;
  }

  .project-intro .more-detail {
    align-self: flex-end;
  }

  .project-intro .more-detail__text {
    font-size: 16px;
  }

  .project-intro .more-detail__arrow {
    font-size: 16px;
  }
}

/* Works：ドロップダウンの非表示制御 */
.works-dropdown[hidden] {
  display: none;
}
/* =========================
   Accessibility：Focus
========================= */

.works-page a:focus-visible,
.works-page button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

/* =========================
   Tablet Works
========================= */

@media screen and (max-width: 1024px) {

  .selected-main {
    height: auto;
  }

  .selected-main-figure {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
  }

  .selected-main-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .selected-main video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

}