/*
 * トップページ（/）2026-10 打ち出し変更の追加スタイル
 * - 旗「人手が限られても、サービスの質は落とさない。」と3つの柱（止まらない・迷わない・伝わる）
 * - main.min.css は触らず、このページで足した要素だけをここに書く
 * - 文字組みは /benefits/ と同じ基準（assets/css/benefits-v2.css 冒頭の表）
 * - 変更したら index.html の ?v= を上げる
 */

/* ---------- KV: 見出し（画像からテキストへ） ---------- */
.p-topKvV2-title {
  font-size: clamp(2.4rem, calc((100vw - 80px) / 9.6), 4.4rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: .02em;
  color: #000;
  text-align: center;
}
.p-topKvV2-line {
  display: block;
  margin: 0 0 .1em;
  white-space: nowrap;
}
.p-topKvV2-emph {
  margin-right: .06em;
  padding: 0 .14em;
  vertical-align: baseline;
}
.p-topKvV2-emphTxt {
  position: relative;
  z-index: 1;
}
.p-topKvV2-logo {
  margin-top: .1em;
}
.p-topKvV2-pillars {
  margin-top: .6rem;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .08em;
  text-align: center;
  color: #1f8f7c;
}

/* KVのバッジ（旧: 乗り換え満足度97%の画像）。2026-10-07 D案（傾きなし）:
   見出しの強調と同じグラデーションの円。白と緑の二重の輪。
   メインコピーのアニメーション終了の1秒後に .is-shine を付け、光を横切らせる（index.html 末尾のスクリプト）。
   2026-10-14: 1回目のあとも5秒ごとにくり返す（光は最初の0.9秒＝5秒の18%、残りは待ち） */
.p-top-kv__icon {
  container-type: inline-size;
}
.p-topKvV2-badge {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, #8aba29, #29baa2);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #29baa2, 0 6px 16px rgba(0, 0, 0, .12);
  color: #fff;
  text-align: center;
  line-height: 1.1;
}
.p-topKvV2-badge__label {
  margin-bottom: 2cqi;
  padding-bottom: 2cqi;
  border-bottom: 1px solid rgba(255, 255, 255, .7);
  font-size: 10cqi;
  font-weight: 700;
}
.p-topKvV2-badge__num {
  font-size: 34cqi;
  font-weight: 800;
  line-height: 1;
}
.p-topKvV2-badge__unit {
  font-size: 10.5cqi;
  font-weight: 700;
}
.p-topKvV2-badge::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -75%;
  width: 50%;
  height: 140%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .65) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
}
.p-topKvV2-badge.is-shine {
  animation: topKvBadgePop 5s ease-out infinite;
}
.p-topKvV2-badge.is-shine::after {
  animation: topKvBadgeShine 5s ease-out infinite;
}
@keyframes topKvBadgeShine {
  0% { left: -75%; opacity: 1; }
  18%, 100% { left: 135%; opacity: 1; }
}
@keyframes topKvBadgePop {
  0%, 18%, 100% { scale: 1; }
  6.3% { scale: 1.06; }
}
@media (prefers-reduced-motion: reduce) {
  .p-topKvV2-badge.is-shine,
  .p-topKvV2-badge.is-shine::after {
    animation: none;
  }
}
/* SPは写真の右下に重ねる位置（main.min.css）。幅は画像のときと違い中身から決まらないので指定する */
@media screen and (max-width: 767.98px) {
  .p-top-kv__icon {
    width: 116px;
  }
  /* 資料ボタン（top-kv-doc）の位置を、画像見出しのときと同じ高さに保つ
     （CTA効果判定 2026-12上旬まで位置を変えないため。375x812 で上端 692px 以内） */
  .p-top-kv__body {
    padding-top: 18px;
  }
  .p-top-kv__btnWrapper {
    margin-top: 12px;
  }
}

/* ---------- 課題 → 3つの柱 ---------- */
.p-topV2-pillarLead {
  margin-top: 1.6rem;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.8;
  text-align: center;
  color: #fff;
}
/* 柱のラベルは課題名の上に置く（カード上部はアイコンが重なるため、絶対配置にしない） */
.p-card-problemSolving__title .p-topV2-pillarChip {
  display: table;
  margin: 0 auto .6rem;
  padding: .1rem .9rem;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
  background: #29baa2;
}

/* ---------- 導入事例カルーセル: 業態ラベル（導入事例一覧と同じ表記） ---------- */
/* 写真の左上に重ねる（SPではカルーセルの矢印が写真の下端の高さに来て、本文の頭と重なるため） */
.p-carousel-caseStudy__item {
  position: relative;
}
.p-topV2-caseTag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: .1rem .9rem;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
  background: rgba(29, 61, 54, .82);
}

