/* ベース設定 */
html {
  overflow-x: auto;
  overflow-y: hidden;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", sans-serif;
  background: #333;
  color: #111;
  overflow-x: auto;
  overflow-y: hidden;
  height: 100vh;
  width: max-content;
  scroll-snap-type: x proximity;
}

/* リンクの設定 */
a {
  text-decoration: none;
  color: #333;
  text-shadow: 0 0 8px #fff;
}

/* イントロ画面（ロゴ表示用の空白） */
.intro-screen {
  flex: 0 0 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  scroll-snap-align: center;
}

/* ロゴラッパー（中央→左上に移動） */
.logo-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  transition: all 1s ease;
}

/* スクロール後にロゴを左上に移動 */
.logo-wrapper.scrolled {
  top: 1rem;
  left: 1rem;
  transform: translate(0, 0);
}

.logo-wrapper.scrolled .logo-img {
  max-width: 180px;
}

/* ロゴ画像本体 */
.logo-img {
  max-width: 350px;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(0,0,0,0.1));
  transition: all 1s ease;
}

/* ヘッダーナビゲーション */
.site-header {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: transparent;
  z-index: 1000;
  opacity: 0;
  transition: opacity 1s ease;
}

/* ナビ表示ON */
.site-header.scrolled {
  opacity: 1;
}

/* ナビメニュー */
.site-header nav ul {
  list-style: none;
  padding: 1em 2em;
  margin: 0;
  background: transparent;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ナビリンク */
.site-header nav a {
  font-weight: bold;
  font-size: 1rem;
  color: #aaa;
  transition: all 0.3s ease;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.site-header nav a:hover {
  color: #333;
}

/* 現在のページ（濃い黒） */
.site-header nav a.active {
  color: #111;
}

/* 横スクロールセクション */
.horizontal-scroll {
  display: flex;
  height: 100vh;
  width: max-content;
}

/* 中身全体横並びにする */
.scroll-inner {
  display: flex;
  height: 100vh;
  scroll-snap-type: x mandatory;
}

/* 各作品エリア */
.work {
  flex: 0 0 100vw;
  height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 2em;
  gap: 6em;
  box-sizing: border-box;
  opacity: 0.4;
  transition: opacity 0.6s ease, background 0.6s ease;
  position: relative;
  background: #333;
  scroll-snap-align: center;
}

/* アクティブなwork（中央にいる） */
.work.active {
  opacity: 1;
  background: #fff;
}

.work.active .caption,
.work.active .caption h2,
.work.active .caption p {
  color: #111;
}

/* 両端にグラデーション（境界ぼかし） */
.work::before,
.work::after {
  content: "";
  position: absolute;
  top: 0;
  width: 200px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.15;
  filter: blur(80px);
  mix-blend-mode: lighten;
}

.work::before {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.2) 0%, transparent 100%);
}

.work::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,0.2) 0%, transparent 100%);
}

/* activeのときはグラデーション非表示 */
.work.active::before,
.work.active::after {
  opacity: 0;
}

/* 画像 */
.work img {
  height: 80vh;
  width: auto;
  max-width: 45%;
  object-fit: contain;
}

/* 作品スライダー */
.work-slider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-slide {
  height: 80vh;
  width: auto;
  max-width: 45vw;
  object-fit: contain;
  display: none;
}

.work-slide.active {
  display: block;
}

.work-dots {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
}

.work-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aaa;
  cursor: pointer;
  transition: background 0.3s ease;
}

.work-dot:hover {
  background: #666;
}

.work-dot.active {
  background: #333;
}

/* キャプション部分 */
.caption {
  width: 45%;
  max-width: 600px;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
  transform: translateX(50px);
  opacity: 0;
  transition: transform 0.8s ease, opacity 0.8s ease, color 0.6s ease;
}

/* アクティブ時にキャプションをカットイン */
.work.active .caption {
  transform: translateX(0);
  opacity: 1;
}

.caption h2 {
  margin-top: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

/* キャプションのデフォルト色（グレー背景用） */
.caption h2,
.caption p {
  color: #ccc;
  transition: color 0.6s ease;
}

/* TOPボタン */
.top-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.8em 1.5em;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: none;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease, background 0.3s ease;
}

.top-button:hover {
  background: #333;
  color: #fff;
}

.top-button.visible {
  opacity: 1;
  visibility: visible;
}

/* 下部ナビ */
.bottom-nav {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 5000;
}

/* 矢印コンテナ */
.arrows-container {
  display: flex;
  align-items: center;
  gap: 3rem;
}

/* 共通矢印スタイル */
.nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  cursor: pointer;
}

.nav-arrow.visible {
  opacity: 1;
  pointer-events: auto;
  animation: fadeInOut 3s ease-in-out infinite;
}

.nav-arrow .arrow {
  width: 30px;
  height: 30px;
  border-right: 3px solid #333;
  border-bottom: 3px solid #333;
  filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 15px rgba(255,255,255,0.8));
}

/* 右矢印（SCROLL用、下向き） */
.nav-next .arrow {
  transform: rotate(-45deg);
  animation: arrowMove 1.5s ease-in-out infinite;
}

.nav-next:hover .arrow {
  animation: none;
  transform: rotate(-45deg) translate(5px, 5px);
}

/* 左矢印（反転、上向き） */
.nav-prev .arrow {
  transform: rotate(135deg);
  animation: arrowMoveLeft 1.5s ease-in-out infinite;
}

.nav-prev:hover .arrow {
  animation: none;
  transform: rotate(135deg) translate(-5px, -5px);
}

/* SCROLLテキスト（矢印の下、中央に配置） */
.hint-text {
  font-size: 0.75rem;
  font-weight: bold;
  color: #333;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px rgba(255,255,255,0.8);
  transition: opacity 0.6s ease;
  animation: fadeInOut 3s ease-in-out infinite;
}


@keyframes arrowMoveLeft {
  0%, 100% {
    transform: rotate(135deg) translate(0, 0);
    opacity: 1;
  }
  50% {
    transform: rotate(135deg) translate(-3px, -3px);
    opacity: 0.5;
  }
}

@keyframes arrowMove {
  0%, 100% {
    transform: rotate(-45deg) translate(0, 0);
    opacity: 1;
  }
  50% {
    transform: rotate(-45deg) translate(5px, 5px);
    opacity: 0.5;
  }
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* 言語切り替え */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  padding: 1em 2em 0;
}

.lang-switcher a,
.lang-switcher span {
  font-size: 0.75rem;
  font-weight: bold;
  color: #aaa;
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid #aaa;
  transition: all 0.3s ease;
  text-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lang-switcher a:hover {
  color: #333;
  border-color: #333;
  background: rgba(255, 255, 255, 0.5);
}

.lang-switcher .current {
  color: #111;
  border-color: #111;
  background: rgba(255, 255, 255, 0.8);
}

/* 中文は漢字なので少し小さく */
.lang-switcher a:last-child,
.lang-switcher span:last-child {
  font-size: 0.7rem;
}
