/* 開発背景（templates/background.html）と導入事例（templates/case_list.html）・2026-11-28 作り直し
   土台は solution_v2.css（.sv-*）。ここはこの2ページだけの部品（.ab-* 開発背景 ／ .cs-* 導入事例）
   動きはほかのページと変える: 数字の数え上げ・下へ送ると伸びる年表・順に灯る3つの段 */

/* ---------- 共通の小物 ---------- */
.sv .ab-label { text-align: center; font-size: 14px; font-weight: 800; color: var(--sv-teal-dark); letter-spacing: .08em; margin-bottom: 8px; }
.sv .ab-label--light { color: var(--sv-mark); }
.ab-text { display: grid; gap: 14px; }
.sv .ab-text p { font-size: 17px; line-height: 1.95; color: var(--sv-ink); }
.sv .ab-quote { margin: 26px 0 0; text-align: center; font-size: 23px; font-weight: 900; line-height: 1.6; color: var(--sv-navy); background: var(--sv-teal-soft); border-radius: 20px; padding: 26px 16px; word-break: auto-phrase; }
.sv .ab-center { text-align: center; font-size: 17px; font-weight: 800; color: var(--sv-navy); margin-top: 14px; }
.ab-shot { margin-top: 28px; }
.ab .sv-more { margin-top: 28px; }

