/* Network bridge, merge layout: students and companies start side by side at
   the top, their streams curve down and inward, and they merge at the KATCHUP
   hub, which hands on to the section below. Red is the students' stream and
   black the companies', the two colours of the mark they meet in.
   landing_network_flow.js sends chips down the lanes; without it (or with
   reduced motion) the diagram stands still. */
.landing-network-bridge[data-network-flow] { max-width: min(100%, 62rem); }

.lnf-sources { display: flex; justify-content: space-between; }
.lnf-source { width: 36%; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.lnf-source p { margin: 0; max-width: 17em; color: #73767d; font-size: clamp(0.84rem, 1.1vw, 0.98rem); line-height: 1.5; }

/* Lane tops sit at 6/18/30% and 70/82/94% of the width, under each source. */
.lnf-funnel { position: relative; height: clamp(150px, 17vw, 220px); margin-top: 18px; }
.lnf-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lnf-lines path { fill: none; stroke-width: 1.25; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.lnf-l { stroke: rgb(237 28 36 / 36%); }
.lnf-r { stroke: rgb(17 18 22 / 26%); }
.lnf-node { position: absolute; top: -5px; width: 10px; height: 10px; margin-left: -5px; border: 2px solid #fcfbfb; border-radius: 50%; }
.lnf-node-l { background: var(--landing-red, #ed1c24); }
.lnf-node-r { background: #111216; }

.lnf-hub-row { position: relative; z-index: 1; display: flex; justify-content: center; margin-top: -4px; }
.landing-network-bridge[data-network-flow] .landing-network-bridge-copy { margin-top: 2.1rem; color: #111216; font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 600; letter-spacing: -0.01em; }
.lnf-tail {
  position: relative; display: block; width: 1px; height: 56px; margin: 20px auto 0;
  background-image: repeating-linear-gradient(to bottom, rgb(237 28 36 / 34%) 0, rgb(237 28 36 / 34%) 4px, transparent 4px, transparent 9px);
}

.landing-network-bridge.is-flowing .lnf-lines path { animation: lnf-march 1.1s linear infinite; }
.landing-network-bridge.is-flowing .lnf-tail { animation: lnf-drip 1.1s linear infinite; }
@keyframes lnf-march { to { stroke-dashoffset: -9; } }
@keyframes lnf-drip { to { background-position-y: 9px; } }

/* A traveller: placed on its lane with offset-path by the script. */
.lnf-chip {
  position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 13px 0 11px; border: 1px solid rgb(17 18 22 / 10%); border-radius: 999px;
  background: #fff; box-shadow: 0 6px 16px rgb(49 30 31 / 10%);
  color: #111216; font-size: 0.78rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1; white-space: nowrap;
  offset-rotate: 0deg; offset-anchor: 50% 50%; pointer-events: none; will-change: offset-distance, transform, opacity;
}
.lnf-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #111216; }
.lnf-chip-left { border-color: rgb(237 28 36 / 20%); }
.lnf-chip-left::before { background: var(--landing-red, #ed1c24); }

.lnf-ring { position: absolute; inset: 0; border: 1.5px solid rgb(237 28 36 / 55%); border-radius: 50%; pointer-events: none; }
.lnf-drop { position: absolute; left: -3.5px; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--landing-red, #ed1c24); pointer-events: none; }

/* Wide screens: scrolling on carries the hub's mark down to the section below,
   where it opens out into the phone. The script sizes and places it, in the
   page's own coordinates, over both sections. */
.lnf-link { position: absolute; left: 0; top: 0; z-index: 30; width: 100%; height: 0; pointer-events: none; }
.lnf-link[hidden] { display: none; }
.lnf-token { position: absolute; left: 0; top: 0; display: grid; place-items: center; overflow: hidden; background: #fff; will-change: transform, width, height; }
.lnf-token img { display: block; max-width: none; height: auto; }

/* Phones: narrower lanes, so the travellers become plain dots. */
@media (max-width: 639.98px) {
  .lnf-source { width: 44%; gap: 8px; }
  .lnf-source p { font-size: 0.76rem; }
  .lnf-funnel { height: 150px; margin-top: 14px; }
  .lnf-chip { width: 9px; height: 9px; padding: 0; gap: 0; border: 0; box-shadow: none; background: #111216; font-size: 0; }
  .lnf-chip::before { content: none; }
  .lnf-chip-left { background: var(--landing-red, #ed1c24); }
  .landing-network-bridge[data-network-flow] .landing-network-bridge-copy { margin-top: 1.5rem; font-size: 0.9rem; max-width: none; }
  .lnf-tail { height: 40px; margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-network-bridge.is-flowing .lnf-lines path, .landing-network-bridge.is-flowing .lnf-tail { animation: none; }
}
