/* ==========================================================================
   page-wipe.css — ページを移る時に、ロゴ色の幕がさっと横切る
   --------------------------------------------------------------------------
   1. サイト内のリンクを押す → 幕が左から右へ閉じる（is-wipe-out）→ 次のページへ
   2. 次のページを開いた瞬間は幕が閉じた状態（is-wipe-in）→ 右へ抜けて晴れる
   動きは assets/js/modules/page-wipe.js。「視差効果を減らす」設定の端末では出しません
   速さを変える時は page-wipe.js の WIPE_MS も合わせてください
   ========================================================================== */

.page-wipe {
  position: fixed;
  inset: 0;
  z-index: var(--z-wipe);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--texture-grain-light), var(--gradient-brand-deep);
  pointer-events: none;
  visibility: hidden;
  clip-path: inset(0 100% 0 0);
}

.page-wipe > img {
  width: min(9rem, 36vw);
  height: auto;
}

.page-wipe > * {
  opacity: 0;
}

/* 1. 閉じる（左から右へ） */
.is-wipe-out .page-wipe {
  visibility: visible;
  pointer-events: auto;
  animation: wipe-close 0.42s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.is-wipe-out .page-wipe > * {
  animation: wipe-logo 0.3s ease 0.2s forwards;
}

@keyframes wipe-close {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes wipe-logo {
  to { opacity: 1; }
}

/* 2. 開いた時：閉じた幕が右へ抜けていく */
.is-wipe-in .page-wipe {
  visibility: visible;
  clip-path: inset(0 0 0 0);
  animation: wipe-open 0.55s cubic-bezier(0.76, 0, 0.24, 1) 0.08s forwards;
}

.is-wipe-in .page-wipe > * {
  opacity: 1;
  animation: wipe-logo-out 0.3s ease 0.1s forwards;
}

@keyframes wipe-open {
  from { clip-path: inset(0 0 0 0); }
  to   { clip-path: inset(0 0 0 100%); visibility: hidden; }
}

@keyframes wipe-logo-out {
  to { opacity: 0; }
}
