/* Data Bridge page revision (Oct 2026). Loaded only on data-bridge.html, after styles.min.css.
   Uses the site's existing tokens (--brand-*, --paper-strong, --border, --charcoal, --graphite, --muted)
   and existing components (.section, .section-kicker, .button, .bi-ledger, details/summary). */

/* ---- Hero CTAs ------------------------------------------------------------------------------------ */
.bridge-whatsapp-cta {
  gap: 9px;
}

.bridge-whatsapp-cta img {
  flex: 0 0 auto;
}

.bridge-final-actions {
  flex-wrap: wrap;
}

/* ---- Worked example (reuses the .bi-ledger card from Business Intelligence) ---------------------- */
.bridge-example-heading {
  margin-bottom: 28px;
}

.bridge-example-ledger.bi-ledger {
  position: static;
  max-width: 980px;
  margin: 0;
}

.bridge-example-scroll {
  overflow-x: auto;
}

.bridge-example-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 0.95rem;
}

.bridge-example-table thead th {
  padding: 18px 16px 6px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.bridge-example-table tbody th,
.bridge-example-table td {
  padding: 16px;
  color: var(--graphite);
  text-align: left;
  white-space: nowrap;
}

/* The row "card" look of .bi-ledger-row, applied to table cells. */
.bridge-example-table tbody tr.bi-ledger-row {
  display: table-row;
  font-size: inherit;
}

.bridge-example-table tbody tr > * {
  background: var(--ledger-bg);
  border-block: 1px solid rgba(85, 124, 123, 0.12);
}

.bridge-example-table tbody tr > :first-child {
  border-left: 4px solid var(--ledger-accent);
  border-radius: 10px 0 0 10px;
  color: var(--charcoal);
  font-weight: 700;
}

.bridge-example-table tbody tr > :last-child {
  border-right: 1px solid rgba(85, 124, 123, 0.12);
  border-radius: 0 10px 10px 0;
}

/* Revenue is the emphasis. */
.bridge-example-table .is-revenue {
  color: var(--charcoal);
  font-family: Manrope, "DM Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
}

.bridge-example-table thead .is-revenue {
  color: var(--brand-teal);
  font-size: 0.68rem;
}

.bridge-example-ledger figcaption {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(85, 124, 123, 0.16);
  color: var(--graphite);
  font-size: 1rem;
  line-height: 1.6;
}

/* Phones: each campaign becomes a stacked card (no sideways scroll). */
@media (max-width: 680px) {
  .bridge-example-ledger.bi-ledger {
    padding: 18px;
  }

  .bridge-example-table,
  .bridge-example-table tbody,
  .bridge-example-table tr,
  .bridge-example-table th,
  .bridge-example-table td {
    display: block;
    width: 100%;
  }

  .bridge-example-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .bridge-example-table tbody tr.bi-ledger-row {
    display: block;
    margin-top: 12px;
    padding: 4px 14px;
    border: 1px solid rgba(85, 124, 123, 0.12);
    border-left: 4px solid var(--ledger-accent);
    border-radius: 10px;
    background: var(--ledger-bg);
  }

  .bridge-example-table tbody tr > *,
  .bridge-example-table tbody tr > :first-child,
  .bridge-example-table tbody tr > :last-child {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border: 0;
    border-radius: 0;
    background: none;
    white-space: normal;
  }

  .bridge-example-table tbody tr > * + * {
    border-top: 1px solid rgba(85, 124, 123, 0.12);
  }

  .bridge-example-table tbody tr > ::before {
    content: attr(data-label);
    color: var(--muted);
    font-family: "DM Sans", sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .bridge-example-table tbody tr > :first-child {
    font-size: 1.05rem;
  }

  .bridge-example-table tbody tr > :first-child::before {
    display: none;
  }
}

/* ---- Hidden case study (unhide only with real, permitted metrics) --------------------------------- */
.bridge-case-card {
  max-width: 760px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--paper-strong);
}

.bridge-case-metric {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.bridge-case-metric strong {
  font-family: Manrope, "DM Sans", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.bridge-case-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- Two ways to start ---------------------------------------------------------------------------- */
.bridge-start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.bridge-start-card {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.6vw, 34px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--paper-strong);
  box-shadow: 0 14px 34px rgba(37, 34, 29, 0.06);
}

.bridge-start-card h3 {
  margin: 4px 0 16px;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
}

.bridge-start-for {
  margin: 0;
  color: var(--brand-teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bridge-start-card .product-check-list {
  margin-bottom: 24px;
}

.bridge-start-card .button {
  align-self: flex-start;
  margin-top: auto;
}

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

/* ---- "What we need from you" ---------------------------------------------------------------------- */
.bridge-needs {
  max-width: 760px;
  margin-top: 28px;
  padding: 22px 26px;
  border: 1px solid rgba(85, 124, 123, 0.22);
  border-left: 4px solid var(--brand-teal);
  border-radius: 14px;
  background: var(--brand-teal-soft);
}

.bridge-needs h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.bridge-needs p {
  margin: 0;
  color: var(--graphite);
  line-height: 1.6;
}

/* ---- FAQ (uses the site's details/summary accordion styles) --------------------------------------- */
.bridge-faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.bridge-faq-list details:first-child {
  border-top: 1px solid var(--border);
}

@media (max-width: 860px) {
  .bridge-faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Phones: buttons stack full width, no sideways scroll ----------------------------------------- */
@media (max-width: 520px) {
  .product-detail-bridge .product-detail-actions .button,
  .bridge-final-actions .button {
    width: 100%;
    justify-content: center;
  }
}

/* "Built to be dependable" heading: its three columns need ~1070px. With the site-wide page width
   (10% margins), smaller laptops are narrower, so the Before/After diagram moves under the heading. */
@media (min-width: 861px) and (max-width: 1439px) {
  .bridge-dependable-heading {
    grid-template-columns: minmax(110px, 0.25fr) minmax(0, 1fr);
  }

  .bridge-dependable-heading .bridge-trust-icon {
    grid-column: 2;
    justify-self: start;
  }
}

/* ---- Hero hub diagram, desktop: taller, more space between the elements -------------------------- */
@media (min-width: 1101px) {
  .product-detail-bridge .bridge-hub-visual {
    min-height: 0;
    aspect-ratio: 10 / 9;
    width: min(100%, 680px);
    container-type: inline-size; /* cqw below = % of this diagram's width */
  }

  .product-detail-bridge .bridge-hub-inputs,
  .product-detail-bridge .bridge-hub-outputs {
    top: 9%;
    bottom: 25%;
    width: 28%;
  }

  .product-detail-bridge .bridge-hub-inputs { left: 4%; }
  .product-detail-bridge .bridge-hub-outputs { right: 4%; }

  .product-detail-bridge .bridge-hub-inputs span,
  .product-detail-bridge .bridge-hub-outputs span {
    min-height: 0;
    height: 8.8cqw;
    padding: 0 1cqw;
    font-size: clamp(0.66rem, 2.3cqw, 0.98rem);
    font-weight: 700;
    white-space: nowrap;
  }

  /* Outer pills step in towards the centre (the existing arc), a little less than before. */
  .product-detail-bridge .bridge-hub-inputs span:first-child,
  .product-detail-bridge .bridge-hub-inputs span:nth-child(4) { transform: translateX(26%); }
  .product-detail-bridge .bridge-hub-outputs span:first-child,
  .product-detail-bridge .bridge-hub-outputs span:nth-child(4) { transform: translateX(-26%); }

  .product-detail-bridge .bridge-hub-core {
    top: 43%;
    width: 27%;
    padding: 4%;
  }

  .product-detail-bridge .bridge-hub-core strong { font-size: clamp(0.9rem, 3.6cqw, 1.45rem); }
  .product-detail-bridge .bridge-hub-core small { font-size: clamp(0.58rem, 1.8cqw, 0.75rem); }

  .product-detail-bridge .bridge-hub-foundation {
    bottom: 7%;
    padding: 2cqw 4cqw;
    font-size: clamp(0.68rem, 2.1cqw, 0.9rem);
  }

  /* Connectors: an SVG drawn between pill and core centres (behind both), replacing the hand-angled spokes. */
  .product-detail-bridge .bridge-hub-flow { display: none; }
}

.bridge-hub-lines { display: none; }

@media (min-width: 1101px) {
  .product-detail-bridge .bridge-hub-lines {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }

  .bridge-hub-lines line {
    stroke: rgba(85, 124, 123, 0.52);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
  }

}

/* No red dots on the connectors (removed 13 Oct 2026), desktop or mobile. */
.product-detail-bridge .bridge-spoke b {
  display: none;
}
