/* =========================================================
   Before & After section (before-and-after.html)
   Uses the brand variables from styles.css. Kept in its own
   file for now; merge into styles.css whenever you like.
   ========================================================= */

.ba-section {
  background: var(--color-bg-alt);
  padding: 4rem 0 5rem;
}

.ba-intro {
  max-width: 46rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.ba-intro p { font-size: 1.125rem; line-height: 1.7; }

.ba-case {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

.ba-case-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.ba-case-head h3 { margin: 0; }
.ba-case-type { margin: 0; color: #5C5959; }

.ba-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.ba-images figure { margin: 0; }
.ba-images figcaption {
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5C5959;
  margin-bottom: 0.5rem;
}
.ba-images .ba-after figcaption { color: var(--color-button); }
.ba-images img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.ba-caption {
  max-width: 52rem;
  margin: 1.75rem auto; /* centered under the screenshots */
  text-align: center;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.ba-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.ba-stats li {
  background: var(--color-bg-alt);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.ba-stat-label { display: block; font-size: 0.9375rem; color: #4A4747; margin-bottom: 0.25rem; }
.ba-stat-value {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: var(--fw-heading);
  font-size: 1.75rem;
  color: var(--color-button);
}
.ba-stat-value .ba-old { color: #6B6868; }
.ba-stat-value svg { flex: none; }

.ba-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}
.ba-source { margin: 0; font-size: 0.875rem; color: #5C5959; }

@media (max-width: 760px) {
  .ba-images { grid-template-columns: minmax(0, 1fr); }
  .ba-stats { grid-template-columns: minmax(0, 1fr); }
}

/* Screen-reader-only "to" between old and new numbers */
.visually-hidden-ba {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
