/* ---------- スクロールで現れる ---------- */
.js-reveal [data-reveal]:not(.is-in) { opacity: 0; }
[data-reveal].is-in {
  animation: revealUp 1.3s cubic-bezier(0.165, 0.84, 0.44, 1) var(--reveal-delay, 0ms) backwards;
}
[data-reveal="left"].is-in { animation-name: revealLeft; }
[data-reveal="right"].is-in { animation-name: revealRight; }
[data-reveal="image"].is-in { animation-name: revealImage; animation-duration: 1.5s; }
@keyframes revealUp { from { opacity: 0; transform: translate3d(0, 56px, 0); } to { opacity: 1; transform: none; } }
@keyframes revealLeft { from { opacity: 0; transform: translate3d(-72px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes revealRight { from { opacity: 0; transform: translate3d(72px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes revealImage { from { opacity: 0; clip-path: inset(14% 0 0 0); transform: translate3d(0, 40px, 0); } to { opacity: 1; clip-path: inset(0 0 0 0); transform: none; } }

/* ---------- 流れる大きな英字（帯） ---------- */
.band-marquee { overflow: hidden; background: var(--surface-alt); border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone); padding: 0 !important; }
.band-marquee .mq-track { display: flex; width: max-content; animation: mq 34s linear infinite; }
.band-marquee span { flex: 0 0 auto; padding: 1.1rem 2.2rem 1.1rem 0; font-family: 'Cormorant Garamond', serif; font-weight: 500; font-style: italic; font-size: clamp(2.6rem, 6.4vw, 5.6rem); letter-spacing: -0.01em; line-height: 1; white-space: nowrap; color: rgba(29, 91, 148, 0.22); }
.band-marquee span b { font-style: normal; font-weight: 500; color: rgba(42, 115, 184, 0.75); padding: 0 1.6rem 0 0; }
@keyframes mq { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-33.3333%, 0, 0); } }

/* ---------- ヒーロー（スクロール連動） ---------- */
.mhero {
  --c-x: 33vw; --c-y: 15vh; --c-w: 30vw; --c-h: 62vh;
  --l-x: 5vw; --l-y: 44vh; --l-w: 21vw; --l-h: 26vh;
  --t-x: 20vw; --t-y: 9vh; --t-w: 23vw; --t-h: 24vh;
  --r-x: 64vw; --r-y: 34vh; --r-w: 22vw; --r-h: 25vh;
  --b-x: 72vw; --b-y: 64vh; --b-w: 20vw; --b-h: 24vh;
  position: relative;
  height: 210svh;
  min-height: calc(100svh + 560px);
  padding: 0 !important;
  background: var(--bg);
}
.mhero__sticky { position: sticky; top: 0; height: 100svh; min-height: 640px; overflow: hidden; background: var(--bg); }

/* 中央の枠：最初は全画面、スクロールで中央のカードに */
.mhero__frame {
  position: absolute; z-index: 30; left: 0; top: 0; width: 100%; height: 100%;
  overflow: hidden; background: #DCEFFA; border-radius: 0;
  transition: left 980ms cubic-bezier(0.22, 0.61, 0.36, 1), top 980ms cubic-bezier(0.22, 0.61, 0.36, 1), width 980ms cubic-bezier(0.22, 0.61, 0.36, 1), height 980ms cubic-bezier(0.22, 0.61, 0.36, 1), border-radius 980ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: left, top, width, height;
}
.mhero.is-step-1 .mhero__frame { left: var(--c-x); top: var(--c-y); width: var(--c-w); height: var(--c-h); border-radius: 4px; }
.mhero__slides { position: relative; width: 100%; height: 100%; overflow: hidden; }
.mhero__slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; z-index: 1; transition: opacity 1500ms ease; }
.mhero__slide.is-current { opacity: 1; visibility: visible; z-index: 2; }
.mhero__slide.is-next { opacity: 0; visibility: visible; z-index: 3; }
.mhero__slide.is-next.is-fade-in { opacity: 1; }
.mhero__slide img { position: absolute; top: 0; left: -32px; width: calc(100% + 64px); height: 100%; max-width: none; object-fit: cover; transform: translate3d(-16px, 0, 0); }
.mhero__slide.is-panning img { animation: heroPan 5600ms linear forwards; }
@keyframes heroPan { from { transform: translate3d(-16px, 0, 0); } to { transform: translate3d(16px, 0, 0); } }
.mhero__shade { position: absolute; inset: 0; z-index: 5; pointer-events: none; transition: opacity 620ms;
  background: linear-gradient(90deg, rgba(20, 60, 90, 0.42) 0%, rgba(20, 60, 90, 0.12) 46%, rgba(20, 60, 90, 0.04) 66%, rgba(20, 60, 90, 0.16) 100%), linear-gradient(0deg, rgba(20, 60, 90, 0.34) 0%, rgba(20, 60, 90, 0) 46%); }
.mhero.is-step-1 .mhero__shade { opacity: 0.04; }

/* 流れる大きな英字（前：白／奥：茶色） */
.mhero__word { position: absolute; left: 0; right: 0; transform: translateY(-50%); overflow: hidden; pointer-events: none; top: 46%; }
.mhero__track { display: flex; width: max-content; align-items: center; animation: heroMarquee 24s linear infinite; font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500; font-size: clamp(88px, 11.5vw, 210px); letter-spacing: -0.03em; line-height: 1; }
.mhero__track span { flex: 0 0 auto; padding-right: 0.4em; white-space: nowrap; }
@keyframes heroMarquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-33.3333%, 0, 0); } }
.mhero__word--front { z-index: 45; color: rgba(255, 255, 255, 0.34); transition: opacity 520ms; }
.mhero.is-step-1 .mhero__word--front { opacity: 0; }
.mhero__word--back { z-index: 40; color: rgba(29, 91, 148, 0.2); opacity: 0; transition: opacity 760ms; }
.mhero.is-step-1 .mhero__word--back { opacity: 1; }
.mhero.is-offscreen .mhero__track, .mhero.is-offscreen .mhero__slide.is-panning img { animation-play-state: paused; }

