/* ============================================================
   トップページのオープニング（スプラッシュ）
   参考: TCD051 のスプラッシュ演出
   0.75s 背景写真 → 1.5s ロゴ → 2.5s コピー → 約4.8sでフェードアウト
   ============================================================ */

.splash { display: none; }

html.splash-active { overflow: hidden; }
html.splash-active .splash {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #fff;
  text-align: center;
}
.splash.is-leaving { animation: splashOut 0.8s ease forwards; }

/* 背景写真（白く透かす） */
.splash__bg {
  position: absolute;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1747032284071-453136f30b49?w=1920&h=1080&fit=crop&auto=format&q=80") center / cover no-repeat;
  opacity: 0;
  animation: splashBgIn 0.65s ease 0.75s forwards;
}

.splash__inner { position: relative; z-index: 1; padding: 0 24px; }
/* ロゴ周りをほんのり白くして読みやすく */
.splash__inner::before {
  content: "";
  position: absolute;
  inset: -30% -15%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255,255,255,0.85), rgba(255,255,255,0));
}

/* ロゴ：マーク＋写真が流れる文字 */
.splash__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 32px);
  margin-bottom: clamp(24px, 4vh, 40px);
  opacity: 0;
  transform: translateY(50%);
  animation: splashUp 1s ease 1.5s forwards;
}
.splash__mark {
  height: clamp(64px, 11vw, 140px);
  width: auto;
}
.splash__type {
  position: relative;
  width: clamp(220px, 44vw, 560px);
  aspect-ratio: 1443 / 360;
  overflow: hidden;
  -webkit-mask: url("../images/common/logo_type.png") center / contain no-repeat;
          mask: url("../images/common/logo_type.png") center / contain no-repeat;
  background: #1f3454;   /* 写真の読み込み前の文字色 */
}
.splash__type-photo {
  position: absolute;
  inset: -20% -10%;
  background: url("https://images.unsplash.com/photo-1747032284071-453136f30b49?w=1400&h=700&fit=crop&auto=format&q=80") center / cover no-repeat;
  filter: brightness(0.62) contrast(1.2) saturate(1.1);
  animation: splashPan 7s ease-in-out forwards;
}

/* キャッチコピー */
.splash__copy {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: #1a5fb4;
  opacity: 0;
  transform: translateY(50%);
  animation: splashUp 1s ease 2.5s forwards;
}
.splash__copy br { display: none; }

.splash__skip {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #d5e8f5;
  border-radius: 999px;
  padding: 6px 16px;
  font: inherit;
  font-size: 12px;
  color: #56697d;
  cursor: pointer;
}
.splash__skip:hover { color: #1a5fb4; }

@keyframes splashBgIn { to { opacity: 0.16; } }
@keyframes splashUp   { to { opacity: 1; transform: translateY(0); } }
@keyframes splashPan  {
  from { transform: translateX(-6%) scale(1.15); }
  to   { transform: translateX(6%)  scale(1.0); }
}
@keyframes splashOut  { to { opacity: 0; visibility: hidden; } }

@media (max-width: 640px) {
  .splash__logo { flex-direction: column; }
  .splash__type { width: 78vw; }
  .splash__copy br { display: inline; }
}

/* 動きを減らす設定の人には静止表示で短く */
@media (prefers-reduced-motion: reduce) {
  .splash__bg { animation: none; opacity: 0.16; }
  .splash__logo, .splash__copy { animation: none; opacity: 1; transform: none; }
  .splash__type-photo { animation: none; }
}
