/* 2026-2027 冬ページ(案: 羊が飛び出す一番上の部分)
   ポップ版の css/2026-winter.css の後に読み込んで、一番上の部分だけを差し替える。
   ・集中線がくるくる回る中に、大きなタイトル。
   ・先にタイトル「この冬の主役は… ひつじ だーー！！」が出て、そのあと切り抜いた羊12頭が
     タイトルの後ろから「わっ」とまわりに飛び出し、ぎゅっと囲んでゆらゆら揺れる(白いふち付きのステッカー風)。
   ・「動きを減らす」設定の人には、動かさずに最初から全部見せる。 */

.wk-hero.wk-hero2 {
  display: block;
  min-height: 680px;
  padding: 80px 24px 90px;
  text-align: center;
  background: linear-gradient(170deg, #5cc6f0 0%, #3cb4e6 55%, #2fa0d6 100%);
  isolation: isolate;
}
.wk-hero.wk-hero2::before, .wk-hero.wk-hero2::after { z-index: 3; }
/* 回る集中線 */
.wk-hero2-rays {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 260%;
  aspect-ratio: 1;
  margin: -130% 0 0 -130%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .24) 0 7.5deg, transparent 7.5deg 15deg);
  animation: wk2-spin 50s linear infinite;
}
@keyframes wk2-spin { to { transform: rotate(360deg); } }

/* タイトル */
.wk-hero2-title { position: relative; z-index: 2; max-width: 540px; margin: 0 auto; }
/* タイトルも羊たちと一緒に、1行ずつ「ポンッ」と出す(scale だけ動かすので、もとの傾きはそのまま) */
.wk-hero2 .wk-hero-kicker,
.wk-hero2 .wk-hero-pre,
.wk-hero2 h4 .accent,
.wk-hero2 .wk-hero-dah { animation: wk2-in .7s cubic-bezier(.3, 1.7, .5, 1) both; }
.wk-hero2 .wk-hero-kicker { animation-delay: .1s; }
.wk-hero2 .wk-hero-pre    { animation-delay: .35s; }
.wk-hero2 h4 .accent      { animation-delay: .65s; animation-duration: .9s; }
.wk-hero2 .wk-hero-dah    { animation-delay: 1.05s; }
.wk-hero2 .wk-hero-lead,
.wk-hero2 .wk-hero-period { animation: wk2-up .6s ease-out both; }
.wk-hero2 .wk-hero-lead   { animation-delay: 2.3s; }
.wk-hero2 .wk-hero-period { animation-delay: 2.5s; }
@keyframes wk2-in { 0% { opacity: 0; scale: .2; } 65% { opacity: 1; scale: 1.18; } 100% { opacity: 1; scale: 1; } }
@keyframes wk2-up { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
.wk-hero2 .wk-hero-kicker { margin-bottom: 4px; }
.wk-hero2 h4 { margin-bottom: 16px; }
.wk-hero2 .wk-hero-pre { margin: 14px 0 0; font-size: 34px; }
.wk-hero2 h4 .accent { font-size: 130px; line-height: 1.05; }
.wk-hero2 .wk-hero-dah { display: block; margin: -6px 0 0; font-size: 50px; transform: rotate(-3deg); }
.wk-hero2 .wk-hero-lead { font-size: 16px; }

/* 羊のステッカー: タイトルの後ろ(中心の方向 --fx, --fy)から、まわりへ「わっ」と飛び出す */
.wk-hero2-sheep .s {
  position: absolute;
  z-index: 1;
  display: block;
  opacity: 0;
  animation: wk2-burst .75s cubic-bezier(.25, 1.5, .5, 1) both;
}
.wk-hero2-sheep .s.f { scale: -1 1; }   /* 左右反転 */
.wk-hero2-sheep img {
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff)
    drop-shadow(5px 6px 0 rgba(29, 43, 79, .45));
  animation: wk2-bob 3.2s ease-in-out infinite;
}
@keyframes wk2-burst {
  0%   { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 0)) scale(.15) rotate(0deg); }
  60%  { opacity: 1; transform: translate(0, 0) scale(1.12) rotate(var(--r, 0deg)); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(var(--r, 0deg)); }
}
@keyframes wk2-pop {
  0%   { opacity: 0; transform: scale(0) rotate(-25deg); }
  100% { opacity: 1; transform: scale(1) rotate(var(--r, 0deg)); }
}
@keyframes wk2-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(2.5deg); }
}

