/* shared/bridge.css — BRIDGE COMPONENT — split from main.css lines 1477-1654. See docs/ for the reorg record. */
/* ===== BRIDGE COMPONENT (shared across 3 instances) =====
   Portrait + Canva-highlight heading. Full-bleed image with
   pure-black vertical gradient on mobile for legibility.
   Desktop (≥1024): spatial split (text left 50% / image right 50%),
   no overlay — organism background governs. Tablets keep the mobile form. One rule block drives
   all bridge sections (Onboarding, Positioning, Filter).
   ======================================================== */
.bridge {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--color-brand-black);
}

.bridge__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.bridge__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Mobile-only overlay. Pure-black stops avoid the lighter-rectangle
   artefact that rgba(10,10,10,…) created against the section's #000. */
.bridge__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(var(--ground), 0.10)   0%,
    rgba(var(--ground), 0.45)  40%,
    rgba(var(--ground), 0.90) 100%
  );
}

.bridge__content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  width: 100%;
  max-width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.bridge__rule {
  display: block;
  border: none;
  height: 2px;
  width: 40px;
  background-color: var(--color-brand-purple);
  margin: 0 0 1.25rem 0;
}

.bridge__heading-wrapper {
  margin: 0 0 1rem 0;
}

/* Canva-style inline highlight. border-radius: 8px is a scoped
   exception to the zero-radius brand rule — applied to the
   typographic effect only, not a structural container. */
.bridge__heading {
  font-family: var(--font-primary);
  font-weight: var(--fw-black);
  color: var(--color-brand-white);
  letter-spacing: -0.01em;
  margin: 0;
  font-size: 1.75rem;
  background-color: rgba(161, 0, 255, 0.50); /* brand purple @ 50% */
  padding: 0.1em 0.4em;
  border-radius: 8px;
  line-height: 1.60;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
  display: inline;
}

.bridge__attribution {
  font-family: var(--font-primary);
  font-weight: var(--fw-light);
  color: var(--color-purple-light);
  letter-spacing: 0.02em;
  margin: 1rem 0 0 0;
  font-size: 0.875rem;
  line-height: 1.4;
  display: block;
}

/* ── Tablet and up: the larger type ─────────────────────────── */
@media (min-width: 768px) {
  .bridge__content {
    padding: 2.5rem;
  }
  .bridge__rule {
    width: 56px;
    margin-bottom: 2rem;
  }
  .bridge__heading {
    font-size: 2.5rem;
  }
  .bridge__attribution {
    font-size: 1rem;
    margin-top: 1.5rem;
  }
}

/* ── Desktop: spatial split, no overlay ──────────────────────
   PR35-Q39: the split starts at 1024. Between 768 and 1023 its half-width column held
   about 234 px, so a long heading ran one word per line over more than a screen; tablets
   keep the phone form (full-bleed portrait, heading at the foot over the gradient). */
@media (min-width: 1024px) {
  .bridge {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
  .bridge__media {
    left: auto;
    right: 0;
    width: 50%;
  }
  .bridge__overlay {
    display: none;
  }
  .bridge__content {
    padding: 4rem 5rem;
    width: 50%;
    max-width: 50%;
  }
}

/* ── A11y image tooltip — desktop hover caption (≥1024px only) ─ */
@media (min-width: 1024px) {
  .img-alt-host {
    position: relative;
    display: inline-block;
  }
  .img-alt-host::after {
    content: attr(alt);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(var(--ground), 0.75);
    color: var(--color-brand-white);
    font-family: var(--font-primary, sans-serif);
    font-size: 0.75rem;
    font-weight: var(--fw-light, 300);
    letter-spacing: 0.01em;
    padding: 0.375rem 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .img-alt-host:hover::after,
  .img-alt-host:focus-within::after {
    opacity: 1;
  }
  /* Portrait: span must fill the absolute media container */
  .bridge .img-alt-host {
    display: block;
    width: 100%;
    height: 100%;
  }
  /* Services: span must fill the image slot */
  .services__image-slot .img-alt-host {
    display: block;
    width: 100%;
    height: 100%;
  }
}

