/* SPヒーロー：写真の下に横書きのコピーを配置する。 */
.hero {
  display: flex;
  flex-direction: column;
  padding-top: var(--header-height, 4.5rem);
  color: var(--color-black);
  background-color: #f5f4f0;
}

.hero-copy {
  order: 2;
  min-width: 0;
  padding: 4.25rem 1.25rem 2rem;
}

.hero-label {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
}

.hero-label p {
  margin: 0;
}

.hero-title {
  margin: 0.75rem 0 1rem;
  color: #293d34;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.hero-photos {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  order: 1;
  gap: 0.25rem;
  min-width: 0;
}

.hero-photo-main,
.hero-photo-sub {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: min(107.5vw, 36rem);
}

.hero-photo-main img,
.hero-photo-sub img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-description {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}


.hero-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

/* PCは従来の縦書き・写真配置を維持する。 */
@media (min-width: 992px) {
  .hero {
    flex-direction: row;
    padding-top: 0;
    background-color: transparent;
  }
  .hero-copy,
  .hero-photos {
    order: 0;
  }
  .hero-photos {
    flex-direction: row;
  }
  .hero-photo-main,
  .hero-photo-sub {
    height: auto;
  }
  .hero-title {
    color: inherit;
  }
  .hero {
    --hero-height: min(100vh, 70rem);
    display: flex;
    flex-wrap: wrap;
    min-height: var(--hero-height);
    color: var(--color-black);
  }

  .hero-copy {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex: 1 1 28.75%;
    min-width: min(100%, 20rem);
    /* 中央より2rem上に寄せつつ、固定ヘッダーとの間隔を確保する。 */
    padding: calc(var(--header-height, 10rem) + 1rem) 1.5rem
      calc(var(--header-height, 10rem) + 5rem);
  }

  .hero-label {
    writing-mode: vertical-rl;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.2em;
  }

  .hero-label p {
    margin: 0;
  }

  .hero-label b,
  .hero-label strong {
    text-combine-upright: all;
    font-weight: inherit;
    letter-spacing: 0;
    /* 縦中横の数字を、周囲の和文の中心に合わせて視覚補正する。 */
    position: relative;
    left: -0.15em;
    margin-bottom: 0.1rem;
    margin-top: 0.1rem;
  }

  .hero-title {
    margin: 0;
    writing-mode: vertical-rl;
    font-size: min(2.8125rem, 9vw);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.15em;
  }

  .hero-photos {
    position: relative;
    display: flex;
    flex: 1 1 71.25%;
    min-width: min(100%, 40rem);
    gap: 0.25rem;
  }

  .hero-photo-main,
  .hero-photo-sub {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: min(43.75rem, 100vw);
  }

  .hero-photo-main img,
  .hero-photo-sub img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hero-photo-sub {
    display: flex;
    align-items: flex-end;
  }

  .hero-photo-sub::after {
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(transparent, rgb(0 0 0 / 35%));
    pointer-events: none;
    content: "";
  }

  .hero-description {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 1.5rem;
    color: var(--color-white);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.8;
    overflow-wrap: anywhere;
  }
}

.hero-features {
  padding-block: 7rem;
  color: var(--color-black);
}

.hero-features .row {
  row-gap: 3rem;
}

.hero-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.5rem;
  text-align: center;
}

.hero-feature img {
  display: block;
  width: 100%;
  height: 10rem;
  object-fit: contain;
}

.hero-feature p {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
}

/* About us */
/* SPでは地図を本文の背景に配置。Bootstrapのmdから従来の2列に戻す。 */
.about {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: 7rem 16rem;
  color: var(--color-black);
}

.about-copy {
  position: relative;
  z-index: 1;
}

.about .section-title {
  margin-bottom: 2rem;
}