/* 置き場所(パソコン)。タイトルが出そろった後(1.4秒〜)に、少しずつずらして一気に出す */
.wk-hero2-sheep .s1  { left: 1%;   top: 2%;     width: 200px; --r: -6deg; --fx: 300px;  --fy: 200px;  animation-delay: 1.40s; }
.wk-hero2-sheep .s2  { left: 19%;  top: 3%;     width: 160px; --r: 8deg;  --fx: 160px;  --fy: 220px;  animation-delay: 1.50s; }
.wk-hero2-sheep .s3  { right: 21%; top: 0;      width: 130px; --r: -6deg; --fx: -160px; --fy: 220px;  animation-delay: 1.45s; }
.wk-hero2-sheep .s4  { right: 1%;  top: 3%;     width: 250px; --r: 5deg;  --fx: -300px; --fy: 200px;  animation-delay: 1.55s; }
.wk-hero2-sheep .s5  { left: 16%;  top: 33%;    width: 110px; --r: -3deg; --fx: 220px;  --fy: 40px;   animation-delay: 1.60s; }
.wk-hero2-sheep .s6  { left: 2%;   top: 42%;    width: 130px; --r: 10deg; --fx: 380px;  --fy: -20px;  animation-delay: 1.70s; }
.wk-hero2-sheep .s7  { right: 16%; top: 35%;    width: 105px; --r: 3deg;  --fx: -220px; --fy: 30px;   animation-delay: 1.65s; }
.wk-hero2-sheep .s8  { right: 2%;  top: 45%;    width: 140px; --r: -8deg; --fx: -380px; --fy: -20px;  animation-delay: 1.75s; }
.wk-hero2-sheep .s9  { left: 0;    bottom: 3%;  width: 330px; --r: 4deg;  --fx: 300px;  --fy: -200px; animation-delay: 1.80s; }
.wk-hero2-sheep .s10 { right: 0;   bottom: 4%;  width: 280px; --r: -4deg; --fx: -300px; --fy: -200px; animation-delay: 1.85s; }
.wk-hero2-sheep .s11 { left: 33%;  bottom: 0;   width: 150px; --r: -5deg; --fx: 100px;  --fy: -240px; animation-delay: 1.90s; }
.wk-hero2-sheep .s12 { right: 26%; bottom: 0;   width: 120px; --r: 6deg;  --fx: -100px; --fy: -240px; animation-delay: 1.95s; }
.wk-hero2-sheep .s1 img  { animation-delay: .2s; }
.wk-hero2-sheep .s2 img  { animation-delay: .9s; }
.wk-hero2-sheep .s3 img  { animation-delay: 1.4s; }
.wk-hero2-sheep .s4 img  { animation-delay: .5s; }
.wk-hero2-sheep .s5 img  { animation-delay: 1.8s; animation-duration: 1.2s; }
.wk-hero2-sheep .s6 img  { animation-delay: .3s; }
.wk-hero2-sheep .s7 img  { animation-delay: 1.1s; animation-duration: 1.4s; }
.wk-hero2-sheep .s8 img  { animation-delay: .7s; }
.wk-hero2-sheep .s9 img  { animation-delay: 1.6s; }
.wk-hero2-sheep .s10 img { animation-delay: 1s; }
.wk-hero2-sheep .s11 img { animation-delay: .4s; animation-duration: 2.6s; }
.wk-hero2-sheep .s12 img { animation-delay: 1.3s; animation-duration: 2.8s; }

