/* ==========================================================================
   1. SETTINGS & RESET
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

   /* 全ページ、全要素のリンク下線とボーダーを根絶 */
a, a *, .project-view a, .project-caption a, .pdf-link a {
  text-decoration: none !important;
  color: inherit;
  border: none !important;
  outline: none !important;
}

   :root {
  --max-width: 1200px;
  --bg-color: #000;
  --text-color: #fff;
  --line-color: #333;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.8;
  margin: 0;
}

/* --- ABOUT: 箱組セクション --- */
.about-section {
  padding: 150px 5vw;
  text-align: center;
}

.about-text {
  display: block;
  max-width: 800px;
  margin: 0 auto;
  text-align: justify; /* 箱組 */
  text-justify: inter-character;
  text-align-last: left; /* 最終行だけ左寄せ */
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 2.5;
}

/*.about-text p { margin-bottom: 3rem; }*/

/* --- WORKS ARCHIVE: 8ジャンル構造 --- */
.works-archive {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 5vw 200px;
}

.section-title {
  font-size: 24px;
  font-weight: 200;
  letter-spacing: 0.5em;
  text-align: center;
  margin-bottom: 150px;
}

.genre-section {
  margin-bottom: 150px;
}

/* 仕切り線 */
.genre-divider {
  display: flex;
  align-items: baseline;
  gap: 20px;
  border-bottom: 1px solid var(--line-color);
  padding-bottom: 10px;
  margin-bottom: 50px;
}

.genre-no {
  font-family: serif;
  font-size: 40px;
  font-style: italic;
  opacity: 0.4;
}

.genre-label {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.genre-label span {
  font-size: 16px;
  opacity: 0.6;
  margin-left: 15px;
  letter-spacing: 0.1em;
}

/* 1行3コマのグリッド */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.work-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #111;
  margin-bottom: 20px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.6s ease;
  filter: grayscale(100%); /* 一覧はモノトーン */
}

.work-item:hover .thumb img {
  transform: scale(1.05);
  filter: grayscale(0%); /* ホバーでカラーに */
}

.work-meta {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.work-meta .year {
  display: block;
  font-weight: 100;
  opacity: 0.5;
  margin-bottom: 5px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .works-grid { grid-template-columns: 1fr; }
  .about-text { text-align: left; text-align-last: left; }
}

/* --- ファーストビュー：静寂の空間 --- */
.hero-view {
  width: 100%;
  height: 100vh; /* ブラウザの縦幅いっぱいに固定 */
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
}

.hero-name {
  font-size: clamp(22px, 5vw, 50px); /* 画面幅に応じて可変 */
  font-weight: 100;
  letter-spacing: 0.8em;
  margin-right: -0.8em; /* 中央寄せのズレ補正 */
  color: #fff;
  margin-bottom: 20px;
}

.hero-since {
  font-family: serif;
  font-size: 20px;
  font-style: non;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.7);
}

/* スクロールを促す垂直線 */
.hero-scroll-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #fff);
  transform: translateX(-50%);
}

/* --- ABOUTセクションの調整（FVの直後のため） --- */
.about-section {
  padding-top: 150px; /* FVからスクロールした際の余白 */
}


/* スマホ用改行コントロール */
.br { display: none; }