/* ---------- こんなお店に ---------- */
.l-section-topSegment {
  padding: 40px 20px 48px;
  background: #f9ffeb;
}
.l-section-topSegment__inner {
  max-width: 1100px;
  margin: 0 auto;
}
.p-topSegment {
  display: grid;
  gap: 1.6rem;
  margin-top: 3.2rem;
}
.p-topSegment__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2.4rem 2rem;
  border: 1px solid #cfe9e4;
  border-radius: 8px;
  background: #fff;
  color: #000;
  transition: box-shadow .3s;
}
.p-topSegment__card:hover,
.p-topSegment__card:focus-visible {
  box-shadow: 0 4px 16px rgba(41, 186, 162, .2);
}
.p-topSegment__title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1d3d36;
}
.p-topSegment__txt {
  flex-grow: 1;
  margin-top: 1rem;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.8;
}
.p-topSegment__more {
  margin-top: 1.6rem;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.7;
  color: #1f8f7c;
  text-decoration: underline;
  text-underline-offset: .3em;
}
.p-topSegment__more::after {
  content: " →";
}

@media screen and (min-width: 768px), print {
  .p-topKvV2-title {
    font-size: clamp(2.6rem, calc((50vw - 98px) / 9.6), 5.2rem);
    text-align: left;
  }
  .p-topKvV2-pillars {
    margin-top: 1rem;
    font-size: 2rem;
    text-align: left;
  }
  /* 資料ボタン（top-kv-doc）の位置を画像見出しのときと同じ高さに保つ（1366x768 で上端 750px 以内） */
  .p-top-kv__btnWrapper {
    margin-top: 56px;
  }
  .p-topV2-pillarLead {
    font-size: 1.6rem;
  }
  .p-card-problemSolving__title .p-topV2-pillarChip {
    margin: 0 0 .8rem;
  }
  .l-section-topSegment {
    padding: 72px 20px 80px;
  }
  .p-topSegment {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.4rem;
    margin-top: 4.8rem;
  }
  .p-topSegment__card {
    padding: 3.2rem 2.8rem;
  }
  .p-topSegment__title {
    font-size: 2rem;
  }
  .p-topSegment__txt {
    font-size: 1.6rem;
  }
}

/* ---------- 3つの柱（2026-10-30 案A）: 柱3枚を主役に、課題はカードの中のリンク。柱のない2課題（顧客育成・コスト削減）は下に小さく ----------
   見出しは「3つの柱」なのに同じ大きさのカードが6枚並び、数が合っていなかったため。旧 .p-card-problemSolving の6枚は使わない */
