/**
 * CSS File: hero.css
 * 2026-06-08 | Top Page Hero & Slider Animation Only (Clean Version)
 */

/* ==============================================================================
 * 1. トップページ専用：ヒーロー外枠 ＆ コンテナ
 * ============================================================================== */
.p-top-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #fff;
  z-index: var(--z_1-up);
}

.p-top-hero__container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* ==============================================================================
 * 2. トップページ専用：キャッチコピー・メインビジュアル画像
 * ============================================================================== */
.p-top-hero__catch {
  width: 100%;
  max-width: 500px;
  text-align: center;
  margin-bottom: 30px;
}

.p-top-hero__catch-img {
  width: 100%;
  height: auto;
}

.p-top-hero__visual {
  width: 80%;
  max-width: 450px;
}

.p-top-hero__visual-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.1;
}

.p-top-hero__visual-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.5s;
}

.p-top-hero__visual-img.is-active {
  opacity: 1;
}

/* ==============================================================================
 * 3. トップページ専用：背景スライダーエリア ＆ グラデーションマスク
 * ============================================================================== */
.p-top-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.p-top-hero__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* トップ背景専用の白ベール */
.p-top-hero__bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 140px; /* スマホ縦をベース（旧max-width: 767pxの指定）に設定 */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.4) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* 最初のちらつき防止設定 */
.js-hero-bg-2 {
  opacity: 0;
}

.js-hero-bg-1 {
  opacity: 1;
}

/* JSから自動生成されるシャッター要素のスタイル定義 */
.js-shutter-layer {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50.5%;
  background: #0f172a;
  z-index: 5;
  pointer-events: none;
  will-change: transform;
}

/* スライドさせる各画像の設定 */
.p-top-hero__bg .js-hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateX(100%);
  opacity: 0;
  z-index: 1;
}

.p-top-hero__bg .js-hero-slide-img.is-first {
  transform: translateX(0);
  opacity: 1;
}

/* 💡 お掃除合体：crossfader.js 連動：中央の閃光（キラッとする光） */
.p-top-hero__flash-line {
  position: absolute;
  top: 50%;
  left: 5%;
  margin-top: -0.5px;
  width: 90%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 15%,
    rgba(135, 206, 235, 1) 50%,
    rgba(255, 255, 255, 1) 85%,
    rgba(255, 255, 255, 0) 100%
  );
  box-shadow:
    0 0 10px 1px rgba(255, 255, 255, 0.8),
    0 0 20px 2px rgba(135, 206, 235, 0.6);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
}

/* ==============================================================================
 * 4. トップページ専用：メッセージ演出 ＆ 英語テキスト
 * ============================================================================== */
.p-top-hero__en-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  box-sizing: border-box;
  z-index: var(--z_5-head-or-something, 5);
  opacity: 1;
  pointer-events: none;
  transition: transform 0.4s ease;
}

.p-top-hero__en-message.is-wide-style {
  max-width: 95vw;
  width: 90%;
  perspective: 1000px;
  container-type: inline-size;
}

.p-top-hero__en-main {
  font-family: "Caveat", cursive;
  font-size: 2.8rem;
  color: #ffffff;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 4px 20px rgba(0, 0, 0, 0.2);
}

.p-top-hero__en-main.js-split-text {
  font-family: "Arial Black", "Impact", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  font-size: max(9vw, 11.2cqw);
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  opacity: 1; /* 👈 親は常に表示（透明度アニメーションはJS側で一字ずつのspanが担当） */
}

.p-top-hero__en-sub {
  font-family: "M PLUS Rounded 1c", sans-serif !important;
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ja-round-text {
  font-family: "M PLUS Rounded 1c", sans-serif !important;
  font-weight: 700;
}

/* 💡 お掃除合体：JSで分割されたスペース用spanの横幅強制確保 */
.js-split-text span.is-whitespace {
  display: inline-block !important;
  width: 0.35em !important;
}

/* ==============================================================================
 * 5. トップページ専用：アバウトセクション
 * ============================================================================== */
.p-top-about {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  opacity: 0;
  pointer-events: none;
  z-index: var(--z_1-content, 10);
}

.p-top-about__inner {
  position: relative;
  top: 3%;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  box-sizing: border-box;
}

.p-top-about-header,
.p-top-about__body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.p-top-about__title-img {
  width: 100%;
  max-width: 500px;
  height: auto;
}

.p-top-about__collab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.p-top-about__systena-img {
  width: auto;
}

.p-top-about__body {
  max-width: 1000px;
  margin: 0 auto;
  color: #ffffff;
  line-height: 1.9;
  text-align: left;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 4px 20px rgba(0, 0, 0, 0.9);
}

.p-top-about__text {
  font-family: "M PLUS Rounded 1c", sans-serif !important;
  font-size: 0.75rem;
  margin-bottom: 1.8em;
  word-break: normal;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.p-top-about__highlight {
  font-family: "M PLUS Rounded 1c", sans-serif !important;
  color: #e8dcc4;
  font-weight: 800;
  position: relative;
  display: inline-block;
  padding: 0 4px;
  text-shadow: 0 0 8px rgba(232, 220, 196, 0.4);
}

.p-top-about__highlight::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #e8dcc4 20%,
    #e8dcc4 80%,
    transparent
  );
  box-sizing: border-box;
}