/* 周囲の4枚 */
.mhero__gallery { position: absolute; inset: 0; pointer-events: none; }
.mhero__tile { position: absolute; margin: 0; overflow: hidden; border-radius: 4px; background: #E6F4FB; opacity: 0;
  transition: opacity 900ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 980ms cubic-bezier(0.22, 0.61, 0.36, 1); will-change: opacity, transform; }
.mhero__tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mhero__tile--l { z-index: 51; left: var(--l-x); top: var(--l-y); width: var(--l-w); height: var(--l-h); transform: translate3d(-120px, 0, 0); }
.mhero__tile--t { z-index: 54; left: var(--t-x); top: var(--t-y); width: var(--t-w); height: var(--t-h); transform: translate3d(0, -105px, 0); }
.mhero__tile--r { z-index: 52; left: var(--r-x); top: var(--r-y); width: var(--r-w); height: var(--r-h); transform: translate3d(120px, 0, 0); }
.mhero__tile--b { z-index: 53; left: var(--b-x); top: var(--b-y); width: var(--b-w); height: var(--b-h); transform: translate3d(130px, 28px, 0); }
.mhero.is-step-1 .mhero__tile { opacity: 1; transform: translate3d(0, 0, 0); }
.mhero.is-step-1 .mhero__tile--t { transition-delay: 80ms; }
.mhero.is-step-1 .mhero__tile--r { transition-delay: 160ms; }
.mhero.is-step-1 .mhero__tile--b { transition-delay: 240ms; }

