.pc-none {
  display: none;
}

#bg-chair {
  background-color: #e5e5e5;
  /* 椅子画像の端に近い色 */
}


#fv {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;

  transition: opacity 1.2s ease;
  opacity: 1;

}

#fv::before {
  content: "";
  position: fixed;
  inset: 0;

  background-image: url('../img/bg_blue.webp');
  background-size: cover;
  background-position: center;

  z-index: -1;
}

#fv.scrolled {
  opacity: 1;
  /* スクロールしたら背景が現れる */
}



/* ========================================
   背景レイヤー（4枚構成）
   Z順: chair-green(一番上) > green > blur > sharp#bg-green {
======================================== */
#bg-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: transparent;
  opacity: 1;
  transition: opacity 1.2s ease;
}



/* レイヤー1: 緑くっきり（最初に表示） */
#bg-sharp {
  position: absolute;
  inset: 0;
  background-image: url('../img/bg_sharp.webp');
  background-size: cover;
  background-position: center;
  opacity: 1;
  transition: opacity 1.8s ease-in-out;
}

/* レイヤー2: 緑ぼかし（くっきりの上にクロスフェード） */
#bg-blur {
  position: absolute;
  inset: 0;
  background-image: url('../img/bg_blur.webp');
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

/* レイヤー3: 椅子（左寄せ・アートボードに合わせた配置） */
#bg-chair {
  position: absolute;
  inset: 0;
  background-image: url('../img/chair.webp');
  background-size: cover;
  background-position: center bottom;
  /* 少し左寄せ */
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
}

/* レイヤー4: 緑ぼかし（椅子の上にmultiply合成） */
#bg-green {
  position: absolute;
  inset: 0;
  background-image: url('../img/bg_blue.webp');
  background-size: cover;
  background-position: center top;
  opacity: 0;
  mix-blend-mode: soft-light;
  transition: opacity 3s ease-in-out;
}

#bg-light {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(circle at 70% 20%,
      rgba(255, 255, 255, 0.45) 0%,
      rgba(255, 255, 255, 0.15) 20%,
      rgba(255, 255, 255, 0) 55%);

  opacity: 0;
  transition: opacity 3s ease;
}


/* ========================================
   タイトルエリア
   文字は右側に配置
======================================== */
#title-area {
  position: absolute;
  bottom: 14%;
  right: 7%;
  /* 右寄せでかぶらない */
  z-index: 10;
  text-align: right;
}

.randomAnime {
  visibility: hidden;
  font-family: 'Candara', 'Calibri', sans-serif;
  font-weight: bold;
  font-size: 80px;
  letter-spacing: 0.01em;
  color: var(--color-bg);

  text-transform: lowercase;
  line-height: 1;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.5);
}

.randomAnime span,
.randomAnime .char {
  display: inline-block;
  font-family: 'Candara', 'Calibri', sans-serif;
  font-weight: bold;
  font-size: 64px;
}

#subtitle {
  font-family: 'Shippori MIncho', sans-serif;
  font-weight: normal;
  font-size: 1.2rem;
  letter-spacing: 0.25em;
  color: rgba(240, 237, 230, 0);
  margin-top: 0.6rem;
  transition: color 1.5s ease;
}

#nav-logo {
  transition:
    opacity 0.5s ease;
}

#nav.scrolled #nav-logo {
  opacity: 0;

  pointer-events: none;
}

/* ========================================
   スクロールヒント
======================================== */
#scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 1s ease;
}

#scroll-hint span {
  font-family: 'Candara', 'Calibri', sans-serif;
  font-weight: normal;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  color: rgba(240, 237, 230, 0.45);
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(240, 237, 230, 0.45), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  51% {
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ========================================
   Story
======================================== */


#story {

  position: relative;
  overflow: hidden;
  padding: 20rem 2.5rem 7rem;
  background: transparent;
}


