/* --- ベース設定 --- */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: black;
  overflow-x: hidden;
  font-family: "Koh Santepheap", serif;
}

* {
  box-sizing: border-box;
}

/* 画面いっぱいセクション共通 */
.top,
.concept,
.areaguide,
.demoplay {
  min-height: 100svh;
  width: 100%;
}

.sectionbox {
  max-width: 1920px;
  margin: 0 auto;
}

/* --- フェードpas --- */
#transition-overlay {
  position: fixed;
  inset: 0;
  background: black;
  opacity: 1;
  z-index: 9999;
  pointer-events: auto;
  transition: opacity 0.5s ease;
}

#transition-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  /* 透明になったら下の要素をクリックできるようにする */
  transition: opacity 2.5s ease;
  /* ページ開始時のフェードインはゆっくり */
}

/* クリック時の暗転は素早くしたい場合はJS側でクラス制御またはCSS調整も可能ですが、
   今回は元のコードに合わせてtransitionで制御しています */


/* --- TOP --- */
.top {
  position: relative;
  background: url(image/night_city.jpg) center/cover;

}

.titlecall {
  position: absolute;
  top: 42vh;
  left: 20vw;
  animation: softBlink 6s ease-in-out infinite;
}

.titlecall h1,
.titlecall p {
  color: white;
  text-shadow: 1px 1px 3px #000;
  line-height: 1;
  font-family: "Koh Santepheap", serif;
  font-weight: 700;
  font-style: normal;
}

.titlecall h1 {
  font-size: 32px;
}

.titlecall p {
  font-size: 28px;
}

@keyframes softBlink {
  0% {
    opacity: 0.9;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.9;
  }
}



section {
  position: relative;
}

.headline {
  position: absolute;
  top: 30px;
  left: 40px;
  z-index: 50;
}




.headline h1{
  color: white;
  font-size: 32px;
  text-shadow: 1px 1px 3px #000;
  line-height: 1;
  font-family: "Koh Santepheap", serif;
  font-weight: 700;
  font-style: normal;
}




.firstcontact{
  background-color: rgba(122, 86, 252, 0.3);
  position: absolute;
  right: 10vw;
  top: 50VH;
  padding: 15px;
  width: 34%;
  
}
.firstcontact h2{
  color: white;
  line-height: 1.8;
  font-size: 20px;
  text-shadow: 2px 2px 2px #000;
  font-family: "Koh Santepheap", serif;
  font-weight: 700;
  font-style: normal;
  text-decoration: none;
}
.firstcontact p{
  color: white;
  line-height: 1.6;
  font-size: 18px;
  text-shadow: 2px 2px 2px #000;
  font-family: "Koh Santepheap", serif;
  font-weight: 700;
  font-style: normal;
  text-decoration: none;
}


#silent{
  position: absolute;
  height: 1px;
  width: 100%;
  top: 55vh;
}

#hintone{
  position: absolute;
  bottom: 20px;
  left: 46%;
  font-size: 12px;
  z-index: 50;
  animation: Light 3s ease-in-out infinite;
  color:#fff;
}

@keyframes Light{
  0% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 0.3;
  }
}

#hintone.hintoens{
  transition: opacity 0.5s ease;
  animation: none;
  opacity: 0;
}

/* #hintone.hintoens {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.5s ease, transform 0.5s ease;
} */









/* --- NAVBAR --- */
header{
  display: none;
}

.titlebox {
  position: absolute;
  top: 10%;
  color: rgb(225, 224, 255);

}

/* --- 1. 左下の半透明メニューボタン --- */
.menu-trigger {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: background 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(5px);
}

/* ボタンの中のハンバーガー線 */
.menu-trigger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  transition: transform 0.3s ease;
}

.menu-trigger:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}


.menu-trigger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-trigger.active span:nth-child(2) {
  opacity: 0;
}

.menu-trigger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* --- 2. 左から出てくるサイドメニュー --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background: rgba(5, 23, 64, 0.5);
  z-index: 190;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
}

/* メニューが開いた時のクラス */
.navbar.active {
  transform: translateX(0);
  /* 画面内に入れる */
}

.navbar ul {
  list-style: none;
  padding: 0;
  text-align: center;
}

.navbar li {
  margin: 30px 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* メニューが開いた時に中身をフワッと出す遅延アニメーション */
.navbar.active li {
  opacity: 1;
  transform: translateY(0);
}

.navbar.active li:nth-child(1) {
  transition-delay: 0.1s;
}

.navbar.active li:nth-child(2) {
  transition-delay: 0.2s;
}

.navbar.active li:nth-child(3) {
  transition-delay: 0.3s;
}

.navbar.active li:nth-child(4) {
  transition-delay: 0.4s;
}

.navbar a {
  text-decoration: none;
  font-size: 18px;
  letter-spacing: 0.1em;
  position: relative;
  display: block;
  height: 40px;
  color: rgb(225, 224, 255);
}

/* ホバー時の下線アニメーション */
.navbar a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: rgb(255, 255, 255);
  transition: width 0.3s ease;
}

.navbar a:hover::after {
  width: 100%;
}



