---
id: seed:archetypes/before-after
title: Before/After comparison archetypes
source_type: seed_archetype
priority: warm
---

A before/after section demonstrates transformation through visual comparison. It converts on proof and credibility — seeing is believing. Use when the product delivers a visible, dramatic change. Four working archetypes:

---

**Slider comparison (default).** Draggable slider reveals before/after images side by side.

*Animation & Visual Details:*
- *Entrance*: Container fades in with scale 0.95 → 1; labels slide in from edges
- *Hover*: Slider handle glows with radial pulse
- *Gradients*: Overlay labels have gradient backgrounds (accent at 80% opacity)
- *Radial circles*: Slider handle has radial ring pulse on hover
- *Scroll trigger*: IntersectionObserver at 20% threshold
- *JS interaction*: Drag slider to reveal before/after; keyboard accessible (arrow keys)

```html
<section data-amb-section="before-after" class="ba-section">
  <div class="container">
    <div class="ba-header">
      <h2 class="ba-title">See the transformation</h2>
      <p class="ba-subtitle">Drag the slider to compare before and after</p>
    </div>
    <div class="ba-slider-wrapper">
      <div class="ba-slider" id="ba-slider">
        <div class="ba-image ba-image--after">
          <img src="https://placehold.co/800x600/6366f1/ffffff?text=After" alt="After transformation" />
          <span class="ba-label ba-label--after">After</span>
        </div>
        <div class="ba-image ba-image--before">
          <img src="https://placehold.co/800x600/e2e8f0/1e293b?text=Before" alt="Before transformation" />
          <span class="ba-label ba-label--before">Before</span>
        </div>
        <div class="ba-handle" role="slider" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" aria-label="Compare before and after" tabindex="0">
          <div class="ba-handle-line"></div>
          <div class="ba-handle-circle">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
              <polyline points="15 18 9 12 15 6"/>
              <polyline points="9 18 15 12 9 6" transform="translate(6,0)"/>
            </svg>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
```

```css
:root {
  --ba-enter-duration: 0.6s;
}

.ba-section {
  padding: clamp(64px, 8vw, 100px) 0;
}

.ba-header {
  text-align: center;
  max-width: 480px;
  margin: 0 auto clamp(40px, 5vw, 60px);
}

.ba-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-text, #1e293b);
}

.ba-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted, #64748b);
  margin-top: 12px;
}

.ba-slider-wrapper {
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--ba-enter-duration) ease, transform var(--ba-enter-duration) ease;
}

.ba-slider-wrapper.is-visible {
  opacity: 1;
  transform: scale(1);
}

.ba-slider {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.ba-image {
  position: relative;
}

.ba-image--after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}

.ba-image img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.ba-label {
  position: absolute;
  top: 20px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.9), rgba(124,58,237,0.9));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 20px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.ba-label--before {
  left: 20px;
  opacity: 0;
  transform: translateX(-20px);
}

.ba-label--after {
  right: 20px;
  opacity: 0;
  transform: translateX(20px);
}

.ba-slider:hover .ba-label--before,
.ba-slider-wrapper.is-visible .ba-label--before {
  animation: ba-label-in-left 0.4s ease-out 0.3s forwards;
}

.ba-slider:hover .ba-label--after,
.ba-slider-wrapper.is-visible .ba-label--after {
  animation: ba-label-in-right 0.4s ease-out 0.3s forwards;
}

@keyframes ba-label-in-left {
  to { opacity: 1; transform: translateX(0); }
}

@keyframes ba-label-in-right {
  to { opacity: 1; transform: translateX(0); }
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  z-index: 10;
}

.ba-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.ba-handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ba-handle-circle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ba-slider:hover .ba-handle-circle::before {
  opacity: 1;
  animation: ba-handle-pulse 1.5s ease-in-out infinite;
}

@keyframes ba-handle-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.ba-handle:hover .ba-handle-circle,
.ba-handle:focus .ba-handle-circle {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 32px rgba(99,102,241,0.3);
}

.ba-handle-circle svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent, #6366f1);
}

@media (prefers-reduced-motion: reduce) {
  .ba-slider-wrapper {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ba-label {
    opacity: 1;
    transform: none;
  }
  .ba-handle-circle::before {
    animation: none;
    opacity: 0;
  }
}
```