#story p {
  display: block;
  width: 100%;
  transform: scale(0.92);
  opacity: 0;
  transition:
    transform 1.5s ease,
    opacity 1.5s ease;
}

#story p.active {
  transform: scale(1);
  opacity: 1;
}

/* スクロール後、背景レイヤーを消して固定背景を見せる */
#bg-wrap.scrolled {
  opacity: 0;
  transition: opacity 1.2s ease;
}

#title-area,
#nav,
#scroll-hint {
  z-index: 3000;
}

#overlay {
  position: absolute;
  inset: 0;

  z-index: 2;
  /* 文字より下、背景より上 */

  background:
    radial-gradient(circle at 70% 20%,
      rgba(255, 255, 255, 0.20),
      transparent 45%);
}

.story-tree-pc {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 100%;
  max-width: 2200px;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition:
    opacity 4s ease,
    transform 6s ease;
  filter: blur(4px);
  z-index: 1;
}

.story-tree-pc.active {
  opacity: 0.9;
  filter: blur(0px);
  transform: translate(-50%, -50%) scale(1);
}

.story-inner {
  position: relative;
  z-index: 2;
  padding-top: 3rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;

}



/* ========================================
   product
======================================== */
.product-section {
  background:
    linear-gradient(to bottom,
      #6ca394 0%,
      #d2daa5 20%,
      #c8ddc0 60%);
  padding: 240px var(--space-side);

}


.product-grid {

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5rem 3rem;
}

.product-item {
  display: block;
  text-align: center;
  transition: transform 0.5s ease,
    opacity 0.5s ease;
}

.product-item img {
  width: 80%;
  max-width: 240px;
  height: 180px;
  object-fit: contain;
  margin: 0 auto;
  margin: 0 auto;
  transition: transform 0.5s ease;
}

.product-item h3 {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: normal;
  color: var(--color-text);
  letter-spacing: 0.05em;
}

/* hover */

.product-item:hover {
  opacity: 0.8;
}

.product-item:hover img {
  transform: translateY(-10px);
}

.section-title h2,
.product-item h3 {
  font-family: 'Montserrat', sans-serif;
}

.section-head {
  text-align: center;


  margin-bottom: 6rem;
}

.section-head h2 {
  margin-bottom: 2.5rem;
}

.section-head p {
  line-height: 2.4;
}

.story-tree-sp {
  display: none;
}

/* ========================================
   SP
======================================== */
@media screen and (max-width: 768px) {
  .pc-none {
    display: inline;
  }

  /* FV */
  #title-area {
    right: 1%;
    bottom: 12%;
    text-align: right;
  }

  .randomAnime,
  .randomAnime span,
  .randomAnime .char {
    font-size: 36px;
  }

  #subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
  }

  #bg-chair {
    background-position: 35% bottom;
  }

  /* Story */
  #story {
    padding: 8rem 1.5rem;
    padding-bottom: 0;
    font-size: 1rem;
    line-height: 2;
  }

  /* 商品セクション */
  .product-section {
    padding: 60px var(--space-side);
  }

  .section-head {
    margin-bottom: 4rem;
  }

  .section-head h2 {
    margin-bottom: 1.5rem;
  }

  .section-head p {
    font-size: 0.95rem;
    line-height: 2;
  }

  /* 商品一覧 */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 1rem;
  }

  .product-item img {
    width: 100%;
    max-width: 140px;
    height: 120px;
  }

  .product-item h3 {
    font-size: 0.85rem;
    margin-top: 0.8rem;
  }

  /* スクロールヒント */
  #scroll-hint {
    bottom: 0.2rem;
    font-size: 0.55rem;
  }

  .story-tree-pc {
    display: none;
  }

  .story-tree-sp {
    display: block;
    width: 100%;
    margin-left: 0;

    max-width: none;
    opacity: 0.9;
  }

  .story-tree-sp {
    width: 100%;
    margin: 0 auto;
  }

  .story-tree-sp {
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
  }
}