/* ===================================
   layout.css — 全13ページ共通の骨格
   ヘッダー / モバイルメニュー / CTA / フッター
   読み込み順: base → layout → components → ページ別
=================================== */


/* ===================================
   HEADER
=================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95); /* 0.92→0.95: Safari にじみ軽減 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(8px); /* Safari: blur を控えめにして合成境界アーティファクト軽減 */
  transition: background var(--transition), backdrop-filter var(--transition);
  will-change: transform; /* Safari GPU 合成レイヤーをクリーンに保つ */
}

/* FV内スクロール：白背景を維持 */
.header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
}

/* 赤背景セクション：ボタンのみ反転 */

/* 白背景セクション：ライトモード（背景は常に白半透明を維持） */
.header.is-light {
}

.header.is-light .header__nav-link {
  color: #1c1818;
  text-shadow: none;
}

.header.is-light .header__nav-link::after {
  background: #1c1818;
}

.header.is-light .header__hamburger span {
  background: #1c1818;
}

/* ライトモード：ロゴのドロップシャドウなし・ハンバーガー背景なし */
.header.is-light .header__logo-img {
  filter: none;
}

.header.is-light .header__hamburger {
  background: none !important;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 100px;  /* Figma: px-[100px] */
  max-width: 1440px;
  margin: 0 auto;
}

/* --- Logo --- */
.header__logo {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header__logo-img {
  height: 25px;
  width: auto;
}

/* デフォルト：カラーロゴ表示・白ロゴ非表示 */
.header__logo-img--white { display: none; }
.header__logo-img--color { display: block; }

/* --- Nav --- */
.header__nav-list {
  display: flex;
  align-items: center;
  gap: 30px;  /* Figma: gap-[30px] */
}

.header__nav-link {
  font-family: var(--font-en);          /* Montserrat */
  font-size: 18px;                      /* Figma: text-[18px] */
  font-weight: 700;                     /* Figma: Montserrat Bold */
  letter-spacing: 0.06em;              /* Figma: tracking-[1.08px] / 18px */
  color: #1c1818;
  text-shadow: none;
  position: relative;
  transition: opacity var(--transition);
}

.header__nav-link--bold {
  font-weight: 700;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: #1c1818;
  transition: width var(--transition);
}

.header__nav-link:hover::after {
  width: 100%;
}

.header__nav-link:hover {
  opacity: 0.7;
}

/* 現在いるセクションのナビ項目（赤文字＋下線を全幅に）
   .header.is-light .header__nav-link の色指定を上書きするため、
   詳細度が同じ .header.is-light 付きの指定をこの位置に置いている */
.header__nav-link--active {
  color: var(--color-red);
}

.header.is-light .header__nav-link--active {
  color: var(--color-red);
}

.header__nav-link--active::after {
  width: 100%;
  background: var(--color-red);
}

/* --- Language Toggle --- */
.header__lang {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header__lang-btn {
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 700;
  color: #1c1818;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  text-shadow: none;
  transition: opacity var(--transition);
  opacity: 0.4;
}

.header__lang-btn.is-active {
  opacity: 1;
}

.header__lang-btn:hover {
  opacity: 0.7;
}

.header__lang-btn.is-active:hover {
  opacity: 1;
}

.header__lang-sep {
  display: block;
  width: 1px;
  height: 14px;
  background: #1c1818;
  opacity: 0.5;
  flex-shrink: 0;
  transform: rotate(16deg);
}

/* ライトモード：セパレーターとボタン色を反転 */
.header.is-light .header__lang-btn {
  color: #1c1818;
  text-shadow: none;
}

.header.is-light .header__lang-sep {
  background: #1c1818;
}

/* --- SP 言語切り替え（廃止：ヘッダー内に統合済み） --- */
.fv__lang-sp {
  display: none !important; /* 全サイズで非表示 */
  position: fixed;
  top: calc(var(--header-h) + 8px);
  left: 32px; /* header__inner padding に合わせる（≤1169px） */
  z-index: 99;
  align-items: center;
  gap: 10px;
}

/* SP用ボタン：白文字・影あり・フォントサイズ小（ダークモード） */
.fv__lang-sp .header__lang-btn {
  font-size: 16px;
  color: var(--color-white);
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.fv__lang-sp .header__lang-btn.is-active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* SP用セパレーター：白 */
.fv__lang-sp .header__lang-sep {
  background: var(--color-white);
}

/* SP ライトモード：黒文字・影なし */
.fv__lang-sp.is-light .header__lang-btn {
  color: #1c1818;
  text-shadow: none;
}

.fv__lang-sp.is-light .header__lang-sep {
  background: #1c1818;
}


/* --- CTA Button --- */
.header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;         /* Figma: gap-[7px] */
  background: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-ja);           /* Noto Sans JP */
  font-size: 16px;                       /* Figma: text-[16px] */
  font-weight: 700;                      /* Figma: Noto Sans JP Bold */
  width: 174px;                          /* Figma: w-[174px] */
  height: 54px;     /* Figma: h-[54px] */
  border-radius: 30px;  /* Figma: rounded-[30px] ピル型 */
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.header__cta:hover {
  background: #b71c1c;
  transform: translateX(2px);
}

.header__cta-arrow {
  display: block;
  flex-shrink: 0;
}

/* --- Hamburger (mobile) --- */
.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.header__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #1c1818;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.header__hamburger.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.header__hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.header__hamburger.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Mobile Menu --- */
.header__mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* backdrop-filter が含有ブロックになるため 100% → 100vh に変更 */
  background: #F8F8F8;
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px); /* 開く時に上から軽くスライドイン */
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  overflow-y: auto;
}