*JS behavior:*
```javascript
const slider = document.getElementById('ba-slider');
const handle = slider.querySelector('.ba-handle');
const afterImage = slider.querySelector('.ba-image--after');
const wrapper = slider.closest('.ba-slider-wrapper');

let isDragging = false;

const updateSlider = (x) => {
  const rect = slider.getBoundingClientRect();
  let percentage = ((x - rect.left) / rect.width) * 100;
  percentage = Math.max(0, Math.min(100, percentage));

  handle.style.left = `${percentage}%`;
  handle.setAttribute('aria-valuenow', Math.round(percentage));
  afterImage.style.clipPath = `inset(0 ${100 - percentage}% 0 0)`;
};

const observer = new IntersectionObserver((entries) => {
  entries.forEach(entry => {
    if (entry.isIntersecting) {
      wrapper.classList.add('is-visible');
      observer.unobserve(entry.target);
    }
  });
}, { threshold: 0.2 });
observer.observe(wrapper);

handle.addEventListener('mousedown', () => { isDragging = true; });
document.addEventListener('mouseup', () => { isDragging = false; });
document.addEventListener('mousemove', (e) => {
  if (isDragging) updateSlider(e.clientX);
});

handle.addEventListener('touchstart', () => { isDragging = true; });
document.addEventListener('touchend', () => { isDragging = false; });
document.addEventListener('touchmove', (e) => {
  if (isDragging) updateSlider(e.touches[0].clientX);
});

handle.addEventListener('keydown', (e) => {
  const current = parseInt(handle.getAttribute('aria-valuenow'));
  if (e.key === 'ArrowLeft') {
    updateSlider(slider.getBoundingClientRect().left + (current - 5) / 100 * slider.offsetWidth);
  } else if (e.key === 'ArrowRight') {
    updateSlider(slider.getBoundingClientRect().left + (current + 5) / 100 * slider.offsetWidth);
  }
});
```

---

**Side-by-side cards.** Two cards showing before/result with distinct visual treatment.

*Animation & Visual Details:*
- *Entrance*: Cards slide in from opposite sides (before from left, after from right), 0.3s delay between
- *Hover*: Cards lift with shadow, gradient border appears
- *Gradients*: "After" card has gradient border (accent colors); "Before" card has muted border
- *Radial circles*: Radial glow behind "After" card content
- *Scroll trigger*: IntersectionObserver at 15% threshold
- *JS interaction*: None beyond entrance

```html
<section data-amb-section="before-after" class="ba-section ba-section--cards">
  <div class="container">
    <div class="ba-header">
      <h2 class="ba-title">Real results</h2>
      <p class="ba-subtitle">From struggling to thriving — here's what changed</p>
    </div>
    <div class="ba-cards">
      <article class="ba-card ba-card--before">
        <div class="ba-card-badge">Before</div>
        <div class="ba-card-image-wrapper">
          <img class="ba-card-image" src="https://placehold.co/600x450/e2e8f0/64748b?text=Before" alt="Before" />
        </div>
        <div class="ba-card-content">
          <h3 class="ba-card-title">The old way</h3>
          <ul class="ba-card-list">
            <li>Manual data entry every day</li>
            <li>Spreadsheets everywhere</li>
            <li>No visibility into performance</li>
            <li>Hours wasted on reporting</li>
          </ul>
        </div>
      </article>
      <div class="ba-cards-divider">
        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
          <line x1="5" y1="12" x2="19" y2="12"/>
          <polyline points="12 5 19 12 12 19"/>
        </svg>
      </div>
      <article class="ba-card ba-card--after">
        <div class="ba-card-badge">After</div>
        <div class="ba-card-glow"></div>
        <div class="ba-card-image-wrapper">
          <img class="ba-card-image" src="https://placehold.co/600x450/6366f1/ffffff?text=After" alt="After" />
        </div>
        <div class="ba-card-content">
          <h3 class="ba-card-title">The new way</h3>
          <ul class="ba-card-list">
            <li>Automated data sync</li>
            <li>Single source of truth</li>
            <li>Real-time dashboards</li>
            <li>Reports in seconds</li>
          </ul>
        </div>
      </article>
    </div>
  </div>
</section>
```

