/* ===== ヒーローブロック（full-bleed・全テーマ対応） ===== */
.bk-hero {
  position: relative;
  /* 親コンテナ（カラム）幅にフィット。サイドバー固定の旧テーマでも重ならない。
     全幅にしたい新テーマでは、ヒーローを全幅領域に置けば自動で全幅になる。 */
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.bk-hero-h-small  { min-height: 320px; }
.bk-hero-h-medium { min-height: 460px; }
.bk-hero-h-large  { min-height: 620px; }
/* full = ファーストビューを使い切る（固定ヘッダー分を引いた真のフル画面）。
   svh対応ブラウザはモバイルのURLバー分も正しく計算される */
.bk-hero-h-full   { min-height: calc(100vh - var(--tm-head-h, 64px)); border-radius: 0; }
@supports (height: 100svh) {
  .bk-hero-h-full { min-height: calc(100svh - var(--tm-head-h, 64px)); }
}

.bk-hero-media { position: absolute; inset: 0; z-index: 0; }
.bk-hero-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  /* 微速ズーム（動いて見える） */
  animation: bkHeroZoom 20s ease-in-out infinite alternate;
}
.bk-hero-fallback { background: linear-gradient(135deg, #0aa2e0, #053b56); animation: none; }
/* 動画ヒーロー: スマホ(<768px)は静止画(poster div)を表示し動画は読み込まない。
   PC幅(>=768px)はその上に動画を重ねて自動再生。JS不要のCSSメディアクエリ制御。 */
.bk-hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  display: none;
}
@media (min-width: 768px) {
  .bk-hero-video { display: block; }
}
/* 旧JSフック互換（任意・あれば優先表示） */
.bk-hero-video.bk-hero-video-on { display: block; }
/* poster静止画はズーム演出なし（落ち着いた背景） */
.bk-hero-video-poster { animation: none; }
@keyframes bkHeroZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .bk-hero-img { animation: none; }
}

.bk-hero-overlay { position: absolute; inset: 0; z-index: 1; }

.bk-hero-inner {
  position: relative; z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  color: #fff;
}
.bk-hero-a-left   .bk-hero-inner { text-align: left; }
.bk-hero-a-center .bk-hero-inner { text-align: center; }

.bk-hero-title {
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: .01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
  margin: 0;
}
.bk-hero-subtitle {
  margin-top: 14px;
  font-size: clamp(14px, 2.2vw, 19px);
  font-weight: 600;
  line-height: 1.7;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
  opacity: .96;
}
.bk-hero-cta {
  display: inline-block;
  margin-top: 26px;
  background: #0aa2e0;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(15px, 2vw, 18px);
  padding: 14px 30px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(10, 162, 224, .45);
  transition: transform .15s ease, background .15s ease;
}
.bk-hero-cta:hover { background: #0890c8; transform: translateY(-2px); color: #fff; }

@media (max-width: 600px) {
  .bk-hero-a-left .bk-hero-inner { text-align: center; }
  .bk-hero-h-large { min-height: 480px; }
  /* スマホもファーストビューいっぱい（svhでURLバー対応） */
  .bk-hero-h-full  { min-height: calc(100vh - var(--tm-head-h, 64px)); }
  @supports (height: 100svh) {
    .bk-hero-h-full { min-height: calc(100svh - var(--tm-head-h, 64px)); }
  }
}

/* ===== レトロマスク（背景動画の粗さを“味”に変える） ===== */
/* マスク重ねレイヤー（テキストの下・メディアの上） */
.bk-hero-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
/* つぶつぶ（フィルムグレイン）— SVGノイズを敷いてパッパッと動かす */
.bk-hero-fx::before {
  content: ""; position: absolute; inset: -40%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)"/></svg>');
  background-size: 180px 180px;
  opacity: .20; mix-blend-mode: overlay;
  animation: bkGrain .5s steps(5) infinite;
}
/* 走査線＋周辺減光（オーバーレイ） */
.bk-hero-fx::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.16) 3px, rgba(0,0,0,0) 4px),
    radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.5) 100%);
}
@keyframes bkGrain {
  0%{transform:translate(0,0)} 20%{transform:translate(-6%,4%)} 40%{transform:translate(4%,-5%)}
  60%{transform:translate(-3%,2%)} 80%{transform:translate(5%,1%)} 100%{transform:translate(-2%,-3%)}
}

/* --- つぶつぶだけ --- */
.bk-hero-fx-grain .bk-hero-fx::before { opacity: .26; }
.bk-hero-fx-grain .bk-hero-fx::after  { background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.4) 100%); }

/* --- 走査線だけ --- */
.bk-hero-fx-scanlines .bk-hero-fx::before { display: none; }

/* --- 昭和VHS（走査線＋粒子＋減光＋わずかにセピア） --- */
.bk-hero-fx-vhs .bk-hero-video,
.bk-hero-fx-vhs .bk-hero-img { filter: saturate(.9) contrast(1.06) sepia(.12); }

/* --- 8ミリ映画（暖色の黄ばみ・粒子・周辺減光・軽い揺れ。明滅(フリッカー)は廃止） --- */
.bk-hero-fx-film8 .bk-hero-media {
  filter: sepia(.34) saturate(1.25) contrast(1.06) brightness(1.04);
  animation: bkWeave 6s ease-in-out infinite;
}
.bk-hero-fx-film8 .bk-hero-fx::before { opacity: .30; mix-blend-mode: soft-light; animation-duration: .42s; } /* 粒子強め */
.bk-hero-fx-film8 .bk-hero-fx::after {
  /* 縦の傷は廃止（見づらいため）。横走査線も無し・暖色ビネットのみ */
  background: radial-gradient(ellipse at center, transparent 42%, rgba(28,16,0,.6) 100%);
  animation: none;
}
@keyframes bkWeave { 0%,100%{transform:translate(0,0)} 25%{transform:translate(-0.4%,0.5%)} 50%{transform:translate(0.5%,-0.3%)} 75%{transform:translate(-0.2%,0.4%)} }

/* 省エネ・酔い防止: 動きを止める設定では粒子/揺れ/明滅を停止（マスクの見た目は残す） */
@media (prefers-reduced-motion: reduce) {
  .bk-hero-fx::before,
  .bk-hero-fx-film8 .bk-hero-media,
  .bk-hero-fx-film8 .bk-hero-fx::after { animation: none; }
}

/* ===== スクロールヒント（下にスクロールできる合図・ふわふわ動く大きめ矢印） ===== */
.bk-hero-scroll {
  position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  width: 62px; height: 62px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
  text-decoration: none;
  animation: bkScrollFloat 1.8s ease-in-out infinite;
  transition: background .2s ease, opacity .4s ease, visibility .4s ease;
}
.bk-hero-scroll:hover { background: rgba(255, 255, 255, .28); }
.bk-hero-scroll-hide { opacity: 0; visibility: hidden; pointer-events: none; }
.bk-hero-scroll svg { display: block; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .4)); }
@keyframes bkScrollFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(11px); }
}
/* モバイル/タブレット(<992px)は下部固定バー(.tm-fixbar 約61px)が出るので、その上＋ホームインジケータを避けて配置 */
@media (max-width: 991.98px) {
  .bk-hero-scroll { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 600px) {
  .bk-hero-scroll { width: 54px; height: 54px; }
  .bk-hero-scroll svg { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-hero-scroll { animation: none; }
}
