@charset "utf-8";

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

body {
  font-family: 'Noto Serif JP', serif;
  color: #333333;
  background-color: #baaec4; 
  line-height: 2.4; 
  letter-spacing: 0.08em;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* ==========================================================================
   ヘッダーナビゲーション（修正後）
   ========================================================================== */
.navbar {
  position: absolute; /* fixed ではなく absolute にする */
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 60px; /* 他のページと同じゆったりしたパディングにする */
  z-index: 100;
  background: transparent;
}

.logo .signature-logo {
  height: 180px;
  width: auto;
  display: block;
  object-fit: contain;
  margin-left: 30px;
}

.nav-links {
  display: flex;
  gap: 35px;
}

.nav-links a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: #333333;
  text-decoration: none;
  letter-spacing: -0.02em;
  font-weight: 400;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #999999;
}

/* ==========================================================================
   ギャラリーページ用レイアウト
   ========================================================================== */
.gallery-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 300px 40px 100px; 
}
.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 0.1em;
}

/* カテゴリー切り替えメニュー */
ul.gallery-categories {
  display: flex;
  justify-content: center; /* 中央に配置 */
  align-items: center;
  flex-wrap: wrap;
  gap: 25px; 
  list-style: none;
  margin-left: auto;   /* 左右の余白を自動調整して中央へ */
  margin-right: auto;
  margin-bottom: 60px;
  padding: 0;
  text-align: center;  /* テキスト自体も中央寄せ */
}

.gallery-categories li {
  position: relative;
}
.gallery-categories li + li::before {
  content: "｜";
  color: #776e82;
  margin-right: 25px;
  font-size: 0.85rem;
}
.gallery-categories a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: #665b70;
  text-decoration: none;
  letter-spacing: 0.1em;
  position: relative;
  padding-bottom: 6px;
  transition: color 0.3s ease, opacity 0.3s ease;
  border-bottom: none;
}
.gallery-categories a:hover {
  color: #333333;
  opacity: 0.6; 
}

/* ▼ ここから下が下線のアニメーション設定です ▼ */
.gallery-categories a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #333333;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.gallery-categories a.active {
  color: #333333;
  font-weight: 400;
  opacity: 0.5;
}
.gallery-categories a:hover::after,
.gallery-categories a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* グリッドレイアウト (3列) */
.gallery-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.gallery-grid-item {
  cursor: pointer;
  text-align: left;
  transition: opacity 0.3s ease;
}
.gallery-grid-item:hover {
  opacity: 0.75;
}
.gallery-grid-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #e5e0d8;
  margin-bottom: 12px;
}
.gallery-grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-grid-item:hover .gallery-grid-thumb img {
  transform: scale(1.03);
}
.gallery-grid-title {
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #333;
}

/* ==========================================================================
   モーダルポップアップ設定（繊細な「×」＆大画面仕様）
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(20, 20, 20, 0.92); 
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.modal.is-open {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 90vw;
  height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

/* 繊細で細い「×」ボタンのデザイン（極細1px） */
.modal-close {
  position: absolute;
  top: -45px;
  right: 0;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.3s;
}
.modal-close:hover {
  opacity: 0.5;
}
.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 1px; /* 繊細な細さに調整済 */
  background-color: #ffffff;
}
.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* 作品画像 */
.modal-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* 詳細情報（右端・下部に上品に配置） */
.modal-text-wrap {
  position: absolute;
  bottom: -35px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  opacity: 0.85;
}
.modal-text-wrap h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 300;
  margin: 0;
}
.modal-details span {
  margin-left: 15px;
}

/* 左右の切り替えテキスト */
.modal-nav-prev, .modal-nav-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.3s;
}
.modal-nav-prev:hover, .modal-nav-next:hover {
  opacity: 1;
}
.modal-nav-prev { left: -50px; }
.modal-nav-next { right: -50px; }

/* ==========================================================================
   PAGE TOP リンク
   ========================================================================== */
