@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");

/* ──────────────────────────────────────────────────────────
   /compare/exa — ZenRows vs Exa.  Indexed search vs the live web.
   Balanced framing; warm-dark, border-before-fill, type-led.
─────────────────────────────────────────────────────────── */
main { position: relative; z-index: 1; }
.back-to-top, .back-to-top * { cursor: none; }

/* ═══ Act 1 — Hero (answer vs data) ═══ */
.cx-hero-section {
  min-height: 100vh; display: flex; align-items: stretch;
  padding: clamp(104px, 14vh, 152px) var(--page-gutter, 7vw) clamp(56px, 8vh, 100px);
}
.cx-hero {
  width: 100%; max-width: 1240px; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(40px, 7vh, 96px);
}
.cx-hero-main { max-width: 980px; }
.cx-hero-h1 {
  margin: clamp(16px, 2.2vh, 28px) 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--mkt-hero-xl);
  line-height: 1.0;
  letter-spacing: var(--tracking-denser, -0.03em);
  color: var(--text-primary);
}
.cx-hero-sub {
  margin: 22px 0 0;
  font-family: var(--font-base);
  font-size: var(--mkt-body);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 42ch;
}
.cx-hero-cta { margin-top: 30px; }
.cx-hero-cta .link-cta { align-self: center; }

/* The two states — indexed (dimmed, stale) vs live (bright, now). */
.cx-hero-vis {
  display: flex; flex-direction: row; gap: clamp(16px, 1.6vw, 26px);
  width: 100%; align-items: stretch;
}
.cx-card {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.cx-card-tag {
  margin: 0;
  font-family: var(--font-code);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}
.cx-live-dot {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7ADAE6;
  box-shadow: 0 0 0 0 rgba(122, 218, 230, 0.55);
  animation: cx-pulse 2.2s ease-out infinite;
}
@keyframes cx-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(122, 218, 230, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(122, 218, 230, 0); }
  100% { box-shadow: 0 0 0 0 rgba(122, 218, 230, 0); }
}

@media (max-width: 760px) {
  .cx-hero-section { min-height: 0; }
  .cx-hero-vis { flex-direction: column; }
}
@media (min-width: 1600px) { .cx-hero { max-width: 1400px; }  }
@media (min-width: 1920px) { .cx-hero { max-width: 1560px; }  }
@media (min-width: 2400px) { .cx-hero { max-width: 1760px; } }
@media (prefers-reduced-motion: reduce) { .cx-live-dot { animation: none; } }

/* Inline pill button — shared by the depth stepper control. */
.cx-evt {
  font-family: var(--font-code); font-size: 12.5px;
  color: var(--text-secondary); background: transparent;
  padding: 8px 15px; border: 1px solid var(--border-subtle); border-radius: 999px;
  cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.cx-evt:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.cx-evt:active { transform: translateY(1px); }
.cx-evt:focus-visible { outline: 2px solid var(--text-tertiary); outline-offset: 2px; }


/* ═══ Act 2 — Breadth (search is one of seven) ═══ */
.cx-h2 {
  margin: 0;
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--mkt-h2); line-height: 1.02;
  letter-spacing: var(--tracking-dense, -0.024em); color: var(--text-primary);
}
.cx-h2--center { text-align: center; }
.cx-lead {
  margin: 18px 0 0; max-width: 50ch;
  font-family: var(--font-base); font-size: var(--mkt-body);
  line-height: 1.55; color: var(--text-secondary);
}

