/* ===========================
   BLANCO - Intro Animation
=========================== */

/* --- Intro Overlay --- */
#intro {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: #161616 url('../img/intro-first-furisode.webp') center top / cover no-repeat;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.6s ease;
}

#intro.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* 各スライド写真 */
.intro__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity;
}

.intro__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.intro__slide.active {
  opacity: 1;
}

/* --- 中央ロゴ --- */
.intro__flying-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 420px;
  max-width: 75vw;
  transform: translate(-50%, -50%);
  transform-origin: center center;

  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  filter: drop-shadow(0 2px 24px rgba(255, 255, 255, 0.5));

  /* フェードイン */
  transition: opacity 0.7s ease;
}

/* ロゴ表示 */
.intro__flying-logo.visible {
  opacity: 1;
}

/* ふわっとフェードアウト */
.intro__flying-logo.fade-away {
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* --- body スクロールロック --- */
html.intro-active {
  overflow: hidden!important;
  scrollbar-width: none;
}

body.intro-active {
  overflow: hidden!important;
}

html.intro-active::-webkit-scrollbar,
body.intro-active::-webkit-scrollbar {
  display: none;
}

/* --- HOME初回表示｜ローディング画面 ---
   画像イントロの準備中だけ表示し、準備完了後はintro.jsからis-readyを付与して消えます。 */
.intro__loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #ffd9dc;
  opacity: 1;
  transition: opacity .42s ease;
}

.intro__loading.is-ready {
  opacity: 0;
  pointer-events: none;
}

.intro__loading-inner {
  display: grid;
  justify-items: center;
  gap: 24px;
}

.intro__loading-logo {
  width: min(336px, 68vw);
  height: auto;
  transform: translateY(0);
}

.intro__loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 12px;
}

.intro__loading-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff669c;
}

@media (prefers-reduced-motion: no-preference) {
  .intro__loading-logo {
    animation: intro-loading-logo 1.15s cubic-bezier(.16, 1, .3, 1) both;
  }

  .intro__loading-dot {
    animation: intro-loading-dot .84s ease-in-out infinite alternate;
  }

  .intro__loading-dot:nth-child(2) {
    animation-delay: .14s;
  }

  .intro__loading-dot:nth-child(3) {
    animation-delay: .28s;
  }
}

@keyframes intro-loading-logo {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes intro-loading-dot {
  from {
    opacity: .32;
    transform: translateY(0) scale(.82);
  }
  to {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro__loading,
  .intro__loading-logo,
  .intro__loading-dot {
    transition: none;
    animation: none;
  }
}
