.cb-before-after {
  position: relative;
  padding: 80px 32px 48px;
  background: linear-gradient(180deg, transparent, rgba(0,229,160,.025));
  color: #f1f5f3;
}
.cb-before-after__inner { max-width: 1160px; margin-inline: auto; }
.cb-before-after header { text-align: center; }
#cambrain-before-after .cb-section-badge { margin: 0 auto 28px; }
#cambrain-before-after h2,
#cambrain-before-after h2 span {
  font-family: Pretendard, sans-serif !important;
  font-size: clamp(28px, 3.3vw, 48px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.035em;
  word-break: keep-all;
}
#cambrain-before-after h2 { margin: 0; }
#cambrain-before-after h2 span { color: #00d6a3; }
#cambrain-before-after .cb-before-after__description {
  margin: 32px auto 0;
  color: #bdc9c4;
  font: 400 18px/1.75 Pretendard, sans-serif;
  word-break: keep-all;
}
.cb-before-after__comparison {
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px; margin-top: 64px; padding-bottom: 32px;
}
.cb-before-after__comparison::before {
  content: ''; position: absolute; top: 0; bottom: 32px; left: 50%; width: 1px;
  background: linear-gradient(transparent, rgba(0,229,160,.35), transparent);
}
.cb-before-after__side { min-width: 0; }
.cb-before-after__side--new { text-align: right; }
#cambrain-before-after .cb-before-after__label {
  margin: 0 9% 8px; color: #aab6b1;
  font: 400 12px/1.5 'Space Mono', monospace !important; letter-spacing: .16em;
}
#cambrain-before-after .cb-before-after__side--new .cb-before-after__label { color: #00e5a0; }
#cambrain-before-after h3 {
  margin: 0 9%; color: #f1f5f3;
  font: 600 24px/1.35 Pretendard, sans-serif !important; letter-spacing: -.025em;
}
.cb-before-after__macbook { position: relative; width: 100%; aspect-ratio: 3944 / 2564; margin-top: 16px; }
.cb-before-after__screen {
  position: absolute; left: 11.68%; top: 11.7%; width: 76.64%; height: 76.6%;
  background: #08090d;
}
.cb-before-after__macbook img { position: relative; display: block; width: 100%; height: auto; }
@media (max-width: 767px) {
  .cb-before-after__comparison { grid-template-columns: 1fr; gap: 40px; margin-top: 48px; }
  .cb-before-after__comparison::before { display: none; }
  .cb-before-after__side--new { text-align: left; padding-top: 32px; border-top: 1px solid rgba(0,229,160,.2); }
}
@media (max-width: 599px) {
  .cb-before-after { padding: 56px 24px 24px; }
  #cambrain-before-after .cb-before-after__description { font-size: 15px; }
}
/* One continuous surface for the comparison and its workflow nodes. */
.cb-comparison-flow {
  position: relative; isolation: isolate;
  background: radial-gradient(ellipse at 10% 15%,rgba(0,229,160,.08),transparent 50%),
    linear-gradient(rgba(0,229,160,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(0,229,160,.025) 1px,transparent 1px),#050a08;
  background-size: auto,40px 40px,40px 40px,auto;
}
.cb-comparison-flow .cb-before-after { background: transparent; padding-bottom: 0; }
.cb-comparison-flow #how-it-works.cb-steps { background: transparent; }
.cb-comparison-flow #how-it-works .cb-steps__inner { padding-top: 0; }
.cb-comparison-flow #how-it-works .cb-steps__timeline { margin-top: 0; }
.cb-comparison-flow .cb-before-after__comparison { padding-bottom: 48px; }
.cb-comparison-flow .cb-before-after__comparison::before { bottom: 0; background: rgba(0,229,160,.25); }
@media (max-width: 767px) {
  .cb-comparison-flow .cb-before-after__comparison::before { display: block; top: auto; height: 48px; }
}
@media (max-width: 767px) {
  .cb-comparison-flow .cb-before-after__comparison::before { bottom: 24px; height: 24px; }
  .cb-comparison-flow .cb-before-after__comparison::after {
    content: ''; position: absolute; bottom: 0; left: 10px;
    width: calc(50% - 10px); height: 24px;
    border-top: 1px solid rgba(0,229,160,.25);
    border-left: 1px solid rgba(0,229,160,.25);
  }
}
/* Extend the photograph beyond the section boundary; fade the whole scene
   into the shared grid rather than ending an opaque overlay at node 01. */
.cb-comparison-flow .cb-before-after { overflow: visible; }
.cb-before-after__scene {
  position: absolute; z-index: -1; inset: 0 0 auto;
  height: calc(100% + 420px); overflow: hidden; pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.cb-before-after__background {
  position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: calc(100% - 420px);
  background: #080c10;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 65%, transparent);
  will-change: transform; pointer-events: none;
}
.cb-before-after__overlay {
  position: absolute; z-index: 1; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,rgba(5,10,8,.92),rgba(8,8,12,.55) 24%,rgba(8,8,12,.46) 50%,rgba(8,8,12,.55) 76%,#050a08),
    radial-gradient(110% 90% at 50% 50%,transparent,rgba(8,8,12,.25) 60%,rgba(8,8,12,.72));
}
@media (prefers-reduced-motion: reduce) {
  .cb-before-after__background { transform: none !important; will-change: auto; }
}
