/* ============================================================
   MESSAGE PAGE Styles — カンプ 01_toshin_message_v0 準拠
   アートボード 1920×3683px → ×0.667 で 1280px 基準
   ============================================================ */

/* ----------------------------------------------------------------
   0. MESSAGE専用ヘッダー：カンプ通りファーストビュー上に重ねる
   ---------------------------------------------------------------- */
.message-page .sub-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  transition: background-color 0.28s var(--ease-out), border-color 0.28s var(--ease-out);
}

.message-page .sub-header__logo {
  color: #0b2b3d;
}

.message-page .sub-header__menu-btn span,
.message-page .sub-header.nav-open .sub-header__menu-btn span {
  background-color: rgba(255, 255, 255, 0.78);
}

.message-page .sub-header__menu-label {
  color: rgba(255, 255, 255, 0.78);
}

.message-page .sub-header.sub-header--scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e8e7e7;
}

.message-page .sub-header.sub-header--scrolled .sub-header__menu-btn span {
  background-color: var(--text-body);
}

.message-page .sub-header.sub-header--scrolled .sub-header__menu-label {
  color: var(--text-body);
}

/* ----------------------------------------------------------------
   1. HERO
   背景 #b3b3b3、左寄せ
   カンプ: MESSAGE y≈0〜740px (1920基準) → ×0.667 ≈ 0〜494px
   ---------------------------------------------------------------- */
.message-hero {
  position: relative;
  background-color: #102d3c;
  height: clamp(360px, 33.85vw, 650px);
  min-height: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* ヒーロー背景写真 */
.message-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.message-page .message-hero.sub-kv-reveal > .message-hero__bg {
  position: absolute;
  z-index: 0;
}

.message-page .message-hero.sub-kv-reveal > .message-hero__inner {
  position: relative;
  z-index: 4;
}

.message-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.message-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(0, 20, 35, 0.58) 0%, rgba(0, 20, 35, 0.26) 48%, rgba(0, 20, 35, 0.2) 100%),
    rgba(3, 24, 43, 0.1);
}

.message-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: calc(44rem / 16) clamp(48px, 5.9vw, 112px) 0;
}

.message-hero__heading-wrap {
  display: flex;
  flex-direction: column;
  gap: calc(10rem / 16);
}

/* ヒーロー英字: style.cssのグローバル定義(80px)をページ固有値で上書き
   design-spec: fontSize=62px(1920基準) → ×0.667 = 41px
   textContent="Message"だが PNG参照で uppercase 表示
*/
.message-hero__en {
  font-size: clamp(calc(41rem / 16), 3.23vw, calc(62rem / 16)) !important;
  line-height: 1.05 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase;
  color: #fff !important;
}

/* ヒーロー和字: style.cssのグローバル定義を上書き
   design-spec: fontSize=24px(1920基準) → ×0.667 = 16px
*/
.message-hero__ja {
  font-size: clamp(calc(14rem / 16), 1.25vw, calc(24rem / 16)) !important;
  letter-spacing: 0.2em !important;
  color: #fff !important;
  margin-top: calc(8rem / 16) !important;
}

/* ----------------------------------------------------------------
   2. MAIN MESSAGE（2カラム）
   背景 #dce9ef 淡ブルー
   カンプ: y≈740〜2120px(1920基準) → ×0.667 ≈ 494〜1414px
   ---------------------------------------------------------------- */
.message-main {
  background-color: #dce9ef;
  overflow: visible;
}

.message-main__inner {
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 50%) minmax(0, 50%);
  align-items: start;
  max-width: calc(1280rem / 16);
}

/* ---- 左カラム：テキスト ---- */
.message-main__text {
  width: min(calc(692rem / 16), calc(100% - clamp(80px, 10vw, 192px)));
  margin-left: clamp(64px, 5vw, 96px);
  padding: clamp(80px, 8.2vw, 158px) 0 clamp(40px, 4vw, 76px);
}

/* 大見出し「失敗することは…」
   カンプ: fontSize=36, leading=63, tracking=100(=0.1em) → ×0.667 = 24px
*/
.message-main__heading {
  font-family: var(--jp-font);
  font-size: clamp(calc(20rem / 16), 1.67vw, calc(26rem / 16));
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0;
  color: #231815;
  margin-bottom: clamp(calc(34rem / 16), 3.2vw, calc(62rem / 16));
}

/* 本文
   カンプ: fontSize=18, leading=31.5, tracking=75
   → ×0.667 = 12px/21px だが読みやすさのため 14px/1.75 に設定
*/
.message-main__body {
  font-family: var(--jp-font);
  font-size: clamp(calc(12rem / 16), 0.84vw, calc(16rem / 16));
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.075em;         /* tracking=75 */
  color: #231815;
}

.message-main__body p {
  margin-bottom: clamp(calc(15rem / 16), 1.35vw, calc(26rem / 16));
}

.message-main__body p:last-child {
  margin-bottom: 0;
}

/* 署名ブロック
   カンプ: fontSize=18, leading=31.5, tracking=75 → ×0.667 = 12px/21px
   署名名前: fontSize=18相当 → 12pxだと小さすぎるため 14px に
*/
.message-main__signature {
  margin-top: clamp(calc(34rem / 16), 3.2vw, calc(62rem / 16));
  font-family: var(--jp-font);
  font-size: clamp(calc(12rem / 16), 0.84vw, calc(16rem / 16));
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.075em;           /* tracking=75 */
  color: #231815;
}

