@charset "UTF-8";
/* ===================================================================
   トップ FV のオープニング（js/fv-intro.js と対）
   状態は <html> のクラス: fv-intro（再生中）/ fv-play / fv-redbg（赤で満ちた）/ fv-landed（着地）
   テンポは --fv-bpm（PC 110 / スマホ 150 で短く）。時刻はすべて拍で指定
   0〜5拍   : グリッド → 線で立体の A → マスが赤く埋まる → 正面へ回り込んで着地
   4.75拍〜 : 見出しがせり上がる → カメラが引く ＋ 赤い幕が上がる → 説明文・ボタン・動画・ヘッダー
   =================================================================== */
:root {
	--fv-bpm: 110;
	--fv-beat: calc(60s / var(--fv-bpm));
	--fv-ease-cine: cubic-bezier(0.76, 0, 0.24, 1);
	--fv-ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}
@media only screen and (max-width: 768px) {
	:root { --fv-bpm: 150; }
}

/* 線の A は SVG を直接置く（線の長さを測るため）。見た目は images/index/fv_img_2.svg と同じ */
#movies .player_2 svg { display: block; width: 100%; height: auto; overflow: visible; }

/* 見出しは行ごとにせり上がる */
#movies .hero__title .ln { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
#movies .hero__title .ln > span { display: inline-block; white-space: nowrap; word-break: normal; }   /* 本番の見出しは break-all のため、行の途中で折り返さないように */

/* 再生中の描画の層（画面全体に固定）: 赤いマス・グリッド・立体の A */
#fv-stage { position: fixed; z-index: 22; inset: 0; pointer-events: none; display: none; }
#fv-stage canvas { position: absolute; left: 0; top: 0; }
#fv-blob, #fv-grid { width: 100%; }
/* 終わったらグリッドは #movies の中へ移る（マウスで弾ける糸） */
#movies > #fv-grid { position: absolute; left: 0; top: 0; z-index: 0; width: 100%; pointer-events: none; }

/* オープニングの幕（画面全体。最初は黒、赤で満ちたら赤。最後に上へ畳まれる） */
#fv-splash { position: fixed; z-index: 20; inset: 0; background: #9F0000; transform-origin: 50% 0; pointer-events: none; display: none; }

/* SKIP ボタン（オープニング中だけ・右下）。FV の「課題に近い事例を探す」と同じ、白い丸の矢印＋文字
   画面のクリックではスキップしない */
#fv-skip { position: fixed; z-index: 31; right: 40px; bottom: 32px; display: none; align-items: center; gap: 14px; padding: 0; border: 0; background: none; cursor: pointer;
	color: #fff; font-family: neue-haas-grotesk-text, sans-serif; font-size: 16px; font-weight: 500; letter-spacing: 0.08em; }
#fv-skip img { width: 40px; height: 40px; transition: transform calc(var(--fv-beat) * 0.5) var(--fv-ease-out); }
#fv-skip:hover img { transform: translateX(4px); }

/* ===================================================================
   再生中
   =================================================================== */
html.fv-intro #fv-splash, html.fv-intro #fv-stage { display: block; }
html.fv-intro #fv-skip { display: flex; }
html.fv-intro.fv-redbg #fv-blob, html.fv-intro.fv-landed #fv-forge { display: none; }
html.fv-intro #container { overflow: visible; }   /* #container は overflow: hidden で、ヘッダーの下から上を切ってしまうため */
html.fv-intro #movies { position: relative; z-index: 21; overflow: visible; }
html.fv-intro #movies .movies_bg { overflow: visible; }
/* 再生中は FV とヘッダーをクリックできなくする（見えていない動画をクリックすると、拡大して音が鳴り出すため）。SKIP は別の層なので押せる */
html.fv-intro #movies, html.fv-intro header { pointer-events: none; }
html.fv-intro #fv-splash { pointer-events: auto; }   /* 幕がクリックを受け止め、その下の見えていないリンクにも届かせない */

/* 始まりは暗い製図台。赤で満ちたら本来の赤へ */
html.fv-intro:not(.fv-redbg) #movies, html.fv-intro:not(.fv-redbg) #fv-splash { background: #141414; }

/* 本物の A は、立体が正面で平らになった瞬間に出す */
html.fv-intro #movies .player_2 { opacity: 0; }
html.fv-intro.fv-landed #movies .player_2 { opacity: 1; }

/* 見出し */
html.fv-intro #movies .hero__title .ln > span { transform: translate3d(0, 110%, 0); }
html.fv-intro.fv-play #movies .hero__title .ln > span { animation: fv-rise calc(var(--fv-beat) * 2) var(--fv-ease-out) calc(var(--fv-beat) * 4.75) both; }
html.fv-intro.fv-play #movies .hero__title .ln + .ln > span { animation-delay: calc(var(--fv-beat) * 5); }
@keyframes fv-rise { from { transform: translate3d(0, 110%, 0); } to { transform: translate3d(0, 0, 0); } }