.header__mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* メニューヘッダー（ロゴ＋Xボタン） */
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h); /* ヘッダー高さと揃えてシームレスな見た目に */
  padding: 0 32px;
  flex-shrink: 0;
}

.mobile-menu__logo img {
  height: 22px;
  width: auto;
}

.mobile-menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: #1c1818; /* 黒 × ボタン */
  flex-shrink: 0;
}

/* メニューボディ */
.mobile-menu__body {
  display: flex;
  flex-direction: column;
  align-items: stretch; /* ナビを全幅に伸ばす */
  gap: 50px;
  padding-bottom: 48px;
}

/* ナビリスト */
.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  padding-top: 40px;
  list-style: none;
}

/* 各アイテム */
.mobile-menu__item {
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.mobile-menu__link {
  display: block;
  width: 100%;
  padding: 20px 0;
  border-bottom: 1px solid #D1CACA; /* テキスト幅に合わせた余白付き区切り線 */
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 500;
  line-height: 22px;
  color: #1c1818; /* 黒文字 */
  transition: opacity var(--transition);
}

.mobile-menu__link:hover {
  opacity: 0.5;
}

/* CTAボタン */
.mobile-menu__cta {
  align-self: center; /* ボタンだけ中央寄せ */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 280px;
  height: 54px;
  background: var(--color-red);
  color: var(--color-white);
  border-radius: 30px;
  font-family: var(--font-ja);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--transition);
}

.mobile-menu__cta:hover {
  background: #b71c1c;
}

/* --- モバイルメニュー内 言語切り替え --- */
.mobile-menu__lang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 4px 16px;
}

/* is-light 等の上書きを防ぐため親セレクターで詳細度を上げる */
.header__mobile-menu .mobile-menu__lang .header__lang-btn {
  font-size: 16px;
  color: #1c1818; /* 黒文字 */
  text-shadow: none;
  opacity: 0.4;
}

.header__mobile-menu .mobile-menu__lang .header__lang-btn.is-active {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header__mobile-menu .mobile-menu__lang .header__lang-btn:hover {
  opacity: 0.7;
}

.header__mobile-menu .mobile-menu__lang .header__lang-sep {
  background: rgba(0, 0, 0, 0.15); /* 薄グレーのセパレーター */
  height: 16px;
}


/* ===================================
   CTA — PC: 左テキスト・右画像の2カラム
   背景 #C30D23 は全幅、コンテンツは max-width: 1440px で中央寄せ
=================================== */
.cta {
  background: #C30D23;
  position: relative;  /* 画像の absolute 基準 */
  overflow: hidden;    /* 1440px外にはみ出した画像をクリップ */
}

/* コンテナ: 最大1440px・中央寄せ・横並び */
.cta__inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 400px;
  display: flex;
}

