/* CLIENTS（実績ロゴ）セクション */

.lh-clients {
  --lh-accent: #e4581e;
  box-sizing: border-box;
  position: relative;
  flex: none;
  width: 100%;
  padding: 96px 24px 88px;
  overflow: hidden;
  background: #f2f2f2;
  color: #333;
  font-family: inherit;
}

.lh-clients *,
.lh-clients *::before,
.lh-clients *::after {
  box-sizing: border-box;
}

/* 斜めのアクセント光 */
.lh-clients::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -10%;
  width: 60%;
  height: 180%;
  background: radial-gradient(
    closest-side,
    rgba(228, 88, 30, 0.08),
    rgba(228, 88, 30, 0)
  );
  transform: rotate(-18deg);
  pointer-events: none;
}

.lh-clients__inner {
  position: relative;
  width: 1440px;
  max-width: 100%;
  margin: 0 auto;
}

/* --- 見出し --- */
.lh-clients__label {
  margin: 0;
  text-align: center;
  color: var(--lh-accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  line-height: 1.4;
}

.lh-clients__title {
  margin: 14px 0 0;
  text-align: center;
  color: #222;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.lh-clients__title em {
  font-style: normal;
  color: var(--lh-accent);
}

.lh-clients__lead {
  margin: 18px 0 0;
  text-align: center;
  color: #777;
  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 2;
}

.lh-clients__rule {
  display: block;
  width: 48px;
  height: 2px;
  margin: 28px auto 0;
  background: var(--lh-accent);
}

/* --- ロゴグリッド --- */
.lh-clients__grid {
  --lh-cols: 5;
  --lh-gap: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--lh-gap);
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.lh-clients__cell {
  flex: 0 0 calc(
    (100% - var(--lh-gap) * (var(--lh-cols) - 1)) / var(--lh-cols)
  );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 1;
  padding: 10px 12px;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease,
    border-color 0.35s ease;
}

/* ホバーで下からアクセントの線が伸びる */
.lh-clients__cell::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--lh-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.lh-clients__cell:hover {
  transform: translateY(-4px);
  border-color: rgba(228, 88, 30, 0.5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.lh-clients__cell:hover::after {
  transform: scaleX(1);
}

.lh-clients__logo {
  width: auto;
  max-width: 88%;
  max-height: 78%;
  object-fit: contain;
}

/* ロゴごとに見た目の大きさを揃える */
.lh-clients__logo--kainan {
  max-width: 94%;
  max-height: 34%;
}

.lh-clients__logo--mashimashi {
  max-height: 86%;
}

.lh-clients__logo--studio-oki {
  max-height: 90%;
}

.lh-clients__logo--chronicle {
  max-height: 86%;
}

.lh-clients__logo--ecxia {
  max-width: 74%;
  max-height: 42%;
}

.lh-clients__logo--guardner {
  max-width: 86%;
  max-height: 36%;
}

.lh-clients__logo--asaya {
  max-width: 86%;
  max-height: 48%;
}

.lh-clients__logo--grail {
  max-width: 78%;
  max-height: 36%;
}

.lh-clients__logo--ubu {
  max-width: 72%;
  max-height: 56%;
}

.lh-clients__logo--south {
  max-width: 82%;
  max-height: 50%;
}

.lh-clients__more {
  margin: 40px 0 0;
  text-align: center;
  color: #666;
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.9;
}

@media (max-width: 900px) {
  .lh-clients {
    padding: 72px 20px 64px;
  }

  .lh-clients__title {
    font-size: 28px;
  }

  .lh-clients__grid {
    --lh-cols: 2;
    --lh-gap: 12px;
    margin-top: 36px;
  }

  .lh-clients__cell {
    min-height: 138px;
    padding: 18px 20px;
  }

  .lh-clients__logo {
    max-height: 62px;
  }

  .lh-clients__logo--kainan {
    max-height: 46px;
  }

  .lh-clients__logo--mashimashi,
  .lh-clients__logo--studio-oki,
  .lh-clients__logo--chronicle {
    max-height: 94px;
  }

  .lh-clients__logo--ecxia,
  .lh-clients__logo--guardner {
    max-height: 44px;
  }
}

@media (max-width: 480px) {
  .lh-clients__lead,
  .lh-clients__more {
    font-size: 13px;
  }
}

/* ---------- ロゴの無限スクロール ---------- */

/*
 * 上段は左へ、下段は右へ、止まらずに流れる。
 *
 * 同じ並びを2つ横に繋げて、1つ分ぶん translateX したところで
 * 先頭に戻す。だから継ぎ目が出ない。位置を JS で計算すると
 * スクロールのたびに再計算が走るので、CSS だけで回している。
 *
 * 親から幅いっぱいに抜く。左右で見切れているほうが「まだ続いている」
 * ことが伝わる。両端は下のグラデーションで溶かす。
 */
.lh-clients__marquee {
  position: relative;
  width: 100vw;
  margin: 48px calc(50% - 50vw) 0;
  overflow: hidden;
}

/* 両端を背景色に溶かして、切れているのではなく続いて見せる */
.lh-clients__marquee::before,
.lh-clients__marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(40px, 8vw, 160px);
  z-index: 2;
  pointer-events: none;
}

.lh-clients__marquee::before {
  left: 0;
  background: linear-gradient(90deg, #fdf3e6, rgba(253, 243, 230, 0));
}

.lh-clients__marquee::after {
  right: 0;
  background: linear-gradient(270deg, #fdf3e6, rgba(253, 243, 230, 0));
}

.lh-clients__row {
  display: flex;
  width: max-content;
}

.lh-clients__row + .lh-clients__row {
  margin-top: var(--lh-gap, 14px);
}

.lh-clients__track {
  display: flex;
  flex: none;
  gap: var(--lh-gap, 14px);
  padding: 0 calc(var(--lh-gap, 14px) / 2);
  margin: 0;
  list-style: none;
}

/* 速度を段で変える。同じだと2段が一体の板に見えて動きが死ぬ */
.lh-clients__row--left .lh-clients__track {
  animation: lh-clients-left 38s linear infinite;
}

.lh-clients__row--right .lh-clients__track {
  animation: lh-clients-right 52s linear infinite;
}

@keyframes lh-clients-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

@keyframes lh-clients-right {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* 流れる並びの中では、セルは割合ではなく固定幅で持つ */
.lh-clients__marquee .lh-clients__cell {
  flex: 0 0 clamp(150px, 17vw, 232px);
}

/* 触れている間は止める。ロゴを読みたい人が追いかけられなくなるため */
.lh-clients__marquee:hover .lh-clients__track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .lh-clients__track {
    animation: none !important;
  }
  /* 止めるなら2周目は不要 */
  .lh-clients__track[aria-hidden="true"] {
    display: none;
  }
  .lh-clients__row {
    width: auto;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* 銀だこは正方形に近く、他より縦が詰まって見えるので少し大きく取る */
.lh-clients__logo--gindaco {
  max-width: 62%;
  max-height: 76%;
}
