/* 公開トップの開始演出。固定層を重ねるだけで、本文の配置・寸法は変えない。
   時刻は html.home-opening-running が付いた瞬間を 0 とする（JS の時刻と同じ基準）。 */
.home-opening{display:none}
.home-opening-active .home-opening{display:block;position:fixed;inset:0;z-index:10000;overflow:hidden;touch-action:none;background:var(--white);color:var(--navy)}
.home-opening__phrase-screen,.home-opening__curtain{position:absolute;inset:0;display:grid;place-items:center;padding:16px}

/* 1. 白地にキャッチ。0.5s から 1 字ずつ 100ms 間隔、各 1s でぼかしが取れる */
.home-opening__phrase{margin:0;white-space:nowrap;text-align:center;line-height:1.8;font-weight:800;letter-spacing:.04em;font-size:clamp(.875rem,calc((100vw - 32px) / 12.8),4.6rem);visibility:hidden}
.home-opening-running .home-opening__phrase{visibility:visible}
.home-opening__char{display:inline-block}
.home-opening__phrase .home-opening__char{opacity:0;filter:blur(20px)}
.home-opening-running .home-opening__phrase .home-opening__char{animation:home-opening-clear 1s ease-out both;animation-delay:calc(500ms + var(--opening-delay,0ms))}

/* 2. 3.5s 紺の幕が上から降りる（0.7s） 3. 4.5s ロゴと団名が一緒に出る（1s） */
.home-opening__curtain{background:var(--navy);transform:translate3d(0,-100%,0)}
.home-opening-running .home-opening__curtain{animation:home-opening-curtain .7s cubic-bezier(.83,0,.17,1) 3.5s both}
.home-opening__brand{display:flex;flex-direction:column;align-items:center;gap:clamp(16px,2.4vw,28px);max-width:100%;opacity:0}
.home-opening-running .home-opening__brand{animation:home-opening-in 1s ease 4.5s both}
.home-opening__logo{display:block;width:clamp(160px,22vw,260px);width:min(clamp(160px,22vw,260px),46vh);width:min(clamp(160px,22vw,260px),46dvh);height:auto;aspect-ratio:1;border-radius:50%}
.home-opening__logo.is-broken{display:none}
.home-opening__name{margin:0;color:var(--white);text-align:center;line-height:1.5;font-weight:700;letter-spacing:.08em;font-size:clamp(1rem,2.1vw,1.5rem)}

/* 4. 6.4s 全体を 0.5s で消す */
.home-opening-running .home-opening{animation:home-opening-out .5s ease 6.4s both}

.home-opening__skip{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));z-index:1;min-width:88px;min-height:44px;padding:8px 18px;border:1px solid rgba(255,255,255,.6);border-radius:999px;background:var(--navy);color:var(--white);font:inherit;font-size:.85rem;font-weight:700;letter-spacing:.06em;cursor:pointer}
.home-opening__skip:focus-visible{outline:3px solid var(--gold);outline-offset:3px}

/* 幕が上がった後: ヘッダー（と下のドック・チーム名の帯）7.2s、タイトル 8.1s から 1 字ずつ。
   transform は付けない（ヘッダー内の固定メニューの基準が変わるため）。 */
.home-opening-active .site-header,.home-opening-active .bottom-nav,.home-opening-active .home-brandbar,.home-opening-active .home-brandbar__tag{opacity:0}
.home-opening-active .home-brandbar{overflow-x:clip} /* 動く字で横スクロールを出さない（clip は配置を変えない） */
.home-opening-running .site-header,.home-opening-running .bottom-nav,.home-opening-running .home-brandbar{animation:home-opening-in .6s ease 7.2s both}
.home-opening-running .home-brandbar__tag{animation:home-opening-in .6s ease 9.2s both}
.home-opening-title .home-opening__char{opacity:0;transform:scale(1.2) translate3d(20px,20px,0)}
.home-opening-running .home-opening-title .home-opening__char{animation:home-opening-letter .5s ease-out both;animation-delay:calc(8100ms + var(--opening-delay,0ms))}

@keyframes home-opening-clear{to{opacity:1;filter:blur(0)}}
@keyframes home-opening-curtain{to{transform:translate3d(0,0,0)}}
@keyframes home-opening-in{from{opacity:0}to{opacity:1}}
@keyframes home-opening-out{to{opacity:0}}
@keyframes home-opening-letter{to{opacity:1;transform:none}}

/* 動きを減らす設定では出さない（JS も起動しないが、途中で設定が変わったときの保険） */
@media (prefers-reduced-motion:reduce){
  .home-opening-active .home-opening{display:none}
  .home-opening-active .site-header,.home-opening-active .bottom-nav,.home-opening-active .home-brandbar,.home-opening-active .home-brandbar__tag,.home-opening-title .home-opening__char{animation:none;opacity:1;transform:none}
}