/* 左: テキストカラム（1440px内の左半分に固定） */
.cta__text-col {
  flex: 0 0 50%;      /* 最大720pxに固定（画像がabsoluteになるため明示） */
  max-width: 720px;
  display: flex;
  align-items: center;
  padding: 0 60px 0 120px;
}

/* 右: 画像カラム（ビューポート中央〜右端まで全幅） */
.cta__img-col {
  position: absolute;
  left: 50vw;   /* ビューポートの中央 = 1440px コンテナの中央と一致 */
  right: 0;     /* ビューポート右端まで */
  top: 0;
  bottom: 0;
  overflow: hidden;
}

.cta__img-col picture,
.cta__img-col img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* テキストボックス */
.cta__textbox {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 538px;
}

.cta__text {
  display: flex;
  flex-direction: column;
  gap: 30px;
  color: #ffffff;
}

.cta__title {
  font-family: var(--font-en);
  /* 88px → 72px に縮小：長い翻訳文（Hubungi Kami 等）でも 538px 幅に収まる */
  font-size: clamp(44px, calc(7.5vw - 26px), 72px);
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cta__desc {
  font-family: var(--font-ja);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #ffffff;
}

/* ボタン */
.cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 336px;
  height: 54px;
  background: #ffffff;
  color: #C30D23;
  border-radius: 30px;
  font-family: var(--font-ja);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity var(--transition), transform var(--transition);
}

.cta__btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* ===================================
   FOOTER
=================================== */
.footer {
  background: #ffffff;
}

/* バナーエリア */
.footer__banners {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 0;
}

.footer__banner-item {
  display: block;
  width: 286px;
  height: 89px;
  overflow: hidden;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.footer__banner-item:hover {
  opacity: 0.8;
}

.footer__banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* フッターボトム */
.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px 0;
}

.footer__bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 1040px;
}

.footer__logo-link {
  display: block;
  transition: opacity var(--transition);
}

.footer__logo-link:hover {
  opacity: 0.8;
}

.footer__logo-link img {
  height: 25px;
  width: auto;
  display: block;
}

.footer__company {
  font-family: var(--font-ja);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #1c1818;
  transition: opacity var(--transition);
}

.footer__company:hover {
  opacity: 0.7;
}

.footer__divider {
  width: 1040px;
  height: 0;
  border: none;
  border-top: 1px solid #e0dada;
  margin: 0;
}

/* コピーライト */
.footer__copy {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: #1c1818;
  text-align: center;
}

@media (max-width: 1024px) {

  /* ===== FOOTER タブレット ===== */
  .footer__banners {
    flex-wrap: wrap;
    justify-content: center;
    padding: 40px 24px;
  }

  .footer__banner-item {
    flex-shrink: 1;
    width: 286px;
    max-width: 100%;
  }

  .footer__bottom-row {
    width: auto;
    padding: 0 48px;
    min-width: min(1040px, 100%);
  }

  .footer__divider {
    width: calc(100% - 96px);
  }

  .header__inner {
    padding: 0 48px;
  }
}


