.preload * {
  transition: none !important;
  animation: none !important;
}

/* ブラウザのデフォルト余白をリセット */
body {
  margin: 0;
  padding: 0;
}

/* ヘッダー全体のスタイル */
.site-header {
  width: 100%;
  height: 60px;
  background-color: #000021;
  border: 2px solid #FFFFFF;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 1. ロゴ */
.logo {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  /* 高さを厳密に中央揃えにするための記述 */
  width: 80px;
  height: 40px;
}

/* 2. メニュー類 */
.global-nav ul {
  list-style: none;
  /* デフォルトの・を消す */
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(10px, 8vw, 120px);
}

.global-nav a {
  text-decoration: none;
  color: #FFFFFF;
  /* 背景が濃紺なので文字は白に */
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  /* Bold */
  font-size: 24pt;
  line-height: 1;
  transition: color .5s;
}

.global-nav a:hover {
  color: #FFFF7D;
}

#btn.hamburger {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 100;
  /* メニューが開いた時に一番上にくるように設定 */
}

#btn.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #FFFFFF;
}

#btn.hamburger span:nth-of-type(1) {
  top: 0;
}

#btn.hamburger span:nth-of-type(2) {
  top: 50%;
  transform: translateY(-50%);
}

#btn.hamburger span:nth-of-type(3) {
  bottom: 0;
}

/* 閉じる時（バツから三本線に戻る動き） */
#btn.close span:nth-of-type(1) {
  animation: btn-bar01 .45s forwards;
}

@keyframes btn-bar01 {
  0% {
    transform: translateY(9px) rotate(45deg);
  }

  50% {
    transform: translateY(9px) rotate(0);
  }

  100% {
    transform: translateY(0) rotate(0);
  }
}

#btn.close span:nth-of-type(2) {
  transition: all .15s .15s;
  opacity: 1;
}

#btn.close span:nth-of-type(3) {
  animation: btn-bar03 .45s forwards;
}

@keyframes btn-bar03 {
  0% {
    transform: translateY(-10px) rotate(-45deg);
  }

  50% {
    transform: translateY(-10px) rotate(0);
  }

  100% {
    transform: translateY(0) rotate(0);
  }
}

/* 開く時（三本線からバツになる動き） */
#btn.active span:nth-of-type(1) {
  animation: active-btn-bar01 .45s forwards;
}

@keyframes active-btn-bar01 {
  0% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(9px) rotate(0);
  }

  100% {
    transform: translateY(9px) rotate(45deg);
  }
}

#btn.active span:nth-of-type(2) {
  opacity: 0;
}

#btn.active span:nth-of-type(3) {
  animation: active-btn-bar03 .45s forwards;
}

@keyframes active-btn-bar03 {
  0% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-10px) rotate(0);
  }

  100% {
    transform: translateY(-10px) rotate(-45deg);
  }
}

#glitch-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* =======================================
   メインビジュアルエリア
======================================= */
.main-visual {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background-color: #000021;
  /* 動画読み込み前やエラー時の背景色 */
  border: 2px solid #FFFFFF;
}

.main-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =======================================
   ABOUTエリア
======================================= */
.about {
  width: 100%;
  min-height: 56.25vw;
  /* 16:9 の比率を最低高さとして維持 */
  height: auto;
  /* 中身が増えたら自動で伸びる */
  display: flex;
  background-color: #000021;
  position: relative;
}

.about-block1 {
  width: 50%;
  box-sizing: border-box;
  border: 2px solid #FFFFFF;
  display: block;
  overflow: hidden;
}

.canvas-wrapper {
  width: 100%;
  aspect-ratio: 8 / 9;
  /* 絶対に元の比率を保つ */
  position: relative;
  /* キャンバスを絶対配置するための基準にする */
}

#canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  /* キャンバス自体の実寸大が親の縮小を邪魔しないようにする */
  top: 0;
  left: 0;
}

.about-block2 {
  width: 50%;
  box-sizing: border-box;
  border: 2px solid #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0 8vw;
}

.about-content {
  width: 100%;
  margin-top: 12vw;
  margin-bottom: 8vw;
}


/* =======================================
  プロフィールタイトルの書式
======================================= */
.profile {
  color: #ffffff;
}

.profile-name {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
}

.profile-exp {
  font-size: 1.5rem;
  font-weight: lighter;
  margin: 0;
}

