/* 奔流 BenLiu — landing page, part 2: the engine band, the capture and video
   stories, the capability sheet. */

/* ==========================================================================
   ENGINE — the dark band
   ========================================================================== */
.engine {
  position: relative;
  margin: var(--space-section) calc(var(--gutter) * -1) 0;
  padding: clamp(3rem, 2rem + 5vw, 6rem) var(--gutter);
  background: var(--night);
  color: var(--night-ink);
  isolation: isolate;
}

/* full-bleed past the wrap */
.engine::before {
  content: "";
  position: absolute;
  inset: 0 -100vw;
  z-index: -1;
  background:
    radial-gradient(60rem 24rem at 82% 0, rgba(143, 137, 255, 0.16), transparent 68%),
    var(--night);
}

.engine .kicker {
  color: var(--night-ink-3);
}

.engine .kicker::before {
  background: var(--night-brand);
}

.engine-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

.engine-copy {
  display: grid;
  gap: 1.25rem;
}

.engine-metric {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: clamp(4.5rem, 2.5rem + 8vw, 9rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.engine-metric small {
  font-family: var(--font-sans);
  font-size: 0.24em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--night-ink-2);
}

.engine-copy h2 {
  font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.9rem);
  line-height: 1.3;
  max-width: 22ch;
}

.engine-copy p {
  color: var(--night-ink-2);
  max-width: 40ch;
}

.engine-viz {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.1rem, 0.8rem + 1.4vw, 1.75rem);
  border: 1px solid var(--night-line);
  border-radius: var(--radius-lg);
  background: var(--night-2);
}

.viz-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--night-ink-3);
}

.viz-head b {
  color: var(--night-ink);
  font-weight: 500;
}

.engine .segs {
  grid-column: auto;
  height: clamp(54px, 9vw, 84px);
  gap: 3px;
}

.engine .segs i {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.engine .segs i::after {
  background: linear-gradient(180deg, #a5a0ff, #6f68f0);
}

/* connection window over time: grows, backs off once, settles */
.window-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 6px;
  height: 92px;
  padding-top: 4px;
  border-bottom: 1px solid var(--night-line);
}

.window-chart i {
  position: relative;
  height: calc(var(--h) * 1%);
  border-radius: 4px 4px 0 0;
  background: rgba(143, 137, 255, 0.34);
}

.window-chart i.is-back {
  background: rgba(240, 183, 101, 0.5);
}

.window-chart i.is-top {
  background: var(--night-brand);
}

.window-chart i::before {
  content: attr(data-n);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  color: var(--night-ink-3);
}

.engine-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--night-line);
}

.engine-notes li {
  display: grid;
  gap: 0.4rem;
  padding: 1.35rem 1.5rem 0 0;
}

.engine-notes li + li {
  padding-left: 1.5rem;
  border-left: 1px solid var(--night-line);
}

.engine-notes span {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--night-brand);
}

.engine-notes strong {
  font-weight: 500;
  color: var(--night-ink-2);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* ==========================================================================
   STORIES — capture / video
   ========================================================================== */
.editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: center;
}

.editorial.reverse .editorial-copy {
  order: 2;
}

.editorial-copy {
  display: grid;
  gap: 1.15rem;
  justify-items: start;
}

.editorial-copy h2 {
  font-size: var(--text-h2);
}

.editorial-copy > p:not(.kicker) {
  color: var(--ink-2);
  max-width: 42ch;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-row li {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-2);
}

.story-stage {
  position: relative;
  padding: clamp(1.25rem, 0.8rem + 2.4vw, 2.75rem);
  border-radius: var(--radius-lg);
  background: var(--paper-sunk);
  border: 1px solid var(--line);
}

/* the confirm prompt, full size */
.prompt {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
  overflow: hidden;
}

.prompt-url {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
}

/* The address is a flex item so a long one ends in an ellipsis, not a hard cut. */
.prompt-url span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prompt-url::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.prompt-body {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
}

.prompt-body h3 {
  font-size: 1rem;
}

.prompt-body dl {
  display: grid;
  /* Wide enough for the longest label; English ones run past 4.5em. */
  grid-template-columns: minmax(4.5em, max-content) minmax(0, 1fr);
  gap: 0.5rem 0.9rem;
  margin: 0;
}

.prompt-body dt {
  color: var(--ink-3);
}

.prompt-body dd {
  margin: 0;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.prompt-actions span {
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-weight: 600;
}

.prompt-actions span:last-child {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

/* video: two streams merge into one file */
.merge {
  display: grid;
  gap: 0.75rem;
  font-size: 0.86rem;
}

.merge-quality {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.merge-quality span {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
}

.merge-quality span.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.stream {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
}

.stream small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stream .bar {
  grid-column: auto;
}

.stream b {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.merge-join {
  justify-self: center;
  width: 1px;
  height: 1.4rem;
  background: var(--line-strong);
}

.stream.is-result {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.stream.is-result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.stream.is-result b {
  color: var(--brand-deep);
}

/* ==========================================================================
   CAPABILITIES — a spec sheet
   ========================================================================== */
.feature-table {
  display: grid;
  border-top: 1px solid var(--ink);
}

.feature-table > div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.3fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  transition: background-color var(--fast) ease, padding var(--fast) ease;
}

.feature-table > div:hover {
  background: var(--surface);
}

.feature-table span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.feature-table b {
  font-size: clamp(1.02rem, 0.95rem + 0.5vw, 1.3rem);
  font-weight: 550;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .engine-grid,
  .editorial {
    grid-template-columns: minmax(0, 1fr);
  }

  .editorial.reverse .editorial-copy {
    order: 0;
  }
}

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

  .engine-notes li,
  .engine-notes li + li {
    padding: 1.15rem 0 0;
    border-left: 0;
  }

  .engine-notes li + li {
    margin-top: 1.15rem;
    border-top: 1px solid var(--night-line);
  }

  .feature-table > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }
}
