@charset "utf-8";

/* ＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝ */
/* About me */
/* ＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝ */
.top-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 必須 */
  width: 100%;
  /* 幅をしっかり確保 */
  max-width: 300px;
  gap: 40px;
}

.about-me {
  text-align: center;
  width: auto;
  /* 100%ではなくautoにして、自らセンターに寄るようにする */
  margin: 0;
}

/* About me 全体：走行距離を 500vh にして余裕を持たせる */
.about-section {
  width: 100%;
  height: 200vh;
  /* 2スクロール分 */
  position: relative;
  background-color: #fff;
}

.sticky-container {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.center-text {
  writing-mode: vertical-rl;
  /* margin: 0 auto; を下記に変更 */
  margin: 0;
  display: inline-block;
  /* 中身の幅に合わせる */
  position: relative;
  left: -0.5rem;
  /* 視覚的に左に少しズラして調整 */
}

.sub-title {
  width: 280px;
  /* サブタイトルの位置をさらに上に離す */
  writing-mode: horizontal-tb;
  font-size: 13px;
  display: block;
  /* 余白を広げて縦長感を強調 */
}

/* =========================================== */
/* ボタン */
/* =========================================== */
.top-button {
  width: 100%;
  /* 親のmax-widthまで無理やり広げる */
}

.button {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.button a {
  position: relative;
  display: flex;

  /* 【修正1】 space-around だと文字位置が不安定になるので center に変更 */
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 100%;

  /* 【修正3】 左の余白をたっぷりとる 
     左を60px空けることで、矢印が来るスペースを強制的に作ります */
  padding: 15px 0px 15px 60px;

  line-height: 1.8;
  text-decoration: none;
  color: #333;
  transition: 0.3s ease-in-out;
  font-weight: 500;

  /* widthにpaddingを含める設定（レイアウト崩れ防止） */
  box-sizing: border-box;
}

.button a:before,
.button a:after {
  content: "";
  position: absolute;
  display: block;
  top: 50%;
}

.button a:before {
  width: 1rem;
  height: 1rem;
  left: 1.8rem;
  border-top: solid 2px #333;
  border-right: solid 2px #333;
  z-index: 2;
  transform: translateY(-50%) rotate(45deg);
  transition: all 0.3s;

}

.button a:after {
  left: 0;
  background: #eee;
  z-index: 1;
  width: 5rem;
  height: 5rem;
  border-radius: 4rem;
  transform: translateY(-50%);
  transition: all 0.5s;
}

.button a span {
  position: relative;
  right: 2rem;
  transition: all 0.3s;
  z-index: 3;
  text-align: center;
}

.button a:hover span {
  color: #fff;
}

.button a:hover:before {
  left: 2.5rem;
  border-top: solid 2px #fff;
  border-right: solid 2px #fff;
}

.button a:hover:after {
  right: 0;
  width: 100%;
  background: #333;
}



/* =========================================== */
/* 写真の基本設定（修正） */
/* =========================================== */
.box {
  position: absolute;
  width: 25vw;
  max-width: 280px;
  min-width: 150px;
  z-index: 9999;

  /* 初期状態（透明・白黒） */
  opacity: 0;
  filter: grayscale(100%);

  /* 【重要】transitionは色と不透明度だけ！transformは入れない */
  transition: opacity 1s ease-out, filter 1s ease-out;
  will-change: transform;
}

/* 表示時（GSAPでこのクラスを付与） */
.box.is-active {
  opacity: 1;
  filter: grayscale(0%);
}

.box img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  transition: transform 0.3s ease;
  /* 画像だけを拡大させるために追加 */
}

/* ホバー時のエフェクト（box自体は動かさず、中のimgを動かす） */
.box.is-active:hover {
  z-index: 10000;
}

.box.is-active:hover img {
  transform: scale(1.05);
  /* Y軸移動は削除し、少し拡大するだけにする */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}


/* --- ボックス内のリンクを基準点にする --- */
.box a {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

/* --- ホバー時に写真を黒くするレイヤー --- */
.box a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  /* 黒の濃さ */
  z-index: 2;
  opacity: 0;
  /* 最初は透明 */
  transition: opacity 0.4s ease;
}

/* --- 浮かび上がる文字の設定 --- */
.box-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  /* 少し下から浮かび上がらせる */
  z-index: 3;
  width: 100%;
  text-align: center;
  color: #fff;
  opacity: 0;
  /* 最初は透明 */
  transition: all 0.4s ease;
  pointer-events: none;
  /* テキストがクリックの邪魔をしないように */
}

.box-caption span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding-bottom: 4px;
  color: #fff;
}

/* --- ホバー時の動き --- */
.box.is-active:hover a::before {
  opacity: 1;
  /* 黒レイヤーを表示 */
}

.box.is-active:hover .box-caption {
  opacity: 1;
  transform: translate(-50%, -50%);
  /* 中央に移動 */
}

