/* ============================================================
   style.css
   ============================================================ */
/* パソコンで見たときは"pc"のclassがついた画像が表示される */
.pc { display: block !important; }
.sp { display: none !important; }
 
/* スマートフォンで見たときは"sp"のclassがついた画像が表示される */
@media only screen and (max-width: 750px) {
    .pc { display: none !important; }
    .sp { display: block !important; }
}
/* ===== CSS変数 ===== */
:root {
  --center-w: 750px;
  /* --color-bg: #00b097; */
  --color-surface: #ffffff;
  --color-border: rgba(0, 0, 0, 0.09);
  --color-text: #1a1a18;
  --color-muted: #6b6b67;
  --font: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}

/* ===== ベース ===== */
html,
body {
  height: 100%;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== LAYOUT =====
   左右 fluid（左:右 = 6:4）、中央 750px 厳密固定
===== */
.layout {
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
}

/* ===== ヘッダーセクション ===== */
header {
  width: 100%;
  height: auto;
  background-color: #ffffff;

}

header img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  
}
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  line-height: 0; /* 画像下の余白消し */
}

.main-header img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== 左右サイドバー共通 ===== */
.sidebar-left,
.sidebar-right {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 20px;

  /* --- 背景画像設定エリア ---
  ---------------------------------------- */
  background-color: var(--color-surface);
  background-image: url('../images/parts/f_pcback.webp');
  /* デフォルトの背景画像（必要に応じて変更） */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.sidebar-left {
  justify-content: flex-start;
  padding-top: 0vh;
}

.sidebar-right {
  justify-content: flex-start;
  padding-top: 7%;
}


/* ★左右の比率を6:4に指定（左が広い分、中央750pxは右にずれる） */
.sidebar-left {
  flex: 1248 1 0;
  background: #efefef;
}

.sidebar-right {
  flex: 857 1 0;
  background: #efefef;
}

/* ===== 画像スロット ===== */
.img-slot {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top:10%;
  gap: 10px;
  z-index:6;
}

.img-slot svg {
  opacity: 0.35;
}

/* 実際の画像に差し替える場合:
*/
.img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
/* 左ゾーンの画像を少し大きく */
.sidebar-left .img-slot img {
  width: 100%;
  height: 100%;
}

/* 右ゾーンの画像を少し小さく */
.sidebar-right .img-slot {
  max-width: 345px;
}

/* ===== CENTER — 750px固定、スクロール ===== */
.main {
  /* ★751px以上は1248:1000:857の比率で可変（750px固定はやめる） */
  flex: 1000 1 0;
  width: auto;
  max-width: none;
  background: #fff;
  padding: 0;
  position: relative;
}

/* mainの高さに完全に連動する左右の罫線（サイドバーの箱の高さに依存しないので途中で切れない） */
.main::before,
.main::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
  z-index: 50;
}

.main::before {
  left: 0;
}

.main::after {
  right: 0;
}

/* gacha.html専用：main背景をグレーに */
.main-gacha {
  background: #efefef;
}

/* ===== コンテンツ ===== */
.main-vj {
  width: 100%;
  position: relative;
}

/* ★追加 */
.main-vj-inner {
  position: relative;
  width: 100%;
}

.main-vj h1 {
  width: 80%;
  margin-bottom: 5%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.vj-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.vj-row {
  z-index: 1;
}

.vj-mid {
  z-index: 2;
}

.vj-high {
  z-index: 3;
}

.vj-top {
  z-index: 4;
}

.vj-img {
  position: absolute;
}

.vj-obj01 {
  width: 37.8%;
  height: auto;
  top: -8%;
  left: -1%;
}

.vj-obj02 {
  width: 39.4%;
  height: auto;
  top: 3%;
  right: -2%;
}

.vj-obj03 {
  width: 41.4%;
  height: auto;
  top: 27%;
  left: -1%;
}

.vj-obj04 {
  width: 52.9%;
  height: auto;
  top: 27%;
  right: -17%;
}

.vj-obj05 {
  width: 50%;
  height: auto;
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
}

.vj-obj06 {
  width: 100%;
  height: auto;
  bottom: 0;
  left: 0;
}

.vj-obj07 {
  width: 10%;
  height: auto;
  top: 5%;
  right: 10%;
}


.main .lead {

  margin-bottom: 40px;
  font-size: 14px;
  padding: 0 40px;
}

.top-section {
  margin-bottom: 56px;
  padding: 0 40px;
  background-color: var(--color-surface);
}

.section a {
  display: block;
}

.block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 14px;
}