.avienu{
  position: fixed;
  text-align: center;
  z-index: 49;
  background: rgba(255, 255, 255, 0.15);
  
  
  width: 100%;
}

.avienu ul{
  display: flex;
  list-style: none;
  justify-content:center;
  gap: 40px;
}

.avienu li{
margin: 5px 0;
height: 80px;
display: flex;
gap: 50px;
}

.avienu a{
  display: flex;
  color: white;
  /* text-shadow: 1px 1px 3px #000; */
  line-height: 1;
  font-family: "Koh Santepheap", serif;
  font-weight: 700;
  font-style: normal;
  font-size: 20px;
  text-decoration: none;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

/* .avienu img {
  width: 50px;
  opacity: 0.4;
  transition: transform 0.4s ease, opacity 0.4s ease;
} */


.avienu span {
  color: rgba(255, 255, 255, 0.2);
  transition: color 0.4s ease;
}

.avienu li:hover span {
  color: rgba(255, 255, 255, 1);
}



.avienu li:hover img {
  transform: translateY(-3px);
  opacity: 1;
}


.svgbox{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 150px;
}



.svgbox svg {
  filter: brightness(0.5);
  transition: filter 0.4s ease, transform 0.4s ease;
  display: block;

}

.avienu li:hover .svgbox svg {
  filter: brightness(1);
  transform: translateY(-3px);
}


.svgbox span {
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.4s ease;
}

.avienu li:hover .svgbox span {
  color: rgba(255, 255, 255, 1);
  /* text-shadow: 1px 1px 2px #fff; */
  /* filter: drop-shadow(1px 1px 2px rgba(255, 255, 255, 0.9)); */
}






#topicon{
  height: 60px;
  opacity: 1;
}

#concepticon{
  height: 60px;
  
}

#areaguideicon{
  height: 60px;
}

#demoplayicon{
  height: 60px;
}


.svgbox.activate svg {
  filter: brightness(1);
  transform: translateY(-3px);
}

.svgbox.activate span {
  color: rgba(255, 255, 255, 1);
  /* text-shadow: 1px 1px 2px #fff; */
  /* filter: drop-shadow(1px 1px 2px rgba(255,255,255,0.9)); */
}



/* --- CONCEPT --- */
.concept {
  position: relative;
  background: url(image/desk_bg.jpg) center/cover;
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-attachment: fixed;
}

.scene {
  width: 400px;
  height: 500px;
  perspective: 2000px;
  position: relative;
  left: 200px;
  margin: 0 auto;
  /* ←これを追加すると中央寄せになります */
}

/* --- 本全体 --- */
.book {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  /* 本全体を少し傾けて立体感を強調 */
  transform: rotateX(10deg) translateY(-20px);
}

/* ページ */
.page {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
  transform-style: preserve-3d;
  cursor: pointer;
  border-radius: 0 50px 50px 0;
}

.face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  padding: 40px;
  box-sizing: border-box;
  background-color: #e4d6d6;
  display: flex;
  flex-direction: column;
  box-shadow: inset 10px 0 5px rgba(0, 0, 0, 0.3);

}


/* ページ厚み */
.face::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to right, #ccc, #eee);
  transform: translateX(-100%) rotateY(-90deg);
  transform-origin: right;
}


.front {
  z-index: 2;
}


.back {
  transform: rotateY(180deg);
  background-color: #efe1e1;
  z-index: 1;
  box-shadow: inset -10px 0 5px rgba(0, 0, 0, 0.3);
  border-radius: 5px 0 0 5px;
}

/* --- めくった状態 --- */
.page.flipped {
  transform: rotateY(-180deg);
  /* 左にパタンと倒す */
}


/* 表紙 */
#page1 .front {
  background: linear-gradient(135deg, #6e4a0c, #a86b33);
  color: white;
  justify-content: center;
  text-align: center;
  border: none;
}

/* 裏表紙 */
#page4 .back {
  background: linear-gradient(135deg, #6e4a0c, #a86b33);
  color: white;
  border: none;
}

#page1 .front h1 {
  font-size: 2.5em;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

#page1 .front p {
  margin-top: 10px;
}

/* 中身のページ */
.face h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
  margin-top: 0;
}

.face p {
  line-height: 1.8;
  font-size: 1.1em;
  color: #000000;
}

.page-num {
  position: absolute;
  bottom: 20px;
  font-size: 0.9em;
  color: #888;
}

.front .page-num {
  right: 30px;
}

.back .page-num {
  left: 30px;
}

/* 手前のページほど高い値を設定 */
#page1 {
  z-index: 5;
}

#page2 {
  z-index: 4;
}

#page3 {
  z-index: 3;
}

#page4 {
  z-index: 1;
}

/* #page5 { z-index: 1; } */
.hintl {
  position: absolute;
  bottom: 20px;
  left: 80px;
  width: 100%;
  font-size: 10px;
  opacity: 0.5;
}


.hintr {
  position: absolute;
  bottom: 20px;
  right: 80px;
  font-size: 10px;
  opacity: 0.5;
}



.pagel{
  position: absolute;
  bottom: 20px;
  left: 30px;
  font-size: 10px;
  opacity: 0.5;
}

