@charset "UTF-8";
/* ---------------------------------------
  2026 リニューアル: Works 一覧（/works/）
  PC 基準 1440×1024: 左カラム 391px（27.15vw）、右に3列 313×250・間隔30px、上150px
  SP 基準 393×852 : 2列 170.5×136.4・間隔12px、タイトル常時表示
-----------------------------------------*/
.works {
  display: grid;
  grid-template-columns: min(27.15vw, 391px) 1fr;   /* 391 / 1440。大画面では 391px で止める */
  padding-right: var(--sh-side);
}

/* 左カラム（カテゴリーと名前） */
.works_side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(100px, 14.65vh, 200px) 0 clamp(30px, 4.88vh, 60px) var(--sh-side);  /* 150 / 50 */
}
.works_filter {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.works_filter button {
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  color: var(--sh-c40);
  transition: color 0.3s ease;
}
.works_filter button.is_current {
  color: var(--sh-c100);
}
@media (any-hover: hover) {
  .works_filter button:hover {
    color: var(--sh-c100);
    opacity: 1;
  }
  /* ホバーしたサムネイル自体は変化させない（common.css の a:hover の半透明を打ち消す） */
  .works_item a:hover {
    opacity: 1;
  }
  .works_name:hover {
    opacity: 0.6;
  }
}
.works_name {
  display: block;
  width: clamp(150px, 13.48vw, 194px);  /* 194 / 1440。大画面でも Figma の 194px で止める */
}
.works_name img {
  width: 100%;
  height: auto;
}

/* PC: Works ページではヘッダーの名前を出さず、メニューを右カラムの上に置く */
@media screen and (min-width: 768px) {
  .site_head.is_works {
    padding-top: clamp(72px, 10.74vh, 140px);   /* 110 / 1024 */
    justify-content: flex-end;
    position: absolute;
  }
  .site_head.is_works .site_head_logo {
    display: none;
  }
  .site_head.is_works .site_head_nav a {
    font-size: 12px;
  }
}

/* サムネイル */
.works_list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.08vw, 40px);   /* 30 / 1440 */
  align-content: start;
  padding: clamp(100px, 14.65vh, 200px) 0 clamp(100px, 14.65vh, 200px);
}
/* 大きな画面では4列に。切り替え位置は、4列にしたときのサムネイルが Figma の 313px 幅になる 1800px */
@media screen and (min-width: 1800px) {
  .works_list {
    grid-template-columns: repeat(4, 1fr);
  }
}
.works_item {
  position: relative;
}
.works_item[hidden] {
  display: none;
}
.works_item a {
  display: block;
}
.works_thumb {
  position: relative;
  aspect-ratio: 313 / 250;
  overflow: hidden;
  clip-path: inset(0);
  isolation: isolate;
  background-color: #E4E8E8;
  transition: opacity 0.4s ease;
}
.works_thumb img,
.works_thumb video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.works_thumb video {
  opacity: 0;
  transition: opacity 0.4s ease;
  /* 動画の縁の色にじみ（エンコード由来）を枠の外へ逃がす */
  transform: scale(1.03);
  backface-visibility: hidden;
}
.works_thumb video.is_playing {
  opacity: 1;
}
.works_title {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  width: 100%;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--sh-c80);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
@media (any-hover: hover) and (min-width: 768px) {
  .works_list:has(.works_item:hover) .works_item:not(:hover) .works_thumb {
    opacity: 0.1;
  }
  .works_item:hover .works_title {
    opacity: 1;
  }
}

/* SP */
@media screen and (max-width: 767px) {
  .works {
    display: block;
    padding: 0 2rem;
  }
  .works_side {
    position: static;
    height: auto;
    padding: calc(10.55rem + env(safe-area-inset-top)) 0 0;
    border-bottom: 1px solid var(--sh-c40);
    padding-bottom: 1.6rem;
  }
  .works_filter {
    flex-direction: row;
    justify-content: flex-end;
    gap: 1.4rem;
  }
  .works_filter button {
    font-size: 1.2rem;
  }
  .works_name {
    display: none;
  }
  .works_list {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.2rem;
    row-gap: 1rem;
    padding: 2.55rem 0 6rem;
  }
  .works_thumb {
    aspect-ratio: 150 / 120;
  }
  .works_title {
    position: static;
    opacity: 1;
    margin-top: 0.2rem;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
    min-height: 3.6rem;
    text-align: justify;
  }
}
