/* =========================================================
   style.css  — Minimal Folio (Full)
   - Base / Header
   - Index (works list + right hero image with right gap)
   - Work page (Swiper, counter, size text, INFO panel)
   - Responsive
========================================================= */

/* -------- Base -------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "Playfair Display", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }

/* -------- Header -------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;       /* top:0; left:0; right:0 */
  height: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 8vw;
  background: #fff;
  z-index: 1000;
}

.logo a {
  font-style: italic;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .5px;
}

.nav a {
  margin-left: 2rem;
  font-size: .9rem;
  color: #666;
  letter-spacing: 1px;
  transition: color .25s ease;
}
.nav a:hover { color: #000; }

/* =========================================================
   Index
========================================================= */
.main {
  margin-top: 160px;         /* header余白 */
  position: relative;
  padding-left: 8vw;
  padding-right: 8vw;
  z-index: 1;
}

/* 左の作品タイトル */
.works {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 700px;
  position: relative;
  z-index: 2;
}
.works li {
  font-size: 2.8rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.25;
  margin: 1.2rem 0;
  transition: opacity .25s ease;
}
.works li:hover { opacity: .7; }

/* タイトルの“細い下線”アニメーション */
.works li a {
  position: relative;
  display: inline-block;
}
.works li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;        /* 文字から少し下げる */
  width: 0%;
  height: .6px;        /* 極細ライン */
  background: #000;
  opacity: .7;
  transition: width .45s ease;
}
.works li a:hover::after { width: 100%; }

/* ======== HERO IMAGE（フル表示対応版） ======== */
.hero-image {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 5%;          /* 右に少し余白を残す */
  left: 25%;          /* 左はタイトル文字にかかる程度 */
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;       /* ← トリミングせず全体表示 */
  object-position: center;
  opacity: 0.95;
  transition: transform 1.2s ease, opacity 0.8s ease;
}


/* ======== TABLET ======== */
@media (max-width: 1024px) {
  .hero-image {
    position: relative;
    left: 0;
    right: 0;
    width: 100%;
    height: 80vh;
    margin: 0 auto;
  }

  .hero-image img {
    object-fit: contain;     /* タブレットもフルで見える */
    object-position: center center;
  }
}

/* ======== SMARTPHONE ======== */
@media (max-width: 768px) {
  .hero-image {
    position: relative;
    left: 0;
    right: 0;
    width: 100%;
    height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-image img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;      /* ← フルで見えるように */
    object-position: center center;
  }
}


/* =========================================================
   Work page (swiper + info)
   HTML側の .work-page / .work-title / .swiper … に対応
========================================================= */
.work-page {
  margin-top: 100px;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 6vw;
}

.work-title {
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
  margin: 0 0 40px;
  text-align: center;
}

/* Swiper箱 */
.swiper {
  width: 85%;
  max-width: 700px;
}
.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ← トリミングせず全体表示 */
  object-position: center center;
}


/* 矢印/ドットを黒に（!important でCDNデフォルト上書き） */
.swiper-button-next,
.swiper-button-prev {
  color: #000 !important;
  opacity: .6;
  transition: opacity .25s ease;
}
.swiper-button-next:hover,
.swiper-button-prev:hover { opacity: 1; }

.swiper-pagination-bullet {
  background: #000 !important;
  opacity: .25 !important;
}
.swiper-pagination-bullet-active {
  background: #000 !important;
  opacity: 1 !important;
}

/* スライド下の情報ブロック（サイズ表記＋カウンタ＋INFO） */
.slide-info {
  margin-top: 25px;
  text-align: center;
  font-family: "Playfair Display", serif;
}
.size-text {
  font-size: .95rem;
  color: #444;
  margin-bottom: 6px;
}
.slide-counter {
  font-size: 1rem;
  color: #222;
  letter-spacing: 1px;
}
.info-btn {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .25s ease;
}
.info-btn:hover { opacity: .6; }

/* INFOオーバーレイ（クリックでフェード表示） */
.info-panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
  z-index: 1100;
}
.info-panel.active {
  opacity: 1;
  visibility: visible;
}
.info-content {
  background: #fff;
  border: 1px solid #ddd;
  padding: 40px 60px;
  max-width: 640px;
  width: min(86vw, 640px);
  text-align: center;
  line-height: 1.6;
}
.close-btn {
  margin-top: 18px;
  background: none;
  border: none;
  color: #000;
  cursor: pointer;
  font-family: inherit;
  font-style: italic;
  font-size: 1rem;
  transition: opacity .25s ease;
}
.close-btn:hover { opacity: .6; }

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 1280px) {
  .works li { font-size: 2.4rem; }
}