.about-text {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.about-text br { display: none; }

.about-text.about-highlight {
  margin-bottom: 1rem;
  line-height: 2.25;
}

.about-map-column {
  position: absolute;
  z-index: 0;
  right: -8rem;
  bottom: 4rem;
  width: 28rem;
  padding: 0;
  pointer-events: none;
}

.about-map {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  opacity: 0.45;
}

.about-link {
  margin-top: 12rem;
  margin-bottom: 0;
}

@media (min-width: 768px) {
.about {
  position: relative;
  padding-block: 5rem 8rem;
  color: var(--color-black);
}

.about-row {
  align-items: flex-start;
  row-gap: 3rem;
}

.about-text {
  margin: 0 0 0.5rem 0.5rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 2.1;
  overflow-wrap: anywhere;
}

.about-text.about-highlight {
  margin-left: 0;
}

.about-text + .about-text:not(.about-highlight) {
  margin-top: 0.5rem;
}

.about-map {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 3rem;
}


  .about { overflow: visible; }
  .about-link { margin-top: 3rem; }
  .about-map-column {
    position: static;
    width: 50%;
    padding-inline: 0.75rem;
    pointer-events: auto;
  }
  .about-map { opacity: 1; }
  .about-text br { display: inline; }
  .about-text.about-highlight { margin-bottom: 0.5rem; line-height: 2.1; }
  .about .section-title { margin-bottom: 1.5rem; }
}

/* Works */
.works {
  container-type: inline-size;
  overflow-x: clip;
  padding-block: 7rem 0;
  color: var(--color-black);
  background-color: var(--color-bg);
}

.works-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 3rem;
}

.works-heading {
  display: flex;
  flex-direction: column;
  flex: 1 1 20rem;
  min-height: min(27.5rem, 70vw);
}

.works-description {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
}

.works-slider {
  min-width: 0;
  width: calc(50cqw + 50%);
}

.works-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--color-green) transparent;
  overscroll-behavior-x: contain;
}

.works-track {
  display: flex;
  gap: 2.5rem;
  padding-bottom: 1rem;
}

.works-card {
  flex: 0 0 min(31.25rem, 85%);
  min-width: 0;
  scroll-snap-align: start;
}

.works-image {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
}

.works-location {
  margin: 1rem 0 0.5rem;
  color: var(--color-gray2);
  font-size: 0.875rem;
  line-height: 1.6;
}

.works-location::before {
  display: inline-block;
  width: 0.5rem;
  height: 0.75rem;
  margin-right: 0.5rem;
  background: url("/system_panel/uploads/images/20260926114629236657.svg")
    center / contain no-repeat;
  content: "";
}

.works-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
}

.works-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
}

.works-controls {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: 3rem;
}

.works.is-ready .works-controls {
  display: flex;
}

.works-control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.125rem;
  height: 3.125rem;
  border-radius: 50%;
  color: var(--color-white);
  text-decoration: none;
  cursor: pointer;
}

.works-control:hover {
  color: var(--color-white);
  opacity: 0.8;
}

.works-control:focus-visible,
.works-viewport:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 0.25rem;
}

.works-all-link {
  justify-self: center;
  margin: 0;
}

.works-control img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 2列時も一覧ボタンをスライダーの下に固定し、画像だけ右端へ広げる。 */
@media (min-width: 992px) {
  .works-layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  .works-slider {
    width: calc(50cqw + 16.666667% - 1.5rem);
  }

  .works-all-link {
    grid-column: 2;
  }
}

.works-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.works-customers {
  margin-top: 6rem;
  padding-block: 7rem;
  color: var(--color-white);
  background: var(--color-green)
    url("/system_panel/uploads/images/20260926115005969847.png") center / cover
    no-repeat;
}

.works-customers-title {
  margin: 0 0 1.5rem;
  font-size: 1.875rem;
  font-weight: 400;
  line-height: 1.6;
}

.works-customers-grid {
  row-gap: 0.75rem;
}

.works-customer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  height: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  background-color: var(--color-deep-green);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.8;
  text-align: center;
  overflow-wrap: anywhere;
}

.works-customer-more {
  background-color: transparent;
}

.works-customer-name p {
  margin: 0;
}

/* CMS編集時は全カードを常時表示し、各パーツを選択可能にする。 */
.works.is-editor .works-viewport,
.works[data-gjs-type] .works-viewport,
.works:has([data-gjs-type]) .works-viewport {
  overflow: visible;
}

.works.is-editor .works-track,
.works[data-gjs-type] .works-track,
.works:has([data-gjs-type]) .works-track {
  flex-wrap: wrap;
}

