/* ===========================================================================
   ServicesCloud — 成果物プレビュー cards beside each 提供内容 step.
   The final state is the default. With JS (html.sc-steps-live, svc-cloud-story.js)
   a card body waits hidden until its row comes into view, then plays its short
   story once (.is-played): ticks pop, bars grow, code lines write, the line draws.
   =========================================================================== */

.sc-card { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--white); }
.sc-card__hd { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #F9FBFD; }
.sc-card__hd .k { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.sc-card__hd .v { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--navy); }
.sc-card__bd { padding: 18px 18px 16px; }
.sc-card__end { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--navy); color: var(--white); font-size: 13px; font-weight: 700; }
.sc-card .ck { display: inline-flex; align-items: center; justify-content: center; justify-self: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); }
.sc-card .ck svg { width: 14px; height: 14px; }

/* 01 移行戦略とロードマップ: AWS vs Google Cloud on the FAQ criteria + migration order */
.sc-card .c1 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sc-card .cmpt__r { display: grid; grid-template-columns: minmax(0, 1fr) 64px 84px; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #EEF2F6; font-size: 13px; color: var(--ink); }
.sc-card .cmpt__h { font-size: 13px; letter-spacing: .04em; color: var(--muted); }
.sc-card .cmpt__h img { justify-self: center; width: auto; height: 18px; }
.sc-card .cmpt__h img + img { height: 16px; }
.sc-card .road__k { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.sc-card .road__r { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; color: var(--muted); }
.sc-card .road__r i { display: block; height: 10px; margin-left: var(--l); width: var(--w); border-radius: 5px; background: var(--blue); transform-origin: left; }
.sc-card .road__r i.no { height: 2px; background: repeating-linear-gradient(90deg, #C6D3E0 0 6px, transparent 6px 10px); }

/* 02 アーキテクチャ設計書: availability / security / cost triangle + the four layers */
.sc-card .c2 { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: center; }
.sc-card .tri { display: block; width: 200px; height: auto; }
.sc-card .tri__dot { transform: translate(-14px, -22px); }
.sc-card .mini { display: flex; flex-direction: column-reverse; gap: 6px; }
.sc-card .mini span { display: block; padding: 7px 12px; border-radius: 6px; font-size: 13px; font-weight: 700; color: var(--navy); background: #EEF6FF; }
.sc-card .mini span:nth-child(2) { background: #DCEEFC; }
.sc-card .mini span:nth-child(3) { background: var(--blue); color: var(--white); }
.sc-card .mini span:nth-child(4) { background: var(--white); border: 1px solid var(--line-strong); }

/* 03 IaCコードと構築環境: main.tf + Terraform → 検証 → 公開 → Kubernetes */
.sc-card .ide { overflow: hidden; border-radius: 8px; background: var(--navy-deep); }
.sc-card .ide__tab { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #13385A; color: #C6D3E0; font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.sc-card .ide__tab img { width: 14px; height: 14px; }
.sc-card .ide__code { padding: 10px 14px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.8; color: #C6D3E0; }
.sc-card .ide__code b { font-weight: 400; color: var(--blue-pale); }
.sc-card .pipe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.sc-card .pipe__n { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); font-size: 13px; font-weight: 700; color: var(--navy); }
.sc-card .pipe__n img { width: 18px; height: 18px; }
.sc-card .pipe i { display: block; width: 18px; height: 2px; background: var(--blue); transform-origin: left; }

/* 04 運用設計と監視体制: uptime line with one alert that recovers, surplus shrinking */
.sc-card .dash { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.sc-card .dash__hd { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.sc-card .dash__hd img { width: 22px; height: 22px; border-radius: 4px; }
.sc-card .dash__ln { display: block; width: 100%; height: auto; margin: 6px 0; }
.sc-card .dash__ln .ln { stroke-dasharray: 1; stroke-dashoffset: 0; }
.sc-card .dash__plot { position: relative; }
.sc-card .dash__al { position: absolute; left: 57%; top: 80%; font-size: 13px; font-weight: 700; line-height: 1; color: var(--sc-amber-text); white-space: nowrap; }
.sc-card .dash__cost { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.sc-card .dash__cost b { display: block; height: 8px; overflow: hidden; border-radius: 4px; background: #EEF2F6; }
.sc-card .dash__cost i { display: block; width: 22%; height: 100%; transform-origin: left center; background: repeating-linear-gradient(135deg, #C6D3E0 0 5px, #E2E8EE 5px 10px); }

@media (max-width: 640px) { .sc-card .c1, .sc-card .c2 { grid-template-columns: 1fr; } }

/* --- one-shot stories --- */
.sc-steps-live .sc-step:not(.is-played) .sc-card__bd { opacity: 0; }
.sc-step.is-played .sc-card__bd { animation: sc-rise .45s both; }
.sc-step.is-played .sc-card .cmpt__r .ck { animation: sc-pop .35s both; animation-delay: var(--d); }
.sc-step.is-played .sc-card .cmpt__r .ck + .ck { animation-delay: calc(var(--d) + .08s); }
.sc-step.is-played .sc-card .road__r i { animation: sc-grow .6s cubic-bezier(.4, 0, .2, 1) both; animation-delay: var(--d); }
.sc-step.is-played .sc-card__end { animation: sc-pop .4s both; animation-delay: var(--d); }
.sc-step.is-played .sc-card .tri__dot { animation: sc-tri 1.1s .2s cubic-bezier(.65, 0, .35, 1) both; }
.sc-step.is-played .sc-card .mini span { animation: sc-rise .4s both; animation-delay: var(--d); }
.sc-step.is-played .sc-card .ide__code div { animation: sc-write .35s both; animation-delay: var(--d); }
.sc-step.is-played .sc-card .pipe__n { animation: sc-pop .35s both; animation-delay: var(--d); }
.sc-step.is-played .sc-card .pipe i { animation: sc-grow .3s both; animation-delay: var(--d); }
.sc-step.is-played .sc-card .dash__ln .ln { animation: sc-dl 1.2s .2s cubic-bezier(.4, 0, .2, 1) both; }
.sc-step.is-played .sc-card .dash__ln .al, .sc-step.is-played .sc-card .dash__al { animation: sc-pop .35s 1.1s both; }
.sc-step.is-played .sc-card .dash__cost i { animation: sc-cut 1s 1.2s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes sc-tri { 0% { transform: translate(0, 0); } 35% { transform: translate(48px, 22px); } 70% { transform: translate(-38px, 20px); } 100% { transform: translate(-14px, -22px); } }
@keyframes sc-dl { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sc-cut { from { transform: scaleX(2.73); } to { transform: none; } }   /* 60% → 22% as a transform, not a width change */
@media (prefers-reduced-motion: reduce) { .sc-steps-live .sc-step:not(.is-played) .sc-card__bd { opacity: 1; } }