/* ═══ Act 3 — Comparison table ═══ */
.cx-act3 { padding: clamp(80px, 11vh, 150px) var(--page-gutter, 7vw); }
.cx-act3-inner { max-width: 980px; margin: 0 auto; }
.cx-table { margin-top: clamp(32px, 5vh, 56px); }
.cx-trow {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) 1fr 1.1fr;
  gap: clamp(16px, 2.5vw, 40px);
  padding: 16px 0;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-base);
  font-size: var(--mkt-body-sm);
  line-height: 1.45;
  color: var(--text-secondary);
  align-items: baseline;
}
.cx-trow:last-child { border-bottom: 1px solid var(--border-subtle); }
.cx-trow--head { border-top: none; color: var(--text-tertiary); font-family: var(--font-code); font-size: 12px; letter-spacing: 0.04em; }
.cx-th-zr, .cx-tz { color: var(--text-primary); }
.cx-tk { font-family: var(--font-code); font-size: 12.5px; letter-spacing: 0.03em; color: var(--text-tertiary); }

/* ═══ Act 4 — Closer ═══ */
.cx-end {
  padding: clamp(120px, 18vh, 210px) var(--page-gutter, 7vw);
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.cx-end-h2 {
  margin: 16px 0 0;
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--mkt-hero); line-height: 0.99;
  letter-spacing: var(--tracking-denser, -0.03em); color: var(--text-primary);
}
.cx-end-cta { margin-top: clamp(30px, 4.5vh, 52px); }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 560ms cubic-bezier(0.22,1,0.36,1), transform 560ms cubic-bezier(0.22,1,0.36,1); }
[data-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .cx-trow { grid-template-columns: 1fr; gap: 4px 0; }
  .cx-trow--head { display: none; }
  .cx-tk { color: var(--text-primary); font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none; }
}

/* ═══ Act 1 — Hero visual: answer (prose) vs data (structured) ═══
   Same query, two shapes. Tavily returns a synthesized paragraph;
   Zenrows returns the live web as a structured dataset. Border-before-fill;
   teal marks the live data side. Rows rise in on mount.                 */
.tv-card { padding: 20px 22px; }
.tv-answer {
  margin: 12px 0 0;
  font-family: var(--font-base);
  font-size: var(--mkt-body-sm); line-height: 1.55;
  color: var(--text-secondary);
}
.tv-foot {
  margin: 14px 0 0;
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.03em;
  color: var(--text-quaternary);
}
.tv-foot--live { color: #7ADAE6; }

.tv-table { margin-top: 13px; }
.tv-trow {
  display: grid; grid-template-columns: 1.5fr 0.9fr 0.7fr; gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--border-subtle);
  font-family: var(--font-base); font-size: var(--mkt-body-xs);
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.tv-trow span:nth-child(n+2) { text-align: right; }
.tv-trow--h {
  border-top: 0; padding-top: 0;
  font-family: var(--font-code); font-size: 10.5px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-tertiary);
}

/* Mount entrance — answer fades, data rows rise one by one. */
.js .tv-answer { opacity: 0; animation: tv-fade 0.6s ease-out 0.15s forwards; }
.js .tv-card--data .tv-trow { opacity: 0; animation: tv-rise 0.5s ease-out forwards; }
.js .tv-card--data .tv-trow--h { animation-delay: 0.30s; }
.js .tv-card--data .tv-trow:nth-child(2) { animation-delay: 0.42s; }
.js .tv-card--data .tv-trow:nth-child(3) { animation-delay: 0.54s; }
.js .tv-card--data .tv-trow:nth-child(4) { animation-delay: 0.66s; }
@keyframes tv-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tv-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .js .tv-answer, .js .tv-card--data .tv-trow { opacity: 1; animation: none; }
}

/* ═══ Act 2 — Where the answer runs out (signature interactive) ═══
   A STICKY SCROLL-STAGE. The wrapper is tall; the inner pins and centres
   while scroll progress (--p) scrubs the depth: each layer reveals as you
   descend and the teal rail fills. Tavily delivers the answer, then hits a
   wall; Zenrows keeps descending. Border-before-fill; teal = Zenrows side,
   dim+strike = where Tavily stops.                                       */
