/* ------------------------------ */
/* page: STORY */
/* ------------------------------ */

.page--story .main {
  background: var(--color-white);
}

.page--story .l-container {
  --container-max: 1320px;
  --container-gutter: 60px;
}

.storyMain {
  padding-bottom: 120px;
  /* 1280px 幅デザイン基準：リード上 375×295 / 下 480×350 */
  --story-img-01-w: min(375px, calc(var(--site-layout-width) * 375 / 1280));
  --story-img-02-w: min(480px, calc(var(--site-layout-width) * 480 / 1280));
}

/* MV下：左テキスト / 右に画像2枚（縦並び・左揃えのままカラムを行右端＝画面右へ）。行は最大幅1320pxで右寄せ */
.storyLead {
  --story-lead-row-max: min(1320px, 100%);
  width: 100%;
  padding-top: clamp(48px, 8vw, 100px);
  padding-bottom: clamp(48px, 8vw, 100px);
  overflow: hidden;
  padding-left: 150px;
}

.storyLead__row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--story-lead-row-max);
  margin-right: 0;
  margin-left: auto;
}

/* numbersLead__copy と同型：10.42vw で 1440px 時 150px ≒ pageMv__inner の左パディング */
.storyLead__copy {
  flex: 1;
  box-sizing: border-box;
  padding: 0 clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0;
  min-width: 0;
}

.storyLead__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.storyLead__text {
  margin: clamp(20px, 3vw, 28px) 0 0;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--color-text);
}

/* 画像同士は左揃え（flex-start）のまま、カラム全体を行の右端＝画面右いっぱいへ */
.storyLead__visual {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(16px, 2.5vw, 32px);
  margin: 0 0 0 auto;
  min-height: 0;
}

.storyLead__figure {
  margin: 0;
}

/* 枠＝figure、中だけ scale しても外寸は変わらない（overflow でクリップ） */
.storyEpisode__figure,
.storyRelease__figure {
  margin: 0;
  display: block;
  overflow: hidden;
  box-sizing: border-box;
}

.storyEpisode__visual .storyEpisode__figure:nth-child(1) {
  width: var(--story-episode-img-top-w);
  max-width: 100%;
  aspect-ratio: 480 / 430;
}

.storyEpisode__visual .storyEpisode__figure:nth-child(2) {
  width: var(--story-episode-img-bottom-w);
  max-width: 100%;
  aspect-ratio: 270 / 235;
}

.storyRelease__visual .storyRelease__figure:nth-child(1) {
  width: var(--story-release-img-top-w);
  max-width: 100%;
  aspect-ratio: 375 / 310;
}

.storyRelease__visual .storyRelease__figure:nth-child(2) {
  width: var(--story-release-img-bottom-w);
  max-width: 100%;
  aspect-ratio: 270 / 240;
}

.storyWalk__figure {
  margin: 0;
  display: block;
  overflow: hidden;
  box-sizing: border-box;
  width: var(--story-walk-img-w);
  max-width: 100%;
  aspect-ratio: 270 / 230;
}

.storyFuture__figure {
  margin: 0;
  display: block;
  overflow: hidden;
  box-sizing: border-box;
  width: var(--story-future-img-w);
  max-width: 100%;
  aspect-ratio: 375 / 495;
}

/* reset の img{width:100%} を上書き */
.storyLead__img {
  display: block;
  box-sizing: border-box;
  height: auto;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center;
}

.storyEpisode__img,
.storyRelease__img,
.storyWalk__img,
.storyFuture__img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center;
}

.storyLead__img--01 {
  width: var(--story-img-01-w);
  max-width: var(--story-img-01-w);
  aspect-ratio: 375 / 295;
}

.storyLead__img--02 {
  width: var(--story-img-02-w);
  max-width: var(--story-img-02-w);
  aspect-ratio: 480 / 350;
}

/* 左画像 / 右テキスト（row-reverse）。行は 1280px 基準で最大幅・画面左にフラッシュ */
.storyEpisode {
  /* 1280px 幅前提：上 480×430 / 下 270×235 */
  --story-episode-img-top-w: min(480px, calc(var(--site-layout-width) * 480 / 1280));
  --story-episode-img-bottom-w: min(270px, calc(var(--site-layout-width) * 270 / 1280));
  /* 中だけ拡大（1 = 等倍）。枠は figure の width × aspect-ratio のまま */
  --story-episode-img-top-zoom: 1.7;
  --story-episode-img-bottom-zoom: 1.7;
  width: 100%;
  padding-top: clamp(48px, 8vw, 100px);
  padding-bottom: clamp(48px, 8vw, 100px);
}

.storyEpisode__img--01 {
  transform: scale(var(--story-episode-img-top-zoom));
  transform-origin: center 50%;
}

.storyEpisode__img--02 {
  transform: scale(var(--story-episode-img-bottom-zoom));
  transform-origin: left center;
}

/* プロダクトリリース（1280基準：上 375×310 / 下 270×240）。レイアウトは storyEpisode と同型 */
.storyRelease {
  --story-release-img-top-w: min(375px, calc(100vw * 375 / 1280));
  --story-release-img-bottom-w: min(270px, calc(var(--site-layout-width) * 270 / 1280));
  width: 100%;
  padding-top: clamp(48px, 8vw, 100px);
  padding-bottom: clamp(48px, 8vw, 100px);
}

.storyRelease__img--01 {
  transform-origin: center 50%;
}

.storyRelease__img--02 {
  transform-origin: left center;
}

