/* ==========================================================================
   Case flow graphs; one shared, responsive component for all case heroes.
   Four stages, left to right. Each stage = number + kicker, a small visual,
   a title and one line of context. A highlight cycles through the stages.
   ========================================================================== */

.cf-cover {
  height: auto !important;
  min-height: 0 !important;
  display: block !important;
  padding: 78px 32px 62px;
}
.cf-cover > svg { display: none !important; } /* legacy graphs, if any remain */

.cf {
  --cf-T: 10s;
  --cf-text: #f6f2ea;
  --cf-soft: #d9dfee;
  --cf-muted: #a9b6d4;
  --cf-line: rgba(169,182,212,.2);
  --cf-orange: #f15a24;
  --cf-green: #3dfba6;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  max-width: 1140px;
  margin: 0 auto;
}

/* ---------- stage card ---------- */
.cf-step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(26,43,87,.78), rgba(17,31,68,.92));
  border: 1px solid var(--cf-line);
  animation: cfActive var(--cf-T) ease-in-out infinite;
  animation-delay: calc((var(--i) - 4) * var(--cf-T) / 4);
}
.cf-head { display: flex; align-items: center; gap: 10px; }
.cf-num {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  font: 500 10px/1 var(--font-mono);
  color: var(--cf-orange);
  border: 1px solid rgba(241,90,36,.55);
  background: rgba(241,90,36,.08);
  flex: none;
}
.cf-kicker {
  font: 500 10px/1.2 var(--font-mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--cf-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cf-viz {
  position: relative;
  height: 126px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(7,15,38,.55);
  border: 1px solid rgba(169,182,212,.1);
  display: flex; flex-direction: column; justify-content: center; gap: 7px;
  overflow: hidden;
}
.cf-viz.center { align-items: center; }
.cf-title {
  font: 400 23px/1.08 var(--font-serif);
  color: var(--cf-text);
  letter-spacing: -.005em;
}
.cf-sub {
  margin-top: -8px;
  font: 400 10px/1.4 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--cf-muted);
}

/* ---------- connectors ---------- */
.cf-link {
  position: relative;
  flex: 0 0 34px;
  align-self: center;
  height: 2px;
  margin-top: -8px;
  background: repeating-linear-gradient(90deg, rgba(241,90,36,.55) 0 5px, transparent 5px 10px);
}
.cf-link::before { /* arrow head */
  content: ""; position: absolute; right: -1px; top: -4px;
  border: 5px solid transparent; border-left: 6px solid rgba(241,90,36,.8); border-right: 0;
}
.cf-link::after { /* travelling packet */
  content: ""; position: absolute; left: 0; top: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px var(--cf-orange), 0 0 10px rgba(241,90,36,.9);
  opacity: 0;
  animation: cfPacket var(--cf-T) linear infinite;
  animation-delay: calc(var(--i) * var(--cf-T) / 4 + var(--cf-T) * .18 - var(--cf-T));
}

/* ---------- visual primitives ---------- */
.cf-row {
  display: flex; align-items: center; gap: 8px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(169,182,212,.14);
  font: 500 10.5px/1.3 var(--font-mono);
  color: var(--cf-soft);
  flex: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cf-row > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.cf-row.ok { border-color: rgba(61,251,166,.28); background: rgba(61,251,166,.05); }
.cf-row.warn { border-color: rgba(241,90,36,.45); background: rgba(241,90,36,.08); }
.cf-dot { width: 7px; height: 7px; border-radius: 50%; background: #6a82b8; flex: none; }
.ok > .cf-dot { background: var(--cf-green); box-shadow: 0 0 8px rgba(61,251,166,.55); }
.warn > .cf-dot { background: var(--cf-orange); box-shadow: 0 0 8px rgba(241,90,36,.6); }
.cf-tag { margin-left: auto; padding-left: 8px; color: var(--cf-muted); font-size: 9px; letter-spacing: .1em; }
.cf-icon { width: 14px; height: 14px; flex: none; color: var(--cf-muted); }

.cf-chips { display: flex; flex-wrap: wrap; gap: 6px; align-content: center; }
.cf-chip {
  padding: 6px 9px; border-radius: 999px;
  font: 500 9.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--cf-soft);
  border: 1px solid rgba(169,182,212,.28);
  background: rgba(255,255,255,.03);
  white-space: nowrap;
}
.cf-chip.hot { border-color: rgba(241,90,36,.6); color: #ffd9c9; background: rgba(241,90,36,.1); }

.cf-art { width: 100%; height: 100%; overflow: visible; }
.cf-art .s  { fill: none; stroke: var(--cf-muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cf-art .o  { fill: none; stroke: var(--cf-orange); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cf-art .g  { fill: none; stroke: var(--cf-green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cf-art .card { fill: rgba(17,31,68,.95); stroke: rgba(169,182,212,.4); stroke-width: 1.2; }
.cf-art .card-hot { fill: rgba(17,31,68,.98); stroke: var(--cf-orange); stroke-width: 1.4; }
.cf-art .fo { fill: var(--cf-orange); }
.cf-art .fg { fill: var(--cf-green); }
.cf-art .fm { fill: rgba(169,182,212,.55); }
.cf-art text { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; fill: var(--cf-muted); }

/* ranked bars (shortlist, roadmap) */
.cf-bars { display: flex; flex-direction: column; gap: 9px; }
.cf-bar { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; font: 500 9.5px/1 var(--font-mono); letter-spacing: .08em; color: var(--cf-soft); text-transform: uppercase; }
.cf-bar.rank { grid-template-columns: 20px 1fr; }
.cf-bar .rk { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(169,182,212,.4); font-size: 10px; }
.cf-bar:first-child .rk { border-color: rgba(61,251,166,.6); color: var(--cf-green); }
.cf-track { position: relative; height: 10px; border-radius: 6px; background: rgba(169,182,212,.12); overflow: hidden; }
.cf-fill { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 6px; background: var(--c, var(--cf-muted)); transform-origin: left center; animation: cfGrow 5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cf-fill.offset { left: var(--x, 0%); }

/* mini dashboard tiles (heritage) */
.cf-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; height: 100%; }
.cf-tile { border-radius: 7px; border: 1px solid rgba(169,182,212,.16); background: rgba(255,255,255,.03); padding: 6px 7px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.cf-tile b { font: 500 8px/1 var(--font-mono); letter-spacing: .12em; color: var(--cf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-tile svg { width: 100%; height: 22px; overflow: visible; }

/* calendar (tenant) */
.cf-cal { display: flex; align-items: center; gap: 12px; }
.cf-cal-day { flex: none; width: 54px; border-radius: 9px; overflow: hidden; border: 1px solid rgba(241,90,36,.6); text-align: center; background: rgba(17,31,68,.9); }
.cf-cal-day span { display: block; font: 500 9px/1 var(--font-mono); letter-spacing: .14em; padding: 5px 0; background: rgba(241,90,36,.85); color: #fff; }
.cf-cal-day strong { display: block; font: 400 26px/1 var(--font-serif); color: var(--cf-text); padding: 6px 0 7px; }
.cf-cal-info { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cf-cal-info .t { font: 500 11px/1 var(--font-mono); color: var(--cf-soft); }
.cf-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font: 500 9.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cf-green); border: 1px solid rgba(61,251,166,.45); background: rgba(61,251,166,.07); }
.cf-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cf-green); box-shadow: 0 0 8px rgba(61,251,166,.7); }
.cf-pill.hot { color: #ffb79c; border-color: rgba(241,90,36,.55); background: rgba(241,90,36,.08); }
.cf-pill.hot::before { background: var(--cf-orange); box-shadow: 0 0 8px rgba(241,90,36,.7); }

/* waveform (tenant call) */
.cf-wave { display: flex; align-items: center; gap: 14px; }
.cf-wave .ph { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(241,90,36,.6); background: rgba(241,90,36,.08); color: var(--cf-orange); animation: cfRing 3.2s ease-in-out infinite; }
.cf-wave .ph svg { width: 22px; height: 22px; }
.cf-bars-v { display: flex; align-items: center; gap: 4px; height: 44px; flex: 1; }
.cf-bars-v i { flex: 1; max-width: 5px; height: var(--h); border-radius: 3px; background: var(--cf-muted); animation: cfWave 1.4s ease-in-out infinite; animation-delay: var(--d); transform-origin: center; }
.cf-bars-v i:nth-child(3n) { background: var(--cf-orange); }

/* pulse rings (core nodes) */
.cf-core { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.cf-core::before, .cf-core::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(241,90,36,.55); animation: cfPulse 3s ease-out infinite; }
.cf-core::after { animation-delay: -1.5s; }
.cf-core > div { position: relative; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: #0b1736; border: 1.5px solid var(--cf-orange); box-shadow: 0 0 18px rgba(241,90,36,.35); }
.cf-core svg { width: 38px; height: 38px; }

/* scan line on documents */
.cf-scan { animation: cfScan 2.8s ease-in-out infinite; }
.cf-float { animation: cfFloat 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.cf-blink { animation: cfBlink 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* ---------- keyframes ---------- */
@keyframes cfActive {
  0%, 22% { border-color: rgba(241,90,36,.85); box-shadow: 0 0 0 1px rgba(241,90,36,.25), 0 14px 40px -12px rgba(241,90,36,.45); transform: translateY(-3px); }
  28%, 100% { border-color: var(--cf-line); box-shadow: none; transform: none; }
}
@keyframes cfPacket {
  0% { left: 0; opacity: 0; }
  2% { opacity: 1; }
  10% { left: calc(100% - 8px); opacity: 1; }
  12%, 100% { left: calc(100% - 8px); opacity: 0; }
}
@keyframes cfGrow { 0%, 100% { transform: scaleX(.35); } 40%, 75% { transform: scaleX(1); } }
@keyframes cfWave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes cfRing { 0%, 60%, 100% { transform: rotate(0); } 64% { transform: rotate(-9deg); } 68% { transform: rotate(9deg); } 72% { transform: rotate(-6deg); } 76% { transform: rotate(0); } }
@keyframes cfPulse { 0% { transform: scale(.78); opacity: .9; } 100% { transform: scale(1.32); opacity: 0; } }
@keyframes cfScan { 0%, 100% { transform: translateY(0); opacity: .2; } 50% { transform: translateY(54px); opacity: 1; } }
@keyframes cfFloat { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
@keyframes cfBlink { 0%, 100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cf-cover { padding: 72px 20px 56px; }
  .cf { flex-wrap: wrap; gap: 12px; }
  .cf-step { flex: 1 1 calc(50% - 6px); }
  .cf-link { display: none; }
}
@media (max-width: 620px) {
  .cf-cover { padding: 64px 12px 14px; }
  .cf-cover .stamp { display: none; }
  .cf { gap: 8px; }
  .cf-step { padding: 11px 10px 12px; gap: 10px; border-radius: 12px; }
  .cf-head { gap: 7px; }
  .cf-num { width: 22px; height: 22px; font-size: 9px; }
  .cf-kicker { font-size: 8.5px; letter-spacing: .12em; }
  .cf-viz { height: auto; min-height: 96px; padding: 8px; gap: 5px; }
  .cf-title { font-size: 18px; }
  .cf-sub { margin-top: -6px; font-size: 8.5px; letter-spacing: .08em; }
  .cf-row { min-height: 22px; padding: 4px 7px; gap: 6px; font-size: 9px; line-height: 1.25; white-space: normal; }
  .cf-tag { display: none; }
  .cf-chips { gap: 4px; }
  .cf-chip { padding: 4px 6px; font-size: 7.5px; letter-spacing: .05em; }
  .cf-bar { grid-template-columns: 50px 1fr; font-size: 8px; gap: 6px; }
  .cf-bars { gap: 7px; }
  .cf-core { width: 70px; height: 70px; }
  .cf-core > div { width: 54px; height: 54px; }
  .cf-wave { gap: 8px; }
  .cf-wave .ph { width: 36px; height: 36px; }
  .cf-cal { gap: 8px; flex-wrap: wrap; }
  .cf-cal-day { width: 44px; }
  .cf-cal-day strong { font-size: 21px; }
  .cf-cal-info .t { font-size: 9.5px; }
  .cf-pill { font-size: 8px; padding: 4px 7px; }
  .cf-tile b { font-size: 6.5px; letter-spacing: .04em; }
  .cf-step { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cf *, .cf *::before, .cf *::after, .cf-step, .cf-link::after { animation: none !important; }
  .cf-fill { transform: none; }
}

/* process lanes with friction points (workshop) */
.cf-lane { position: relative; height: 12px; }
.cf-lane::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: rgba(169,182,212,.35); }
.cf-lane i { position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #6a82b8; }
.cf-lane i.f { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: var(--cf-orange); box-shadow: 0 0 0 3px rgba(241,90,36,.18), 0 0 10px rgba(241,90,36,.7); animation: cfBlink 2.4s ease-in-out infinite; }
.cf-lane i.f:nth-child(odd) { animation-delay: -1.2s; }
@media (prefers-reduced-motion: reduce) { .cf-lane i.f { animation: none !important; } }