@media (max-width: 1024px) {
  .works li { font-size: 2.2rem; }
  .hero-image { width: 50%; right: 5%; }
  .header { height: 80px; padding: 1.2rem 7vw; }
  .main { margin-top: 140px; }
}

@media (max-width: 768px) {
  /* スマホでは右画像を非表示にして縦1カラム */
  .main { padding-left: 6vw; padding-right: 6vw; }
  .works li { font-size: 1.8rem; margin: 1rem 0; }

  .header { height: 70px; padding: 1rem 6vw; }
  .logo a { font-size: .9rem; }
  .nav a { margin-left: 1.2rem; font-size: .8rem; }

  .work-page { margin-top: 90px; padding: 0 5vw; }
  .swiper { width: 100%; max-width: 640px; }
}

@media (max-width: 480px) {
  .works li { font-size: 1.6rem; }
  .work-title { font-size: 1.4rem; margin-bottom: 28px; }
  .slide-counter { font-size: .95rem; }
  .size-text { font-size: .9rem; }
}
/* =========================================================
   Overlay for About / Exhibitions / Bibliography
========================================================= */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 1500;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay-content {
  max-width: 640px;
  width: 86vw;
  text-align: center;
  background: #fff;
  border: 1px solid #ddd;
  padding: 50px 60px;
  line-height: 1.7;
  font-family: "Playfair Display", serif;
  animation: fadeIn 0.6s ease both;
}

.overlay-content h2 {
  font-style: italic;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.overlay-content p {
  font-size: 0.95rem;
  color: #333;
}

.close-overlay {
  margin-top: 1.5rem;
  border: none;
  background: none;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.3s ease;
}
.close-overlay:hover { opacity: 0.6; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ロゴ画像の自然なサイズ調整 */
.logo img {
  height: 22px;
  width: auto;
  vertical-align: middle;
}
/* フェードアニメーション */
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.6s ease;
  opacity: 1;
}
.hero-image img.fade-out {
  opacity: 0;
}
/* ===============================
   Work Page — Fullscreen Image + Fixed Info
=============================== */
.work-page {
  margin-top: 100px;
  height: calc(100vh - 100px); /* Header分だけ差し引き */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.mySwiper {
  width: 100%;
  height: calc(100vh - 220px); /* 下のinfo分を確保して大きく表示 */
  max-width: 1400px;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ← 全体表示でトリミングしない */
  object-position: center;
}

/* 下部固定エリア */
.slide-info {
  position: fixed;
  bottom: 4vh;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: "Playfair Display", serif;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  padding: 10px 0;
  z-index: 2100;
}


.size-text {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 3px;
}

.slide-counter {
  font-size: 1rem;
  color: #111;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.info-btn {
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.info-btn:hover { opacity: 0.6; }

/* INFOパネル */
.info-panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
  z-index: 2000;
}
.info-panel.active {
  opacity: 1;
  visibility: visible;
}

.info-content {
  background: #fff;
  border: 1px solid #ddd;
  padding: 40px 60px;
  max-width: 640px;
  width: min(86vw, 640px);
  text-align: center;
  line-height: 1.6;
}
.close-btn {
  margin-top: 18px;
  background: none;
  border: none;
  color: #000;
  cursor: pointer;
  font-family: inherit;
  font-style: italic;
  font-size: 1rem;
  transition: opacity .25s ease;
}
.close-btn:hover { opacity: .6; }

/* スマホ */
@media (max-width: 768px) {
  .mySwiper {
    height: calc(100vh - 220px);
  }
  .info-content {
    padding: 30px 25px;
  }
}
/* --- タブレット・スマホでは右側の画像を非表示 --- */
@media screen and (max-width: 1280px) {
  .hero-image {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}
/* --- スマホ・タブレット時：タイトルと画像の縦間を短く調整 --- */
@media screen and (max-width: 1024px) {
  .work-page {
    margin-top: 50px; /* 以前100pxだったのを少し詰める */
  }

  .work-title {
    margin-bottom: 5px; /* ← ここが一番大事。40px → 15pxへ */
  }

  .swiper {
    margin-top: 0; /* 不要な上余白を除去 */
  }

  .swiper-slide img {
    object-fit: contain;
    margin-top: 0;
  }

  .slide-info {
    margin-top: 10px; /* 下の情報も少し詰める */
  }
}
