/*
 * /compare/browserbase-alternative — Act 1 only (scaffolding).
 *
 * Hero on dark.  Brief verbatim H1.  Dual-pane split widget
 * shows both products' outputs simultaneously:
 *   LEFT  (browserbase)  mini browser mock with cursor click
 *   RIGHT (zenrows)       JSON response with structured data
 *
 * Distinct identity from vs Firecrawl (scroll-cycled single
 * card).  Subsequent acts (2-4) will land next.
 */

@import url("../../_ds/fonts.css");
@import url("../../_ds/theme.css");
@import url("../../_shared/chrome.css");
@import url("../../_shared/components.css");
@import url("../../_shared/audience-switcher.css");

main {
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Cursor portal scope — Zenrows pane only.  The Browserbase
   pane keeps the native cursor (matches the browser-mock
   metaphor — the browser inside the pane has its own cursor). */
.bb-split-pane--zr { cursor: pointer; }
.bb-split-pane--zr * { cursor: pointer; }

/* ══════════════════════════════════════════════════════════
   Act 1 — hero-split.
══════════════════════════════════════════════════════════ */

.bb-act-1 {
  position: relative;
  background: var(--background);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  padding: clamp(104px, 14vh, 152px) clamp(20px, 6vw, 96px) clamp(64px, 8vh, 104px);
}

.bb-act-1-frame {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(28px, 4vh, 56px);
}

@media (min-width: 1600px) { .bb-act-1-frame { max-width: 1400px; } }
@media (min-width: 1920px) { .bb-act-1-frame { max-width: 1560px; } }
@media (min-width: 2400px) { .bb-act-1-frame { max-width: 1760px; } }

@media (max-height: 820px) {
  .bb-act-1 {
    padding-top: clamp(88px, 11vh, 112px);
    padding-bottom: clamp(48px, 6vh, 72px);
  }
}

/* ── Hero — kicker + brief H1, top-left. */

.bb-hero {
  width: 100%;
  align-self: flex-start;
}

.bb-hero-kicker { margin: 0 0 clamp(14px, 1.6vw, 22px); }

.bb-hero-h1 {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 500;
  letter-spacing: -0.026em;
  line-height: 1.06;
  font-size: var(--mkt-hero-xl);
  color: var(--text-primary);
  text-wrap: balance;
}

@media (min-width: 1600px) {  }
@media (min-width: 1920px) {  }
@media (min-width: 2400px) {  }

@media (max-height: 820px) {
  
}

/* ══════════════════════════════════════════════════════════
   Split widget — two panes simultaneously visible.

   Distinct from the vs Firecrawl single-card scroll-cycle.
   Same input shape (a URL), two adjacent outputs shown side
   by side so the reader sees the products' beats at a glance.
   Mouse hover on a pane intensifies it (other pane dims) —
   subtle weighting via opacity.
══════════════════════════════════════════════════════════ */

.bb-split {
  /* Fill the full frame width — both panes are equal-fr, so
     they expand together with the container. */
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 1.6vw, 24px);
  position: relative;
}

@media (max-width: 720px) {
  .bb-split {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.bb-split-pane {
  position: relative;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: clamp(260px, 32vh, 360px);
  transition: opacity 240ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 1600px) { .bb-split-pane { min-height: clamp(300px, 36vh, 420px); } }

/* Hover-side weighting — when the user hovers one pane, the
   other dims slightly.  Continuous opacity / scale shift via
   data-active-side on the split. */
.bb-split[data-active-side="bb"] .bb-split-pane--zr,
.bb-split[data-active-side="zr"] .bb-split-pane--bb {
  opacity: 0.55;
  transform: scale(0.985);
}

/* ── Top bar — shared treatment, color-coded tag per side. */

.bb-split-bar {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 16px);
  padding: 0 clamp(16px, 1.8vw, 22px);
  height: clamp(46px, 5.2vh, 56px);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: var(--mkt-body-xs);
}

.bb-split-dots {
  display: inline-flex;
  gap: 5px;
  flex-shrink: 0;
}

.bb-split-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
}

.bb-split-host {
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-split-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  flex-shrink: 0;
}

