/* -------------------------------------------------------
   style.css (整理・BEM化・修正)
------------------------------------------------------- */

/* -------------------------------------------------------
   :root - CSS変数定義
------------------------------------------------------- */
:root {
  /* ヘッダーの高さ (PC: 55px, SP: 45px) - ロゴの大きさに合わせて調整 */
  --header-height-pc: 55px;
  --header-height-sp: 45px;
}

/* -------------------------------------------------------
   reset.css
------------------------------------------------------- */

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
main,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section {
  display: block;
}

/* Box sizing for consistency */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* -------------------------------------------------------
   Header (BEM: .header)
   position: fixed; による追従ヘッダー
------------------------------------------------------- */
/* Fixedヘッダーがコンテンツを隠さないようbodyに余白追加 */
body {
  /* PC用のデフォルト値 */
  padding-top: var(--header-height-pc);
  line-height: 1.6;
  font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: #222;
  background-color: #fff;
  text-rendering: optimizeLegibility;
  background-color: #0a0a0a;
}

/* Block: ヘッダーコンテナ */
.header {
  position: fixed; /* 画面に固定してスクロール追従 */
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between; /* ロゴとナビを両端に配置 */
  align-items: center;
  padding: 0 5vw;
  height: var(--header-height-pc);
  z-index: 1000; /* 最前面 */
  font-family: "Pirata One", cursive;
  color: #fff; /* 文字色を白に */
  background-color: #0a0a0a; /* または #0A0A0A (MVやWorkセクションの背景色) */
}

/* Element: ロゴ部分 */
.header__logo {
  height: var(--header-height-pc); /* ヘッダーの高さに合わせて高さを設定 */
  display: flex;
  align-items: center;
}
.header__logo img {
  height: 40px; /* PCロゴサイズ */
  width: auto;
}

/* Element: ナビゲーション全体 (PC用) */
.header__nav {
  /* PCでは通常表示 */
  display: block;
}

/* Element: ナビゲーションリスト (PC用) */
.header__nav-list {
  display: flex; /* 横並び */
  gap: 40px; /* メニュー間の余白を調整 */
  font-size: 1.5rem; /* 24px */
}

/* Element: ナビゲーションリンク */
.header__nav-list a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}

.header__nav-list a:hover {
  opacity: 0.7;
  text-decoration: none;
}