.works.is-editor .works-status,
.works[data-gjs-type] .works-status,
.works:has([data-gjs-type]) .works-status {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip-path: none;
  white-space: normal;
}

/* TOPの年輪配置。共通のkirikabu-imageと組み合わせる。 */
.kirikabu-top-hero {
  left: 0;
  top: -5.5rem;
  width: 8rem;
  transform: translateX(-28%);
  mix-blend-mode: screen;
}

@media (min-width: 992px) {
  .kirikabu-top-hero {
    left: 0;
    top: -10rem;
    width: min(15rem, 32vw);
    transform: translateX(-35%);
    mix-blend-mode: soft-light;
  }
}

.kirikabu-top-news {
  left: 0;
  top: -16rem;
  width: min(29rem, 42vw);
  transform: translateX(-46%);
  opacity: 0.5;
  mix-blend-mode: multiply;
}

.kirikabu-top-news-sub {
  left: 20%;
  top: -5rem;
  width: min(12rem, 20vw);
  transform: translateX(-40%) rotate(75deg);
  opacity: 1;
  mix-blend-mode: normal;
}

.kirikabu-top-strengths-side {
  left: 0;
  top: 0;
  width: min(12rem, 24vw);
  transform: translateX(-20%);
  opacity: 0.08;
  mix-blend-mode: multiply;
}

.kirikabu-top-strengths-bottom {
  left: 57%;
  bottom: -7rem;
  width: min(24rem, 42vw);
  transform: translateX(-50%);
  mix-blend-mode: screen;
  z-index: 0;
  opacity: 0.5;
}

.kirikabu-top-works {
  right: 3%;
  bottom: -13rem;
  width: min(14rem, 26vw);
  opacity: 0.7;
  mix-blend-mode: color-burn;
}

.kirikabu-top-recruit-top {
  left: -6%;
  top: -7rem;
  width: min(20rem, 40vw);
  mix-blend-mode: screen;
  opacity: 0.3;
}

.kirikabu-top-recruit-bottom {
  right: 6%;
  bottom: 0;
  width: min(14rem, 28vw);
  opacity: 0.7;
  mix-blend-mode: color-burn;
}

/* TOPはCMSで差し替えられる画像パーツを使う。 */
.recruit-content.recruit-content-undecorated::before,
.recruit-content.recruit-content-undecorated::after {
  content: none;
}

/* 枚数に依存しないヒーロー画像切り替え。JS未実行時は最初の1枚を表示。 */
.hero-photo-main img,
.hero-photo-sub img {
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.hero-photo-main img:first-of-type,
.hero-photo-sub img:first-of-type {
  opacity: 1;
}

.hero-photo-main.is-slideshow img,
.hero-photo-sub.is-slideshow img {
  opacity: 0;
}

.hero-photo-main.is-slideshow img.is-active,
.hero-photo-sub.is-slideshow img.is-active {
  opacity: 1;
}

/* CMSでは全画像を縦に並べて編集する。 */
.hero-photos:is([data-gjs-type], :has([data-gjs-type])) .hero-photo-main,
.hero-photos:is([data-gjs-type], :has([data-gjs-type])) .hero-photo-sub {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-height: 0;
}

.hero-photos:is([data-gjs-type], :has([data-gjs-type]))
  :is(.hero-photo-main, .hero-photo-sub)
  img {
  position: static;
  width: 100%;
  height: auto;
  opacity: 1;
  transition: none;
}

.hero-photos:is([data-gjs-type], :has([data-gjs-type])) .hero-photo-sub::after {
  content: none;
}

/* TOPの新着情報。ニュース一覧ページのスタイルとの差分。 */
@media (min-width: 992px) {
  .top-news .news-archives-item {
    border-bottom: 0;
  }
}

@media (min-width: 768px) {
  .top-news-list {
    border-left: 1px solid #e5e5e5;
  }
}

.hero-photos:is([data-gjs-type], :has([data-gjs-type])) .hero-photo-main,
.hero-photos:is([data-gjs-type], :has([data-gjs-type])) .hero-photo-sub {
  height: auto;
}