.p-top-about__footer-visual {
  margin-top: 40px;
}

.p-top-about__footer-visual img {
  width: 100%;
  max-width: 850px;
  height: auto;
}

/* ==============================================================================
 * 6. スクロールナビゲーション（右下配置＆ピコピコアニメーション）
 * ============================================================================== */
.p-top-hero__scroll-nav {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.p-top-hero__scroll-text {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.1em;
}

.p-top-hero__scroll-arrow {
  width: 12px;
  height: 12px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg);
  animation: arrow-bounce 1.5s infinite ease-in-out;
}

@keyframes arrow-bounce {
  0%,
  100% {
    transform: rotate(45deg) translate(0, 0);
  }
  50% {
    transform: rotate(45deg) translate(6px, 6px);
  }
}

/* ==============================================================================
 * ✨ 新設 8. スローガン動画小窓 ＆ モーダル拡大システム
 * ============================================================================== */
/* 右下の動画小窓 */
.p-top-hero__video-thumb {
  position: absolute;
  right: 20px;
  bottom: 85px; /* SCROLLナビ（底から20px）の上に絶妙に配置 */
  width: 140px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  z-index: 45;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.p-top-hero__video-thumb:hover {
  transform: scale(1.06);
  border-color: #e7decd;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.p-top-hero__video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* 小窓内のシークバー等はクリックさせない */
}

/* 全画面モーダル（初期状態は非表示） */
.p-video-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 23, 0.92); /* シネマティックな超暗幕 */
  backdrop-filter: blur(8px);
  z-index: 9999; /* ヘッダー等すべてをねじ伏せる最前面 */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.p-video-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* モーダル内の動画コンテナ */
.p-video-modal__container {
  position: relative;
  width: 90%;
  max-width: 960px; /* 16:9 映画館サイズスクリーン */
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.p-video-modal__container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 閉じるボタン */
.p-video-modal__close {
  position: absolute;
  top: -45px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.05em;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.p-video-modal__close:hover {
  opacity: 1;
}

.p-video-modal__close::before {
  content: "✕";
  font-size: 1.2rem;
}

/* ==============================================================================
 * 7. 指定ブレイクポイントに基づくレスポンシブ対応
 * ============================================================================== */

/* ── スマホ横向き ── */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .p-top-hero .p-top-hero__container {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 15px !important;
    height: 100vh !important;
  }

  .p-top-about .p-top-about__inner {
    top: 0 !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .p-top-about .p-top-about-header {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    flex: none !important;
  }

  .p-top-about .p-top-about__title-img {
    width: 100% !important;
    max-width: 200px !important;
    height: auto !important;
  }

  .p-top-about .p-top-about__systena-img {
    width: 100% !important;
    max-width: 160px !important;
    margin-top: 6px !important;
    height: auto !important;
  }

  .p-top-about .p-top-about__body {
    flex: none !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  .p-top-about .p-top-about__text {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
  }

  .p-top-hero .p-top-hero__visual {
    display: none !important;
  }

  .p-top-about .p-top-about__footer-visual {
    display: none !important;
  }

  /* スマホ横のときは動画窓をすっきり隠すか小さく（今回は誤タップ防止で非表示） */
  .p-top-hero__video-thumb {
    display: none !important;
  }
}

/* ── タブレット・PC（768px以上 ＆ 501px以上） ── */
@media screen and (min-width: 768px) and (min-height: 501px) {
  .p-top-hero__bg::after {
    height: 180px;
  }

  .p-top-hero__container {
    flex-direction: row;
    justify-content: space-between;
  }

  .p-top-hero__catch {
    flex: 0 0 48%;
    text-align: left;
    margin-bottom: 0;
  }

  .p-top-hero__visual {
    flex: 0 0 45%;
  }

  .p-top-hero__en-message {
    gap: 16px;
  }

  .p-top-hero__en-main {
    font-size: 4.5rem;
    letter-spacing: 0.03em;
  }

  .p-top-hero__en-sub {
    font-size: 1.6rem;
  }

  .p-top-about__text {
    font-size: 1.4rem;
    line-height: 2.1;
  }

  .p-top-about__footer-visual {
    margin-top: 60px;
  }

  .p-top-hero__scroll-nav {
    right: 40px;
    bottom: 40px;
  }

  /* PCサイズでの動画小窓の調整 */
  .p-top-hero__video-thumb {
    right: 40px;
    bottom: 120px; /* PCでもSCROLLナビの上をキープ */
    width: 220px; /* 視認性アップのためのサイズ調整 */
  }
}

/* ── 大型モニター（1024px以上 ＆ 501px以上） ── */
@media screen and (min-width: 1024px) and (min-height: 501px) {
}

.p-top-hero__en-main.js-split-text,
.p-top-hero__en-main.js-split-text span {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}
