/* ── Chart & Proof Visualizations ─────────────────────────────────────────────
   Reusable SVG-backed data visualizations: ring charts, comparison bars,
   proof dashboards, timelines, and outcome strips.
   All use CSS custom properties — dark mode adapts automatically.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Ring / Donut Chart ───────────────────────────────────────────────────
   An SVG ring showing a percentage with a center label.
   Usage: <div class="ring-chart" style="--ring-pct:89;--ring-color:var(--color-accent)">
            <svg>...</svg><span class="ring-chart__value">89%</span></div>
   ──────────────────────────────────────────────────────────────────────── */
.ring-chart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
}
.ring-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-chart__bg {
  fill: none;
  stroke: var(--color-bg-muted);
  stroke-width: 8;
}
.ring-chart__fill {
  fill: none;
  stroke: var(--ring-color, var(--color-accent));
  stroke-width: 8;
  stroke-linecap: butt;
  stroke-dasharray: calc(var(--ring-pct, 0) * 2.513), 251.3;
  transition: stroke-dasharray 0.8s var(--ease-base); stroke-dashoffset: 0;
}
.ring-chart__value {
  position: absolute;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ── Before / After Comparison Bars ──────────────────────────────────────
   Horizontal bar chart comparing two values (before/after).
   Usage: inside a .comparison-card with --before-w and --after-w CSS vars.
   ──────────────────────────────────────────────────────────────────────── */
.comparison-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
.comparison-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.comparison-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.comparison-bar-row__label {
  font-size: var(--text-xs);
  color: var(--color-text-3);
  width: 56px;
  flex-shrink: 0;
}
.comparison-bar-row__track {
  flex: 1;
  height: 10px;
  background: var(--color-bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.comparison-bar-row__fill { display: block;
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s var(--ease-base);
}
.comparison-bar-row__fill--before {
  background: var(--color-text-4);
  width: var(--bar-w, 0%);
}
.comparison-bar-row__fill--after {
  background: var(--color-accent);
  width: var(--bar-w, 0%);
}
.comparison-bar-row__val {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  color: var(--color-text-2);
  width: 48px;
  flex-shrink: 0;
}

/* ── Proof Metrics Dashboard (window-frame SVG card) ─────────────────────
   A card containing an SVG illustration of a dashboard with KPI cards.
   Used on About, Services overview, Case Studies index.
   ──────────────────────────────────────────────────────────────────────── */
.proof-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.proof-dashboard__visual {
  display: flex;
  justify-content: center;
}
.proof-dashboard__visual svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(26,63,168,.10));
}
.proof-dashboard__content h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}
.proof-dashboard__content p {
  font-size: var(--text-base);
  color: var(--color-text-3);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}
.proof-dashboard__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.proof-dashboard__metric {
  text-align: center;
  padding: var(--space-4);
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
}
.proof-dashboard__metric-val {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-1);
}
.proof-dashboard__metric-label {
  font-size: var(--text-xs);
  color: var(--color-text-3);
}

@media (max-width: 768px) {
  .proof-dashboard {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .proof-dashboard__metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Timeline / SLA Visual ───────────────────────────────────────────────
   Horizontal step timeline showing stages with SVG connectors.
   ──────────────────────────────────────────────────────────────────────── */
.sla-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
  padding: var(--space-4) 0;
}
.sla-timeline__step {
  flex: 1;
  text-align: center;
  position: relative;
  padding-top: var(--space-10);
}
.sla-timeline__step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-border);
}
.sla-timeline__step:first-child::before { left: 50%; }
.sla-timeline__step:last-child::before { right: 50%; }
.sla-timeline__dot {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-accent-light);
  z-index: 1;
}
.sla-timeline__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.sla-timeline__time {
  font-size: var(--text-xs);
  color: var(--color-text-4);
}

/* ── Outcome Strip (t-stat-chip row on booking, contact) ───────────────── */
.outcome-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.outcome-chip {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
.outcome-chip__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.outcome-chip__val {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 2px;
}
.outcome-chip__label {
  font-size: var(--text-xs);
  color: var(--color-text-3);
  line-height: var(--leading-relaxed);
}

@media (max-width: 768px) {
  .outcome-strip { grid-template-columns: 1fr; }
}


/* ── Ring Chart Row (testimonials aggregate section) ──────────────────── */
.ring-charts-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.ring-chart-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
.ring-chart-item__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--color-text);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
}
.ring-chart-item__sub {
  font-size: var(--text-xs);
  color: var(--color-text-4);
}

/* ── Outcomes Table Wrapper (testimonials aggregate section) ──────────── */
.outcomes-table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

@media (max-width: 768px) {
  .ring-charts-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .ring-charts-row { grid-template-columns: 1fr; }
}
/* ── Technology Grid (for tech strip on About, Services) ───────────────── */
.tech-strip {
  background: var(--color-bg-soft);
  border-top: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
  padding-block: var(--space-10);
}
.tech-strip__wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}
.tech-strip__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-2);
  white-space: nowrap;
  transition: border-color var(--ease-base);
}
.tech-strip__badge:hover {
  border-color: var(--color-accent-muted);
}
.tech-strip__badge svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ── Aggregate Outcomes Table ────────────────────────────────────────────
   Clean metrics table for testimonials page.
   ──────────────────────────────────────────────────────────────────────── */
.outcomes-table {
  width: 100%;
  border-collapse: collapse;
}
.outcomes-table th,
.outcomes-table td {
  padding: var(--space-4) var(--space-6);
  text-align: left;
  border-bottom: 1px solid var(--color-border-soft);
}
.outcomes-table th {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-4);
  background: var(--color-bg-soft);
}
.outcomes-table td {
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
.outcomes-table td:last-child {
  font-weight: var(--weight-semi);
  color: var(--color-accent);
}

/* ── Trust Indicators Chips ────────────────────────────────────────────── */
.trust-indicators {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.trust-chip {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4);
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  color: var(--color-text-3);
}
.trust-chip__icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .trust-indicators { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .trust-indicators { grid-template-columns: 1fr; }
}
