/*
 * トップページ（front-page.php と template-parts/home/）。
 */

/* メインビジュアル：静止画の上に動画を重ねる */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  overflow: hidden;
  background-color: var(--color-navy-950);
  background-position: center;
  background-size: cover;
  padding-bottom: 5rem;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__shade {
  position: absolute;
  inset: 0;
  /* スマホでは文字が下半分に並ぶので、下から青を重ねる */
  background: linear-gradient(to top in oklab, rgb(76 79 105 / 0.82), rgb(76 79 105 / 0.5) 60%, rgb(114 135 253 / 0.15));
}

.hero .container {
  position: relative;
}

.hero__en {
  color: var(--color-accent-300);
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4286;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero__title {
  margin-top: 1.5rem;
  color: var(--color-white);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.025em;
}

/* キャッチコピーの2行目に引く黄色のマーカー */
.hero__marker {
  box-shadow: inset 0 -0.28em 0 rgb(223 142 29 / 0.85);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone; /* 2行に分かれたときも、各行にマーカーを引く */
}

.hero__lead {
  max-width: 36rem;
  margin-top: 2rem;
  color: rgb(255 255 255 / 0.8);
  font-size: 1rem;
  line-height: 2;
}

.hero .button-row {
  margin-top: 2.5rem;
}

@media (min-width: 400px) {
  .hero__title {
    font-size: 2rem;
  }
}

@media (min-width: 640px) {
  .hero {
    align-items: center;
    padding-bottom: 0;
  }

  /* 文字が読める程度に左側だけ青を重ね、右側は動画をそのまま見せる */
  .hero__shade {
    background: linear-gradient(to right in oklab, rgb(76 79 105 / 0.78), rgb(114 135 253 / 0.38), rgb(114 135 253 / 0));
  }

  .hero__title {
    font-size: 3.75rem;
  }

  .hero__lead {
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: 4.5rem;
  }
}

/* 動画の代わりに静止画を表示する */
@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none;
  }
}

/* 右（事業内容）または下（お知らせ）にボタンがあるセクション見出し */
.home-heading-row {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.home-heading-row .button {
  align-self: flex-start;
}

@media (min-width: 640px) {
  .home-heading-row--side {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  /* 見出しは自分の幅で英字の大きさを決めるので、ボタンの残りの幅いっぱいに広げる */
  .home-heading-row--side .section-heading {
    flex: 1;
  }

  .home-heading-row--side .button {
    align-self: auto;
  }
}

.home-business .business-grid {
  margin-top: 3.5rem;
}

/* 採用の帯：左に文章、右に写真 */
.home-recruit {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg in oklab, var(--color-navy-900), var(--color-navy-800) 55%, var(--color-accent-500));
  color: var(--color-white);
}

.home-recruit__glow {
  position: absolute;
  bottom: -12rem;
  left: -12rem;
  width: 560px;
  height: 560px;
  border-radius: var(--radius-round);
  background: rgb(114 135 253 / 0.35);
  filter: blur(64px);
  pointer-events: none;
}

.home-recruit .container {
  position: relative;
}

.home-recruit__grid {
  display: grid;
  align-items: center;
  gap: 3.5rem;
}

.home-recruit__text {
  margin-top: 2rem;
  color: rgb(255 255 255 / 0.8);
  line-height: 2;
}

.home-recruit .button-row {
  margin-top: 2.5rem;
}

@media (min-width: 1024px) {
  .home-recruit__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 角が丸い写真（例：文章の横に置く 4:3 の写真） */
.photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-large);
  aspect-ratio: 4 / 3;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 採用情報の帯の右側：社員インタビューのカードの上の小さな見出し */
.home-recruit__people-title {
  margin-bottom: 1rem;
  color: var(--color-accent-300);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3333;
  letter-spacing: 0.05em;
}

/* 代表メッセージ（home/message.php）：左に社長の写真、右に見出しと短い文章 */
.home-message__grid {
  display: grid;
  grid-template-areas: "heading" "photo" "body";
  gap: 2.5rem;
}

.home-message__heading {
  grid-area: heading;
}

.home-message__body {
  grid-area: body;
}

/* 左上だけ大きく丸め、黄色の影をずらして重ねる */
.home-message__photo {
  grid-area: photo;
  width: 100%;
  max-width: 12rem; /* スマホでは小さめ、768px 以上では右の列いっぱい */
  border-radius: 8rem 1.5rem 1.5rem 1.5rem;
  box-shadow: 1rem 1rem 0 var(--color-yellow);
  aspect-ratio: 4 / 5;
}

.home-message__photo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: top;
}

.home-message__text {
  max-width: 40rem;
  line-height: 2;
}

.home-message__name {
  margin-top: 1rem;
  color: var(--color-navy-900);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4286;
}

.home-message__action {
  margin-top: 2rem;
}

@media (min-width: 768px) {
  /* 左に見出しと文章、右に写真（見出しから文章までの高さの真ん中に置く） */
  .home-message__grid {
    grid-template-areas: "heading photo" "body photo";
    grid-template-columns: minmax(0, 1fr) 20rem;
    column-gap: 5rem;
    row-gap: 2rem;
  }

  .home-message__heading {
    align-self: end;
  }

  .home-message__body {
    align-self: start;
  }

  .home-message__photo {
    align-self: center;
  }

  .home-message__photo {
    max-width: none;
  }
}

/*
 * 背景の飾り：大きな円の線と黄色い点（事業内容、代表メッセージ）、斜めの線（選ばれる理由）。
 * はみ出した部分は切り取り、中身（.container）は飾りより手前に出す。
 */
.home-business,
.home-message,
.home-strengths {
  position: relative;
  overflow-x: clip;
}

.home-business > .container,
.home-message > .container,
.home-strengths > .container {
  position: relative;
  z-index: 1;
}

.home-business::before,
.home-message::before {
  content: "";
  position: absolute;
  top: -6rem;
  right: -14rem;
  width: 40rem;
  height: 40rem;
  border: 1px solid rgb(76 79 105 / 0.1);
  border-radius: var(--radius-round);
  box-shadow: inset 0 0 0 5rem rgb(76 79 105 / 0.02);
  pointer-events: none;
}

.home-business::after,
.home-message::after {
  content: "";
  position: absolute;
  top: 9rem;
  right: 18%;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-round);
  background: var(--color-yellow);
  pointer-events: none;
}

.home-message::before {
  top: 2rem;
  right: auto;
  left: -16rem;
}

.home-message::after {
  top: 4rem;
  right: auto;
  left: 6%;
}

.home-strengths::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 140%;
  background: rgb(76 79 105 / 0.08);
  transform: rotate(55deg);
  transform-origin: top;
  pointer-events: none;
}