/* =======================================
   Q&A のホバー展開アニメーション
======================================= */
.qa-item {
  color: #FFFFFF;
  cursor: pointer;
  width: 100%;
  margin-top: 4vw;
  margin-bottom: 4vw;
}

/* 太字（ホバーする対象） */
.qa-question {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
  transition: color 0.3s ease;
}

/* ホバー時に太字の色を少し変える */
.qa-item:hover .qa-question {
  color: #FFFF7D;
}

/* 答えのラッパー（通常時は高さを0にして隠す） */
/* モダンなCSS Gridを使った高さアニメーション手法 */
.qa-answer-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease-out;
}

/* ホバー時に高さを内容に合わせて広げる */
.qa-item:hover .qa-answer-wrapper {
  grid-template-rows: 1fr;
}

/* アンサー全体 */
.qa-answer {
  overflow: hidden;
  margin: 0;
  padding-top: 0;
  font-weight: normal;
  line-height: 1.6;
  opacity: 0;
  color: rgba(255, 255, 255, 0.8);
  transition: opacity 0.3s ease-out, padding-top 0.3s ease-out;
}

/* ホバー時に不透明度と余白をつける */
.qa-item:hover .qa-answer {
  opacity: 1;
  padding-top: 15px;
}

/* 展開される回答のタイトルとテキストの調整 */
.qa-answer-title {
  margin: 0 0 10px 0;
  /* 下に少し余白を開ける */
  font-size: 1.5rem;
  font-weight: bold;
  color: #FFFFFF;
  /* タイトルは少し目立たせるため真っ白に */
}

.qa-answer-text {
  margin: 0;
  font-size: 1.2rem;
}

.about-title {
  font-family: 'Oswald', sans-serif;
  font-size: 12vw;
  color: #FFFFFF;
  text-align: left;
  position: absolute;
  margin: 0;
  top: 0px;
  transform: translateY(-64%);
  left: 20px;
  z-index: 10;
  font-weight: bold;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.about-title-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 20;
}

/* 汎用フェードイン用のクラス（左から右への動き） */
.fadein-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.fadein-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* =======================================
   WORKSエリア
======================================= */
.spacer {
  width: 100%;
  height: 16vw;
  background-color: #000021;
  border: 2px solid #FFFFFF;
}

.works {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: #000021;
  position: relative;
}

.works-row {
  display: flex;
  width: 100%;
}

.works-title {
  font-family: 'Oswald', sans-serif;
  font-size: 12vw;
  color: #FFFFFF;
  text-align: left;
  position: absolute;
  margin: 0;
  top: 0px;
  transform: translateY(-64%);
  left: 20px;
  z-index: 10;
  font-weight: bold;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.works-title-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 20;
}

.work-item {
  width: 50vw;
  height: 50vw;
  /* 横幅と同じ値を高さにして完全な正方形にする */
  box-sizing: border-box;
  border: 2px solid #FFFFFF;
  display: flex;
  flex-direction: column;
  /* サムネイルと情報を縦に並べる */
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

/* ホバー時にオーバーラップする半透明の白い四角 */
.work-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.work-item:hover::after {
  opacity: 1;
}

.work-item.small {
  width: calc(100vw / 3);
  height: calc(100vw / 3);
}

.work-item.small .work-info {
  padding: 2.5vw;
}

.work-item.small .work-title {
  font-size: 1.8vw;
}

/* =======================================
   CONTACT / FOOTERエリア
======================================= */
.site-footer {
  width: 100%;
  background-color: #000021;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 10vw;
  /* タイトルとのバランスをとるための余白 */
  border: 2px solid #FFFFFF;
  box-sizing: border-box;
}

.contact-title {
  font-family: 'Oswald', sans-serif;
  font-size: 12vw;
  color: #FFFFFF;
  text-align: left;
  position: absolute;
  margin: 0;
  top: 0px;
  transform: translateY(-64%);
  left: 20px;
  z-index: 10;
  font-weight: bold;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.contact-title-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 20;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8vw 4vw 6vw;
  color: #FFFFFF;
  text-align: center;
}

.contact-info p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.8);
}

.contact-email {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  color: #FFFF7D;
  text-decoration: none;
  display: block;
  margin-bottom: 4rem;
  transition: color 0.3s;
}

.contact-email:hover {
  color: #FFFFFF;
}

