/* --- Base Reset & Colors --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background-color: #000000;
  color: #ffffff;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.index-main {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 80px 0;
}

/* --- Row Layout --- */
.year-row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 700px;
  transition: opacity 0.3s ease;
}

.year-row:hover:not(.disabled) {
  opacity: 0.8;
}

.year-row.disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: not-allowed;
}

.year-label {
  font-size: 6rem;
  font-weight: 700;
  padding: 0 100px; /* 余白を確保 */
  height: 100%;
  display: flex;
  align-items: center; /* 上下中央 */
  justify-content: center; /* 左右中央 */
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.year-2023 .year-label,
.year-2024 .year-label {
  color: #555555;
}

/* --- Sliders --- */
.slider-wrapper {
  flex-grow: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.slider-track {
  display: flex;
  height: 100%;
  gap: 30px;
  width: max-content;
  animation: scrollLeft 300s linear infinite;
}

/* 2023, 2024はスライダーを停止 */
.slider-track.stopped {
  animation: none !important;
}

.slider-track.reverse-slow {
  animation: scrollRight 300s linear infinite;
}
.slider-track.slow {
  animation: scrollLeft 300s linear infinite;
}

.slide-item {
  width: 480px;
  height: 100%;
  flex-shrink: 0;
  background-color: #ffffff;
}

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gray-box {
  background-color: #333333;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } 
}

@keyframes scrollRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* --- Fade-in --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1200px) {
  .year-row { height: 500px; }
  .slide-item { width: 350px; }
  .year-label { font-size: 5rem; padding: 0 100px; }
}

@media (max-width: 768px) {
  .heading-bg {
    height: 450px;
  }
  .year-row { 
    height: 400px; 
    flex-direction: column; 
    align-items: flex-start;
    gap: 15px; 
    padding: 20px 0;
  }
  .year-2023 {
    flex-direction: column-reverse;
    align-items: flex-end;
  }
  .slider-wrapper {
    width: 100%;
  }
  .year-label {
    width: 100%;
    height: auto;
    text-align: left;
    justify-content: flex-start;
    padding: 0 30px;
    font-size: 3.5rem;
  }
  .year-2023 .year-label {
    justify-content: flex-end;
  }
  .slide-item { width: 200px; }
}

/* =========================================
   2022.html (Lower Page) Styles
========================================= */

.page-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 20px;
}

.page-title {
  font-size: 6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 80px;
  text-align: center;
}

/* 作品セクション（共通） */
.artwork-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 100px;
  width: 100%;
}

.artwork-image-wrapper {
  max-width: 500px; /* 画像の最大幅（2022_01.jpgのバランスに合わせて調整してください） */
  width: 100%;
  margin-bottom: 20px;
}

.artwork-image {
  width: 100%;
  height: auto;
  display: block;
}

/* キャプション（タイトル・画材等） */
.artwork-caption {
  text-align: center;
}

.artwork-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.artwork-medium {
  font-size: 0.9rem;
  color: #aaaaaa;
}

/* 作品のリンク */

.artwork-link-wrapper {
  max-width: 500px; /* 画像の最大幅（2022_01.jpgのバランスに合わせて調整してください） */
  width: 100%;
  margin-top:50px;
  margin-bottom: 20px;
  text-align: center;
}

.artwork-link {
  background-color: #272727;
  border: none;
  cursor: pointer;
  outline: none;
  padding: 0;
  appearance: none;
  border-radius: 100px;
  color:#FFFFFF;
  font-size:1.1rem;
  font-weight:600;
  padding:20px 100px;
  transition: .7s;
}

.artwork-link:hover {
  opacity: .7;
}

.artwork-link-wrapper .artwork-link-note {
  margin-top:20px;
  font-size:0.9rem;
  color:#aaaaaa;
}

/* BACKボタン */
.back-link-wrapper {
  margin-top: 60px;
  margin-bottom: 80px;
}

.back-link {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: #888888;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #ffffff;
}

/* スマホ用調整 */
@media (max-width: 768px) {
  .heading-bg {
    height: 450px;
  }
  .page-main {
    padding: 60px 20px;
  }
  .page-title {
    font-size: 4rem;
    margin-bottom: 50px;
  }
  .artwork-image-wrapper {
    max-width: 90%;
  }
  .artwork-link {
    padding:20px 60px;
  }
}