/* スマホ */
@media screen and (max-width: 768px) {
  .wk-hero.wk-hero2 { min-height: 0; padding: 160px 12px 200px; }
  .wk-hero2 .wk-hero-pre { font-size: 22px; }
  .wk-hero2 h4 .accent { font-size: 76px; }
  .wk-hero2 .wk-hero-dah { font-size: 30px; }
  .wk-hero2 .wk-hero-lead { font-size: 14px; }
  .wk-hero2-sheep .s1  { left: -2%;  top: 0;      width: 104px; }
  .wk-hero2-sheep .s2  { left: 25%;  top: 14px;   width: 84px; }
  .wk-hero2-sheep .s3  { right: 24%; top: 4px;    width: 66px; }
  .wk-hero2-sheep .s4  { right: -2%; top: 6px;    width: 124px; }
  .wk-hero2-sheep .s5  { left: 1%;   top: auto; bottom: 150px; width: 54px; }
  .wk-hero2-sheep .s7  { right: 1%;  top: auto; bottom: 160px; width: 52px; }
  .wk-hero2-sheep .s6, .wk-hero2-sheep .s8 { display: none; }
  .wk-hero2-sheep .s9  { left: -8px;  bottom: 8px;  width: 170px; }
  .wk-hero2-sheep .s10 { right: -6px; bottom: 44px; width: 150px; }
  .wk-hero2-sheep .s11 { left: 47%;  bottom: 0;   width: 76px; }
  .wk-hero2-sheep .s12 { right: 32%; bottom: 92px; width: 60px; }
  .wk-hero2-sheep .s { --fx: 0px; --fy: 0px; }
}

/* ===== ページを開いたときの演出: 画面いっぱいに、羊とタイトルがポコポコ飛び出す =====
   ・一番上の部分(.wk-hero2)を script で複製して、画面いっぱいの .wk-intro2 の中で再生する。
   ・1回の訪問(タブ)につき1回。2回目以降・「動きを減らす」設定の人には出さない。URL に ?intro を付けると毎回再生(確認用)。
   ・画面のどこかを押すか「とばす」で、すぐ本編へ。
   ・本編の一番上の部分は、演出を見た後は動きを終えた状態で表示(.is-static)。
     演出を出さないときは、画面に入ってきたときに動き出す(.is-play)。 */
.wk-intro2 {
  position: fixed;
  inset: 0;
  z-index: 100000;
  overflow: hidden;
  cursor: pointer;
  background: #3cb4e6;
  animation: wk2-intro-out .7s ease-in 4.4s forwards;
}
.wk-intro2.is-done { animation: wk2-intro-out .35s ease-in forwards; }
@keyframes wk2-intro-out { to { opacity: 0; visibility: hidden; transform: scale(1.08); } }
html.wk-intro-lock, html.wk-intro-lock body { overflow: hidden; }
.wk-intro2 .wk-hero.wk-hero2 {
  position: absolute;
  inset: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 40px 20px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 15px;
}
.wk-intro2 .wk-hero-lead,
.wk-intro2 .wk-hero-period { display: none; }
.wk-intro2 .wk-hero2 h4 .accent { font-size: 160px; }
.wk-intro2 .wk-hero2 .wk-hero-pre { font-size: 40px; }
.wk-intro2 .wk-hero2 .wk-hero-dah { font-size: 58px; }
.wk-intro2 .wk-hero2-sheep .s1  { width: 250px; }
.wk-intro2 .wk-hero2-sheep .s2  { width: 200px; left: 21%; }
.wk-intro2 .wk-hero2-sheep .s3  { width: 160px; right: 22%; }
.wk-intro2 .wk-hero2-sheep .s4  { width: 300px; }
.wk-intro2 .wk-hero2-sheep .s5  { width: 130px; left: 19%; top: 36%; }
.wk-intro2 .wk-hero2-sheep .s6  { width: 160px; }
.wk-intro2 .wk-hero2-sheep .s7  { width: 125px; right: 19%; top: 37%; }
.wk-intro2 .wk-hero2-sheep .s8  { width: 170px; }
.wk-intro2 .wk-hero2-sheep .s9  { width: 400px; }
.wk-intro2 .wk-hero2-sheep .s10 { width: 360px; }
.wk-intro2 .wk-hero2-sheep .s11 { width: 180px; left: 33%; }
.wk-intro2 .wk-hero2-sheep .s12 { width: 170px; right: 29%; }
.wk-intro2-skip {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: 16px;
  padding: 6px 16px;
  border: 2px solid #1d2b4f;
  border-radius: 999px;
  background: #fff;
  color: #1d2b4f;
  font: 800 13px/1.4 "M PLUS Rounded 1c", sans-serif;
  cursor: pointer;
}
@media screen and (max-width: 768px) {
  .wk-intro2 .wk-hero.wk-hero2 { padding: 20px 12px; }
  .wk-intro2 .wk-hero2 h4 .accent { font-size: 84px; }
  .wk-intro2 .wk-hero2 .wk-hero-pre { font-size: 24px; }
  .wk-intro2 .wk-hero2 .wk-hero-dah { font-size: 34px; }
  .wk-intro2 .wk-hero2-sheep .s1  { width: 130px; left: -2%; top: 2%; }
  .wk-intro2 .wk-hero2-sheep .s2  { width: 104px; left: 30%; top: 4%; }
  .wk-intro2 .wk-hero2-sheep .s3  { width: 80px;  right: 30%; top: 12%; }
  .wk-intro2 .wk-hero2-sheep .s4  { width: 150px; right: -3%; top: 3%; }
  .wk-intro2 .wk-hero2-sheep .s5  { width: 70px;  left: 6%; top: 19%; }
  .wk-intro2 .wk-hero2-sheep .s7  { width: 66px;  right: 6%; top: 22%; }
  .wk-intro2 .wk-hero2-sheep .s6  { display: block; width: 84px; left: 2%; top: auto; bottom: 22%; }
  .wk-intro2 .wk-hero2-sheep .s8  { display: block; width: 90px; right: 2%; top: auto; bottom: 24%; }
  .wk-intro2 .wk-hero2-sheep .s9  { width: 200px; left: -10px; bottom: 3%; }
  .wk-intro2 .wk-hero2-sheep .s10 { width: 180px; right: -8px; bottom: 11%; }
  .wk-intro2 .wk-hero2-sheep .s11 { width: 100px; left: 32%; bottom: 13%; }
  .wk-intro2 .wk-hero2-sheep .s12 { width: 84px;  right: 34%; bottom: 2%; }
  .wk-intro2 .wk-hero2-sheep .s { --fx: 0px; --fy: 0px; }
}

