@font-face {
  font-family: "Cabinet Grotesk";
  src: url("https://19853391.fs1.hubspotusercontent-na2.net/hubfs/19853391/CabinetGrotesk-Extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

.contact-message-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 1;
  min-height: clamp(260px, 25vw, 512px);
  background-image: var(--contact-bg-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--contact-text-color, #fff);
  display: grid;
  place-items: center;
  
    /* 追加 */
  position: relative;
}

/* 背景画像の上に暗いレイヤーを重ねる */
.contact-message-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
  pointer-events: none;
}

/* 文字を暗いレイヤーより前に表示 */
.contact-message-hero__inner {
  width: min(100%, 1500px);
  padding: 0 clamp(20px, 5vw, 80px);
  text-align: center;
  box-sizing: border-box;
  font-family: "Noto Sans JP", sans-serif;

  /* 追加 */
  position: relative;
  z-index: 1;
}

  /* モジュール全体のフォントを統一 */
  font-family: "Noto Sans JP", sans-serif;
}

/* リッチテキスト内の要素も含めてフォントを統一 */
.contact-message-hero *,
.contact-message-hero *::before,
.contact-message-hero *::after {
  font-family: "Noto Sans JP", sans-serif !important;
}

.contact-message-hero__inner {
  width: min(100%, 1500px);
  padding: 0 clamp(20px, 5vw, 80px);
  text-align: center;
  box-sizing: border-box;
}

.contact-message-hero__inner--sp {
  display: none;
}

/* large_textが上に来るため、下側に余白を設定 */
.contact-message-hero__large {
  margin: 0 0 14px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--contact-text-color, #fff);
  white-space: nowrap;
}

.contact-message-hero__large p {
  margin: 0;
}

.contact-message-hero__large br {
  display: block;
}

/* small_textは下に来るため、下余白はなし */
.contact-message-hero__small {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--contact-text-color, #fff);
}

.contact-message-hero__small p {
  margin: 0;
}

.contact-message-hero__small br {
  display: block;
}

/* リッチテキスト内の文字色を統一 */
.contact-message-hero__small,
.contact-message-hero__small p,
.contact-message-hero__small span,
.contact-message-hero__small strong,
.contact-message-hero__small em,
.contact-message-hero__small a,
.contact-message-hero__small li {
  color: var(--contact-text-color, #fff);
}

/* リッチテキストで複数段落を入れた場合の余白 */
.contact-message-hero__small p + p {
  margin-top: 0.5em;
}

@media (max-width: 1024px) {
  .contact-message-hero {
    aspect-ratio: auto;
    min-height: 300px;
    background-position: center center;
  }

  .contact-message-hero__inner--pc {
    display: none;
  }

  .contact-message-hero__inner--sp {
    display: block;
  }

  .contact-message-hero__large {
    font-size: clamp(19px, 2.8vw, 24px);
    line-height: 1.4;
    white-space: normal;
  }

  .contact-message-hero__small {
    font-size: clamp(12px, 1.7vw, 14px);
    line-height: 1.8;
    letter-spacing: 0.02em;
  }
}

@media (max-width: 767px) {
  .contact-message-hero {
    min-height: 260px;
    background-position: center center;
  }

  .contact-message-hero__inner {
    padding: 0 20px;
  }

  .contact-message-hero__large,
  .contact-message-hero__large--sp {
    margin: 0 0 10px;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    white-space: normal;
  }

  .contact-message-hero__small {
    margin: 0;
    font-size: 10px;
    line-height: 1.8;
    letter-spacing: 0.01em;
  }
}

@media (max-width: 767px) {
  /* スマホ用：見出し */
  .contact-message-hero .contact-message-hero__large,
  .contact-message-hero .contact-message-hero__large--sp {
    font-size: 18px !important;
    line-height: 1.4 !important;
  }

  /* スマホ用：small_text本体 */
  .contact-message-hero .contact-message-hero__small,
  .contact-message-hero .contact-message-hero__small--sp {
    font-size: 12px !important;
    line-height: 1.8 !important;
  }

  /* リッチテキスト内の要素にも直接指定 */
  .contact-message-hero .contact-message-hero__small p,
  .contact-message-hero .contact-message-hero__small span,
  .contact-message-hero .contact-message-hero__small strong,
  .contact-message-hero .contact-message-hero__small b,
  .contact-message-hero .contact-message-hero__small em,
  .contact-message-hero .contact-message-hero__small a,
  .contact-message-hero .contact-message-hero__small li,
  .contact-message-hero .contact-message-hero__small--sp p,
  .contact-message-hero .contact-message-hero__small--sp span {
    font-size: 12px !important;
    line-height: 1.8 !important;
  }
}