/* --- 2. ナビゲーション（FVの上に乗せる） --- */
.global-nav {
  position: fixed; /* スクロール追従 */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 30px 0;
  /* スクロール後に背景を薄くなじませる */
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.nav-links {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* 中央寄せ、または左右に振る */
  gap: 40px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.2em;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.nav-links a:hover { opacity: 1; }

/* ==========================================================================
   4. TOP PAGE (HERO & WORKS)
   ========================================================================== */
.hero {
  position: relative;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  background: #000; /* 最終的な色は漆黒 */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* 光の層（アニメーション用） */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 上部中央から漏れる微かな光 */
  background: radial-gradient(circle at 50% -10%, #222 0%, transparent 70%);
  opacity: 0;
  animation: lightPass 5s ease-out forwards; /* 5秒かけて消える */
  pointer-events: none; /* クリックを邪魔しない */
}

@keyframes lightPass {
  0% { opacity: 0; }
  20% { opacity: 1; }  /* じわっと光が差す */
  100% { opacity: 0; } /* ゆっくりと漆黒に戻る */
}

.site-title {
  font-size: clamp(20px, 3.5vw, 36px); /* 画面幅に合わせて可変 */
  font-weight: 100;
  letter-spacing: 0.6em;
  margin-right: -0.6em;
  text-align: center;
  line-height: 1.5;
}

/* 改行用スパンの制御 */
.site-title .br {
  display: block;
  height: 0;
  margin-top: 10px;
}

.years {
  margin-top: 2rem;
  font-size: clamp(13px, 1.8vw, 24px);
  font-weight: 100;
  letter-spacing: 0.3em;
  opacity: 0.8;
  text-align: center;
  margin-top: 30px;
}


/* --- ABOUTセクション：初期状態 --- */
.about {
  padding: 150px 0;
  opacity: 0;                   /* 最初は透明 */
  transform: translateY(50px);  /* 50px下に下げておく */
  transition: opacity 1.5s ease-out, transform 1s ease-out; /* 変化を滑らかに */
}

/* --- ページ読み込み後に付与するクラス（JSで制御） --- */
.about.is-visible {
  opacity: 1;                   /* 表示する */
  transform: translateY(0);    /* 元の位置に戻す */
}

.works {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 5vw 120px;
}

/* .meta：works-archive 内の年・名前表示 */
.meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 14px;
  font-size: clamp(12px, 1.2vw, 14px);
  letter-spacing: 0.08em;
}

.meta .year {
  font-weight: 100;
  opacity: 0.5;
  white-space: nowrap;
}

.meta .name {
  font-weight: 300;
  opacity: 0.85;
}

/* ==========================================================================
   5. PROJECT DETAIL (SLIDER & META)
   ========================================================================== */
body.project-view {
  padding: 80px 0 120px;
}

.project-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 5vw;
}

/* スライダー */
.slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.project-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}
.project-slider::-webkit-scrollbar { display: none; } /* Chrome/Safari */



/* スライダーの外枠で、はみ出したズームをカット */
.slider-wrapper {
  position: relative;
  overflow: hidden; /* これが重要 */
}

.slider-item {
  flex: 0 0 100%;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  scroll-snap-align: center;
  
  /* 初期状態 */
  transform: scale(1);
  will-change: transform; /* ブラウザに描画準備をさせる */
}

/* 「呼吸」のアニメーション定義 */
@keyframes breathe {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.07); } /* 7%拡大。これなら視認できる */
}

/* 表示された画像だけにアニメーションを適用 */
.slider-item.is-active {
  animation: breathe 20s ease-out forwards; /* 20秒かけてゆっくり拡大 */
}

/* スライダーボタン */
.slider-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 40px;
  font-weight: 100;
  padding: 20px;
  opacity: 0.3;
  transition: opacity 0.3s;
  cursor: pointer;
  z-index: 10;
}
.slider-btn:hover { opacity: 1; }
.slider-btn.prev { left: 0; }
.slider-btn.next { right: 0; }

/* プロジェクト情報 (名称・年・場所) */
.project-meta-clean {
  margin-top: 60px;
  text-align: center;
}

.p-name {
  font-size: clamp(10px, 1.3vw, 18px);
  font-weight: 300;
  letter-spacing: 0.2em;
  margin-bottom: 25px;
}