```css
.ba-section--cards {
  background: var(--color-bg-alt, #f8fafc);
}

.ba-cards {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .ba-cards {
    grid-template-columns: 1fr;
  }
  .ba-cards-divider {
    transform: rotate(90deg);
    margin: 8px auto;
  }
}

.ba-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  border: 2px solid #f1f5f9;
  opacity: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ba-card--before {
  transform: translateX(-40px);
}

.ba-card--after {
  transform: translateX(40px);
}

.ba-card.is-visible {
  animation: ba-card-enter 0.6s ease-out forwards;
}

.ba-card--before.is-visible {
  animation-delay: 0s;
}

.ba-card--after.is-visible {
  animation-delay: 0.15s;
}

@keyframes ba-card-enter {
  to { opacity: 1; transform: translateX(0); }
}

.ba-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}

.ba-card--after:hover {
  border-color: var(--color-accent, #6366f1);
}

.ba-card-badge {
  display: inline-block;
  padding: 6px 14px;
  background: #f1f5f9;
  color: var(--color-text-muted, #64748b);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 20px;
  margin-bottom: 20px;
}

.ba-card--after .ba-card-badge {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(124,58,237,0.1));
  color: var(--color-accent, #6366f1);
}

.ba-card-glow {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.ba-card-image-wrapper {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.ba-card-image {
  width: 100%;
  height: auto;
  display: block;
}

.ba-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text, #1e293b);
  margin-bottom: 16px;
}

.ba-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ba-card-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--color-text-muted, #64748b);
}

.ba-card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
}

.ba-card--after .ba-card-list li::before {
  background: radial-gradient(circle, var(--color-accent, #6366f1) 0%, rgba(99,102,241,0.5) 100%);
}

.ba-cards-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #64748b);
  opacity: 0.5;
}

.ba-cards-divider svg {
  width: 32px;
  height: 32px;
}

@media (prefers-reduced-motion: reduce) {
  .ba-card {
    opacity: 1;
    transform: none;
  }
}
```

*JS behavior:*
```javascript
const baCards = document.querySelectorAll('.ba-card');
const observer = new IntersectionObserver((entries) => {
  entries.forEach(entry => {
    if (entry.isIntersecting) {
      entry.target.classList.add('is-visible');
      observer.unobserve(entry.target);
    }
  });
}, { threshold: 0.15 });
baCards.forEach(card => observer.observe(card));
```

---

**Reveal on scroll.** Before image visible, after image clips in as user scrolls.

*Animation & Visual Details:*
- *Entrance*: Initial state shows "before"; scroll progress reveals "after"
- *Scroll*: CSS clip-path driven by scroll position through JS
- *Gradients*: Progress indicator has gradient fill (accent colors)
- *Radial circles*: Radial progress ring around indicator
- *Scroll trigger*: Not applicable (scroll-linked animation)
- *JS interaction*: Scroll position maps to clip-path value (0% = before visible, 100% = after visible)

```html
<section data-amb-section="before-after" class="ba-section ba-section--scroll-reveal">
  <div class="container">
    <div class="ba-header">
      <h2 class="ba-title">Watch the change unfold</h2>
      <p class="ba-subtitle">Scroll to reveal the transformation</p>
    </div>
    <div class="ba-scroll-container" id="ba-scroll-container">
      <div class="ba-scroll-wrapper">
        <div class="ba-scroll-image ba-scroll-image--before">
          <img src="https://placehold.co/800x600/e2e8f0/64748b?text=Before" alt="Before" />
        </div>
        <div class="ba-scroll-image ba-scroll-image--after">
          <img src="https://placehold.co/800x600/6366f1/ffffff?text=After" alt="After" />
        </div>
        <div class="ba-scroll-progress">
          <div class="ba-scroll-progress-ring">
            <svg viewBox="0 0 36 36">
              <circle class="ba-scroll-progress-bg" cx="18" cy="18" r="16" fill="none" stroke="#e2e8f0" stroke-width="2"/>
              <circle class="ba-scroll-progress-fill" cx="18" cy="18" r="16" fill="none" stroke="url(#ba-gradient)" stroke-width="2" stroke-dasharray="100" stroke-dashoffset="100" stroke-linecap="round"/>
              <defs>
                <linearGradient id="ba-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
                  <stop offset="0%" stop-color="#6366f1"/>
                  <stop offset="100%" stop-color="#7c3aed"/>
                </linearGradient>
              </defs>
            </svg>
            <span class="ba-scroll-progress-label">0%</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
```