.block h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.block p {
  margin: 0;
  font-size: 13px;
}

/* ===== 涼感スタイルページ ===== */
.r-style {
  background-image: url('../images/f/f1_02.webp');
  background-size: contain;
  background-position: center center;
  background-color: #54c3f1;
}

.r-style .layered-vj {
  background-image: url('../images/f/f1_02.webp');
  background-size: cover;
  background-position: center center;
  background-color: #54c3f1;
}

/* ===== コーデスタイルページ ===== */
.code-style {
  background-image: url('../images/f/f3_02.webp');
  background-size: contain;
  background-position: center center;
  background-color: #f5a21b;
}

.code-style .layered-vj {
  background-image: url('../images/f/f3_02.webp');
  background-size: cover;
  background-position: center center;
}

/* ===== 夏旅ページ ===== */
.travel {
  background-image: url('../images/f/f5_02.webp');
  background-size: contain;
  background-position: center center;
  background-color: #f19ec2;
}

.travel .layered-vj {
  background-image: url('../images/f/f5_02.webp');
  background-size: cover;
  background-position: center center;
}

/* ===== 夏旅グッズページ ===== */
.goods {
  background-image: url('../images/f/f7_02.webp');
  background-size: contain;
  background-position: center center;
  background-color: #95d0c0;
}

.goods .layered-vj {
  background-image: url('../images/f/f7_02.webp');
  background-size: cover;
  background-position: center center;
}

/* ===== アニメーション定義 ===== */

/* キーフレーム */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

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

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }

  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }

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

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(28px);
  }

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

/* アニメーション前の初期状態（非表示） */
[data-anim] {
  opacity: 0;
}

/* 発火したら対応アニメーションを実行 */
[data-anim="fade-in"].animated {
  animation: fadeIn 0.7s ease forwards;
}

[data-anim="fade-up"].animated {
  animation: fadeUp 0.7s ease forwards;
}

[data-anim="fade-down"].animated {
  animation: fadeDown 0.6s ease forwards;
}