/* ---------- 開発背景: 最初の画面の数字 ---------- */
.ab-nums { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ab-nums > div { background: #fff; border: 1px solid var(--sv-line); border-radius: 18px; padding: 18px 12px 14px; text-align: center; box-shadow: 0 18px 40px -26px rgba(20, 35, 60, .5); display: grid; gap: 2px; }
.ab-nums b { font-size: 50px; font-weight: 900; line-height: 1.1; color: var(--sv-teal-dark); font-variant-numeric: tabular-nums; }
.ab-nums b i { font-style: normal; }
.ab-nums b small { font-size: 18px; margin-left: 3px; color: var(--sv-navy); }
.ab-nums span { font-size: 14px; font-weight: 800; color: var(--sv-sub); }
.ab-nums-wide { grid-column: 1 / -1; background: var(--sv-navy) !important; border-color: var(--sv-navy) !important; }
.ab-nums-wide b { color: var(--sv-mark); font-size: 46px; }
.ab-nums-wide b small { color: #fff; }
.ab-nums-wide span { color: #cfe0ef; }

/* ---------- 開発背景: やること ---------- */
.ab-mission { display: grid; gap: 14px; }
.ab-mission > div { background: var(--sv-tint); border-radius: 20px; padding: 22px 18px; }
.ab-mission-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; background: var(--sv-teal-dark); color: #fff; font-size: 21px; }
.ab-mission-icon--warm { background: #d4546e; }
.ab-mission h3 { margin: 12px 0 12px; font-size: 22px; font-weight: 900; color: var(--sv-navy); line-height: 1.4; }

/* ---------- 開発背景: 年表（下へ送ると線が伸びる。--p は JS が 0〜1 で入れる） ---------- */
.ab-time { position: relative; display: grid; gap: 30px; padding-left: 34px !important; margin-top: 10px !important; }
.ab-time::before, .ab-time::after { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px; }
.ab-time::before { background: rgba(255, 255, 255, .16); }
.ab-time::after { background: var(--sv-mark); transform-origin: top; transform: scaleY(var(--p, 1)); transition: transform .15s linear; }
.ab-time li { position: relative; }
.ab-time li::before { content: ""; position: absolute; left: -33px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--sv-navy); border: 4px solid rgba(255, 255, 255, .3); z-index: 1; transition: border-color .4s, background .4s, box-shadow .4s; }
.ab-time li.is-in::before { border-color: var(--sv-mark); background: var(--sv-mark); box-shadow: 0 0 0 6px rgba(255, 228, 107, .2); }
.ab-time small { display: inline-block; font-size: 13px; font-weight: 900; color: var(--sv-navy); background: var(--sv-mark); border-radius: 999px; padding: 1px 12px; }
.ab-time b { display: block; margin-top: 6px; font-size: 21px; font-weight: 900; line-height: 1.5; color: #fff; }
.sv .ab-time p { margin-top: 8px; font-size: 16px; line-height: 1.9; color: #d6e2ee; }

/* ---------- 開発背景: 名前の由来（ふく ＋ link ＝ ロゴ が順に出る） ---------- */
.ab-name { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.ab-name > span { display: grid; justify-items: center; background: var(--sv-tint); border-radius: 16px; padding: 12px 16px; font-size: 24px; font-weight: 900; color: var(--sv-navy); line-height: 1.3; }
.ab-name > span small { font-size: 12px; font-weight: 800; color: var(--sv-sub); }
.ab-name > i { color: var(--sv-teal); font-size: 14px; }
.ab-name-c { flex: 0 0 100%; background: none !important; padding: 6px 0 0 !important; }
.ab-name-c img { height: 46px; width: auto; display: block; animation: abSwim 3.2s ease-in-out infinite; }
.sv-js .ab-name > * { opacity: 0; transform: translateY(12px) scale(.9); }
.sv-js .ab-name.is-in > * { animation: abPop .5s cubic-bezier(.2, 1.3, .4, 1) forwards; }
.sv-js .ab-name.is-in > :nth-child(2) { animation-delay: .25s; }
.sv-js .ab-name.is-in > :nth-child(3) { animation-delay: .5s; }
.sv-js .ab-name.is-in > :nth-child(4) { animation-delay: .75s; }
.sv-js .ab-name.is-in > :nth-child(5) { animation-delay: 1s; }
@keyframes abPop { to { opacity: 1; transform: none; } }
@keyframes abSwim { 0%, 100% { transform: translate(-4px, 0) rotate(-2deg); } 50% { transform: translate(4px, -5px) rotate(2deg); } }

/* ---------- 導入事例: 最初の画面（3つの段が順に灯る。6秒でひと回り） ---------- */
.cs-path { margin-top: 30px; display: grid; justify-items: stretch; }
.cs-path-step { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 0 14px; background: #fff; border: 2px solid var(--sv-line); border-radius: 16px; padding: 12px 16px; animation: csLit 6s ease infinite; }
.cs-path-step i { grid-row: 1 / 3; width: 48px; height: 48px; border-radius: 50%; background: var(--sv-tint); color: var(--sv-sub); font-size: 18px; display: flex; align-items: center; justify-content: center; animation: csLitIcon 6s ease infinite; }
.cs-path-step b { font-size: 19px; font-weight: 900; color: var(--sv-navy); line-height: 1.4; }
.cs-path-step small { font-size: 14px; color: var(--sv-sub); line-height: 1.5; }
.cs-path-step--2, .cs-path-step--2 i { animation-delay: 1.5s; }
.cs-path-step--3, .cs-path-step--3 i { animation-delay: 3s; }
.cs-path-line { justify-self: start; margin-left: 38px; width: 4px; height: 22px; background: var(--sv-line); border-radius: 4px; overflow: hidden; }
.cs-path-line i { display: block; width: 100%; height: 100%; background: var(--sv-teal); transform-origin: top; animation: csLine 6s ease infinite; animation-delay: .9s; }
.cs-path-line--2 i { animation-delay: 2.4s; }
@keyframes csLit { 0%, 4% { border-color: var(--sv-line); box-shadow: none; } 10%, 88% { border-color: var(--sv-teal-dark); box-shadow: 0 14px 28px -18px rgba(0, 134, 154, .9); } 96%, 100% { border-color: var(--sv-line); box-shadow: none; } }
@keyframes csLitIcon { 0%, 4% { background: var(--sv-tint); color: var(--sv-sub); } 10%, 88% { background: var(--sv-teal-dark); color: #fff; } 96%, 100% { background: var(--sv-tint); color: var(--sv-sub); } }
@keyframes csLine { 0% { transform: scaleY(0); } 10%, 80% { transform: scaleY(1); } 90%, 100% { transform: scaleY(0); } }

/* ---------- 導入事例: 1件 ---------- */
.cs-card { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 22px 44px -30px rgba(20, 35, 60, .6); margin-bottom: 22px; }
.cs-card-img { aspect-ratio: 16 / 9; background: #e9f1f6; overflow: hidden; }
.cs-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-card-body { padding: 20px 18px 24px; }
.sv .cs-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cs-tags span { font-size: 12px; font-weight: 800; color: var(--sv-teal-dark); background: var(--sv-teal-soft); border-radius: 999px; padding: 1px 11px; }
.sv .cs-meta { font-size: 14px; color: var(--sv-sub); }
.cs-card h2 { margin: 6px 0 16px; font-size: 23px; font-weight: 900; line-height: 1.5; color: var(--sv-navy); word-break: auto-phrase; }
.cs-num { background: var(--sv-navy); color: #fff; border-radius: 18px; padding: 16px 14px 14px; text-align: center; }
.cs-num small { font-size: 14px; font-weight: 800; color: #cfe0ef; }
.sv .cs-num p { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.cs-num-before { font-size: 20px; font-weight: 800; color: #9fb2c6; text-decoration: line-through; text-decoration-thickness: 2px; }
.cs-num p > i { font-size: 14px; color: var(--sv-mark); }
.cs-num-after { font-size: 40px; font-weight: 900; line-height: 1.2; color: var(--sv-mark); }
.sv-js .cs-card .cs-num-after { display: inline-block; transform: scale(.4); opacity: 0; }
.sv-js .cs-card.is-in .cs-num-after { animation: csPop .7s cubic-bezier(.2, 1.5, .4, 1) .7s forwards; }
@keyframes csPop { to { transform: none; opacity: 1; } }
.sv .cs-quote { font-size: 20px; font-weight: 900; line-height: 1.7; color: var(--sv-navy); background: var(--sv-teal-soft); border-radius: 18px; padding: 18px 16px; }
.cs-steps { margin-top: 22px !important; display: grid; }
.cs-step { position: relative; display: flex; gap: 14px; align-items: flex-start; padding-bottom: 20px; }
.cs-step:last-child { padding-bottom: 0; }
.cs-step:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--sv-line); }
.cs-step > span { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--sv-tint); color: var(--sv-sub); font-size: 15px; display: flex; align-items: center; justify-content: center; transition: background .4s, color .4s; }
.cs-step b { display: block; font-size: 17px; font-weight: 900; color: var(--sv-navy); line-height: 40px; }
.sv .cs-step p { font-size: 16px; line-height: 1.85; color: var(--sv-ink); white-space: pre-line; }
.cs-step--3 > span { background: var(--sv-teal-dark); color: #fff; }
.sv-js .cs-card .cs-step { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.sv-js .cs-card.is-in .cs-step { opacity: 1; transform: none; }
.sv-js .cs-card.is-in .cs-step--1 { transition-delay: .3s; }
.sv-js .cs-card.is-in .cs-step--2 { transition-delay: .7s; }
.sv-js .cs-card.is-in .cs-step--3 { transition-delay: 1.1s; }

@media (prefers-reduced-motion: reduce) {
    .cs-path-step, .cs-path-step i, .cs-path-line i, .ab-name-c img { animation: none !important; }
    .sv-js .ab-name > *, .sv-js .cs-card .cs-num-after, .sv-js .cs-card .cs-step { opacity: 1 !important; transform: none !important; animation: none !important; }
    .ab-time::after { transform: none !important; }
}

@media (min-width: 900px) {
    .ab-nums, .cs-path { margin-top: 0; }
    .ab-nums b { font-size: 64px; }
    .ab-nums-wide b { font-size: 58px; }
    .sv .ab-text p { font-size: 18px; }
    .sv .ab-quote { font-size: 30px; padding: 36px 24px; }
    .ab-quote br, .ab-time b br { display: none; }
    .ab-mission { grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
    .ab-mission > div { padding: 32px 30px; }
    .ab-shot { max-width: 760px; margin: 36px auto 0; }
    .ab-time { gap: 40px; padding-left: 44px !important; }
    .ab-time li::before { left: -43px; }
    .ab-time b { font-size: 26px; }
    .ab-name-c { flex-basis: auto; }
    .cs-card { display: grid; grid-template-columns: 1fr; }
    .cs-card-body { padding: 32px 36px 36px; }
    .cs-card h2 { font-size: 28px; }
    .cs-num-after { font-size: 52px; }
}