/* 前の拡大エフェクトと合わせる場合 */
.box.is-active:hover img {
  transform: scale(1.05);
  filter: blur(2px);
  /* 少しぼかすと文字が見やすくなります（お好みで） */
}

/* 各ボックスの横位置だけCSSで決める（縦はGSAPで決まるので書かない） */

.b1 {

  left: 10%;

}



.b2 {

  right: 10%;

}



.b3 {

  left: 15%;

}



.b4 {

  right: 10%;

}



.b5 {

  left: 8%;

}



.b6 {

  right: 18%;

}



.b7 {

  left: 12%;

}

/* 右下の本棚 */
/* ＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝ */
/* Works */
/* ＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝ */

.works-section {
  /* トップの「下の枠線（90px）」と、Worksの「上の余白」を合算して調整 */
  /* ここを 0 にすると、トップの額縁の底辺とWorksがくっついて見えます */
  position: relative;
  z-index: 20;
}

.container {
  width: 95%;
  /* 固定幅をやめて全幅にする */
  /* トップの額縁と同じ余白を指定（これで画像の端とタイトルの端が揃う） */
  padding-left: clamp(20px, 5vw, 90px);
  padding-right: clamp(20px, 5vw, 90px);

  margin: 0 auto 150px auto;
  box-sizing: border-box;
}

/* タイトル名 */

/* アニメーションの定義 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-target {
  display: block;
  /* または inline-block */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-target.is-show {
  opacity: 1;
  transform: translateY(0);
  /* 登場する時だけ 0.6s かけて変化させる */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 3. サブタイトルだけ少し遅らせて出す設定（delay） */
.section-subtitle.is-show {
  transition-delay: 0.3s;
}

/* タイトル名 */
.section-title {
  /* タイトルサイズも可変にすると、小さいPCで圧迫感がなくなります */
  font-size: clamp(40px, 5vw, 64px);
  font-weight: bold;
  margin-bottom: 0;
  color: #333;
}

.section-subtitle {
  font-size: clamp(14px, 1.5vw, 18px);
  color: #919191;
  margin-top: 10px;
  margin-bottom: clamp(40px, 5vw, 80px);
}

/* --- ついでにWorksのグリッドも微調整 --- */
.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 4vw, 60px);
  width: 100%;
  margin: 0 auto;
  /* 親要素いっぱいに広げる */
}

.work-card {
  flex: 1;
}

.work-card a {
  text-decoration: none;
}

/* 画像エリア */
.work-image {
  background-color: #f0f0f0;
  /* 画像がない時の仮背景 */
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 20px;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.work-card:hover img {
  transform: scale(1.05);
  /* ホバー時に少し大きく */
}

/* テキストエリア */
.work-category {
  font-size: 16px;
  margin-bottom: 8px;
}

.work-category span {
  margin-left: 10px;
  color: #888;

}

.work-name {
  font-size: 18px;
  font-weight: normal;
  margin: 0;
}





/* ＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝ */
/* SP・タブレット用レスポンシブ (800px以下) */
/* ＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝ */

@media (max-width: 800px) {

  /* --- 全体のレイアウト調整 --- */
  .container {
    /* 固定幅(1100px)を解除して、画面いっぱい(100%)にする */
    width: 100%;
    margin: 40px auto;
    /* 上下の余白を少し狭める */
  }

  /* --- タイトルの文字サイズ調整 --- */
  .section-title {
    font-size: 40px;
    /* 64pxだとスマホでは大きすぎるので小さく */
  }

  .section-subtitle {
    margin-bottom: 40px;
    /* 余白を少し詰める */
  }

  /* --- Works (実績) エリア --- */
  .works-grid {
    /* 画面幅800px以下なら1列にする */
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .work-card {
    width: 100%;
  }

  .sticky-container {
    background-color: #fff;
  }

  /* --- About me (自己紹介) エリア --- */
  .about-me {
    /* 横並び(row)から縦並び(column)に変更 */
    flex-direction: column;
    gap: 40px;
    flex-wrap: wrap;
    /* スマホでは縦並びにする */

  }

  .box img {
    width: 50%;
    margin: 0 auto;
  }

  .b1 {

    left: 0%;

  }



  .b2 {

    right: 0%;

  }



  .b3 {

    left: 0%;

  }



  .b4 {

    right: 0%;

  }



  .b5 {

    left: 0%;

  }



  .b6 {

    right: 0%;

  }



  .b7 {

    left: 0%;

  }


  .box.is-active {
    z-index: -9999;
  }

  /* 画像とテキストを画面幅いっぱいに */
  .about-me-img,
  .about-me-text {
    width: 80%;
  }

  /* スマホでは画像を少し小さく表示したい場合（任意） */
  .about-me-img {
    padding: 0 20px;
    /* 左右に少し余白を入れて圧迫感を減らす */
  }

  /* スマホではボタンを中央揃えにするとバランスが良い */
  .about-me-text .button {
    text-align: center;
    margin-top: 30px;
  }

  .about-me-name {
    font-size: 32px;
    /* 名前も少し小さく */
  }
}