.bb-split-tag--bb {
  background: rgba(247, 188, 107, 0.18);
  border: 1px solid rgba(247, 188, 107, 0.36);
  color: #F7BC6B;
}

.bb-split-tag--zr {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #FFFFFF;
}

/* Mesh-bubble bar on the ZR pane — same vocabulary as MCP/CLI
   convo widget header.  Linear gradient base + 4 drifting
   colour bubbles on coprime durations so they never sync. */

.bb-split-bar--mesh {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--border-subtle);
}

.bb-mesh-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--zen-orange-5, #C97A4E) 0%,
    var(--zen-purple-5, #6B4DCF) 100%
  );
}

.bb-mesh-bubble {
  position: absolute;
  width: 65%;
  height: 280%;
  border-radius: 50%;
  filter: blur(34px);
  transform: translateZ(0);
  backface-visibility: hidden;
  opacity: 0.92;
  will-change: transform;
}

.bb-mesh-bubble[data-bubble="1"] {
  background: var(--zen-purple-6, #9B6FFF);
  top: -90%; left: -10%;
  animation: bb-bubble-1 7s ease-in-out infinite alternate;
}
.bb-mesh-bubble[data-bubble="2"] {
  background: var(--zen-orange-6, #F38C5A);
  top: -80%; left: 35%;
  animation: bb-bubble-2 9s ease-in-out infinite alternate;
}
.bb-mesh-bubble[data-bubble="3"] {
  background: var(--zen-red-6, #F36A6A);
  top: -100%; left: 55%;
  animation: bb-bubble-3 11s ease-in-out infinite alternate;
}
.bb-mesh-bubble[data-bubble="4"] {
  background: #7ADAE6;
  top: -85%; left: 18%;
  animation: bb-bubble-4 13s ease-in-out infinite alternate;
}

@keyframes bb-bubble-1 { 0% { transform: translate(0,0); } 100% { transform: translate(55%, 20%); } }
@keyframes bb-bubble-2 { 0% { transform: translate(0,0); } 100% { transform: translate(-40%, 30%); } }
@keyframes bb-bubble-3 { 0% { transform: translate(0,0); } 100% { transform: translate(45%, -25%); } }
@keyframes bb-bubble-4 { 0% { transform: translate(0,0); } 100% { transform: translate(-30%, -20%); } }

.bb-split-bar--mesh > *:not(.bb-mesh-bg) {
  position: relative;
  z-index: 1;
}

/* On the mesh bar, tweak the chrome bits for white-on-gradient
   legibility. */
.bb-split-bar--mesh .bb-split-dots span {
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.bb-split-bar--mesh .bb-split-host {
  color: #FFFFFF;
  font-weight: 500;
}

/* ── Browser mock content (LEFT pane). */

.bb-mock {
  position: relative;
  flex: 1;
  padding: clamp(20px, 2.4vw, 32px) clamp(22px, 2.4vw, 30px) clamp(60px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vw, 16px);
  min-height: 0;
}

.bb-mock-title {
  margin: 0 0 clamp(8px, 1vw, 14px);
  font-family: var(--font-base);
  font-weight: 600;
  font-size: var(--mkt-body);
  color: var(--text-primary);
}

.bb-mock-input {
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: var(--mkt-body-xs);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  width: fit-content;
  max-width: 100%;
}

.bb-mock-button {
  align-self: flex-start;
  padding: 8px 16px;
  background: #F7BC6B;
  border: 1px solid #F7BC6B;
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: var(--mkt-body-xs);
  font-weight: 600;
  color: #1D1612;
  transition: transform 140ms cubic-bezier(0.22, 1, 0.36, 1), filter 140ms ease;
}

.bb-split-pane--bb[data-armed="true"] .bb-mock-button {
  transform: scale(0.96);
  filter: brightness(0.92);
}

.bb-mock-cursor {
  position: absolute;
  width: 22px;
  height: 22px;
  color: #FFFFFF;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  /* Position driven by JS via --cur-x, --cur-y (in percent of
     the .bb-mock box).  Default lands near the bottom-right. */
  left: calc(var(--cur-x, 38%) - 5px);
  top: calc(var(--cur-y, 56%) - 4px);
  transform: translate3d(0, 0, 0);
  transition: left 1100ms cubic-bezier(0.34, 1.56, 0.64, 1),
              top 1100ms cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.bb-mock-ripple {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid #F7BC6B;
  pointer-events: none;
  left: calc(var(--cur-x, 38%) - 4px);
  top: calc(var(--cur-y, 56%) - 4px);
  opacity: 0;
  z-index: 1;
}

.bb-split-pane--bb[data-armed="true"] .bb-mock-ripple {
  animation: bb-ripple 800ms ease-out;
}

@keyframes bb-ripple {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(5);
  }
}

/* ── JSON content (RIGHT pane). */

.bb-json {
  margin: 0;
  padding: clamp(20px, 2.4vw, 32px) clamp(22px, 2.4vw, 30px) clamp(60px, 6vw, 80px);
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: var(--mkt-body-xs);
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre;
  flex: 1;
  overflow: auto;
}

.bb-json-line {
  display: block;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 380ms ease, transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bb-act-1.is-in .bb-json-line {
  opacity: 1;
  transform: translateY(0);
}

.bb-act-1.is-in .bb-json-line[data-line="0"] { transition-delay: 900ms; }
.bb-act-1.is-in .bb-json-line[data-line="1"] { transition-delay: 1080ms; }
.bb-act-1.is-in .bb-json-line[data-line="2"] { transition-delay: 1260ms; }
.bb-act-1.is-in .bb-json-line[data-line="3"] { transition-delay: 1440ms; }
.bb-act-1.is-in .bb-json-line[data-line="4"] { transition-delay: 1620ms; }

.bb-json-k { color: var(--text-primary); font-weight: 600; }
.bb-json-s { color: #7ADAE6; }
.bb-json-n { color: #FFB36B; }

/* ── Status pill (bottom-left of each pane). */

.bb-split-status {
  position: absolute;
  bottom: clamp(16px, 1.8vw, 22px);
  left: clamp(22px, 2.4vw, 30px);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.bb-split-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.bb-split-status-dot--bb { background: #F7BC6B; }
.bb-split-status-dot--zr { background: #7C4FE8; }

/* ══════════════════════════════════════════════════════════
   Entry — IO-driven .is-in cascade.
══════════════════════════════════════════════════════════ */

.bb-hero-kicker,
.bb-hero-h1,
.bb-split-pane {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bb-act-1.is-in .bb-hero-kicker {
  opacity: 1; transform: translateY(0);
  transition-delay: 80ms;
}
.bb-act-1.is-in .bb-hero-h1 {
  opacity: 1; transform: translateY(0);
  transition-delay: 200ms;
}
.bb-act-1.is-in .bb-split-pane--bb {
  opacity: 1; transform: translateY(0);
  transition-delay: 380ms;
}
.bb-act-1.is-in .bb-split-pane--zr {
  opacity: 1; transform: translateY(0);
  transition-delay: 540ms;
}

@media (prefers-reduced-motion: reduce) {
  .bb-hero-kicker, .bb-hero-h1, .bb-split-pane, .bb-json-line {
    opacity: 1; transform: none; transition: none;
  }
  .bb-mock-cursor { transition: none; }
  .bb-mock-ripple { animation: none; }
}

/* ══════════════════════════════════════════════════════════
   Act 2 — two-jobs.

   Dark BG, no band.  Two editorial sentences stacked, the
   second indented from the first to break the alignment.
   Per-row verb cycles through related verbs in JS — readers
   notice the change without a list of bullets.

   Brand color only on the verb (warm orange for Browserbase,
   purple-7 for Zenrows) so the eye reads the contrast.
══════════════════════════════════════════════════════════ */

.bb-act-2 {
  position: relative;
  background: var(--background);
  padding: clamp(120px, 18vh, 220px) clamp(20px, 6vw, 96px);
}

.bb-act-2-frame {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vh, 80px);
}

@media (min-width: 1600px) { .bb-act-2-frame { max-width: 1400px; } }
@media (min-width: 1920px) { .bb-act-2-frame { max-width: 1560px; } }
@media (min-width: 2400px) { .bb-act-2-frame { max-width: 1760px; } }

.bb-act-2-kicker {
  margin: 0;
  color: var(--text-tertiary);
}

.bb-jobs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vh, 56px);
}

.bb-jobs-row {
  font-family: var(--font-base);
  font-weight: 600;
  letter-spacing: -0.024em;
  line-height: 1.05;
  /* Conservative scale so the sentence fits on ONE line at
     laptop widths.  31-33 chars (longest sentence) at ~0.55em
     avg char width = ~17em wide; clamped to 56px max means
     ~950px wide which fits the 1140px content area at 1280
     viewport.  Wide-screen tiers below bump the scale up. */
  font-size: clamp(26px, 4vw, 56px);
  color: var(--text-primary);
  white-space: nowrap;
}

@media (min-width: 1600px) { .bb-jobs-row { font-size: 68px; } }
@media (min-width: 1920px) { .bb-jobs-row { font-size: 80px; } }
@media (min-width: 2400px) { .bb-jobs-row { font-size: 96px; } }

/* Asymmetry — row 2 indented from the left so the eye breaks
   the alignment between the two beats. */
.bb-jobs-row--bb { text-align: left; }
.bb-jobs-row--zr {
  text-align: left;
  padding-left: clamp(20px, 5vw, 90px);
}

/* Mobile: allow wrap so the sentence doesn't overflow. */
@media (max-width: 720px) {
  .bb-jobs-row {
    white-space: normal;
    font-size: var(--mkt-h3);
  }
  .bb-jobs-row--zr { padding-left: 16px; }
}

.bb-jobs-mark {
  font-weight: 700;
  color: var(--text-primary);
}

.bb-jobs-rest {
  color: var(--text-primary);
}

/* ── Cycling verb — simple crossfade with blur.

   No fixed slot width: the .bb-jobs-verb shrinks/grows with
   the current word, surrounding sentence reflows slightly
   per cycle.  The fade + blur during the swap hides the
   reflow visually.  Sidesteps the slot-machine min-width
   trap (longest verb left huge gaps for shorter ones). */

.bb-jobs-verb {
  display: inline-block;
  font-style: italic;
  font-weight: 500;
  transition:
    opacity 320ms ease,
    filter 320ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bb-jobs-row--bb .bb-jobs-verb { color: #F7BC6B; }
.bb-jobs-row--zr .bb-jobs-verb { color: #7C4FE8; }

.bb-jobs-verb.is-changing {
  opacity: 0;
  filter: blur(3px);
  transform: translateY(-4px);
}

/* ── Entry reveal — kicker first, then rows cascade. */

.bb-act-2-kicker,
.bb-jobs-row {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bb-act-2.is-in .bb-act-2-kicker {
  opacity: 1; transform: translateY(0);
  transition-delay: 120ms;
}
.bb-act-2.is-in .bb-jobs-row--bb {
  opacity: 1; transform: translateY(0);
  transition-delay: 320ms;
}
.bb-act-2.is-in .bb-jobs-row--zr {
  opacity: 1; transform: translateY(0);
  transition-delay: 540ms;
}

@media (prefers-reduced-motion: reduce) {
  .bb-act-2-kicker, .bb-jobs-row {
    opacity: 1; transform: none; transition: none;
  }
  .bb-jobs-verb { transition: none; }
}

/* ══════════════════════════════════════════════════════════
   Act 3 — decide.

   Editorial decision list on dark.  Each row reads as a
   typographic sentence: number + job + brand answer + arrow.
   Hover-reveal:
     - row text brightens to primary
     - answer scales up + full brand color
     - arrow slides right
     - subtle row background tint
   Stagger reveal on entry (40ms steps).
══════════════════════════════════════════════════════════ */

.bb-act-3 {
  position: relative;
  background: var(--background);
  padding: clamp(120px, 18vh, 220px) clamp(20px, 6vw, 96px);
}

.bb-act-3-frame {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vh, 80px);
}

@media (min-width: 1600px) { .bb-act-3-frame { max-width: 1240px; } }
@media (min-width: 1920px) { .bb-act-3-frame { max-width: 1360px; } }

.bb-act-3-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 22px);
}

.bb-act-3-kicker { margin: 0; color: var(--text-tertiary); }

.bb-act-3-h2 {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 500;
  letter-spacing: -0.024em;
  line-height: 1.04;
  font-size: clamp(36px, 5vw, 72px);
  color: var(--text-primary);
}

@media (min-width: 1600px) { .bb-act-3-h2 { font-size: 84px; } }
@media (min-width: 1920px) { .bb-act-3-h2 { font-size: 96px; } }

/* ── Decision list. */

.bb-decide {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.bb-decide-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: baseline;
  gap: clamp(20px, 2.4vw, 36px);
  padding: clamp(20px, 2.4vw, 32px) clamp(8px, 1.2vw, 20px);
  border-bottom: 1px solid var(--border-subtle);
  cursor: default;
  transition: background-color 240ms ease;
}

.bb-decide-row:first-child { border-top: 1px solid var(--border-subtle); }

.bb-decide-row:hover {
  background: color-mix(in srgb, var(--text-primary) 4%, transparent);
}

.bb-decide-num {
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-quaternary, var(--text-tertiary));
  transition: color 220ms ease;
}

.bb-decide-row:hover .bb-decide-num { color: var(--text-secondary); }

.bb-decide-job {
  font-family: var(--font-base);
  font-weight: 500;
  letter-spacing: -0.008em;
  font-size: var(--mkt-h4);
  color: var(--text-secondary);
  transition: color 220ms ease;
}

@media (min-width: 1600px) { .bb-decide-job { font-size: 30px; } }
@media (min-width: 1920px) { .bb-decide-job { font-size: 34px; } }

.bb-decide-row:hover .bb-decide-job { color: var(--text-primary); }

.bb-decide-answer {
  font-family: var(--font-base);
  font-weight: 700;
  letter-spacing: -0.012em;
  font-size: var(--mkt-lead);
  /* Brand color at reduced intensity; hover lights it up. */
  opacity: 0.5;
  transition:
    opacity 220ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: right center;
}

@media (min-width: 1600px) { .bb-decide-answer { font-size: 24px; } }
@media (min-width: 1920px) { .bb-decide-answer { font-size: 28px; } }

.bb-decide-row[data-answer="bb"] .bb-decide-answer { color: #F7BC6B; }
.bb-decide-row[data-answer="zr"] .bb-decide-answer { color: #7C4FE8; }

.bb-decide-row:hover .bb-decide-answer {
  opacity: 1;
  transform: scale(1.06);
}

.bb-decide-arrow {
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: var(--mkt-body);
  color: var(--text-quaternary, var(--text-tertiary));
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    color 220ms ease;
  min-width: 1em;
}

.bb-decide-row:hover .bb-decide-arrow {
  transform: translateX(6px);
}

.bb-decide-row[data-answer="bb"]:hover .bb-decide-arrow { color: #F7BC6B; }
.bb-decide-row[data-answer="zr"]:hover .bb-decide-arrow { color: #7C4FE8; }

/* ── Entry stagger. */

.bb-act-3-kicker,
.bb-act-3-h2,
.bb-decide-row {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bb-act-3.is-in .bb-act-3-kicker { opacity: 1; transform: translateY(0); transition-delay: 100ms; }
.bb-act-3.is-in .bb-act-3-h2 { opacity: 1; transform: translateY(0); transition-delay: 240ms; }
.bb-act-3.is-in .bb-decide-row:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 440ms; }
.bb-act-3.is-in .bb-decide-row:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 520ms; }
.bb-act-3.is-in .bb-decide-row:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 600ms; }
.bb-act-3.is-in .bb-decide-row:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 680ms; }
.bb-act-3.is-in .bb-decide-row:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 760ms; }
.bb-act-3.is-in .bb-decide-row:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 840ms; }

/* When restored to row state, mouse-react timings stay normal
   (the entry transition stays applied but doesn't interfere
   with the shorter hover transitions on child elements). */

@media (max-width: 720px) {
  .bb-act-3 { padding: clamp(80px, 12vh, 140px) 20px; }
  .bb-decide-row {
    grid-template-columns: auto 1fr;
    gap: 12px 18px;
  }
  .bb-decide-job { grid-column: 2; }
  .bb-decide-answer { grid-column: 2; }
  .bb-decide-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bb-act-3-kicker, .bb-act-3-h2, .bb-decide-row {
    opacity: 1; transform: none; transition: none;
  }
  .bb-decide-num, .bb-decide-job, .bb-decide-answer, .bb-decide-arrow {
    transition: none;
  }
}

/* ══════════════════════════════════════════════════════════
   Act 4 — closer.

   Dark BG, no band.  Centered editorial closer.  Display H2
   with the second half in italic.  Below, a "Pick Zenrows →"
   answer with an animated brushstroke underline that draws
   under the brand name on entry.  CTA stack + secondary link.
══════════════════════════════════════════════════════════ */

.bb-act-4 {
  position: relative;
  background: var(--background);
  padding: clamp(120px, 18vh, 220px) clamp(20px, 6vw, 96px);
}

.bb-act-4-frame {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(28px, 4vh, 56px);
}

@media (min-width: 1600px) { .bb-act-4-frame { max-width: 1240px; } }
@media (min-width: 1920px) { .bb-act-4-frame { max-width: 1360px; } }

.bb-act-4-kicker {
  margin: 0;
  color: var(--text-tertiary);
}

.bb-act-4-h2 {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 500;
  letter-spacing: -0.026em;
  line-height: 1.04;
  font-size: var(--mkt-hero);
  color: var(--text-primary);
  text-wrap: balance;
}

@media (min-width: 1600px) {  }
@media (min-width: 1920px) {  }
@media (min-width: 2400px) {  }

.bb-act-4-h2 em {
  font-style: normal;
  font-weight: 500;
  /* In white — same primary color as the rest of the H2; the
     italic is the contrast on its own. */
}

.bb-act-4-cta { margin-top: clamp(6px, 1vw, 14px); }

.bb-act-4-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(8px, 1vw, 14px);
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: 13px;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
  transition:
    color 200ms ease,
    border-bottom-color 200ms ease;
}

.bb-act-4-secondary:hover {
  color: #7C4FE8;
  border-bottom-color: #7C4FE8;
}

/* ── Entry reveal cascade. */

.bb-act-4-kicker,
.bb-act-4-h2,
.bb-act-4-cta,
.bb-act-4-secondary {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bb-act-4.is-in .bb-act-4-kicker {
  opacity: 1; transform: translateY(0);
  transition-delay: 120ms;
}
.bb-act-4.is-in .bb-act-4-h2 {
  opacity: 1; transform: translateY(0);
  transition-delay: 280ms;
}
.bb-act-4.is-in .bb-act-4-cta {
  opacity: 1; transform: translateY(0);
  transition-delay: 880ms;
}
.bb-act-4.is-in .bb-act-4-secondary {
  opacity: 1; transform: translateY(0);
  transition-delay: 1100ms;
}

@media (max-width: 720px) {
  .bb-act-4 { padding: clamp(80px, 12vh, 140px) 20px; }
  
}

@media (prefers-reduced-motion: reduce) {
  .bb-act-4-kicker, .bb-act-4-h2,
  .bb-act-4-cta, .bb-act-4-secondary {
    opacity: 1; transform: none; transition: none;
  }
}

/* ══════════════════════════════════════════════════════════
   BU light overrides.  --font-display auto-flips to Mq12 via
   DS-level override.

   .bb-split-tag--zr, .bb-split-bar--mesh, and .bb-split-dots
   inside the mesh bar keep their rgba-white chrome: the mesh
   gradient backdrop stays coloured in BU, so the white-on-mesh
   contrast remains the right move.
═══════════════════════════════════════════════════════════ */
html:not(.dark) body {
  background: var(--zen-gray-3);
  color: var(--text-primary);
}

html:not(.dark) .bb-mock-input { background: rgba(29, 22, 18, 0.02); }

/* Teal text on light bg — JSON string highlight flip. */
html:not(.dark) .bb-json-s {
  color: #1C9E97;
}
