/*!
page: トップ ファーストビュー
------------------------------
*/
.top-hero {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
}

.top-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/hero-fv-pc.jpg") center center / cover no-repeat;
  opacity: 0;
  animation: hero-photo-fade 0.56s ease-out 0.68s forwards;
}

.top-hero-inner {
  display: flex;
  align-items: stretch;
  min-height: 540px;
}

.top-hero-copy {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 40px 36px 36px max(36px, calc((100vw - var(--container-width-l)) / 2));
  opacity: 0;
  transform: translateX(-16px);
  animation: hero-copy-block-reveal 0.56s ease-out 0.12s forwards;
}

.top-hero-title {
  color: var(--color-black);
  font-size: clamp(38px, 3.4vw, 54px);
  font-weight: 800;
  line-height: 1.2;
}

.top-hero-line {
  display: block;
}

.top-hero-line + .top-hero-line {
  margin-top: 12px;
}

.top-hero-line--intro,
.top-hero-line--closing {
  font-size: clamp(33px, 2.95vw, 46px);
  line-height: 1.5;
}

.top-hero-line--closing {
  white-space: nowrap;
}

.top-hero-line--emphasis {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.top-hero-line--markers {
  white-space: nowrap;
}

.top-hero-emphasis-box {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  padding: 8px 20px;
  line-height: 1.5;
  white-space: nowrap;
}

.top-hero-emphasis-box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--color-primary);
}

.top-hero-emphasis-text {
  position: relative;
  z-index: 1;
  color: var(--color-white);
}

.top-hero-emphasis-tail {
  flex: 0 0 auto;
  font-size: clamp(30px, 2.7vw, 43px);
  line-height: 1.5;
}

.top-hero-inline-small {
  display: inline-block;
  font-size: clamp(30px, 2.7vw, 43px);
  line-height: 1.5;
}

.top-hero-marker {
  position: relative;
  display: inline-block;
  padding-inline: 8px;
  box-decoration-break: clone;
}

.top-hero-marker::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.06em;
  left: 0;
  z-index: -1;
  height: 0.34em;
  background: var(--color-primary-soft);
  transform-origin: left center;
}

.top-hero-visual {
  display: none;
}

@keyframes hero-copy-block-reveal {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hero-copy-block-reveal-mobile {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-photo-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .top-hero::before {
    background-position: 20% center;
  }

  .top-hero-inner {
    min-height: 480px;
  }
}

@media (max-width: 767px) {
  .top-hero::before {
    content: none;
  }

  .top-hero-inner {
    flex-direction: column;
    min-height: auto;
  }

  .top-hero-copy {
    width: 100%;
    padding: 32px 18px;
    animation-name: hero-copy-block-reveal-mobile;
  }

  .top-hero-title {
    font-size: clamp(25px, 7.6vw, 34px);
    line-height: 1.26;
  }

  .top-hero-line--emphasis {
    flex-wrap: wrap;
  }

  .top-hero-emphasis-box {
    min-height: 0;
    width: fit-content;
    max-width: 100%;
    padding: 12px 16px;
    font-size: clamp(28px, 7.4vw, 30px);
    line-height: 1;
    white-space: normal;
  }

  .top-hero-emphasis-tail {
    font-size: 30px;
    line-height: 1.1;
  }

  .top-hero-line--intro,
  .top-hero-line--closing,
  .top-hero-inline-small {
    font-size: 30px;
    line-height: 1.1;
  }

  .top-hero-line--markers {
    white-space: normal;
  }

  .top-hero-visual {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    opacity: 0;
    animation: hero-photo-fade 0.56s ease-out 0.74s forwards;
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 72%,
        rgba(255, 255, 255, 0.22) 100%
      ),
      url("../images/hero-fv-sp.jpg") center 36% / cover no-repeat;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-hero::before,
  .top-hero-line,
  .top-hero-emphasis-tail,
  .top-hero-marker::before,
  .top-hero-emphasis-box::before,
  .top-hero-visual {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/*!
page: トップ 共通
------------------------------
*/
.top-about,
.top-service,
.top-news,
.top-recruit,
.top-contact {
  background: var(--color-white);
  padding-block: 96px;
}

.top-service,
.top-recruit {
  background: var(--color-gray-lighter);
}

.top-section-title {
  color: var(--color-black);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.top-section-description {
  margin-top: 24px;
}

.top-section-button-wrap {
  margin-top: 24px;
}

@media (max-width: 767px) {
  .top-about,
  .top-service,
  .top-news,
  .top-recruit,
  .top-contact {
    padding-block: 56px;
  }

  .top-section-title {
    font-size: 24px;
  }

  .top-section-description {
    margin-top: 16px;
  }
}

/*!
page: トップ 私たちについて
------------------------------
*/

.top-about-visual img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-top: 24px;
  margin-inline: auto;
}

@media (max-width: 767px) {
  .top-about-visual img {
    max-width: 160px;
    margin-top: 16px;
  }
}

/*!
page: トップ 外国人材採用サポート事業
------------------------------
*/

.top-service-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 72px;
}

.top-service-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(30, 41, 59, 0.08);
  border-radius: 16px;
}

.top-service-card-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.top-service-card-body {
  display: flex;
  flex-direction: column;
  padding: 28px;
  text-align: left;
}

.top-service-card-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.top-service-card-icon {
  width: 32px;
  height: 32px;
  display: none;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-service-card-title {
  width: fit-content;
  font-size: 18px;
  background: linear-gradient(
    transparent 64%,
    var(--color-primary-soft) 64%
  );
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.top-service-card-text {
  margin-top: 24px;
}

.top-service-card-button-wrap {
  margin-top: 24px;
  text-align: center;
}

@media (max-width: 1024px) {
  .top-service-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .top-service-cards {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .top-service-card {
    width: 100%;
    max-width: 400px;
  }

  .top-service-card-body {
    padding: 20px;
  }

  .top-service-card-title-wrap {
    gap: 8px;
  }

  .top-service-card-text {
    margin-top: 8px;
  }

  .top-service-card-button-wrap {
    margin-top: 16px;
  }
}

/*!
page: トップ お知らせ
------------------------------
*/
.top-news-list {
  margin-top: 24px;
  border-top: 1px solid var(--color-gray-light);
}

.top-news-button-wrap {
  text-align: right;
}

@media (max-width: 767px) {
  .top-news-button-wrap {
    text-align: left;
  }
}

/*!
page: トップ 採用情報 / お問い合わせ
------------------------------
*/

.top-recruit-visual img,
.top-contact-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
}

@media (max-width: 767px) {
  .top-recruit-copy,
  .top-contact-copy {
    order: 2;
  }

  .top-recruit-visual,
  .top-contact-visual {
    order: 1;
  }
}