[data-anim="zoom-in"].animated {
  animation: zoomIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

[data-anim="slide-right"].animated {
  animation: slideRight 0.65s ease forwards;
}

[data-anim="slide-left"].animated {
  animation: slideLeft 0.65s ease forwards;
}


/* ===== 右から左へ現れるアニメーション（単独使用・ラッパー不要） =====
========================================================== */
[data-anim="reveal-right"] {
  opacity: 1;
  clip-path: inset(0 0 0 100%);
  transition: clip-path 500ms linear;
}

[data-anim="reveal-right"].animated {
  clip-path: inset(0 0 0 0%);
}

/* reveal-right の時間差（clip-pathはtransitionで動くため、
   既存のdata-delay（animation-delay用）とは別にtransition-delayで指定） */
[data-anim="reveal-right"][data-delay="1"] {
  transition-delay: 0.15s;
}

[data-anim="reveal-right"][data-delay="2"] {
  transition-delay: 0.3s;
}

[data-anim="reveal-right"][data-delay="3"] {
  transition-delay: 0.45s;
}

/* ===== メインビジュアル：背景 + 人物3分割 + タイトル ===== */
.vj-bg {
  display: block;
  width: 100%;
  height: auto;
  z-index: 1;
}

.vj-humans {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 2;
}

.vj-human {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vj-human img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  /* 上に少し持ち上げつつ、わずかに拡大（数値はお好みで調整） */
  transform: translateY(-15%) scale(1.1);
}

.vj-title {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  max-width: 70%;
  height: auto;
}

/* タイトルは人物画像(human3)が出そろってから最後にフェードイン */
.vj-title[data-anim="fade-in"].animated {
  animation: fadeIn 0.7s ease forwards;
  animation-delay: 1s;
}

/* ===== カテゴリセクション（背景 + parts3 + mainparts1〜3） ===== */
.category-section {
  width: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.category-section img {
  display: block;
  width: 100%;
  height: auto;
}

.category-section a {
  display: block;
}

/* gacha.html専用：背景は上固定、最初の画像だけ少し下にずらす */
.gacha-section {
  background-position: top center;
  background-size: 100% auto; /* 高さの変化に連動して拡大・クロップされないよう、幅基準の等倍表示に */
  overflow: hidden; /* 子のmargin-topが親(背景)ごと押し下げるmargin collapseを防ぐ */
}

.gacha-section > img:first-child {
    margin-top: 50%;
}

.gacha-sectionss {
  background-position: top center;
  background-size: 100% auto; /* 高さの変化に連動して拡大・クロップされないよう、幅基準の等倍表示に */
  overflow: hidden; /* 子のmargin-topが親(背景)ごと押し下げるmargin collapseを防ぐ */
}

.gacha-sectionss > img:first-child {
    margin-top: 70%;
}

/* ===== TOPに戻るボタン ===== */
.btn-top {
  position: fixed;
  bottom: 2%;
  /* JSで上書きするのでとりあえず右端に */
  right: 10px;
  width: clamp(44px, 13vw, 100px);
  height: clamp(44px, 13vw, 100px);
  z-index: 400;
  display: block;
  line-height: 0;
}

.btn-top img {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== ページリンクボタン ===== */
.link-btn {
  display: block;
  margin-top: 10%;
}

/* ブロックを順番に遅らせる（stagger） */
[data-anim][data-delay="1"] {
  animation-delay: 0.1s;
}

[data-anim][data-delay="2"] {
  animation-delay: 0.2s;
}

[data-anim][data-delay="3"] {
  animation-delay: 0.3s;
}

[data-anim][data-delay="4"] {
  animation-delay: 0.4s;
}

[data-anim][data-delay="5"] {
  animation-delay: 0.5s;
}

/* ===== スマホ用ハンバーガー ===== */
.hamburger {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 310;
  flex-direction: column;
  justify-content: center;
  gap: 12%;
  width: 55px;
  height: 55px;
  min-height: 2px;
  background: #000;
  border: none;
  border-radius: 0;
  padding: 2%;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  min-height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  flex-shrink: 0;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== OVERLAY ===== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 200;
}

.overlay.visible {
  display: block;
}

/* ===== サイドバー下部：無限ループスライダー（人物） =====
========================================================== */
.people-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background-color: #e83837;
  overflow: visible;
  z-index: 5;
}

.people-track {
  position: absolute;
  left: 0;
  bottom: 60px;
  display: flex;
  align-items: flex-end;
  width: max-content;
  animation: peopleLoop 55s linear infinite;
}

.people-track img {
  width: 123px;
  height: 230px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

@keyframes peopleLoop {
  from {
    transform: translateX(0);
  }

  to {
    /* 画像リストを2セット並べているため、半分移動でシームレスにループする */
    transform: translateX(-50%);
  }
}

/* 1100px以下：地面の高さ・画像サイズ・浮かせ幅を画面幅に連動する可変値(vw)に切り替え */
@media (max-width: 1100px) {
  .people-ground {
    height: 13.6364vw; /* 150px ÷ 1100px */
  }

  .people-track {
    bottom: 5.4545vw; /* 60px ÷ 1100px */
  }

  .people-track img {
    width: 16.6364vw; /* 183px ÷ 1100px */
    height: 26.3636vw; /* 290px ÷ 1100px */
  }
}

/* ===== MOBILE (≤750px) ===== */
@media (max-width: 750px) {
  .hamburger {
    display: flex;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar-left {
    position: fixed;
    top: 0;
    left: 0;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 210;
  }

  .sidebar-left.open {
    transform: translateX(0);
  }

  .sidebar-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 80vw;
    max-width: 320px;
    /* 高さは画像に合わせてauto、画像の下50pxで背景が終わる */
    height: auto;
    justify-content: flex-start;
    padding-top: 60px;
    padding-bottom: 50px;
    background-color: #efefef;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 210;
  }

  .sidebar-right.open {
    transform: translateX(0);
  }

  /* モバイルはドロワー表示（高さ可変）になるため、下部固定のスライダーは非表示 */
  .people-ground {
    display: none;
  }

  /* gacha.htmlの画像下げ幅をスマホ用に小さく */
  .gacha-section > img:first-child {
    margin-top: 50%;
  }

  .main {
    width: 100%;
    flex: 1 1 auto;
  }

  .main h1,
  .main .lead {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* .section {
    padding: 0 18px;
  } */


}
