/* =============================================================
   STAT VISUALS: data cards beside the info sections
   Animation start states only apply under html.has-motion (set by
   animations.js when motion is allowed), so without JS or with
   reduced motion every card renders in its final state.
   ============================================================= */
.has-motion .stat-bar-fill,
.has-motion .stat-meter-fill,
.has-motion .stat-tl-fill-paying,
.has-motion .stat-tl-fill-saving {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.has-motion .stat-flow-step,
.has-motion .stat-flow-arrow {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.has-motion .stat-check-item {
  opacity: 0; transform: translateX(-12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.has-motion .stat-compare-col {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.has-motion .stat-kpi,
.has-motion .stat-row-item,
.has-motion .stat-tl-marker,
.has-motion .stat-tl-box,
.has-motion .stat-check-footer,
.has-motion .stat-flow-stat {
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.has-motion .stat-compare-tag {
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
/* Played state: animations.js adds .stat-animated when the card scrolls in */
.has-motion .stat-animated .stat-bar-fill,
.has-motion .stat-animated .stat-meter-fill,
.has-motion .stat-animated .stat-tl-fill-paying,
.has-motion .stat-animated .stat-tl-fill-saving {
  transform: scaleX(1);
}
.has-motion .stat-animated .stat-flow-step,
.has-motion .stat-animated .stat-flow-arrow,
.has-motion .stat-animated .stat-check-item,
.has-motion .stat-animated .stat-compare-col,
.has-motion .stat-animated .stat-kpi,
.has-motion .stat-animated .stat-row-item,
.has-motion .stat-animated .stat-tl-marker,
.has-motion .stat-animated .stat-tl-box,
.has-motion .stat-animated .stat-check-footer,
.has-motion .stat-animated .stat-flow-stat,
.has-motion .stat-animated .stat-compare-tag {
  opacity: 1; transform: none;
}
/* Stagger — flow steps */
.has-motion .stat-animated .stat-flow > :nth-child(1) {
  transition-delay: 0s;
}
.has-motion .stat-animated .stat-flow > :nth-child(2) {
  transition-delay: 0.15s;
}
.has-motion .stat-animated .stat-flow > :nth-child(3) {
  transition-delay: 0.3s;
}
.has-motion .stat-animated .stat-flow > :nth-child(4) {
  transition-delay: 0.45s;
}
.has-motion .stat-animated .stat-flow > :nth-child(5) {
  transition-delay: 0.6s;
}
.has-motion .stat-animated .stat-flow-stat:nth-child(1) {
  transition-delay: 0.9s;
}
.has-motion .stat-animated .stat-flow-stat:nth-child(2) {
  transition-delay: 1.0s;
}
.has-motion .stat-animated .stat-flow-stat:nth-child(3) {
  transition-delay: 1.1s;
}
/* Stagger — checklist */
.has-motion .stat-animated .stat-check-item:nth-child(1) {
  transition-delay: 0s;
}
.has-motion .stat-animated .stat-check-item:nth-child(2) {
  transition-delay: 0.12s;
}
.has-motion .stat-animated .stat-check-item:nth-child(3) {
  transition-delay: 0.24s;
}
.has-motion .stat-animated .stat-check-item:nth-child(4) {
  transition-delay: 0.36s;
}
.has-motion .stat-animated .stat-check-item:nth-child(5) {
  transition-delay: 0.48s;
}
.has-motion .stat-animated .stat-check-footer {
  transition-delay: 0.7s;
}
/* Stagger — compare columns */
.has-motion .stat-animated .stat-compare-col:nth-child(1) {
  transition-delay: 0s;
}
.has-motion .stat-animated .stat-compare-col:nth-child(2) {
  transition-delay: 0.15s;
}
.has-motion .stat-animated .stat-compare-col:nth-child(3) {
  transition-delay: 0.3s;
}
.has-motion .stat-animated .stat-compare-tag {
  transition-delay: 0.6s;
}
/* Stagger — KPIs */
.has-motion .stat-animated .stat-kpi:nth-child(1) {
  transition-delay: 0.8s;
}
.has-motion .stat-animated .stat-kpi:nth-child(2) {
  transition-delay: 0.9s;
}
.has-motion .stat-animated .stat-kpi:nth-child(3) {
  transition-delay: 1.0s;
}
/* Stagger — stat rows */
.has-motion .stat-animated .stat-row-item:nth-child(1) {
  transition-delay: 0.6s;
}
.has-motion .stat-animated .stat-row-item:nth-child(2) {
  transition-delay: 0.7s;
}
.has-motion .stat-animated .stat-row-item:nth-child(3) {
  transition-delay: 0.8s;
}
/* Stagger — timeline */
.has-motion .stat-animated .stat-tl-marker:nth-child(1) {
  transition-delay: 0.3s;
}
.has-motion .stat-animated .stat-tl-marker:nth-child(2) {
  transition-delay: 0.6s;
}
.has-motion .stat-animated .stat-tl-marker:nth-child(3) {
  transition-delay: 0.9s;
}
.has-motion .stat-animated .stat-tl-box:nth-child(1) {
  transition-delay: 1.0s;
}
.has-motion .stat-animated .stat-tl-box:nth-child(2) {
  transition-delay: 1.1s;
}

/* ---------- Card styles ---------- */
.stat-visual {
  background: var(--white); border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg); padding: 28px 24px;
}
.stat-visual-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.stat-visual-label {
  font-size: 13px; font-weight: 600; color: var(--ink-900); letter-spacing: 0.2px;
}
.stat-visual-badge {
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; letter-spacing: 0.2px;
}
.stat-visual-badge-green {
  background: #ecfdf5; color: #059669;
}
.stat-visual-badge-orange {
  background: #fff7ed; color: #d97706;
}
.stat-visual-divider {
  height: 1px; background: var(--ink-100); margin: 20px 0;
}
/* Bar chart — cost comparison */
.stat-bars {
  display: flex; flex-direction: column; gap: 12px;
}
.stat-bar-group {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px;
}
.stat-bar-label {
  font-size: 11px; font-weight: 500; color: var(--ink-500); text-align: right;
}
.stat-bar-track {
  height: 28px; background: var(--ink-50); border-radius: 6px; overflow: hidden;
}
.stat-bar-fill {
  height: 100%; border-radius: 6px;
  transition: width 1s ease;
}
.stat-bar-old {
  background: var(--ink-300);
}
.stat-bar-new {
  background: var(--brand-primary);
}
.stat-bar-value {
  font-size: 14px; font-weight: 700; color: var(--ink-700); min-width: 60px;
}
.stat-bar-value-accent {
  color: var(--brand-primary);
}
/* KPI row */
.stat-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.stat-kpi {
  text-align: center;
}
.stat-kpi-number {
  display: block; font-size: 22px; font-weight: 700; color: var(--ink-900);
  line-height: 1.2;
}
.stat-kpi-unit {
  display: block; font-size: 11px; font-weight: 500; color: var(--ink-500);
  margin-top: 2px;
}
/* Meter chart — bill comparison */
.stat-meter {
  display: flex; flex-direction: column; gap: 14px;
}
.stat-meter-row {
  display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 12px;
}
.stat-meter-label {
  font-size: 11px; font-weight: 500; color: var(--ink-500); text-align: right;
}
.stat-meter-track {
  height: 32px; background: var(--ink-50); border-radius: 6px; overflow: hidden;
}
.stat-meter-fill {
  height: 100%; border-radius: 6px;
  display: flex; align-items: center; justify-content: flex-end; padding: 0 10px;
  font-size: 13px; font-weight: 700; color: var(--white);
  transition: width 1s ease;
}
.stat-meter-without {
  background: var(--ink-500);
}
.stat-meter-with {
  background: var(--brand-primary);
}
/* Row list — key-value stats */
.stat-row-list {
  display: flex; flex-direction: column; gap: 10px;
}
.stat-row-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px;
}
.stat-row-key {
  font-size: 13px; font-weight: 500; color: var(--ink-500);
}
.stat-row-val {
  font-size: 14px; font-weight: 700; color: var(--ink-900);
}
.stat-row-val-red {
  color: #dc2626;
}
@media (max-width: 680px) {
  .stat-bar-group {
    grid-template-columns: 40px 1fr auto;
  }
  .stat-meter-row {
    grid-template-columns: 70px 1fr;
  }
  .stat-kpis {
    grid-template-columns: repeat(3, 1fr); gap: 8px;
  }
  .stat-kpi-number {
    font-size: 18px;
  }
}
/* Flow diagram — vertical component chain */
.stat-flow {
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.stat-flow-step {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 12px 0;
}
.stat-flow-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.stat-flow-icon svg {
  width: 22px; height: 22px;
}
.stat-flow-icon-orange {
  background: rgba(245,166,35,0.1); color: var(--brand-primary);
}
.stat-flow-icon-dark {
  background: var(--ink-100); color: var(--ink-700);
}
.stat-flow-icon-green {
  background: rgba(16,185,129,0.1); color: #059669;
}
.stat-flow-name {
  font-size: 14px; font-weight: 600; color: var(--ink-900); margin-bottom: 3px;
}
.stat-flow-desc {
  font-size: 11.5px; font-weight: 400; color: var(--ink-500); max-width: 200px;
}
.stat-flow-arrow {
  width: 20px; height: 20px; color: var(--ink-300);
}
.stat-flow-arrow svg {
  width: 100%; height: 100%;
}
.stat-flow-footer {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.stat-flow-stat {
  text-align: center;
}
.stat-flow-stat-num {
  display: block; font-size: 18px; font-weight: 700; color: var(--ink-900); line-height: 1.2;
}
.stat-flow-stat-label {
  display: block; font-size: 11px; font-weight: 500; color: var(--ink-500); margin-top: 2px;
}
/* Compare grid — system types */
.stat-compare-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.stat-compare-col {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 20px 12px;
  border-radius: 12px; background: var(--ink-50);
  border: 1px solid var(--ink-100);
}
.stat-compare-col-featured {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary-30);
}
.stat-compare-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.stat-compare-icon svg {
  width: 18px; height: 18px;
}
.stat-compare-icon-gray {
  background: var(--ink-100); color: var(--ink-500);
}
.stat-compare-icon-orange {
  background: var(--brand-primary); color: var(--white);
}
.stat-compare-icon-green {
  background: rgba(16,185,129,0.1); color: #059669;
}
.stat-compare-name {
  font-size: 13px; font-weight: 700; color: var(--ink-900); margin-bottom: 10px;
}
.stat-compare-traits {
  list-style: none; padding: 0; margin: 0 0 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.stat-compare-traits li {
  font-size: 11px; font-weight: 400; color: var(--ink-500); line-height: 1.4;
}
.stat-compare-tag {
  font-size: 10px; font-weight: 600; color: var(--ink-500);
  padding: 3px 10px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--ink-100);
  letter-spacing: 0.2px;
}
.stat-compare-tag-orange {
  background: var(--brand-primary); color: var(--white); border-color: var(--brand-primary);
}
@media (max-width: 480px) {
  .stat-compare-grid {
    grid-template-columns: 1fr; gap: 10px;
  }
}
/* Timeline card — ROI */
.stat-timeline {
  margin-bottom: 4px;
}
.stat-tl-track {
  display: flex; height: 8px; border-radius: 4px; overflow: hidden;
  margin-bottom: 12px;
}
.stat-tl-fill-paying {
  flex: 30; background: var(--ink-300);
}
.stat-tl-fill-saving {
  flex: 70; background: var(--brand-primary);
}
.stat-tl-markers {
  display: flex; justify-content: space-between; position: relative;
}
.stat-tl-marker {
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.stat-tl-dot {
  width: 10px; height: 10px; border-radius: 50%; margin-bottom: 6px;
}
.stat-tl-dot-dark {
  background: var(--ink-900);
}
.stat-tl-dot-orange {
  background: var(--brand-primary);
}
.stat-tl-dot-green {
  background: #059669;
}
.stat-tl-year {
  font-size: 12px; font-weight: 700; color: var(--ink-900); line-height: 1.2;
}
.stat-tl-event {
  font-size: 10.5px; font-weight: 400; color: var(--ink-500);
}
.stat-tl-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.stat-tl-box {
  padding: 14px 16px; border-radius: 10px;
}
.stat-tl-box-paying {
  background: var(--ink-50);
}
.stat-tl-box-saving {
  background: rgba(245,166,35,0.06);
}
.stat-tl-box-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--ink-900);
  margin-bottom: 4px;
}
.stat-tl-box-detail {
  display: block; font-size: 11px; font-weight: 400; color: var(--ink-500);
  line-height: 1.5;
}
/* Checklist card */
.stat-checklist {
  display: flex; flex-direction: column; gap: 14px;
}
.stat-check-item {
  display: flex; align-items: flex-start; gap: 12px;
}
.stat-check-icon {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.stat-check-icon svg {
  width: 12px; height: 12px;
}
.stat-check-done {
  background: var(--brand-primary); color: var(--white);
}
.stat-check-text {
  display: flex; flex-direction: column;
}
.stat-check-name {
  font-size: 13.5px; font-weight: 600; color: var(--ink-900); line-height: 1.3;
}
.stat-check-desc {
  font-size: 11.5px; font-weight: 400; color: var(--ink-500); margin-top: 1px;
}
.stat-check-footer {
  font-size: 11.5px; font-weight: 500; color: var(--ink-500);
  text-align: center; font-style: italic;
}