```css
.ba-section--scroll-reveal {
  background: var(--color-bg-alt, #f8fafc);
}

.ba-scroll-container {
  max-width: 800px;
  margin: 0 auto;
}

.ba-scroll-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.ba-scroll-image {
  position: relative;
}

.ba-scroll-image--after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.05s linear;
}

.ba-scroll-image img {
  width: 100%;
  height: auto;
  display: block;
}

.ba-scroll-progress {
  position: absolute;
  bottom: 24px;
  right: 24px;
}

.ba-scroll-progress-ring {
  position: relative;
  width: 56px;
  height: 56px;
}

.ba-scroll-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ba-scroll-progress-fill {
  transition: stroke-dashoffset 0.1s ease;
}

.ba-scroll-progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text, #1e293b);
}
```

*JS behavior:*
```javascript
const container = document.getElementById('ba-scroll-container');
const afterImage = container.querySelector('.ba-scroll-image--after');
const progressFill = container.querySelector('.ba-scroll-progress-fill');
const progressLabel = container.querySelector('.ba-scroll-progress-label');

let ticking = false;
window.addEventListener('scroll', () => {
  if (!ticking) {
    requestAnimationFrame(() => {
      const rect = container.getBoundingClientRect();
      const viewportHeight = window.innerHeight;
      const elementTop = rect.top;
      const elementHeight = rect.height;

      if (rect.top < viewportHeight && rect.bottom > 0) {
        const scrollProgress = Math.max(0, Math.min(1,
          (viewportHeight - elementTop) / (viewportHeight + elementHeight)
        ));
        const revealPercent = Math.round(scrollProgress * 100);

        afterImage.style.clipPath = `inset(0 ${100 - revealPercent}% 0 0)`;
        progressFill.style.strokeDashoffset = 100 - revealPercent;
        progressLabel.textContent = `${revealPercent}%`;
      }

      ticking = false;
    });
    ticking = true;
  }
});
```

---

**Split screen with stats.** Before/after side by side with metrics that count up.

*Animation & Visual Details:*
- *Entrance*: Split panels slide in from edges; stats count up after panels settle
- *Hover*: Stat cards have gradient border glow on hover
- *Gradients*: "After" side has gradient overlay at 5% opacity; stat cards have gradient backgrounds
- *Radial circles*: Radial rings behind stat numbers
- *Scroll trigger*: IntersectionObserver at 20% threshold, count-up triggers when stats visible
- *JS interaction*: Count-up animation for metrics on viewport entry

```html
<section data-amb-section="before-after" class="ba-section ba-section--split-stats">
  <div class="container">
    <h2 class="ba-title">The difference is measurable</h2>
    <div class="ba-split">
      <div class="ba-split-panel ba-split-panel--before">
        <div class="ba-split-label">Before</div>
        <div class="ba-split-content">
          <div class="ba-stat">
            <span class="ba-stat-value" data-target="12">0</span>
            <span class="ba-stat-suffix">hrs</span>
            <span class="ba-stat-label">Weekly manual work</span>
          </div>
          <div class="ba-stat">
            <span class="ba-stat-value" data-target="5">0</span>
            <span class="ba-stat-suffix">tools</span>
            <span class="ba-stat-label">Disconnected systems</span>
          </div>
          <div class="ba-stat">
            <span class="ba-stat-value" data-target="48">0</span>
            <span class="ba-stat-suffix">hrs</span>
            <span class="ba-stat-label">Monthly reporting time</span>
          </div>
        </div>
      </div>
      <div class="ba-split-panel ba-split-panel--after">
        <div class="ba-split-label">After</div>
        <div class="ba-split-glow"></div>
        <div class="ba-split-content">
          <div class="ba-stat">
            <span class="ba-stat-value" data-target="2">0</span>
            <span class="ba-stat-suffix">hrs</span>
            <span class="ba-stat-label">Weekly manual work</span>
          </div>
          <div class="ba-stat">
            <span class="ba-stat-value" data-target="1">0</span>
            <span class="ba-stat-suffix">platform</span>
            <span class="ba-stat-label">Unified workspace</span>
          </div>
          <div class="ba-stat">
            <span class="ba-stat-value" data-target="4">0</span>
            <span class="ba-stat-suffix">hrs</span>
            <span class="ba-stat-label">Monthly reporting time</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
```