/* 本編の一番上の部分: 演出を見た後は、動きを終えた状態(ゆらゆら・集中線はそのまま) */
.wk-hero2.is-static,
.wk-hero2.is-static * { animation-delay: -30s !important; }
/* 演出を出さないときは、画面に入るまで止めておく */
.wk-hero2:not(.is-play):not(.is-static),
.wk-hero2:not(.is-play):not(.is-static) * { animation-play-state: paused !important; }

/* ===== 羊を押すと「メェ～」 =====
   一番上の部分の羊を押すと、ぷよんと弾んで吹き出しが出て、鳴き声が鳴る(script で)。
   鳴き声は、録音ファイル(images/2026-winter/baa.mp3 など)があればそれを鳴らし、なければブラウザで作った声を鳴らす。 */
#contents .wk-hero2-title { pointer-events: none; }   /* タイトルの透明な部分が、後ろの羊の「押す」をじゃましないように */
#contents .wk-hero2-sheep .s { cursor: url("../images/2026-winter/cursor-sheep-link.png") 3 20, pointer; -webkit-tap-highlight-color: transparent; }
.wk-baa {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: -10px;
  padding: 3px 14px;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: 800 16px/1.4 "M PLUS Rounded 1c", sans-serif;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--navy);
  pointer-events: none;
  animation: wk-baa 1s ease-out forwards;
}
.wk-hero2-sheep .s.f .wk-baa { scale: -1 1; }   /* 左右反転した羊でも文字は正しい向きに */
@keyframes wk-baa {
  0%   { opacity: 0; transform: translate(-50%, 10px) scale(.4); }
  20%  { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
  70%  { opacity: 1; transform: translate(-50%, -18px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(.95); }
}
@media screen and (max-width: 768px) {
  .wk-baa { font-size: 13px; padding: 2px 10px; border-width: 2px; box-shadow: 2px 2px 0 var(--navy); }
}

@media (prefers-reduced-motion: reduce) {
  .wk-hero2 * { animation: none !important; opacity: 1 !important; }
  .wk-intro2 { display: none; }
  .wk-hero2-sheep .s { transform: rotate(var(--r, 0deg)); }
}