/* =========================================
   01 Zone & Grid Styles
========================================= */

/* 横幅100%の画像セクション */
.full-width-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 0px;
}

.full-width-image {
  width: 100%;
  height: auto;
  display: block;
}

.heading-image img {
  width: 100%;
  display: block;
}

/* 初期状態はPC */
.heading-image-sp {
  display: none;
}

/* 下層ページ用 スライダー (最大幅1000px) */
.lower-slider-section {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 120px auto;
  overflow: hidden;
}

/* アニメーションスピードと方向の調整クラス */
.slider-track.fast {
  animation-duration: 35s; /* 少し早めに流す */
}
.slider-track.reverse {
  animation-direction: reverse; /* 逆向きに流す */
}

.slide-item-small {
  height: 100%;
  width: 340px; /* スライダー内の各画像の幅 */
  flex-shrink: 0;
  background-color: #111;
}

.slide-item-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider-container {
  overflow: hidden;
  width: 100%;
}

.slider-track {
  display: flex;
  width: max-content; 
}

.slider-track > div {
  flex-shrink: 0;
}

.slider-track.is-animated {
  /* JSから受け取った秒数でアニメーション */
  animation: scrollTrack var(--duration, 10s) linear infinite;
}

@keyframes scrollTrack {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* JSで複製して2倍の長さになっているため -50% でループ */
}

/* 作品紹介のグリッド (2列並び) */
.artwork-grid-section {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 120px auto;
}

.artwork-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 60px;
  row-gap: 80px;
}

.artwork-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.artwork-item .artwork-image-wrapper {
  max-width: 100%;
  margin-bottom: 20px;
}

/* スマホ用調整 */
@media (max-width: 768px) {
  .lower-slider-wrapper {
    height: 300px;
  }
  .slide-item-small {
    width: 260px;
  }
  .artwork-grid-2 {
    grid-template-columns: 1fr; /* スマホでは1列（縦並び）に */
    row-gap: 60px;
  }

  .full-width-section {
    height: 320px; /* 好きな高さに調整 */
    overflow: hidden;
  }

  .full-width-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .heading-image-pc {
    display: none;
  }

  .heading-image-sp {
    display: block;
  }
}

/* =========================================================
   Section Description (説明テキストエリア)
========================================================= */
.section-description {
  padding: 60px 20px;   /* 上下、左右の余白（背景色なし） */
}

.section-description .desc-inner {
  max-width: 800px;     /* テキストが横に広がりすぎないように最大幅を設定 */
  margin: 0 auto;       /* 画面の中央に配置 */
  text-align: center;   /* テキストを中央揃えにする（左揃えが良い場合は left に変更） */
}

.section-description .desc-text {
  font-size: 1rem;      /* 基準サイズ（約16px相当） */
  line-height: 1.8;     /* 読みやすいように行間を広めに */
  color: #ffffff;       /* 文字色を白に設定 */
}

/* --- スマートフォン向けの微調整 --- */
@media screen and (max-width: 768px) {
  .section-description {
    padding: 40px 15px; /* スマホでは上下の余白を少し狭くする */
  }
  
  .section-description .desc-text {
    font-size: 0.875rem; /* スマホ用に少し小さく（約14px相当） */
    text-align: left;    /* スマホでは左揃えの方が読みやすい場合があります */
  }
}

/* =========================================================
   Heading Image (画像 + 黒トーン + タイトル)
========================================================= */
/* 画像を囲む親要素 */
.heading-image-wrapper {
  position: relative; 
  width: 100%;
  overflow: hidden;   
}

/* 背景となる画像 */
.heading-image-wrapper .heading-image {
  width: 100%;
  height: auto;
  display: block;     
  object-fit: cover;  
}

/* 黒いトーン（オーバーレイ） */
.heading-image-wrapper .heading-overlay {
  position: absolute; 
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* 透明度の黒 */
  z-index: 1;         
}

/* 画像の上に乗せるタイトルテキスト */
.heading-image-wrapper .heading-title {
  position: absolute; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); 
  color: #ffffff;     
  font-size: 2.5rem;  
  font-weight: bold;
  letter-spacing: 0.1em; 
  z-index: 2;         
  margin: 0;
  text-align: center;
}

/* --- スマートフォン向けの微調整 --- */
@media screen and (max-width: 768px) {
  .heading-image-wrapper .heading-title {
    font-size: 1.5rem; 
  }
}