.message-main__signature-name {
  font-family: var(--jp-font);
  font-size: clamp(calc(18rem / 16), 1.46vw, calc(28rem / 16));
  font-weight: 500;
  letter-spacing: 0.075em;
  color: #231815;
  margin-top: calc(8rem / 16);
  line-height: 1.35;
}

/* ---- 右カラム：写真（sticky + 右端フルブリード）
   people/index の .pi-dept__photo と同パターン
   スクロール追従でテキストに寄り添う
---- */
.message-main__image {
  position: sticky;
  top: 60px;
  width: 100%;
  aspect-ratio: 960 / 1147;
  align-self: start;
  overflow: hidden;
  margin-top: clamp(90px, 8.4vw, 162px);
}

.message-main__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ----------------------------------------------------------------
   3. VIDEO SECTION
   背景 #dce9ef 継続
   カンプ: GroupItem x=387.4, y=2122.8, w=1145.1, h=643.6
   → ×0.667 = x=258, y=1416, w=764, h=429
   赤斜め線: PathItem x=387.4, y=2122.8, w=1145.1, h=643.6, stroke=#dc175a, strokeWidth=7
   → ×0.667 = strokeWidth≈5px
   ---------------------------------------------------------------- */
.message-video {
  background-color: #dce9ef;
  padding: clamp(48px, 4.2vw, 80px) calc(100rem / 16) clamp(92px, 7.5vw, 144px);
}

.message-video__inner {
  max-width: clamp(calc(764rem / 16), 59.64vw, calc(1145rem / 16));
  margin: 0 auto;
}

.message-video .video-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1145 / 644;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  background: #06283a;
  color: #fff;
}

.message-video .video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  opacity: 0.58;
  filter: saturate(0.95) contrast(1.08);
}

.message-video .video-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 91, 150, 0.45);
  pointer-events: none;
  z-index: 1;
}

/* 動画プレースホルダー（実画像未設定時） */
.message-video .video-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--navy-deep);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: calc(24rem / 16);
}

.video-thumb__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: clamp(56px, 5vw, 96px);
  height: clamp(56px, 5vw, 96px);
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.video-thumb__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  width: 0;
  height: 0;
  border-top: clamp(9px, 0.8vw, 15px) solid transparent;
  border-bottom: clamp(9px, 0.8vw, 15px) solid transparent;
  border-left: clamp(14px, 1.15vw, 22px) solid #314251;
  transform: translate(-50%, -50%);
}

.message-video .video-thumb .video-thumb__text {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 100%;
  padding: 0 clamp(28px, 5vw, 96px);
  font-family: var(--jp-font);
  font-size: clamp(calc(12rem / 16), 1.25vw, calc(24rem / 16));
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.28em;
  color: #fff;
  text-align: center;
  transform: translate(-50%, -50%);
}

/* ----------------------------------------------------------------
   4. NEXT PAGE カード
   背景 #0063ae、カンプ: x=265.5, y=3001.9, w=1389, h=292.8
   → ×0.667: x=177, y=2003, w=927, h=195
   → 1280px基準では中央配置で幅最大
   ---------------------------------------------------------------- */
/* message-next は廃止 → style.css の .ct-next を使用 */

/* ----------------------------------------------------------------
   5. cFooterRecruit-wrap（style.css の定義を流用）
   ---------------------------------------------------------------- */
/* style.css に定義済み。追加スタイルなし */

/* ----------------------------------------------------------------
   6. RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 1024px) {
  .message-hero {
    height: clamp(300px, 42vw, 430px);
  }

  .message-hero__inner {
    padding: calc(40rem / 16) calc(40rem / 16) 0;
  }

  .message-main__text {
    margin-left: calc(56rem / 16);
    width: calc(100% - 96px);
  }

  .message-main__heading {
    font-size: calc(20rem / 16);
  }

  .message-video {
    padding: calc(50rem / 16) calc(60rem / 16) calc(60rem / 16);
  }

}

@media (max-width: 768px) {
  body.message-page {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .message-page .sub-header {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.94);
  }

  .message-page .sub-header__entry-btn {
    display: none;
  }

  .message-page .sub-header__menu-btn span,
  .message-page .sub-header.nav-open .sub-header__menu-btn span {
    background-color: var(--text-body);
  }

  .message-page .sub-header__menu-label {
    color: var(--text-body);
  }

  .message-hero {
    height: calc(340rem / 16);
  }

  .message-hero__inner {
    padding: calc(56rem / 16) calc(24rem / 16) 0;
  }

  .message-main__inner {
    width: 100vw;
    max-width: 100vw;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .message-main__text {
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    margin-left: 0;
    padding: calc(56rem / 16) calc(24rem / 16) calc(40rem / 16);
    order: 1;
    overflow-wrap: anywhere;
  }

  .message-main__heading,
  .message-main__body,
  .message-main__body p {
    max-width: 100%;
    word-break: break-all;
    line-break: anywhere;
  }

  .message-main__body br {
    display: none;
  }

  .message-main__image {
    position: relative;
    top: 0;
    width: 100vw;
    max-width: 100vw;
    order: 0;
    margin-top: 0;
  }

  .message-main__image img {
    height: 100%;
  }

  .message-main__heading {
    font-size: calc(18rem / 16);
    line-height: 1.75;
  }

  .message-video {
    padding: calc(40rem / 16) calc(24rem / 16) calc(48rem / 16);
  }

  .message-video__inner {
    width: 100%;
    max-width: 100%;
  }

  .message-video .video-thumb .video-thumb__text {
    padding: 0 calc(18rem / 16);
    font-size: calc(11rem / 16);
    line-height: 1.8;
    letter-spacing: 0.12em;
    overflow-wrap: anywhere;
  }

}