/* Element: ハンバーガーボタン (PCでは非表示) */
.header__menu-toggle {
  display: none;
  /* ★修正: position: relative; を追加して z-index を有効化 */
  position: relative;
  z-index: 1002;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.header__menu-toggle-bar {
  display: block;
  width: 30px; /* ボタンサイズを少し大きく */
  height: 3px;
  background-color: #fff;
  margin: 6px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Modifier: ハンバーガー (X) のアニメーション 
   nth-child の番号は 2, 3, 4 (前回の修正済み)
*/
.header__menu-toggle--is-active .header__menu-toggle-bar:nth-child(2) {
  transform: translateY(9px) rotate(45deg);
}
.header__menu-toggle--is-active .header__menu-toggle-bar:nth-child(3) {
  opacity: 0;
}
.header__menu-toggle--is-active .header__menu-toggle-bar:nth-child(4) {
  transform: translateY(-9px) rotate(-45deg);
}

/* -------------------------------------------------------
   Header - Responsive (スマホ: 768px以下で適用)
------------------------------------------------------- */
@media (max-width: 768px) {
  /* bodyのパディングをスマホ用に変更 */
  body {
    padding-top: var(--header-height-sp);
  }

  /* ヘッダーの高さをスマホ用に変更 */
  .header {
    height: var(--header-height-sp);
  }

  /* ロゴサイズをスマホ用に変更 */
  .header__logo img {
    height: 30px; /* SPロゴサイズ */
  }

  /* Element: ハンバーガーボタン (スマホで表示) */
  .header__menu-toggle {
    display: block;
  }

  /* Element: ナビゲーション全体 (スマホ用 - PC用ナビを非表示) */
  .header__nav {
    display: none; /* 初期状態で非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* 画面全体を覆う */
    background: rgba(0, 0, 0, 0.95); /* 半透明の黒背景 */
    z-index: 1001;
  }

  /* Modifier: スマホ用ナビを表示 */
  .header__nav--is-open {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Element: ナビゲーションリスト (スマホ用) */
  .header__nav-list {
    flex-direction: column; /* 縦並び */
    text-align: center;
    font-size: 2rem; /* 32px */
    gap: 40px;
  }
}
/* -------------------------------------------------------
   共通h2用
------------------------------------------------------- */
@keyframes pulsingGlow {
  0% {
    /* MVのオーブの色(rgba(120, 0, 255, 0.5))を参考に */
    text-shadow: 0 0 10px #fff, 0 0 20px rgba(120, 0, 255, 0.5);
  }
  50% {
    /* アニメーションの中間で最も強く光る */
    text-shadow: 0 0 20px #fff, 0 0 40px rgba(120, 0, 255, 1);
  }
  100% {
    text-shadow: 0 0 10px #fff, 0 0 20px rgba(120, 0, 255, 0.5);
  }
}

/* 汎用的なクラス .title-pulsing-glow に変更。
  このクラスが追加された要素（h2など）が光るようになります。
*/
.title-pulsing-glow {
  /* アニメーションの適用 */
  animation: pulsingGlow 3s infinite ease-in-out; /* 3秒かけて呼吸するように */
}

/* カーソルを追いかけるブローブ（光の玉）のスタイル */
#blob {
  height: 250px;
  width: 250px;

  position: fixed;
  top: 0;
  left: 0;
  z-index: 1; /* コンテンツの背後、背景の前面 */

  border-radius: 50%;

  /* グラデーションで中心を明るくする */
  background: radial-gradient(
    circle at center,
    rgba(120, 0, 255, 0.8) 0%,
    rgba(120, 0, 255, 0.5) 50%,
    rgba(120, 0, 255, 0) 100%
  );

  /* ★ 修正: ぼかしを少し弱め、光の芯をハッキリさせます */
  filter: blur(80px);
  -webkit-filter: blur(80px);

  /* ★ 追加: box-shadow で外側の光を追加 */
  box-shadow: 0 0 40px rgba(120, 0, 255, 0.5), 0 0 80px rgba(120, 0, 255, 0.3);

  pointer-events: none; /* カーソルイベントを貫通させる */

  /* JSでの transform の中心を玉の中央にする */
  /* (height/width の半分だけずらす) */
  transform: translate(-125px, -125px);

  opacity: 1;
  transition: opacity 0.3s ease;
}

/* JSによって .is-hidden クラスが付与されたら非表示にする */
#blob.is-hidden {
  opacity: 0;
}

/* =======================================================
   ★★★ 追加 ★★★
   Blob Effect - Mobile Hide
   (ホバー機能がないデバイスでは非表示にする)
======================================================= */
@media (hover: none) {
  #blob {
    display: none !important;
  }
}

/* -------------------------------------------------------
   Main Visual (BEM: .mv)
------------------------------------------------------- */
.mv {
  /* bodyのpadding-topを打ち消し、MVを画面上端から表示する */
  margin-top: calc(0px - var(--header-height-pc));
  background-color: #000;
  color: #fff;
  height: 100vh;
  min-height: 700px;
  width: 100%;
  overflow: hidden;
  position: relative;
  font-family: "Pirata One", cursive;
  padding: 0;
}

/* Element: エフェクト用キャンバス */
.mv__effect-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Element: タイトル */
.mv__title {
  font-size: clamp(4rem, 12vw, 10rem);
  text-align: center;
  line-height: 1;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  visibility: hidden; /* JSが処理を始めるまで非表示 */

  width: 100%;
}

/* Modifier: JS処理完了後、タイトルを表示 */
.mv__title--ready {
  visibility: visible;
}

/* Element: タイトルの一文字 */
.mv__title-char {
  display: inline-block;
  opacity: 0;
  animation: charFadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mv__title br {
  display: block;
}

/* Keyframes: フェードインアニメーション */
@keyframes charFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------------
   MV - Responsive (スマホ)
   (768px以下で適用)
------------------------------------------------------- */
@media (max-width: 768px) {
  .mv {
    /* bodyのpadding-topをスマホのヘッダー高さで打ち消す */
    margin-top: calc(0px - var(--header-height-sp));
  }
}

/* -------------------------------------------------------
   Links, Lists, etc. (Other Global Styles)
------------------------------------------------------- */
/* Links */
a {
  color: inherit;
  text-decoration: none;
}
a:hover,
a:focus {
  text-decoration: underline;
}

/* Lists */
ol,
ul {
  list-style: none;
}

/* Images and media */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Forms */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.25;
}

/* Accessibility helpers */
[hidden] {
  display: none !important;
}

