/* =============================================================
   StoneBridge — Signature Bridge Identity (art-direction layer)
   Cinematic illuminated-stone-bridge imagery integrated into the
   hero and closing sections, plus a restrained architectural arch
   motif. Layered beneath content with scrims that protect the copy.
   Business-owned photography, optimized to responsive WebP.
   ============================================================= */

/* ---------- HERO signature bridge ---------- */
.hero { isolation: isolate; }
.hero > .wrap { position: relative; z-index: 2; }
.hero > .glow { z-index: 1; }
.hero .glow-gold { opacity: 0.26; }

.hero-bridge {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #0a0a0c;
  background-repeat: no-repeat;
  background-position: center 26%;
  background-size: cover;
  background-image: url("../assets/img/bridge-hero-1200.webp");
}
.hero-bridge::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 86% at 50% 32%, rgba(10,10,12,0.56), rgba(10,10,12,0) 58%),
    linear-gradient(180deg,
      rgba(10,10,12,0.95) 0%,
      rgba(10,10,12,0.66) 24%,
      rgba(10,10,12,0.44) 44%,
      rgba(10,10,12,0.72) 66%,
      rgba(10,10,12,0.96) 85%,
      #0a0a0c 100%);
}
/* Cinematic legibility insurance for text over the glow */
.hero-headline { text-shadow: 0 2px 34px rgba(0,0,0,0.55); }
.hero-sub { text-shadow: 0 1px 24px rgba(0,0,0,0.6); }
.hero-proof .chip, .hero-meta { text-shadow: 0 1px 14px rgba(0,0,0,0.55); }

@media (min-width: 1400px) {
  .hero-bridge { background-image: url("../assets/img/bridge-hero-1536.webp"); }
}
@media (max-width: 900px) {
  .hero-bridge { background-image: url("../assets/img/bridge-hero-900.webp"); }
}
@media (max-width: 640px) {
  .hero-bridge {
    background-image: url("../assets/img/bridge-hero-portrait.webp");
    background-position: center 18%;
  }
  .hero-bridge::after {
    background:
      radial-gradient(130% 80% at 50% 30%, rgba(10,10,12,0.5), rgba(10,10,12,0) 60%),
      linear-gradient(180deg,
        rgba(10,10,12,0.9) 0%,
        rgba(10,10,12,0.62) 30%,
        rgba(10,10,12,0.6) 54%,
        rgba(10,10,12,0.86) 74%,
        #0a0a0c 100%);
  }
}

/* ---------- CLOSING complementary bridge ---------- */
.final-cta { isolation: isolate; }
.final-cta .wrap { position: relative; z-index: 2; }
.final-cta > .glow { z-index: 1; opacity: 0.5; }

.cta-bridge {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #08080a;
  background-repeat: no-repeat;
  background-position: center 80%;
  background-size: cover;
  background-image: url("../assets/img/bridge-close-1200.webp");
}
.cta-bridge::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(100% 72% at 50% 44%, rgba(8,8,10,0.5), transparent 62%),
    linear-gradient(180deg,
      rgba(8,8,10,0.96) 0%,
      rgba(8,8,10,0.82) 22%,
      rgba(8,8,10,0.5) 44%,
      rgba(8,8,10,0.44) 64%,
      rgba(8,8,10,0.72) 100%);
}
.final-cta h2 { text-shadow: 0 2px 34px rgba(0,0,0,0.55); }
.final-cta .lead { text-shadow: 0 1px 24px rgba(0,0,0,0.6); }
.final-cta .fc-meta .mi { text-shadow: 0 1px 14px rgba(0,0,0,0.6); }

@media (min-width: 1400px) {
  .cta-bridge { background-image: url("../assets/img/bridge-close-1536.webp"); }
}
@media (max-width: 900px) {
  .cta-bridge { background-image: url("../assets/img/bridge-close-900.webp"); }
}
@media (max-width: 640px) {
  .cta-bridge {
    background-image: url("../assets/img/bridge-close-portrait.webp");
    background-position: center 88%;
  }
  .cta-bridge::after {
    background:
      linear-gradient(180deg,
        rgba(8,8,10,0.94) 0%,
        rgba(8,8,10,0.78) 26%,
        rgba(8,8,10,0.66) 48%,
        rgba(8,8,10,0.6) 66%,
        rgba(8,8,10,0.78) 100%);
  }
  .final-cta .lead { text-shadow: 0 1px 10px rgba(0,0,0,0.85); }
}

/* ---------- Problem section: illuminated bridge art-plate ----------
   Fills the empty lower-right beneath the cost panel. The architecture
   emerges from shadow — a quiet visual promise that there's a way back
   to the leads leaking out on the left. Desktop/tablet only. */
.problem-bridge {
  position: relative;
  flex: 1 1 auto;
  min-height: clamp(190px, 21vw, 268px);
  margin: 0;
  isolation: isolate;
}
/* Image layer — masked so every edge dissolves into the dark section
   (no border, no rectangular frame). The architecture emerges from the
   surrounding shadow exactly like the footer imagery. */
.problem-bridge::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  background-image: url("../assets/img/bridge-close-900.webp");
  background-size: cover;
  background-position: center 56%;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 19%, #000 81%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 22%, #000 74%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 19%, #000 81%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 22%, #000 74%, transparent 100%);
  mask-composite: intersect;
}
/* Warm glow + a soft bottom scrim for caption legibility — no hard box. */
.problem-bridge::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(85% 78% at 50% 118%, rgba(199,163,91,0.17), transparent 60%),
    linear-gradient(180deg, transparent 52%, rgba(14,14,17,0.5) 86%, rgba(14,14,17,0.78) 100%);
}
.problem-bridge .pb-cap {
  position: absolute;
  z-index: 2;
  left: clamp(6px, 1.4vw, 18px);
  right: clamp(6px, 1.4vw, 18px);
  bottom: clamp(10px, 1.6vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.problem-bridge .pb-kicker {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.problem-bridge .pb-line {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 0.9rem + 0.9vw, 1.7rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--white);
  text-shadow: 0 2px 22px rgba(0,0,0,0.62);
}
@media (min-width: 1400px) {
  .problem-bridge::before { background-image: url("../assets/img/bridge-close-1200.webp"); }
}
/* Hidden on phones to keep the mobile section compact; the blended
   treatment is shown on tablet and up, where the column space exists. */
@media (max-width: 767px) {
  .problem-bridge { display: none; }
}

/* ---------- Subtle architectural arch motif (system section) ---------- */
.system-arch {
  position: absolute;
  z-index: 0;
  right: -2%;
  bottom: 0;
  width: min(46%, 560px);
  aspect-ratio: 640 / 380;
  background: url("../assets/arch-motif.svg") no-repeat bottom right / contain;
  opacity: 0.1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(120deg, transparent, #000 60%);
          mask-image: linear-gradient(120deg, transparent, #000 60%);
}
/* overflow:clip contains the arch motif's slight bleed WITHOUT creating a
   scroll container — so the "Who Does What" sticky card can pin within the
   section (overflow:hidden would silently break position:sticky). */
#system { overflow: clip; }
#system .wrap { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .system-arch { width: 70%; opacity: 0.07; }
}

@media (prefers-reduced-motion: reduce) {
  /* imagery is static by design; nothing to disable */
  .hero-bridge, .cta-bridge { background-attachment: scroll; }
}