.sns-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.sns-links a {
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.sns-links a:hover {
  color: #FFFF7D;
}

.footer-bottom {
  border-top: 2px solid #FFFFFF;
  padding: 2vw;
  text-align: center;
}

.copyright {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
}

.work-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  /* サムネイルは16:9で上部に固定 */
  border-bottom: 2px solid #FFFFFF;
  background-color: #111;
  /* 画像がない場合の仮背景 */
  flex-shrink: 0;
  /* 縮まないようにする */
  overflow: hidden;
}

.work-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 画像の比率を保ちながら枠を埋める */
  display: block;
}

.work-info {
  flex-grow: 1;
  /* 正方形の余ったスペースをすべて埋める */
  padding: 3vw;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* 情報を上下中央に配置 */
}

.work-category {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2vw;
  color: #FFFF7D;
  margin: 0 0 1vw 0;
  letter-spacing: 0.1em;
}

.work-title {
  font-size: 2.5vw;
  font-weight: bold;
  margin: 0 0 1vw 0;
}

.work-desc {
  font-size: 1vw;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 2vw 0;
}

.work-date {
  font-family: 'Oswald', sans-serif;
  font-size: 1vw;
  color: rgba(255, 255, 255, 0.5);
  margin-top: auto;
  /* 余白があれば下に押しやる */
}

/* =======================================
   スマホ・タブレット用（画面幅768px以下）
======================================= */
@media screen and (max-width: 768px) {

  /* メニュー全体を画面いっぱいのオーバーレイ（前面の層）にする */
  .global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 33, 0.95);
    z-index: 90;
    /* ハンバーガー(100)より下に配置して、ボタンを押せるようにする */

    /* 初期状態は透明にして隠す */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;

    /* 中のリストを中央に配置するためのFlexbox */
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* JSで「open」クラスが付いた時にメニューを表示する */
  .global-nav.open {
    opacity: 1;
    visibility: visible;
  }

  /* リストの並びを縦にする */
  .global-nav ul {
    flex-direction: column;
    /* 縦並びに変更 */
    align-items: center;
    gap: 40px;
    /* 縦の間隔 */
  }
}

/* =======================================
   PC用（画面幅769px以上）
======================================= */
@media screen and (min-width: 769px) {

  /* PCの時はハンバーガーボタンを非表示にする */
  #btn {
    display: none;
  }
}

/* =======================================
   WORKS DETAIL (1枚ペラページ)
======================================= */
.work-detail-body {
  margin: 0;
  padding: 0;
  background-color: #000021;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  /* スクロールなし */
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  /* 全体の枠線 */
  border: 2px solid #FFFFFF;
  transition: all 0.4s ease-in-out;
}

.work-detail-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.work-detail-left {
  width: 50%;
  height: 100%;
  border-right: 2px solid #FFFFFF;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* 子要素(アスペクト比固定の箱)を左右中央に配置 */
  padding: 6vw;
  box-sizing: border-box;
}

/* 幾何学的な装飾 */
.work-detail-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* 左上の黄色いアクセント三角 */
.work-detail-decor::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-top: 70px solid #FFFF7D;
  border-right: 360px solid transparent;
}

/* 右下の白い四角いアウトライン */
.work-detail-decor::after {
  content: "";
  position: absolute;
  bottom: 0px;
  right: -50px;
  width: 250px;
  height: 250px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
}

.work-detail-content {
  position: relative;
  z-index: 10;
  color: #FFFFFF;

  /* 箱（文字情報の塊）のアスペクト比を固定 */
  aspect-ratio: 1.1 / 1;
  /* 親の中で最大まで広がるが、上下の壁(100vh -上下padding 12vw)にぶつかったら幅をそれに合わせて縮める */
  width: 100%;
  max-width: calc((100vh - 12vw) * 1.1);
  max-height: 100%;

  /* コンテナクエリを定義 (自身の幅が基準になる) */
  container-type: inline-size;

  /* 内部要素を中央に配置 */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.work-detail-content .work-category {
  font-family: 'Oswald', sans-serif;
  font-size: 4cqw;
  color: #FFFF7D;
  margin: 0 0 2.6cqw 0;
  letter-spacing: 0.1em;
}

.work-detail-title {
  font-size: 9cqw;
  font-weight: bold;
  margin: 0 0 7.8cqw 0;
  line-height: 1.3;
}

.work-detail-info {
  font-size: 3cqw;
  line-height: 1.8;
  margin-bottom: 3.9cqw;
  color: rgba(255, 255, 255, 0.8);
}

.work-detail-info p {
  margin: 0 0 1.3cqw 0;
}

.work-detail-info strong {
  color: #FFFFFF;
  font-family: 'Oswald', sans-serif;
  display: inline-block;
  width: 16cqw;
  margin-right: 2.6cqw;
  font-size: 3.4cqw;
}

.work-detail-desc {
  margin-top: 5.2cqw !important;
  padding-top: 5.2cqw;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.work-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7.8cqw;
}

.btn-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.6cqw 7.8cqw;
  background-color: #FFFF7D;
  color: #000021;
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-size: 3.9cqw;
  font-weight: bold;
  transition: all 0.3s ease;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  /* 幾何学的な斜めボタン */
}

