/* =============================================================
   home-emblem.css — トップだけ
   既定（JSなし・動きを減らす設定）：紋章の静止画と章の文が縦に並ぶ普通の区画。
   .is-film（JS が付ける）：画面を止めて、紋章が姿を変える映画の形。
   ============================================================= */
.em-film { position: relative; background: var(--black); border-top: 1px solid var(--gold-border); border-bottom: 1px solid var(--gold-border); }
.em-sticky { position: relative; padding: var(--section-pad) 0; }
.em-stage { position: relative; width: min(320px, 70vw); aspect-ratio: 1; margin: 0 auto 56px; perspective: 900px; }
.em-emblem-img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 0 30px rgba(201,168,76,.22)); }
.em-chs { list-style: none; margin: 0 auto; padding: 0; width: 90%; max-width: 720px; display: grid; gap: 64px; }
.em-ch .em-idx { display: block; font-family: var(--font-label); font-size: 11px; letter-spacing: .38em; color: var(--gold); text-transform: uppercase; margin-bottom: 16px; }
.em-ch .em-idx b { font-weight: 400; color: var(--gold-light); margin-right: 12px; }
.em-ch h2 { font-family: var(--font-serif-ja); font-weight: 300; font-size: clamp(26px, 2.8vw, 40px); line-height: 1.6; letter-spacing: .08em; color: var(--white); margin: 0 0 20px; }
.em-ch h2 em { font-style: normal; color: var(--gold-light); }
.em-ch p { font-size: 16px; line-height: 2; letter-spacing: .05em; color: var(--gray-light); margin: 0; max-width: 32em; }
.em-progress, .em-count { display: none; }

/* ---------- 映画の形 ---------- */
.em-film.is-film { height: 420vh; }
.em-film.is-film .em-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0; overflow: clip; }
.em-film.is-film .em-stage { position: absolute; inset: 0; width: auto; margin: 0; aspect-ratio: auto; perspective: none; }
.em-film.is-film .em-emblem-img { position: absolute; right: 9vw; top: 50%; width: min(40vw, 62vh); height: auto; aspect-ratio: 1; transform: translateY(-50%); }
.em-film.is-drawn .em-emblem-img { opacity: 0; transition: opacity .6s var(--ease-smooth); }
.em-gl, .em-2d { position: absolute; inset: 0; width: 100% !important; height: 100% !important; pointer-events: none; display: block; }
.em-film.is-gl .em-2d { opacity: 0; transition: opacity .9s var(--ease-smooth); }
/* 映画の黒帯（区画に入ると上下から閉じ、出るときに開く） */
.em-film.is-film .em-sticky::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(var(--black), var(--black)) top / 100% var(--em-bar, 0px) no-repeat,
              linear-gradient(var(--black), var(--black)) bottom / 100% var(--em-bar, 0px) no-repeat; }
.em-film.is-film .em-sticky::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, rgba(10,10,10,.92) 0%, rgba(10,10,10,.55) 34%, transparent 58%),
              radial-gradient(ellipse at 70% 50%, transparent 40%, rgba(10,10,10,.6) 100%); }
.em-film.is-film .em-chs { position: absolute; z-index: 2; left: max(5vw, calc((100vw - var(--container)) / 2)); top: 50%; transform: translateY(-50%);
  width: min(540px, 40vw); height: 44vh; max-width: none; margin: 0; display: block; }
.em-film.is-film .em-ch { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(calc(-50% + 22px)); opacity: 0; visibility: hidden; filter: blur(6px);
  transition: opacity .35s var(--ease-smooth), transform .35s var(--ease-smooth), filter .35s var(--ease-smooth), visibility 0s .35s; }
.em-film.is-film .em-ch.on { opacity: 1; visibility: visible; transform: translateY(-50%); filter: none;
  transition: opacity .8s var(--ease-smooth) .3s, transform 1s var(--ease-expo) .3s, filter .8s var(--ease-smooth) .3s, visibility 0s .3s; }
.em-film.is-film .em-progress { display: block; position: absolute; z-index: 4; left: max(5vw, calc((100vw - var(--container)) / 2)); bottom: calc(var(--em-bar, 0px) + 5vh); width: 160px; height: 1px; background: rgba(255,255,255,.12); }
.em-film.is-film .em-progress i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.em-film.is-film .em-count { display: block; position: absolute; z-index: 4; right: max(5vw, calc((100vw - var(--container)) / 2)); bottom: calc(var(--em-bar, 0px) + 4.4vh);
  font-family: var(--font-label); font-size: 11px; letter-spacing: .32em; color: var(--gray); }
.em-film.is-film .em-count b { font-weight: 400; color: var(--gold-light); }

/* スマホ・縦長：紋章を上、章の文を下 */
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .em-film.is-film { height: 360vh; }
  .em-film.is-film .em-emblem-img { left: 50%; right: auto; top: calc(var(--nav-h) + 3vh); width: min(64vw, 36vh); transform: translateX(-50%); }
  .em-film.is-film .em-sticky::after { background: linear-gradient(0deg, rgba(10,10,10,.97) 0%, rgba(10,10,10,.75) 36%, transparent 60%); }
  .em-film.is-film .em-chs { left: 7vw; right: 7vw; width: auto; top: auto; bottom: 13vh; transform: none; height: 36vh; }
  .em-film.is-film .em-ch { top: auto; bottom: 0; transform: translateY(18px); }
  .em-film.is-film .em-ch.on { transform: none; }
  .em-ch h2 { font-size: 25px; }
  .em-ch p { font-size: 15px; }
  .em-film.is-film .em-progress { left: 7vw; bottom: 6vh; }
  .em-film.is-film .em-count { right: 7vw; bottom: calc(6vh - 6px); }
}
/* スマホは下に電話バーがあるので、その分だけ文を上げる */
@media (max-width: 860px) {
  .em-film.is-film .em-chs { bottom: calc(13vh + 56px); }
  .em-film.is-film .em-progress { bottom: calc(6vh + 56px); }
  .em-film.is-film .em-count { bottom: calc(6vh + 50px); }
}