/* -------------------------------------------------------
   Work Section (BEM: .work)
------------------------------------------------------- */
.work {
  background-color: #0a0a0a;
  color: #fff;
  /* ★ 修正: 上下の余白を 80px から 120px に増やします */
  padding: 120px 5vw;
  overflow-x: hidden;
  /* ★ 修正: スナップさせるため、高さを100vh基準に */
  min-height: 100vh;
  /* ヘッダーの高さを考慮 ( calc(100vh - var(--header-height-pc)) だと
     コンテンツが少ない場合にスナップ先として小さすぎるため 100vh を維持) */
}

.work__container {
  max-width: 1600px;
  margin: 0 auto;
}

/* ★ 修正: スナップ後にフワッと表示させるため、初期状態を定義 */
.work__title {
  font-family: "Pirata One", cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  text-align: center;
  line-height: 1;
  margin: 0 0 40px 0;
  color: #fff;

  /* ★ 追加: アニメーション初期状態 */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s; /* 0.4s遅延 */
}

/* -------------------------------------------------------
   Work List (Layout using CSS Grid)
------------------------------------------------------- */
.work__list#work-list-container {
  display: grid;
  /* PCでは3列 */
  grid-template-columns: repeat(3, 1fr);
  /* ★ 修正: アイテム間の隙間を 40px から 60px に増やします */
  gap: 60px;
}

/* Gridで並べる各アイテム */
.work__item {
  background-color: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  position: relative;
  width: 100%; /* 幅は100% (Gridアイテムのデフォルト) */

  /* ★ 追加: アニメーション初期状態 */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ★ 追加: JS が .work-section-visible を追加したら表示 */
body.work-section-visible .work__title {
  opacity: 1;
  transform: translateY(0);
}
body.work-section-visible .work__list .work__item {
  opacity: 1;
  transform: translateY(0);
}
/* ★ 追加: グリッドアイテムを順番に表示 (Stagger) */
body.work-section-visible .work__list .work__item:nth-child(3n + 1) {
  /* 1, 4, 7... */
  transition-delay: 0.5s;
}
body.work-section-visible .work__list .work__item:nth-child(3n + 2) {
  /* 2, 5, 8... */
  transition-delay: 0.6s;
}
body.work-section-visible .work__list .work__item:nth-child(3n + 3) {
  /* 3, 6, 9... */
  transition-delay: 0.7s;
}

/* ★ 追加: JS が .work-section-visible を追加したらボタンも表示 */
body.work-section-visible .work__load-more-container {
  opacity: 1;
  transform: translateY(0);
}

/* JSで制御するための非表示クラス */
.work__item.is-hidden {
  display: none;
}
/* ホバーエフェクト */
.work__item:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(200, 200, 200, 0.2);
}

.work__item-image-wrapper {
  line-height: 0; /* 画像下の余白を削除 */
  position: relative; /* ホバータイトルを重ねるため */
}

.work__item-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.work__item:hover .work__item-image {
  transform: scale(1.03);
}

/* -------------------------------------------------------
   Hover Title (ホバー時に表示するタイトル)
------------------------------------------------------- */
.work__item-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  padding: 40px 20px 20px 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.work__item-title {
  font-family: "Pirata One", cursive;
  font-size: 1.8rem;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.work__item:hover .work__item-title-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------
   No Posts (投稿が0件の場合)
------------------------------------------------------- */
.work__no-posts {
  text-align: center;
  font-size: 1.1rem;
  color: #888;
  padding: 40px 0;
  font-family: "Inter", sans-serif;
}

/* -------------------------------------------------------
   Load More Button
------------------------------------------------------- */
.work__load-more-container {
  /* ★ 修正: もしGrid内に入り込んでしまっていても、強制的に全幅を使う設定を追加 */
  grid-column: 1 / -1;
  width: 100%;

  /* Flexboxで中央揃え */
  display: flex;
  justify-content: center;

  /* ★ 修正: ボタンとグリッドの隙間も 60px に合わせます */
  padding-top: 60px;

  /* ★ 追加: アニメーション初期状態 (ボタンもフワッと表示) */
  opacity: 0;
  transform: translateY(20px);
  /* ★ 修正: グリッド(0.7s)より少し遅れて 0.8s で表示 */
  transition: opacity 0.6s ease 0.8s, transform 0.6s ease 0.8s;
}

.work__load-more {
  font-family: "Pirata One", cursive;
  font-size: 2rem;
  color: #fff;
  background-color: transparent;
  border: 2px solid #555;
  border-radius: 50px;
  padding: 10px 60px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.1em;
}

.work__load-more:hover {
  background-color: #fff;
  border-color: #fff;
  color: #0a0a0a;
  transform: scale(1.05);
}

/* -------------------------------------------------------
   Grid - Responsive (レスポンシブ設定)
------------------------------------------------------- */

/* タブレットサイズ (1024px 以下) */
@media (max-width: 1024px) {
  .work__list#work-list-container {
    grid-template-columns: repeat(2, 1fr);
    /* ★ 修正: タブレットの隙間も調整 */
    gap: 40px;
  }

  /* ★ 追加: Stagger (2列用) */
  body.work-section-visible .work__list .work__item:nth-child(3n + 1),
  body.work-section-visible .work__list .work__item:nth-child(3n + 2),
  body.work-section-visible .work__list .work__item:nth-child(3n + 3) {
    transition-delay: 0s; /* 3列用をリセット */
  }
  body.work-section-visible .work__list .work__item:nth-child(2n + 1) {
    /* 1, 3, 5... */
    transition-delay: 0.5s;
  }
  body.work-section-visible .work__list .work__item:nth-child(2n + 2) {
    /* 2, 4, 6... */
    transition-delay: 0.6s;
  }
}