.p-details {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.p-year, .p-location {
  font-size: clamp(11px, 1.8vw, 18px);
  font-weight: 100;
  letter-spacing: 0.3em;
  opacity: 0.6;
}

.close {
  position: fixed;
  top: 30px; right: 30px;
  font-size: 40px;
  opacity: 0.7;
  z-index: 2000;
}

/* ==========================================================================
   6. ABOUT / FOOTER
   ========================================================================== */
.about-to-works {
  margin-top: 80px; /* 文章との「間」をしっかり取る */
  text-align: center;
  text-align-last: center; /* ここだけは中央に */
}

.about-to-works span {
  font-size: 16px;
  letter-spacing: 0.2em;
  opacity: 0.8;
  display: block;
  margin-bottom: 40px;
}

/* 視線を下へ誘導する細い縦線 */
.scroll-arrow {
  width: 1px;
  height: 250px;
  background: linear-gradient(to bottom, #fff, transparent);
  margin: 0 auto;
}

  .about-text {
  max-width: 800px;
  margin: 0 auto;
  
  /* 1. 全体を均等割付（箱組）にする */
  text-align: justify;
  
  /* 2. 日本語の箱組を綺麗に見せるための魔法 */
  text-justify: inter-character;
  
  /* 3. ★最終行だけを左に寄せる */
  text-align-last: left;

  line-height: 2.5;
  letter-spacing: 0.1em;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

/* 段落間の余白 */
.about-text p {
  margin-bottom: 3rem;
}

.site-footer {
  padding: 100px 5vw;
  border-top: 1px solid #4d4d4d;
  text-align: center;
}

.footer-logo img {
  width: 130px;
  margin: 0 auto 40px;
}

.footer-info {
  font-size: 15px;
  line-height: 2.2;
  opacity: 0.7;
}

.footer-copy {
  font-size: 12px;
  letter-spacing: 0.15em;
  opacity: 0.8;
  padding-top: 30px;
 }

.pdf {
  text-align: center;
  padding: 0 5vw 160px;
}

.pdf-links {
  display: flex;
  justify-content: center;
  gap: 2px;
  max-width: 720px;
  margin: 0 auto;
}

.pdf-link {
  flex: 1;
}

.pdf-link a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 50px 32px;
  border: 1px solid #2a2a2a;
  transition: border-color 0.4s, background 0.4s;
  cursor: pointer;
}

.pdf-link a:hover {
  border-color: #555;
  background: rgba(255,255,255,0.03);
}

.pdf-link-label {
  font-size: 11px;
  letter-spacing: 0.4em;
  opacity: 0.35;
}

.pdf-link-title {
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 300;
  letter-spacing: 0.15em;
}

.pdf-link-sub {
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.45;
}

/* PDF links responsive */
@media (max-width: 600px) {
  .pdf-links {
    flex-direction: column;
    gap: 12px;
  }
}

/* ==========================================================================
   7. RESPONSIVE (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
  /* body の padding-top は不要（nav は fixed だが hero が 100vh あるため） */
  .br { display: block; } /* スマホで改行有効 */

  .section-title { font-size: 20px; letter-spacing: 0.3em; margin: 80px 0; }
  .works-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 16px; }
  
  .p-details { flex-direction: column; gap: 10px; }
  .slider-btn { display: none; } /* スマホはスワイプのみ */
  
  /* スマホは左揃えが読みやすい（center !important を削除） */
  .about-text {
    font-size: 14px;
    text-align: left !important;
    text-align-last: left !important;
    padding-left: 20px;
    padding-right: 20px;
  }
  .close { top: 20px; right: 20px; font-size: 30px; }

  .genre-section { margin-bottom: 80px; }
  .works-archive { padding-bottom: 100px; }
}

/* ==========================================================================
   PROJECT DETAIL (CENTER ALIGN FIX)
   ========================================================================== */
.project-meta-clean {
  margin-top: 60px;
  width: 100%;
  /* コンテナ全体をセンターに */
  text-align: center !important; 
}

.p-name {
  display: block;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 300;
  letter-spacing: 0.2em;
  margin-bottom: 25px;
  /* 親のtext-alignに追従させる */
}

.p-details {
  display: flex;
  justify-content: center; /* PC時の横並び中央 */
  align-items: center;     /* 縦軸の中央 */
  gap: 40px;
  width: 100%;
}

.p-year, .p-location {
  display: inline-block;
  font-size: clamp(15px, 1.8vw, 20px);
  font-weight: 100;
  letter-spacing: 0.3em;
  opacity: 0.7;
}

/* ==========================================================================
   MOBILE ADJUSTMENT (スマホでも中央を死守)
   ========================================================================== */
@media (max-width: 768px) {
  .p-details {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}