/* コピー（最初の全画面のとき） */
.mhero__copy { position: absolute; z-index: 50; left: clamp(24px, 4vw, 64px); bottom: clamp(96px, 14vh, 150px); width: min(640px, 86vw); color: #fff; text-shadow: 0 2px 22px rgba(0, 0, 0, 0.3); transition: opacity 520ms, transform 620ms; }
.mhero.is-step-1 .mhero__copy { opacity: 0; transform: translate3d(0, -12px, 0); pointer-events: none; }
.mhero__eyebrow { display: block; font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 0.95rem; letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 1.1rem; color: rgba(255, 255, 255, 0.96); }
.mhero__title { font-family: 'Noto Serif JP', serif; font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.3rem); line-height: 1.45; letter-spacing: 0.03em; margin: 0; color: #fff; }
.mhero__title em { font-style: normal; font-weight: 500; }
.mhero__title .nb { white-space: nowrap; }
.mhero__lead { margin: 1.2rem 0 0; font-size: 1rem; line-height: 1.95; font-weight: 500; color: rgba(255, 255, 255, 0.96); }
.mhero__scroll { position: absolute; z-index: 50; right: clamp(24px, 4vw, 64px); bottom: 7vh; display: flex; align-items: center; gap: 12px; color: #fff; font-family: 'Cormorant Garamond', serif; font-size: 0.8rem; letter-spacing: 0.3em; transition: opacity 420ms; }
.mhero__scroll i { position: relative; display: block; width: 64px; height: 1px; overflow: hidden; background: rgba(255, 255, 255, 0.4); }
.mhero__scroll i::after { content: ''; position: absolute; left: -100%; top: 0; width: 100%; height: 1px; background: #fff; animation: scrollLine 1.9s ease-in-out infinite; }
@keyframes scrollLine { 0% { transform: translateX(0); } 70%, 100% { transform: translateX(210%); } }
.mhero.is-step-1 .mhero__scroll { opacity: 0; }

/* 説明パネル（最後） */
.mhero__panel { position: absolute; z-index: 60; left: 2.6vw; bottom: 3.2vh; width: min(560px, 94vw); padding: 1.6rem 1.8rem 1.5rem; background: linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.93) 78%, rgba(255, 255, 255, 0) 100%);
  opacity: 0; transform: translate3d(0, 18px, 0); pointer-events: none; transition: opacity 560ms, transform 680ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.mhero.is-step-2 .mhero__panel { opacity: 1; transform: none; pointer-events: auto; }
.mhero__panel-title { font-family: 'Noto Serif JP', serif; font-weight: 400; font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.5; margin: 0 0 1rem; color: var(--text); }
.mhero__panel-title em { font-style: normal; color: var(--teal-dark); font-weight: 500; }
.mhero__panel .hero-facts { margin: 0 0 1.1rem; padding: 0.9rem 0; }
.mhero__panel .hero-facts b { font-size: 2.2rem; }
.mhero__panel .hero-actions { margin: 0; }

/* ---------- 動きオフ／簡易表示（JSなし・動きを減らす設定） ---------- */
.motion-off .mhero { height: auto; min-height: 0; }
.motion-off .mhero__sticky { position: relative; height: min(92vh, 820px); min-height: 600px; }
.motion-off .mhero__tile, .motion-off .mhero__word--back { display: none; }
.motion-off .mhero__word--front { opacity: 1; }
.motion-off .mhero__panel { opacity: 1; transform: none; pointer-events: auto; left: 0; right: 0; bottom: 0; width: 100%; background: rgba(255, 255, 255, 0.95); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.4rem; padding: 1.2rem clamp(24px, 4vw, 64px); }
.motion-off .mhero__panel-title { display: none; }
.motion-off .mhero__panel .hero-facts { border: 0; margin: 0; padding: 0; }
.motion-off .mhero__copy { bottom: 190px; }
.motion-off [data-reveal] { opacity: 1 !important; animation: none !important; }
.motion-off .mhero__slide img, .motion-off .mhero__track, .motion-off .band-marquee .mq-track { animation: none !important; }
.motion-off .mhero__scroll { display: none; }

/* ---------- 切り替えボタン ---------- */
.motion-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 120; font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; color: var(--text); background: rgba(255, 255, 255, 0.95); border: 1.5px solid var(--text); border-radius: 999px; padding: 0.45rem 1rem; cursor: pointer; }
.motion-toggle:hover { background: var(--sand); }
.motion-toggle:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; animation: none !important; }
  .mhero__track, .band-marquee .mq-track, .mhero__slide.is-panning img { animation: none !important; }
}