/* スマホサイズ (600px 以下) */
@media (max-width: 600px) {
  .work__list#work-list-container {
    grid-template-columns: 1fr;
    /* ★ 修正: スマホの隙間も調整 */
    gap: 30px;
  }

  .work {
    /* ★ 修正: スマホの上下余白も調整 */
    padding-top: 80px;
  }

  .work__load-more-container {
    padding-top: 40px;
  }

  /* ★ 追加: Stagger (1列用) */
  body.work-section-visible .work__list .work__item:nth-child(2n + 1),
  body.work-section-visible .work__list .work__item:nth-child(2n + 2) {
    transition-delay: 0s; /* 2列用をリセット */
  }
  /* 1列なので 0.1s ずつ遅延 */
  body.work-section-visible .work__list .work__item:nth-child(1) {
    transition-delay: 0.5s;
  }
  body.work-section-visible .work__list .work__item:nth-child(2) {
    transition-delay: 0.6s;
  }
  body.work-section-visible .work__list .work__item:nth-child(3) {
    transition-delay: 0.7s;
  }
  /* ... (必要なら増やす) ... */
}

/* =======================================================
   Simple Modal (BEM: .work-modal)
======================================================= */
/* (Modal styles remain the same) */
.work-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 2000;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  cursor: pointer;
}