.p-top-problemSolving__body.-pillars { display: block; }
.p-topV2-pillars { display: grid; gap: 20px; }
.p-topV2-pillarCard { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,.10); display: flex; flex-direction: column; }
.p-topV2-pillarCard__img { aspect-ratio: 5 / 2; overflow: hidden; }
.p-topV2-pillarCard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-topV2-pillarCard__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.p-topV2-pillarCard__num { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; color: #12866f; }
.p-topV2-pillarCard__num b { font-family: Montserrat, sans-serif; font-size: 1.4rem; letter-spacing: .08em; color: #fff; background: #29baa2; border-radius: 99px; padding: 2px 10px; }
.p-topV2-pillarCard__name { font-size: 2.6rem; line-height: 1.3; font-weight: 700; color: #1a1a1a; margin: 6px 0 4px; letter-spacing: .04em; }
.p-topV2-pillarCard__catch { font-size: 1.7rem; line-height: 1.55; font-weight: 700; color: #12866f; }
.p-topV2-pillarCard__txt { font-size: 1.4rem; line-height: 1.8; color: #4b5a61; margin-top: 10px; }
.p-topV2-pillarCard__label { margin-top: 14px; padding-top: 12px; border-top: 1px solid #dcece8; font-size: 1.2rem; font-weight: 700; color: #5a6a72; }
.p-topV2-pillarCard__links { margin-top: 8px; display: grid; gap: 8px; }
.p-topV2-pillarCard__links a { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #f2fbf9; border-radius: 10px; padding: 12px 14px; font-size: 1.5rem; font-weight: 700; color: #1a1a1a; text-decoration: none; }
.p-topV2-pillarCard__links a::after { content: "›"; color: #29baa2; font-size: 2rem; line-height: 1; }
.p-topV2-pillarCard__links a:hover { background: #eafaf6; }
.p-topV2-pillarCard__more { margin-top: auto; padding-top: 16px; font-size: 1.4rem; font-weight: 700; color: #12866f; text-decoration: underline; }
.p-topV2-pillarMore { margin-top: 36px; }
/* 背景の写真がこの見出しの後ろまで続くので、SP・PCとも白文字に（PCも 2026-11-02 から） */
.p-topV2-pillarMore__title { text-align: center; font-size: 1.8rem; font-weight: 700; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); margin-bottom: 16px; }
.p-topV2-pillarMore__title span { display: inline-block; }
.p-topV2-pillarMore__list { display: grid; gap: 12px; }
.p-topV2-pillarMini { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; background: #fff; border: 1px solid #dcece8; border-radius: 14px; padding: 10px; text-decoration: none; color: inherit; }
.p-topV2-pillarMini img { width: 112px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.p-topV2-pillarMini b { display: block; font-size: 1.6rem; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.p-topV2-pillarMini b::after { content: " ›"; color: #29baa2; }
.p-topV2-pillarMini span { font-size: 1.3rem; line-height: 1.7; color: #4b5a61; }
/* SP: 柱3枚を縦に並べても長くなりすぎないよう、写真は右上の小さな角丸に（高さを増やさない）。上に色の帯 */
@media screen and (max-width: 767px) {
  .p-topV2-pillarCard { position: relative; border-top: 5px solid #29baa2; }
  .p-topV2-pillarCard__img { position: absolute; top: 16px; right: 16px; width: 84px; height: 84px; aspect-ratio: auto; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
  .p-topV2-pillarCard__num, .p-topV2-pillarCard__name, .p-topV2-pillarCard__catch { padding-right: 94px; }
  .p-topV2-pillarCard__catch { font-size: 1.6rem; }
  .p-topV2-pillars { gap: 14px; }
  .p-topV2-pillarMore { margin-top: 28px; }
}
/* 375px前後: 「入ったばかりのスタッフも、」が写真の横に収まるように */
@media screen and (max-width: 380px) {
  .p-topV2-pillarCard__catch { font-size: 1.5rem; }
}
@media screen and (min-width: 768px) {
  .p-topV2-pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .p-topV2-pillarCard__body { padding: 28px 30px 30px; }
  .p-topV2-pillarCard__name { font-size: 3.6rem; }
  .p-topV2-pillarCard__catch { font-size: 1.9rem; }
  .p-topV2-pillarCard__txt { font-size: 1.5rem; min-height: 5.4em; }
  .p-topV2-pillarCard__img { aspect-ratio: 16 / 9; }
  .p-topV2-pillarCard__name { font-size: 3.6rem; margin: 10px 0 6px; }
  .p-topV2-pillarMore { margin-top: 56px; }
  .p-topV2-pillarMore__title { font-size: 2rem; }
  .p-topV2-pillarMore__list { grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1000px; margin: 0 auto; }
  .p-topV2-pillarMini { grid-template-columns: 160px 1fr; gap: 20px; padding: 12px 20px 12px 12px; }
  .p-topV2-pillarMini img { width: 160px; height: 107px; }
  .p-topV2-pillarMini b { font-size: 1.8rem; }
  .p-topV2-pillarMini span { font-size: 1.4rem; }
}
/* 1024〜1199px: カードが細く説明が4行になるので、「この柱で応える課題」の行をそろえる高さを4行分に */
@media screen and (min-width: 1024px) and (max-width: 1199px) {
  .p-topV2-pillarCard__txt { min-height: 7.2em; }
}
/* 768〜1023px: 3列では柱の名前・キャッチまで折れて行がそろわないので、1列（中央・幅680px）に。写真は横長の帯 */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .p-topV2-pillars { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; gap: 20px; }
  .p-topV2-pillarCard__img { aspect-ratio: 3 / 1; }
  .p-topV2-pillarCard__txt { min-height: 0; }
  .p-topV2-pillarMore__list { grid-template-columns: 1fr; max-width: 680px; gap: 14px; }
}

/* ---------- KVの14年バッジ: 768〜1209px の位置（2026-10-31） ----------
   main.min.css はこの幅でバッジ（.p-top-kv__icon）を本文ブロックの左下（bottom:10px; left:-100px）に置くため、
   写真の列に重なり、画面の下端に半分隠れていた。1210px以上と同じく資料ボタンの近くに置き直す。
   CTA効果判定（2026-12上旬）まで資料ボタン（top-kv-doc）の位置を変えないため、バッジは絶対配置のまま
   （流れに入れると本文の上下中央寄せがずれ、ボタンが動く）、基準をボタンの行（.p-top-kv__btnWrapper）にする */
@media screen and (min-width: 768px) and (max-width: 1209.98px) {
  .p-top-kv__btnWrapper { position: relative; }
  .p-top-kv__icon { left: auto; bottom: auto; }
}
/* 1100〜1209px: ボタンの右に並べる。ボタンの幅だけ、バッジの分を空ける（1024px台は英語版のボタンの文字が2行に折れるので下に置く） */
@media screen and (min-width: 1100px) and (max-width: 1209.98px) {
  .p-top-kv__btn { max-width: calc(100% - clamp(100px, 100px + 59 * (100vw - 768px) / 512, 159px) - 20px); }
  .p-top-kv__icon { top: 50%; right: 0; transform: translateY(-50%); }
}
/* 768〜1099px: ボタンの下、左寄せ */
@media screen and (min-width: 768px) and (max-width: 1099.98px) {
  .p-top-kv__icon { top: calc(100% + 16px); left: 0; }
}