.tv-depth-scroll { position: relative; min-height: 260vh; }
.tv-depth-inner {
  position: sticky; top: 0;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 1000px; margin: 0 auto;
  padding: clamp(64px, 9vh, 110px) var(--page-gutter, 7vw);
  text-align: center;
}
.tv-depth .tv-depth-h2 { font-size: var(--mkt-h2); }
.tv-depth .tv-depth-lead { margin: 18px auto 0; max-width: 56ch; }

.tv-depth-stage { margin-top: clamp(36px, 5vh, 64px); text-align: left; }
.tv-depth-grid {
  display: grid;
  grid-template-columns: minmax(108px, 0.85fr) 1fr 1fr;
  column-gap: clamp(14px, 2vw, 32px);
  align-items: stretch;
}
.tv-layer { display: contents; }
.tv-colhead {
  padding-bottom: 12px; border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-tertiary);
}
.tv-colhead--tavily { color: var(--text-secondary); }
.tv-colhead--zr { color: #7ADAE6; }

.tv-layer-label, .tv-cell {
  padding: 15px 0; border-top: 1px solid var(--border-subtle);
  font-size: var(--mkt-body-sm);
}
.tv-layer:first-of-type .tv-layer-label,
.tv-layer:first-of-type .tv-cell { border-top: 0; }
.tv-layer-label {
  font-family: var(--font-code); font-size: 11.5px; letter-spacing: 0.03em;
  color: var(--text-tertiary); text-transform: uppercase; align-self: center;
}
.tv-cell { font-family: var(--font-base); }
.tv-cell--ok { color: var(--text-secondary); }
.tv-cell--zr { color: var(--text-primary); font-weight: 600; }
.tv-cell--blocked {
  color: var(--text-quaternary); text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Progressive reveal — layers rise in as the reader goes deeper. */
.js .tv-layer > * { opacity: 0; transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease; }
.js .tv-layer.is-rev > * { opacity: 1; transform: none; }
.js .tv-layer.is-rev > *:nth-child(2) { transition-delay: 0.05s; }
.js .tv-layer.is-rev > *:nth-child(3) { transition-delay: 0.10s; }

/* Foot — a teal rail that fills continuously with scroll progress. */
.tv-depth-foot {
  margin-top: clamp(26px, 4vh, 40px);
  display: flex; align-items: center; gap: 18px;
}
.tv-depth-rail {
  position: relative; flex: 1; height: 2px; border-radius: 2px;
  background: var(--border-subtle); overflow: hidden;
}
.tv-depth-rail-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: calc(var(--p, 0) * 100%); background: #7ADAE6;
}
.tv-depth-read {
  font-family: var(--font-code); font-size: 11.5px; letter-spacing: 0.03em;
  color: var(--text-tertiary); white-space: nowrap;
}

@media (max-width: 720px) {
  /* Sticky scrub off on phones — the stage lays out normally, all revealed. */
  .tv-depth-scroll { min-height: 0; }
  .tv-depth-inner { position: static; min-height: 0;
    padding: clamp(80px, 12vh, 120px) var(--page-gutter, 7vw); }
  .tv-depth-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .tv-depth-rail { width: 100%; }
  .tv-depth-read { white-space: normal; }
}
@media (max-width: 640px) {
  .tv-depth-grid { grid-template-columns: 1fr 1fr; row-gap: 0; }
  .tv-colhead:first-child { display: none; }
  .tv-layer-label {
    grid-column: 1 / -1; padding: 16px 0 4px; border-top: 1px solid var(--border-subtle);
    color: var(--text-secondary);
  }
  .tv-layer:first-of-type .tv-layer-label { border-top: 1px solid var(--border-subtle); }
  .tv-layer .tv-cell { border-top: 0; padding-top: 4px; }
}
@media (min-width: 1600px) { .tv-depth-inner { max-width: 1140px; } }
@media (min-width: 1920px) { .tv-depth-inner { max-width: 1240px; } }
@media (prefers-reduced-motion: reduce) {
  .js .tv-layer > * { opacity: 1; transform: none; transition: none; }
}

/* ═══ Act 3 — The last mile vs the pipeline ═══
   A left-to-right flow: Zenrows primitives feed a final "Answer" tile.
   SCROLL-PAINT: scroll progress (--q) lights the stages Fetch→Answer
   one after another; the teal bracket fills and the Answer tile rings
   when the current arrives. A teal bracket spans the pipeline; a thin
   one caps the answer (Tavily).                                          */
.tv-pipe { padding: clamp(92px, 13vh, 168px) var(--page-gutter, 7vw); }
.tv-pipe-inner { max-width: 1120px; margin: 0 auto; }
.tv-pipe .tv-pipe-h2 { font-size: var(--mkt-h2); }
.tv-pipe .tv-pipe-lead { margin-top: 18px; max-width: 56ch; }

.tv-flow {
  margin-top: clamp(48px, 7vh, 84px);
  display: flex; align-items: flex-start; flex-wrap: wrap;
  gap: clamp(12px, 1.6vw, 22px);
}
.tv-flow-group { display: flex; flex-direction: column; gap: 14px; }
.tv-flow-stages { display: flex; flex-wrap: wrap; gap: 10px; }
.tv-stage {
  padding: 11px 17px; border: 1px solid var(--border-subtle); border-radius: 999px;
  font-family: var(--font-code); font-size: var(--mkt-body-xs);
  color: var(--text-secondary); white-space: nowrap;
}
.tv-stage--answer { color: var(--text-primary); border-color: var(--text-tertiary); }
.tv-flow-arrow {
  align-self: center; padding-top: 6px;
  font-size: var(--mkt-h4); color: var(--text-tertiary);
}
.tv-bracket {
  position: relative; padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.04em;
  color: var(--text-tertiary);
}
.tv-bracket--zr { border-top-color: color-mix(in srgb, #7ADAE6 42%, transparent); color: #7ADAE6; }

/* Scroll-paint — stages light Fetch→Answer as --q advances with scroll. */
.js .tv-flow .tv-stage {
  opacity: calc(0.22 + 0.78 * clamp(0, var(--q, 0) * 7 - var(--i, 0), 1));
  transition: opacity 0.12s linear, border-color 0.3s ease, color 0.3s ease;
}
.js .tv-flow .tv-flow-arrow { opacity: clamp(0.18, var(--q, 0) * 7 - 5, 1); }
.js .tv-flow .tv-bracket { opacity: clamp(0.25, var(--q, 0) * 3, 1); }
.js .tv-flow .tv-stage--answer.is-lit {
  border-color: #7ADAE6; color: #7ADAE6;
}

@media (max-width: 720px) {
  .tv-flow { flex-direction: column; align-items: stretch; gap: 18px; }
  .tv-flow-arrow { align-self: center; transform: rotate(90deg); padding: 0; }
}
@media (min-width: 1600px) { .tv-pipe-inner { max-width: 1260px; } }
@media (prefers-reduced-motion: reduce) {
  .js .tv-flow .tv-stage, .js .tv-flow .tv-flow-arrow, .js .tv-flow .tv-bracket {
    opacity: 1 !important; transform: none; transition: none;
  }
}

/* Hero visual — dominant: two big cards side by side filling the lower view. */
.tv-hero-vis { gap: clamp(16px, 1.6vw, 26px); align-items: stretch; }
.tv-card { flex: 1; min-width: 0; padding: clamp(24px, 2.4vw, 38px); border-radius: 18px;
  display: flex; flex-direction: column; justify-content: center; min-height: clamp(210px, 30vh, 330px); }
.tv-card .cx-card-tag { font-size: 12.5px; }
.tv-answer { font-size: var(--mkt-body); line-height: 1.5; margin-top: 18px; }
.tv-foot { font-size: 12px; margin-top: 20px; }
.tv-table { margin-top: 18px; }
.tv-trow { font-size: var(--mkt-body-sm); padding: 11px 0; }
@media (max-width: 760px) { .tv-card { min-height: 0; } }