.work-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.work-modal__content {
  cursor: default;
  text-align: center;
  max-width: 90%;
  max-height: 90vh;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-modal.is-open .work-modal__content {
  transform: scale(1);
  opacity: 1;
}

.work-modal__image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.work-modal__title {
  font-family: "Pirata One", cursive;
  font-size: 2rem;
  color: #fff;
  line-height: 1.3;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

.work-modal__close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #444;
  color: #fff;
  border-radius: 50%;
  font-size: 24px;
  line-height: 38px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}
.work-modal__close-button:hover {
  background: #fff;
  color: #000;
  transform: rotate(90deg);
}

/* =======================================================
   ★★★ Work Welcome 演出 (スクロールスナップ版) ★★★
======================================================= */

/* -------------------------------------------------------
   ★ スクロールスナップ設定 ★
------------------------------------------------------- */
/* html要素をスクロールコンテナにする */
/*
html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth; 
}
*/

/* ★ 追加: Workページでのみ body をスナップコンテナにする */
body.work-page-active {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

/* -------------------------------------------------------
   ★ ウェルカム演出用 基本スタイル ★
------------------------------------------------------- */

/* フェードインするウェルカムテキストの基本アニメーション */
@keyframes textFadeIn {
  /* (一瞬点滅する挙動の修正) */
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ウェルカムスクリーンのコンテナ */
.work-welcome {
  height: 100vh;
  width: 100%;
  /* ★ 修正: 'fixed' を解除 */
  /* position: fixed; */

  /* ★ 追加: スナップの対象にする */
  scroll-snap-align: start;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #0a0a0a;
  z-index: 100; /* ヘッダーよりは下 */

  /* ★ 追加: コンテンツがはみ出た場合に備える */
  overflow: hidden;
}

/* ウェルカムテキスト (h1) */
.work-welcome__title {
  font-family: "Pirata One", cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  color: #fff;
  text-align: center;
  line-height: 1.1;
  margin: 0;
  opacity: 0; /* JSで .is-ready が付くまで非表示 */
  z-index: 102;
}
.work-welcome__title span {
  display: block;
}
.work-welcome__title span.line-1 {
  font-size: 0.8em; /* "welcome" を少し小さく */
}

/* スクロールを促す矢印 (基本コンテナ) */
.work-welcome__scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0; /* JSで .is-ready が付くまで非表示 */
  z-index: 102;
}

/* スクロール後のコンテンツ本体 */
.work-content {
  position: relative;
  z-index: 1;
  /* ★ 修正: 'margin-top: 100vh' を解除 */
  /* margin-top: 100vh; */

  /* ★ 追加: スナップの対象にする */
  scroll-snap-align: start;

  /* ★ 追加: .work セクションが 100vh 未満でも高さを確保 */
  min-height: 100vh;
}

/* -------------------------------------------------------
   ★ 演出デザイン 2: Parallax (削除) ★
   (スクロールスナップ方式に変更したため、関連スタイルを削除)
------------------------------------------------------- */

/* -------------------------------------------------------
   ★ 矢印デザイン 10: Text "SCROLL" ★
------------------------------------------------------- */
@keyframes arrow-fade {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.work-welcome__scroll-down {
  width: 100px; /* テキスト用に幅を広げる */
  height: auto;
  text-align: center;
}
.work-welcome__scroll-down::before {
  content: "SCROLL";
  font-family: "Pirata One", cursive;
  font-size: 1.5rem; /* 24px */
  color: #fff;
  letter-spacing: 0.1em;
  opacity: 0; /* ★ JSで .is-ready がつくまでは透明 */
}

/* -------------------------------------------------------
   ★ JS制御クラス ★
------------------------------------------------------- */
/* JSが .is-ready を body に追加するとテキストがフェードイン */
body.is-ready .work-welcome__title {
  animation: textFadeIn 1.5s ease 0.2s forwards;
  /* (一瞬点滅する挙動の修正済み) */
}
body.is-ready .work-welcome__scroll-down {
  opacity: 1;
  /* ★ 修正: 0.5s に短縮 */
  transition: opacity 0.8s ease 0.5s;
}
body.is-ready .work-welcome__scroll-down::before {
  animation: arrow-fade 2s infinite ease-in-out;
  /* ★ 修正: アニメーションの開始も親の transition delay と合わせる (0.5s に短縮) */
  animation-delay: 0.5s;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* -------------------------------------------------------
   ★ ウェルカム演出用 基本スタイル ★
------------------------------------------------------- */

/* フェードインするウェルカムテキストの基本アニメーション */
@keyframes textFadeIn {
  /* (一瞬点滅する挙動の修正) */
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ウェルカムスクリーンのコンテナ */
.work-welcome {
  height: 100vh;
  width: 100%;
  /* ★ 修正: 'fixed' を解除 */
  /* position: fixed; */

  /* ★ 追加: スナップの対象にする */
  scroll-snap-align: start;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #0a0a0a;
  z-index: 100; /* ヘッダーよりは下 */

  /* ★ 追加: コンテンツがはみ出た場合に備える */
  overflow: hidden;
}

/* ウェルカムテキスト (h1) */
.work-welcome__title {
  font-family: "Pirata One", cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  color: #fff;
  text-align: center;
  line-height: 1.1;
  margin: 0;
  opacity: 0; /* JSで .is-ready が付くまで非表示 */
  z-index: 102;
}
.work-welcome__title span {
  display: block;
}
.work-welcome__title span.line-1 {
  font-size: 0.8em; /* "welcome" を少し小さく */
}

/* スクロールを促す矢印 (基本コンテナ) */
.work-welcome__scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0; /* JSで .is-ready が付くまで非表示 */
  z-index: 102;
}

/* スクロール後のコンテンツ本体 */
.work-content {
  position: relative;
  z-index: 1;
  /* ★ 修正: 'margin-top: 100vh' を解除 */
  /* margin-top: 100vh; */

  /* ★ 追加: スナップの対象にする */
  scroll-snap-align: start;

  /* ★ 追加: .work セクションが 100vh 未満でも高さを確保 */
  min-height: 100vh;
}

/* -------------------------------------------------------
   ★ 演出デザイン 2: Parallax (削除) ★
   (スクロールスナップ方式に変更したため、関連スタイルを削除)
------------------------------------------------------- */

/* -------------------------------------------------------
   ★ 矢印デザイン 10: Text "SCROLL" ★
------------------------------------------------------- */
@keyframes arrow-fade {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.work-welcome__scroll-down {
  width: 100px; /* テキスト用に幅を広げる */
  height: auto;
  text-align: center;
}
.work-welcome__scroll-down::before {
  content: "SCROLL";
  font-family: "Pirata One", cursive;
  font-size: 1.5rem; /* 24px */
  color: #fff;
  letter-spacing: 0.1em;
  opacity: 0; /* ★ JSで .is-ready がつくまでは透明 */
}

/* -------------------------------------------------------
   ★ JS制御クラス ★
------------------------------------------------------- */
/* JSが .is-ready を body に追加するとテキストがフェードイン */
body.is-ready .work-welcome__title {
  animation: textFadeIn 1.5s ease 0.2s forwards;
  /* (一瞬点滅する挙動の修正済み) */
}
body.is-ready .work-welcome__scroll-down {
  opacity: 1;
  /* ★ 修正: 0.5s に短縮 */
  transition: opacity 0.8s ease 0.5s;
}
body.is-ready .work-welcome__scroll-down::before {
  animation: arrow-fade 2s infinite ease-in-out;
  /* ★ 修正: アニメーションの開始も親の transition delay と合わせる (0.5s に短縮) */
  animation-delay: 0.5s;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* -------------------------------------------------------
   ★ ウェルカム演出用 基本スタイル ★
------------------------------------------------------- */

/* フェードインするウェルカムテキストの基本アニメーション */
@keyframes textFadeIn {
  /* (一瞬点滅する挙動の修正) */
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ウェルカムスクリーンのコンテナ */
.work-welcome {
  height: 100vh;
  width: 100%;
  /* ★ 修正: 'fixed' を解除 */
  /* position: fixed; */

  /* ★ 追加: スナップの対象にする */
  scroll-snap-align: start;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #0a0a0a;
  z-index: 100; /* ヘッダーよりは下 */

  /* ★ 追加: コンテンツがはみ出た場合に備える */
  overflow: hidden;
}

/* ウェルカムテキスト (h1) */
.work-welcome__title {
  font-family: "Pirata One", cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  color: #fff;
  text-align: center;
  line-height: 1.1;
  margin: 0;
  opacity: 0; /* JSで .is-ready が付くまで非表示 */
  z-index: 102;
}
.work-welcome__title span {
  display: block;
}
.work-welcome__title span.line-1 {
  font-size: 0.8em; /* "welcome" を少し小さく */
}

/* スクロールを促す矢印 (基本コンテナ) */
.work-welcome__scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0; /* JSで .is-ready が付くまで非表示 */
  z-index: 102;
}

/* スクロール後のコンテンツ本体 */
.work-content {
  position: relative;
  z-index: 1;
  /* ★ 修正: 'margin-top: 100vh' を解除 */
  /* margin-top: 100vh; */

  /* ★ 追加: スナップの対象にする */
  scroll-snap-align: start;

  /* ★ 追加: .work セクションが 100vh 未満でも高さを確保 */
  min-height: 100vh;
}

/* -------------------------------------------------------
   ★ 演出デザイン 2: Parallax (削除) ★
   (スクロールスナップ方式に変更したため、関連スタイルを削除)
------------------------------------------------------- */

/* -------------------------------------------------------
   ★ 矢印デザイン 10: Text "SCROLL" ★
------------------------------------------------------- */
@keyframes arrow-fade {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.work-welcome__scroll-down {
  width: 100px; /* テキスト用に幅を広げる */
  height: auto;
  text-align: center;
}
.work-welcome__scroll-down::before {
  content: "SCROLL";
  font-family: "Pirata One", cursive;
  font-size: 1.5rem; /* 24px */
  color: #fff;
  letter-spacing: 0.1em;
  opacity: 0; /* ★ JSで .is-ready がつくまでは透明 */
}

/* -------------------------------------------------------
   ★ JS制御クラス ★
------------------------------------------------------- */
/* JSが .is-ready を body に追加するとテキストがフェードイン */
body.is-ready .work-welcome__title {
  animation: textFadeIn 1.5s ease 0.2s forwards;
  /* (一瞬点滅する挙動の修正済み) */
}
body.is-ready .work-welcome__scroll-down {
  opacity: 1;
  /* ★ 修正: 0.5s に短縮 */
  transition: opacity 0.8s ease 0.5s;
}
body.is-ready .work-welcome__scroll-down::before {
  animation: arrow-fade 2s infinite ease-in-out;
  /* ★ 修正: アニメーションの開始も親の transition delay と合わせる (0.5s に短縮) */
  animation-delay: 0.5s;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* =======================================================
   Contact Form Styles (アイデア1) - 修正版
======================================================= */

.contact {
  background-color: #0a0a0a;
  color: #fff;
  /* 上下の余白 (Workセクションに合わせる) */
  padding: 120px 5vw;
  /* 画面いっぱいに広げる設定 */
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* スマホ用の余白調整 */
@media (max-width: 768px) {
  .contact {
    padding-top: 80px;
  }
}

.contact__container {
  max-width: 1000px; /* フォームが見やすい幅に設定 */
  margin: 0 auto;
}

/* タイトルのスタイル */
.contact__title {
  font-family: "Pirata One", cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  text-align: center;
  line-height: 1;
  margin: 0 0 60px 0;
  color: #fff;

  /* ★重要: Workと違い、最初から表示状態にする (opacity: 1) */
  opacity: 1;
  transform: translateY(0);
}

/* フォームラッパーの基本スタイル (共通) */
.contact-form-wrapper {
  max-width: 800px;
  margin: 40px auto 80px auto;
  padding: 40px;
  border-radius: 8px;
  font-family: "Inter", sans-serif; /* フォーム入力は読みやすく */
  position: relative;
  overflow: hidden;
  border: 1px solid #222; /* 境界線 */
}

/* ★修正: フォーム全体は中央揃え（ボタンのため） */
.contact-form-wrapper form {
  text-align: center;
}

/* MW WP Form の出力を想定した共通スタイル (共通) */
.contact-form-wrapper .mw-form-item {
  margin-bottom: 25px;
  /* ★修正: ラベルと入力欄の親要素は左揃えに戻す */
  text-align: left;
}
.contact-form-wrapper .mw-form-item label {
  display: block;
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 8px;
  font-weight: 500;
  /* アイデア1はシンプルなフォントを使用 */
  font-family: "Inter", sans-serif;
}
.contact-form-wrapper .mw-form-item input[type="text"],
.contact-form-wrapper .mw-form-item input[type="email"],
.contact-form-wrapper .mw-form-item textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 1rem;
  color: #fff;
  background-color: #1a1a1a;
  border: 1px solid #333;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form-wrapper .mw-form-item input[type="text"]:focus,
.contact-form-wrapper .mw-form-item input[type="email"]:focus,
.contact-form-wrapper .mw-form-item textarea:focus {
  outline: none;
  border-color: rgba(120, 0, 255, 0.7); /* オーブの色 */
  box-shadow: 0 0 10px rgba(120, 0, 255, 0.5);
}
.contact-form-wrapper .mw-form-item textarea {
  min-height: 150px;
  resize: vertical;
}

/* 送信ボタンの共通スタイル (workのMOREボタン風)
  (ラッパーなしボタンにも対応済み) 
*/
/* ★修正: ボタンの親要素の中央揃え指定を削除 */
.contact-form-wrapper .mw-form-submit,
.contact-form-wrapper .mw-form-item-submit,
.contact-form-wrapper .mw-form-item-submit-button {
  margin-top: 30px;
}
.contact-form-wrapper .mw-form-submit button,
.contact-form-wrapper .mw-form-item-submit input[type="submit"],
.contact-form-wrapper .mw-form-item-submit-button input[type="submit"],
.contact-form-wrapper form input[type="submit"] {
  font-family: "Pirata One", cursive;
  font-size: 1.8rem;
  color: #fff;
  background-color: transparent;
  border: 2px solid #555;
  border-radius: 50px;
  padding: 10px 60px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.1em;
  -webkit-appearance: none;
  width: auto;
  display: inline-block;
}
.contact-form-wrapper .mw-form-submit button:hover,
.contact-form-wrapper .mw-form-item-submit input[type="submit"]:hover,
.contact-form-wrapper .mw-form-item-submit-button input[type="submit"]:hover,
.contact-form-wrapper form input[type="submit"]:hover {
  background-color: #fff;
  border-color: #fff;
  color: #0a0a0a;
  transform: scale(1.05);
}

/* --- 1: ミニマル・ライン --- */
.contact-form-wrapper.style-1 {
  background: #0a0a0a;
  border-color: #0a0a0a;
  padding-left: 20px;
  padding-right: 20px;
}

/* アイデア1の入力欄 */
.contact-form-wrapper.style-1 .mw-form-item input[type="text"],
.contact-form-wrapper.style-1 .mw-form-item input[type="email"],
.contact-form-wrapper.style-1 .mw-form-item textarea {
  background-color: transparent;
  border: none;
  border-bottom: 2px solid #333;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}
.contact-form-wrapper.style-1 .mw-form-item input[type="text"]:focus,
.contact-form-wrapper.style-1 .mw-form-item input[type="email"]:focus,
.contact-form-wrapper.style-1 .mw-form-item textarea:focus {
  border-bottom-color: rgba(120, 0, 255, 1);
  box-shadow: none;
}

/* =======================================================
   Contact Form - Completion Message (送信完了メッセージ)
======================================================= */
.contact-form-wrapper .mw-form-completion {
  padding: 40px 20px;
  text-align: center;
  color: #ccc;
  font-family: "Inter", sans-serif;
  line-height: 1.8;
  font-size: 1.1rem;
}

.contact-form-wrapper .mw-form-completion p {
  margin: 0;
}

/* =======================================================
   ★★★ About Section ★★★
======================================================= */

/* ★★★ 変更: 浮遊アニメーション (bobbing) ★★★ */
@keyframes bobbing {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-35px); /* ★変更: 25pxから35pxに (さらに大きく) */
  }
  100% {
    transform: translateY(0);
  }
}

.about {
  background-color: #0a0a0a;
  color: #fff; /* ★修正: 色を直接指定 */
  padding: 120px 5vw;
  min-height: calc(100vh - 55px);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .about {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

.about__container {
  max-width: 1200px;
  margin: 0 auto;
}

.about__title {
  font-family: "Pirata One", cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  text-align: center;
  line-height: 1;
  margin: 0 0 60px 0;
  color: #fff; /* ★修正: 色を直接指定 */
  visibility: hidden; /* JSでのアニメーション準備用 */
}

/* 共通サブ見出し (Career用) */
.about__sub-title {
  font-family: "Pirata One", cursive;
  font-size: 2.5rem;
  color: #fff; /* ★修正: 色を直接指定 */
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #555;
  display: inline-block;
}
@media (max-width: 768px) {
  .about__sub-title {
    font-size: 2rem;
  }
}

/* 2カラムレイアウト (Grid) */
.about__details {
  display: grid;
  grid-template-columns: 4fr 6fr;
  gap: 60px;
  margin-top: 60px;
  align-items: flex-start;
}

/* プロフィール画像 */
.about__profile-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 8px;

  /* ★修正: 枠線と背景色を削除 */
  border: none;
  background-color: transparent;

  /* ★★★ 変更: 浮遊アニメーションを適用 (3sから2sに) ★★★ */
  animation: bobbing 2s ease-in-out infinite;
}

/* 自己紹介文 */
.about__profile-bio {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #ccc; /* ★修正: 色を直接指定 */
  margin-bottom: 40px;
}
.about__profile-bio p {
  margin-bottom: 1em;
}

/* サイン */
.about__signature {
  font-family: "Pirata One", cursive;
  font-size: 3.5rem;
  color: #fff; /* ★修正: 色を直接指定 */
  text-align: right;
  margin-bottom: 50px;
}

/* 経歴リスト */
.about__career-list {
  list-style: none;
  padding: 0;
  font-size: 1rem;
  color: #ddd; /* ★修正: 色を直接指定 */
}
.about__career-list li {
  display: flex;
  margin-bottom: 15px;
}
.about__career-list li strong {
  font-weight: 500;
  color: #ccc; /* ★修正: 色を直接指定 */
  margin-right: 20px;
  flex-shrink: 0;
  width: 80px;
}

/* レスポンシブ (900px以下で1カラム) */
@media (max-width: 900px) {
  .about__details {
    grid-template-columns: 1fr; /* 1カラムに変更 */
  }
  .about__profile-image {
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
  }
  .about__column-right {
    margin-top: 40px;
  }
}

/* =======================================================
   ★★★ Footer Section★★★
======================================================= */
.site-footer {
  background-color: #0a0a0a;
  color: #fff;
  padding: 60px 5vw;
  text-align: center;
  border-top: 1px solid #222; /* 境界線 */
  margin-top: auto; /* コンテンツが少ない場合でも最下部に配置されるように */
  position: relative;
  z-index: 10; /* コンテンツより前面に */
}

.site-footer__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* SNS Link (Instagram) */
.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: transform 0.3s ease, color 0.3s ease;
}

/* アイコンのサイズ調整 */
.site-footer__social-link svg {
  width: 32px;
  height: 32px;
}

/* ホバー時のエフェクト (Instagramカラーに変更) */
.site-footer__social-link:hover {
  /* インスタグラムらしいピンク色 (#E1306C) に変更 */
  color: #e1306c;
  transform: scale(1.1);
}

/* Copyright */
.site-footer__copyright {
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  color: #666;
  letter-spacing: 0.05em;
}