/* カメラが引く（着地の直後） */
html.fv-intro.fv-play #movies .movies_bg { transform-origin: 35% 60%; animation: fv-pullback calc(var(--fv-beat) * 2) var(--fv-ease-cine) calc(var(--fv-beat) * 5.25) both; }
@keyframes fv-pullback { from { transform: scale(1.14); } to { transform: scale(1); } }

/* 赤い幕が上がる */
html.fv-intro.fv-play #fv-splash { animation: fv-curtain calc(var(--fv-beat) * 1.75) var(--fv-ease-cine) calc(var(--fv-beat) * 5.5) both; }
@keyframes fv-curtain { to { transform: scaleY(0); } }

/* 説明文・ボタン・動画・音のボタン・ヘッダー */
html.fv-intro #movies .hero__chach, html.fv-intro #movies .arrow-btn, html.fv-intro #video-container,
html.fv-intro #toggle-btn, html.fv-intro #sound-toggle { opacity: 0; }

/* ヘッダーは再生中ずっと透明（背景を出すと、着地した A の上の部分を隠してしまう）。中のロゴ・ナビだけを後からフェードイン。
   代わりに、赤で満ちたら FV の赤をヘッダーの裏まで上に伸ばし、幕が上がっても白いページが透けないようにする */
html.fv-intro #index_red header { background-color: transparent; transition: none; }   /* #index_red header（index.css）より強く */
html.fv-intro.fv-redbg #movies::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 200px; background: #9F0000; }
/* A が最終の大きさに戻り終わる 7.25拍で、ヘッダーの赤い背景を瞬時に出しておく。
   オープニングの解除時に、ヘッダーの背景の切り替え（本番の transition 0.5s）で白が透けないように */
html.fv-intro.fv-play #index_red header { animation: fv-headbg 1ms linear calc(var(--fv-beat) * 7.25) both; }
@keyframes fv-headbg { from { background-color: transparent; } to { background-color: #9F0000; } }
html.fv-intro.fv-play #movies .hero__chach { animation: fv-fadeup calc(var(--fv-beat) * 1.25) var(--fv-ease-out) calc(var(--fv-beat) * 6.5) both; }
html.fv-intro.fv-play #movies .arrow-btn   { animation: fv-fadeup calc(var(--fv-beat) * 1.25) var(--fv-ease-out) calc(var(--fv-beat) * 6.75) both; }
html.fv-intro.fv-play #video-container     { animation: fv-fade calc(var(--fv-beat) * 1.25) var(--fv-ease-out) calc(var(--fv-beat) * 7) both; }   /* 動かさずに出す（音量・拡大ボタンが動画の枠を測って置かれるため） */
html.fv-intro.fv-play #toggle-btn, html.fv-intro.fv-play #sound-toggle { animation: fv-fade calc(var(--fv-beat) * 1.25) var(--fv-ease-out) calc(var(--fv-beat) * 7.25) both; }

/* ヘッダー: 項目が左から順に降りてくる */
html.fv-intro header > .logo, html.fv-intro header .header__nav .item, html.fv-intro header .header__bnr li, html.fv-intro header > .hamburger { opacity: 0; }
html.fv-intro.fv-play header > .logo, html.fv-intro.fv-play header .header__nav .item, html.fv-intro.fv-play header .header__bnr li, html.fv-intro.fv-play header > .hamburger {
	animation: fv-drop calc(var(--fv-beat) * 0.9) var(--fv-ease-out) calc(var(--fv-beat) * var(--fv-d)) both; }
html.fv-intro header > .logo                             { --fv-d: 7; }
html.fv-intro header .header__nav .item:nth-child(1)     { --fv-d: 7.08; }
html.fv-intro header .header__nav .item:nth-child(2)     { --fv-d: 7.16; }
html.fv-intro header .header__nav .item:nth-child(3)     { --fv-d: 7.24; }
html.fv-intro header .header__nav .item:nth-child(4)     { --fv-d: 7.32; }
html.fv-intro header .header__nav .item:nth-child(5)     { --fv-d: 7.4; }
html.fv-intro header .header__bnr li:nth-child(1)        { --fv-d: 7.48; }
html.fv-intro header .header__bnr li:nth-child(2)        { --fv-d: 7.56; }
html.fv-intro header > .hamburger                        { --fv-d: 7.64; }
@keyframes fv-drop { from { opacity: 0; transform: translate3d(0, -14px, 0); } to { opacity: 1; transform: none; } }
@keyframes fv-fadeup { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes fv-fade   { from { opacity: 0; } to { opacity: 1; } }

/* AI に質問するボタンは、オープニングが終わってから */
.ai-fab-group { transition: opacity calc(var(--fv-beat) * 1); }
html.fv-intro .ai-fab-group { opacity: 0; pointer-events: none; }

/* スマホ: 縦に並ぶ配置なので、カメラの引きはしない。SKIP は小さく */
@media only screen and (max-width: 768px) {
	html.fv-intro.fv-play #movies .movies_bg { animation: none; }
	#fv-skip { right: 16px; bottom: 16px; gap: 10px; font-size: 14px; }
	#fv-skip img { width: 28px; height: 28px; }
}