.pager{
  position: absolute;
  bottom: 20px;
  right: 30px;
  font-size: 10px;
  opacity: 0.5;
}


/* --- AREA GUIDE --- */
.areaguide .sectionbox {
background: url(image/night_city.jpg) center/cover;
background-attachment: fixed;
}

.flcontainer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  height: 100vh;
  overflow: hidden;
}

/* --- 個別のアイテム枠 --- */
.flitem {
  position: relative;
  flex: 1;
  /* 通常時の幅 */
  height: 100%;
  margin: 0;
  border-right: 1px solid rgba(255, 255, 255, 0);
  transition: flex 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
}

.flitem:hover {
  flex: 5;
  /* ホバー時に広がる */
}

/* --- 1. 画像pas（真ん中：z-index 2） --- */
.fl-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100vh auto;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  /* 背景色より手前 */

  /* 通常時は四角 */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 0.8s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.8s ease;
}

/* 各画像のパス */
#img1 {
  background-image: url(image/bar_bg.jpg);
}

#img2 {
  background-image: url(image/library_bg.jpg);
}

#img3 {
  background-image: url(image/garden_bg.jpg);
}

#img4 {
  background-image: url(image/arcade_bg.jpg);
}

#img5 {
  background-image: url(image/observatory_bg.jpg);
}

/* ホバー時の画像の変化（斜めにカット） */
.flitem:hover .fl-img {
  /* ここで画像を斜めに切ることで、下の .bgc が見えるようになります */
  /* 左上、右上(70%)、右下(60%)、左下 */
  clip-path: polygon(0 0, 70% 0, 60% 100%, 0 100%);

  /* 画像を少しズームさせて奥行きを出す */
  transform: scale(1.1);
}

.bgc {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* ★画像と同じサイズにする（重要） */
  z-index: 1;

  /* 初期は完全に非表示 */
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  overflow: hidden;
  /* ★内側の要素だけ見せたい */
  transition: clip-path 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ===== 中身（縦方向を調整する帯） ===== */
.bgc-inner {
  position: absolute;
  top: 20.5%;
  /* ★これがあなたの margin-top:25% と同じ役割 */
  left: 0;
  width: 100%;
  height: 59%;
  /* ★必要な高さだけ色をつける */
  background-color: #0b0522;
}

/* ===== hover 時：画像と同じ形で斜めカット ===== */
.flitem:hover .bgc {
  clip-path: polygon(70% 0, 100% 0, 100% 100%, 60% 100%);
}

/* テキストpas */
.fl-text {
  position: absolute;
  top: 20.5%;
  /* ★ bgc-inner と同じ */
  right: 0;
  width: 30%;
  height: 59%;
  /* ★ bgc-inner と同じ */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  z-index: 3;

  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
  color: white;
  pointer-events: none;
}

/* hover時にテキストを表示 */
.flitem:hover .fl-text {
  opacity: 1;
  transform: translateX(0);
}

/* 画像部分を右側30%切り取る */
.flitem:hover .fl-img {
  clip-path: polygon(0 0, 70% 0, 60% 100%, 0 100%);
  transform: scale(1.05);
}

.fl-text h2 {
  font-size: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 10px;
  white-space: nowrap;
  text-align: center;
}

.fl-text p {
  font-size: 15px;
  line-height: 1.8;
  white-space: nowrap;
}

/* --- スマホ対応 --- */
@media (max-width: 768px) {
  .flitem:hover .fl-img {
    /* スマホでは縦に切るなど調整 */
    clip-path: polygon(0 0, 100% 0, 100% 60%, 0 100%);
  }

  .fl-text {
    width: 100%;
    height: 40%;
    top: auto;
    bottom: 0;
    background: rgba(11, 5, 32, 0.9);
    /* スマホ時は読みやすいように半透明背景をつける */
  }
}





/* --- DEMO PLAY --- */
.demoplay {
  justify-content: center;
  align-items: center;
  background: black;
}

.demoplay-inner {
  position: relative;
  width: 100vw;
  max-width: 1920px;
  aspect-ratio: 16/ 9;
  background: url("image/nextdoor.jpg") center/cover no-repeat;
  background-size: contain;
  overflow: visible;
}

.demoplay-inner a{
  text-decoration: none;
  
}

.door-link {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 17.2%;
  max-width: 360px;
  transition: transform .25s ease, opacity .2s ease;
  z-index: 10;
}

#doorImage {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  transition: opacity 0.2s ease;
  /* ドア消滅時のスムーズさのため追加 */
}

.door-link:hover {
  transform: translate(-50%, -50%) scale(1.01);
}

#next {
  position: absolute;
  color: white;
  font-size: clamp(20px, 1.5vw, 28px);
  text-shadow: 1px 1px 3px #000;
  line-height: 1.4;
  top: 50%;
  left: 34%;
  transition: opacity 100ms ease-in;
}

/* --- FOOTER --- */
.footerbox {
  position: absolute;
  bottom: 10%;
}

.footerbox p {
  font-size: clamp(8px, 1.5vw, 16px);
  letter-spacing: 0.1em;
  color: rgb(225, 224, 255);
}