@media (max-width: 1169px) {

  /* PCのみ表示するヘッダー要素 */
  .header__nav,
  .header__cta {
    display: none;
  }

  /* SP/タブレット：header__lang をヘッダー内に表示（右寄り） */
  .header__lang {
    display: flex;
    gap: 6px;
    margin-left: auto;
    margin-right: 20px;
  }

  .header__lang .header__lang-btn {
    font-size: 14px;
  }

  .header__lang .header__lang-sep {
    height: 12px;
  }

  /* fv__lang-sp は完全非表示 */
  .fv__lang-sp {
    display: none !important;
  }

  .header__hamburger {
    display: flex !important;
    width: 44px;
    height: 44px;
    background: none;
    border-radius: 6px;
    padding: 10px 8px;
    gap: 6px;
  }

  .header__mobile-menu {
    display: block;
  }

  .header__inner {
    padding: 0 32px;
  }

  .header__logo-img {
    height: 22px;
    width: auto;
  }


/* =====================================================
   CTA 1169px以下: SPレイアウト（縦積み）に切り替え
   ≥1170px: PCの2カラムを維持
   769〜1169px: 縦積み・画像高さをSPより大きく確保
   ≤768px: 下記 @media (max-width: 768px) がSP値で上書き
===================================================== */


  /* column-reverse: 画像を上・テキストを下 */
  .cta__inner {
    flex-direction: column-reverse;
    height: auto;
    max-width: 100%;
  }

  /* 上段: 画像エリア（タブレットはSPより高め）
     PC の position:absolute / left:50vw をリセット */
  .cta__img-col {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: clamp(220px, 30vw, 380px);  /* 画面幅に比例してスケール */
    flex: none;
    overflow: hidden;
    clip-path: inset(0);
    background: #C30D23;
  }

  .cta__img-col img {
    object-fit: cover;
    object-position: center top;
  }

  /* 下段: テキストエリア（PC の flex: 0 0 50% / max-width: 720px をリセット） */
  .cta__text-col {
    flex: none;
    width: 100%;
    max-width: 100%;
    padding: 36px 48px 44px;
  }

  .cta__textbox {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    /* 基準 1169px で 30px → 30/1169 ≈ 2.57vw */
    gap: clamp(14px, 3vw, 30px);
  }

  /* cta__text の gap も同比率でスケール（基準 1169px で 28px → 2.4vw） */
  .cta__text {
    gap: clamp(12px, 1vw, 28px);
  }

  .cta__title {
    font-size: clamp(40px, 6vw, 58px);
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.15;
  }

  .cta__btn {
    width: 336px;
    color: #C30D23;
  }
}


@media (max-width: 768px) {

  /* ===== FOOTER SP ===== */
  .footer__banners {
    flex-direction: column;
    gap: 24px;
    padding: 40px 24px;
  }

  .footer__banner-item {
    width: 320px;
    height: 100px;
  }

  .footer__bottom-row {
    width: 100%;
    padding: 0 28px;
    box-sizing: border-box;
    min-width: unset;
  }

  .footer__divider {
    width: calc(100% - 56px);
  }

  .footer__company {
    font-size: 14px;
  }

  .footer__copy {
    font-size: 13px;
    padding: 0 28px;
  }


  /* ===== CTA SP: 画像（上部193px）＋ テキスト（下部）の2段構成 ===== */

  /* column-reverse で画像を上に、テキストを下に */
  .cta__inner {
    flex-direction: column-reverse;
    height: auto;
    max-width: 100%;
  }

  /* 上段: 画像エリア — position もリセット、高さは画面幅に比例 */
  .cta__img-col {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: clamp(160px, 50vw, 220px);  /* 画面幅に比例してスケール */
    flex: none;
    overflow: hidden;
    clip-path: inset(0);
  }

  /* 下段: テキストエリア */
  .cta__text-col {
    padding: 25px 28px 36px;
    flex: none;
    width: 100%;
  }

  .cta__textbox {
    width: 100%;
    max-width: 100%;
    /* SP でも同比率を継続（2.57vw @ 768px ≈ 19.7px ≈ 20px） */
    gap: clamp(14px, 3vw, 30px);
  }

  .cta__title {
    font-size: clamp(36px, 10vw, 46px);
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* ボタン：全幅・赤文字 */
  .cta__btn {
    width: 100%;
    color: #C30D23;
  }

  .header__inner {
    padding: 0 16px;
  }

  .header__logo-img {
    height: 18px;
  }

  .mobile-menu__head {
    padding: 0 16px;
  }

  .mobile-menu__logo img {
    height: 18px;
  }
}