```css
.ba-section--split-stats {
  padding: clamp(64px, 8vw, 100px) 0;
}

.ba-section--split-stats .ba-title {
  text-align: center;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-text, #1e293b);
  margin-bottom: 48px;
}

.ba-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .ba-split { grid-template-columns: 1fr; }
}

.ba-split-panel {
  position: relative;
  border-radius: 24px;
  padding: 32px;
  overflow: hidden;
  opacity: 0;
}

.ba-split-panel--before {
  background: #f8fafc;
  transform: translateX(-50px);
}

.ba-split-panel--after {
  background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(124,58,237,0.02));
  border: 1px solid rgba(99,102,241,0.15);
  transform: translateX(50px);
}

.ba-split-panel.is-visible {
  animation: ba-split-enter 0.6s ease-out forwards;
}

.ba-split-panel--before.is-visible { animation-delay: 0s; }
.ba-split-panel--after.is-visible { animation-delay: 0.15s; }

@keyframes ba-split-enter {
  to { opacity: 1; transform: translateX(0); }
}

.ba-split-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.ba-split-label {
  display: inline-block;
  padding: 6px 14px;
  background: #e2e8f0;
  color: var(--color-text-muted, #64748b);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 20px;
  margin-bottom: 24px;
}

.ba-split-panel--after .ba-split-label {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(124,58,237,0.1));
  color: var(--color-accent, #6366f1);
}

.ba-split-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ba-stat {
  position: relative;
  padding-left: 16px;
}

.ba-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #e2e8f0;
  border-radius: 2px;
}

.ba-split-panel--after .ba-stat::before {
  background: linear-gradient(to bottom, var(--color-accent, #6366f1), #7c3aed);
}

.ba-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text, #1e293b);
  position: relative;
}

.ba-stat-value::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -8px;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, var(--color-accent, #6366f1) 0%, rgba(99,102,241,0.4) 100%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ba-stat.is-counting .ba-stat-value::after {
  opacity: 1;
}

.ba-stat-suffix {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted, #64748b);
  margin-left: 4px;
}

.ba-stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted, #64748b);
  margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .ba-split-panel {
    opacity: 1;
    transform: none;
  }
}
```

*JS behavior:*
```javascript
const splitPanels = document.querySelectorAll('.ba-split-panel');
const stats = document.querySelectorAll('.ba-stat-value');

const observer = new IntersectionObserver((entries) => {
  entries.forEach(entry => {
    if (entry.isIntersecting) {
      entry.target.classList.add('is-visible');
      observer.unobserve(entry.target);
    }
  });
}, { threshold: 0.2 });

splitPanels.forEach(panel => observer.observe(panel));

const countUp = (el) => {
  const target = parseInt(el.dataset.target);
  const duration = 1500;
  const start = performance.now();
  const stat = el.closest('.ba-stat');
  stat.classList.add('is-counting');

  const easeOutQuart = t => 1 - Math.pow(1 - t, 4);

  const animate = (now) => {
    const elapsed = now - start;
    const progress = Math.min(elapsed / duration, 1);
    const eased = easeOutQuart(progress);
    el.textContent = Math.round(eased * target);

    if (progress < 1) {
      requestAnimationFrame(animate);
    } else {
      el.textContent = target;
      stat.classList.remove('is-counting');
    }
  };

  requestAnimationFrame(animate);
};

const statsObserver = new IntersectionObserver((entries) => {
  entries.forEach(entry => {
    if (entry.isIntersecting) {
      countUp(entry.target);
      statsObserver.unobserve(entry.target);
    }
  });
}, { threshold: 0.5 });

stats.forEach(stat => statsObserver.observe(stat));
```

---

Copy rules: the before state should feel genuinely challenging (not just "slightly inconvenient") to make the after state feel like meaningful progress. Use specific numbers, not vague claims ("50% faster" not "much faster"). The transformation should be believable for your audience.

Layout rules: before/after comparisons work well mid-page after you've established context. They should never be the first thing a visitor sees — without context, the viewer doesn't know what they're comparing or why it matters.

CSS custom property summary:
```css
:root {
  --ba-enter-duration: 0.6s;
  --color-accent: #6366f1;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
}
```