/* ---------- スマホ ---------- */
@media (max-width: 760px) {
  .mhero { --c-x: 17vw; --c-y: 15vh; --c-w: 66vw; --c-h: 50vh;
    --l-x: 2vw; --l-y: 58vh; --l-w: 36vw; --l-h: 17vh;
    --r-x: 62vw; --r-y: 24vh; --r-w: 36vw; --r-h: 17vh;
    height: 230svh; }
  .mhero__tile--t, .mhero__tile--b { display: none; }
  .mhero__title { font-size: 1.7rem; }
  .mhero__copy { width: 92vw; }
  .mhero__panel { left: 3vw; width: 94vw; padding: 1.2rem 1.2rem 1.1rem; }
  .mhero__panel .hero-facts { gap: 1.1rem; }
  .mhero__panel .hero-facts b { font-size: 1.7rem; }
  .mhero__panel .hero-actions { gap: 0.6rem; }
  .mhero__panel .btn-primary { padding: 0.7rem 1rem; font-size: 0.82rem; }
  .motion-off .mhero__sticky { min-height: 560px; }
  .motion-off .mhero__panel { padding-bottom: 1rem; }
  .motion-off .mhero__copy { bottom: 230px; }
}

/* ---------- ヒーロー内の部品（このサイト用） ---------- */
.mhero__slide img { object-position: center 40%; }
.mhero__tile img { object-position: center 30%; }
.mhero__panel .hero-bullets { margin: 0 0 1.1rem; }
.mhero__panel .hero-bullets li { font-size: 0.9rem; color: var(--secondary); }
.mhero__panel .hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.mhero__panel .sns-strip { margin-top: 1rem; }
.mhero__title .nb, .nb { white-space: nowrap; }
.mhero__ribbon { position: absolute; z-index: 47; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }
.mhero__ribbon path { fill: none; stroke: #3DB5EC; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 3200; stroke-dashoffset: 3200; animation: ribbonDraw 3.2s 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
@keyframes ribbonDraw { to { stroke-dashoffset: 0; } }
.mhero.is-step-1 .mhero__ribbon { opacity: 0.55; transition: opacity 700ms; }
.motion-off .mhero__ribbon path { animation: none; stroke-dashoffset: 0; }
.band-marquee { background: #E1F2FB; border-color: #BFE3F6; }
@media (max-width: 760px) {
  .mhero__ribbon path { stroke-width: 6; }
}

/* ---------- 人が切れない表示（2026-11-11） ----------
   写真は全体を見せ（contain）、余白は同じ写真をぼかして埋める */
.mhero__slide::before, .mhero__tile::before { content: ''; position: absolute; inset: -40px; z-index: 0;
  background: var(--src) center / cover no-repeat; filter: blur(28px) saturate(1.05); opacity: 0.9; }
.mhero__slide img, .mhero__tile img { z-index: 1; object-fit: contain; object-position: center; }
.mhero__tile img { position: relative; }
.mhero__slide img { left: 0; width: 100%; transform: none; }
.mhero__slide.is-panning img { animation: heroZoom 5600ms linear forwards; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.03); } }
.mhero__slide img, .mhero__tile img { filter: drop-shadow(0 10px 30px rgba(20, 60, 90, 0.18)); }
@media (max-width: 760px) {
  /* 縦長の画面では写真を上寄せにして、下のぼかし部分に見出しを置く */
  .mhero__slide img { object-position: center 18%; }
}