.btn-primary:hover {
  background-color: #FFFFFF;
  transform: scale(1.05);
}

.btn-back {
  display: inline-block;
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-size: 3.4cqw;
  transition: color 0.3s ease;
  border-bottom: 2px solid transparent;
}

.btn-back:hover {
  color: #FFFF7D;
  border-bottom: 2px solid #FFFF7D;
}

.work-detail-right {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: #000021;
}

.work-detail-right video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* スマホ用レスポンシブ (画面幅768px以下) */
@media screen and (max-width: 768px) {
  .work-detail-body {
    height: auto;
    overflow: visible;
    border: none;
  }

  .work-detail-wrapper {
    flex-direction: column-reverse;
    /* 動画を上、情報を下にする場合は column, 逆なら column-reverse */
  }

  .work-detail-left,
  .work-detail-right {
    width: 100%;
    height: auto;
    border-right: none;
  }

  .work-detail-left {
    min-height: 100vh;
    padding: 10vw 6vw;
  }

  .work-detail-right {
    height: 60vh;
    border-bottom: 2px solid #FFFFFF;
  }

  .work-detail-content .work-category {
    font-size: 4vw;
  }

  .work-detail-title {
    font-size: 8vw;
  }

  .work-detail-info {
    font-size: 3.5vw;
  }

  .work-detail-info strong {
    width: 15vw;
    font-size: 4vw;
  }

  .btn-primary {
    font-size: 5vw;
    padding: 3vw 8vw;
  }

  .btn-back {
    font-size: 4vw;
  }
}

/* =======================================
   WORKS DETAIL 拡張機能 (PC版限定)
======================================= */
@media screen and (min-width: 769px) {
  .work-detail-left {
    transition: width 0.5s ease;
  }

  .work-detail-right {
    transition: width 0.5s ease;
    cursor: pointer;
    /* クリックできることを示す */
  }

  .work-detail-content,
  .work-detail-decor {
    transition: opacity 0.5s ease;
  }

  /* 拡大時のスタイル */
  .work-detail-body.is-expanded .work-detail-left {
    width: 10%;
    /* padding（左右6vw = 12vw）があると画面幅の10%未満に縮まないためゼロにする */
    padding: 0;
    overflow: hidden;
    /* 中身が縮小の邪魔をしないように隠す */
  }

  .work-detail-body.is-expanded .work-detail-right {
    width: 90%;
  }

  .work-detail-body.is-expanded .work-detail-content,
  .work-detail-body.is-expanded .work-detail-decor {
    opacity: 0;
    pointer-events: none;
    /* 透明になったらクリックできないようにする */
    visibility: hidden;
    /* コンテンツがレイアウトに影響しにくくする */
    transition: opacity 0.3s ease, visibility 0.3s;
  }

  /* 拡大縮小用のトグルボタン（デフォルトは左向き三角） */
  .work-detail-toggle {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 20px solid #FFFFFF;
    cursor: pointer;
    z-index: 50;
    transition: right 0.5s ease, transform 0.5s ease, border-color 0.3s ease;
  }

  .work-detail-toggle:hover {
    border-right-color: #FFFF7D;
  }

  /* 拡大時のトグルボタン（右向き三角） */
  .work-detail-body.is-expanded .work-detail-toggle {
    /* 親要素(work-detail-left)の横幅の中央に配置 */
    right: 50%;
    transform: translate(50%, -50%);
    /* 向きを右にする */
    border-right: none;
    border-left: 20px solid #FFFFFF;
  }

  .work-detail-body.is-expanded .work-detail-toggle:hover {
    border-left-color: #FFFF7D;
  }
}

/* スマホ用はトグルボタンを非表示にする */
@media screen and (max-width: 768px) {
  .work-detail-toggle {
    display: none;
  }
}