.pagetop-container {
  position: fixed;
  bottom: 60px;
  right: 50px;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
}
.pagetop-container.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.pagetop-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.3s ease;
}
.pagetop-link:hover {
  opacity: 0.4;
}
.pagetop-arrow {
  display: block;
  width: 1px;
  height: 45px;
  background-color: #333333;
  margin-bottom: 25px;
  position: relative;
}
.pagetop-arrow::before {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  border-top: 1px solid #333333;
  border-left: 1px solid #333333;
  transform: rotate(45deg);
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -3px;
}
.pagetop-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: #333333;
  letter-spacing: 0.15em;
  font-weight: 300;
  white-space: nowrap;
  transform: rotate(90deg);
  display: block;
  margin-top: 15px;
}

/* アニメーション制御 */
.scroll-trigger, .fade-in, .navbar {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1), transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.is-active {
  opacity: 1;
  transform: translateY(0);
}
.delay-nav { transition-delay: 0.2s; }

footer small {
  display: block !important;
  text-align: center !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 10px !important;
  line-height: 1 !important;
  letter-spacing: 0.1em !important;
  color: #333333 !important;
  text-transform: uppercase !important;
  margin: 10px 0 !important;
  margin-bottom: 40px !important;
}

/* ==========================================================================
   ハンバーガーメニュー共通設定 (about・gallery共通)
   ========================================================================== */
/* 共通のハンバーガーボタン設定（Index側と完全一致させる） */
.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px; /* ← 26pxから30pxに統一 */
  height: 24px; /* ← 高さを24pxに統一 */
  position: relative;
  z-index: 1000;
}

.menu-btn span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%; /* ← 横幅いっぱいにする */
  left: 16px;     /* ← 中央寄せの計算を単純化 */
  transform: translateX(-50%) scaleY(0.5);
  transform-origin: center;
  background: #333333;
  border-radius: 0;
  transition: all 0.3s ease;
}

/* 線の位置をIndexと合わせる */
.menu-btn span:nth-child(1) { top: 0; }
.menu-btn span:nth-child(2) { top: 11px; }
.menu-btn span:nth-child(3) { top: 22px; }

/* 開いたときの変形もIndexと統一 */
.menu-btn.is-open span:nth-child(1) { transform: rotate(45deg); top: 11px; }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { transform: rotate(-45deg); top: 11px; }

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  /* !important を外し、通常の背景色指定に戻します */
  background-color: #fcfbfa; 
  display: flex;
  justify-content: center;
  align-items: center;
  
  /* 余白をスッキリさせ、真っ白になりすぎるのを防ぎます */
  padding: 40px 20px;
  box-sizing: border-box;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 900; /* インデックスやジャーナルと同じ標準的なz-indexに戻す */
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 項目が8個でも一番下が詰まらない絶妙な間隔 */
  gap: 20px; 
}

.mobile-link {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: #333333;
  text-decoration: none;
}
/* ==========================================================================
   レスポンシブ設定
   ========================================================================== */
@media (max-width: 1024px) {
  .navbar { padding: 25px 40px; }
  .nav-links { gap: 16px; }
}

@media (max-width: 768px) {
  
  .navbar {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .nav-links { display: none; }
  .menu-btn { display: block; }

  .logo .signature-logo {
    height: 90px;
    margin-left: 0;
  }

  .gallery-page-container {
    padding: 160px 20px 60px;
  }
  
  .gallery-categories {
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important; 
    margin-bottom: 40px !important;
  }
  .gallery-categories li + li::before {
    display: none !important;
  }
  .gallery-categories a {
    padding-bottom: 0 !important;
    display: inline-block;
    line-height: 1.2 !important;
  }

  .gallery-grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .mobile-nav-links .mobile-link {
    font-size: 1.5rem !important;
    color: #333333 !important;
    text-decoration: none !important;
  }

  .modal-content {
    width: 95vw;
    height: 75vh;
  }
  .modal-nav-prev, .modal-nav-next {
    display: none;
  }

  .pagetop-container { bottom: 25px; right: 25px; }
}