.storyEpisode__row,
.storyRelease__row {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  box-sizing: border-box;
  width: 100%;
  max-width: min(1280px, 100%);
  margin-left: 0;
  margin-right: auto;
}

.storyEpisode__copy,
.storyRelease__copy {
  flex: 1;
  box-sizing: border-box;
  min-width: 0;
  padding: 0 0 0 clamp(24px, 4vw, 48px);
}

.storyEpisode__title,
.storyRelease__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.storyEpisode__text,
.storyRelease__text {
  margin-top: 50px;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--color-text);
}

.storyEpisode__visual,
.storyRelease__visual {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(16px, 2.5vw, 32px);
  min-height: 0;
}

/* 左テキスト / 右上に画像1枚（270×230・1280基準）。ブロックは最大1280px・左寄せ */
.storyWalk {
  --story-walk-img-w: min(270px, calc(var(--site-layout-width) * 270 / 1280));
  --story-walk-img-zoom: 1.12;
  width: 100%;
  padding-top: clamp(48px, 8vw, 100px);
  padding-bottom: clamp(48px, 8vw, 100px);
  padding-left: 150px;
}

/* storyWalk と同レイアウト・画像のみ 375×495（1280基準） */
.storyFuture {
  --story-future-img-w: min(375px, calc(100vw * 375 / 1280));
  --story-future-img-zoom: 1.12;
  width: 100%;
  padding-top: clamp(48px, 8vw, 100px);
  padding-bottom: clamp(48px, 8vw, 100px);
  padding-left: 150px;
}

.storyWalk__row,
.storyFuture__row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  box-sizing: border-box;
  width: 100%;
  max-width: min(1280px, 100%);
  margin-left: 0;
  margin-right: auto;
}

.storyWalk__copy,
.storyFuture__copy {
  flex: 1;
  box-sizing: border-box;
  min-width: 0;
  padding: 0 clamp(24px, 4vw, 48px) 0 0;
}

.storyWalk__title,
.storyFuture__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.storyWalk__text,
.storyFuture__text {
  margin: clamp(20px, 3vw, 28px) 0 0;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--color-text);
}

.storyWalk__visual,
.storyFuture__visual {
  flex: 0 0 auto;
  min-height: 0;
}

.storyWalk__img {
  transform: scale(var(--story-walk-img-zoom));
  transform-origin: center center;
}

.storyFuture__img {
  transform: scale(var(--story-future-img-zoom));
  transform-origin: center center;
}

.storySection {
  padding: clamp(64px, 10vw, 120px) 0;
}

@media (max-width: 900px) and (min-width: 99999px) {
  /* ↑ responsive 一時 OFF */
  .storyLead__row {
    flex-direction: column;
    min-height: 0;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .storyLead__copy {
    flex: 1 1 auto;
    max-width: 100%;
    padding: 24px 20px 32px;
  }

  .storyLead__title {
    font-size: clamp(24px, 6vw, 32px);
  }

  .storyLead__visual {
    flex: none;
    width: 100%;
    margin-left: 0;
    align-items: center;
    padding: 0 20px 8px;
    box-sizing: border-box;
  }

  .storyLead__img--01 {
    width: min(100%, var(--story-img-01-w));
    max-width: min(100%, var(--story-img-01-w));
  }

  .storyLead__img--02 {
    width: min(100%, var(--story-img-02-w));
    max-width: min(100%, var(--story-img-02-w));
  }

  .storyEpisode__row,
  .storyRelease__row {
    flex-direction: column;
    max-width: 100%;
  }

  .storyEpisode__copy,
  .storyRelease__copy {
    padding: 24px 20px 32px;
  }

  .storyEpisode__title,
  .storyRelease__title {
    font-size: clamp(24px, 6vw, 32px);
  }

  .storyEpisode__visual,
  .storyRelease__visual {
    width: 100%;
    align-items: flex-end;
    padding: 0 20px 8px;
    box-sizing: border-box;
  }

  .storyEpisode__visual .storyEpisode__figure:nth-child(1) {
    width: min(100%, var(--story-episode-img-top-w));
    max-width: min(100%, var(--story-episode-img-top-w));
  }

  .storyEpisode__visual .storyEpisode__figure:nth-child(2) {
    width: min(100%, var(--story-episode-img-bottom-w));
    max-width: min(100%, var(--story-episode-img-bottom-w));
  }

  .storyRelease__visual .storyRelease__figure:nth-child(1) {
    width: min(100%, var(--story-release-img-top-w));
    max-width: min(100%, var(--story-release-img-top-w));
  }

  .storyRelease__visual .storyRelease__figure:nth-child(2) {
    width: min(100%, var(--story-release-img-bottom-w));
    max-width: min(100%, var(--story-release-img-bottom-w));
  }

  .storyWalk__row,
  .storyFuture__row {
    flex-direction: column;
    max-width: 100%;
  }

  .storyWalk__copy,
  .storyFuture__copy {
    padding: 24px 20px 32px;
  }

  .storyWalk__title,
  .storyFuture__title {
    font-size: clamp(24px, 6vw, 32px);
  }

  .storyWalk__visual,
  .storyFuture__visual {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 0 20px 8px;
    box-sizing: border-box;
  }

  .storyWalk__figure {
    width: min(100%, var(--story-walk-img-w));
    max-width: min(100%, var(--story-walk-img-w));
  }

  .storyFuture__figure {
    width: min(100%, var(--story-future-img-w));
    max-width: min(100%, var(--story-future-img-w));
  }
}

@media (max-width: 768px) and (min-width: 99999px) {
  /* ↑ responsive 一時 OFF */
  .storyMain {
    padding-bottom: 64px;
  }
}
