/* =====================================================================
   Directline — "how we work" hub (2026-11-27), after the superside.com
   section where every service flows through one mark out to the teams
   it serves. Ours, read right to left:
   · our twelve services (from the services section) as coloured chips,
     a few carrying a real picture from our work;
   · a lime beam that gathers them into the Directline mark;
   · arrows out to the sectors we have worked for, each shown with a
     design from one of its projects.
   On entering: chips pop in one by one, the mark lands, the arrows draw
   and the sectors appear. Then it keeps breathing: sparks run along the
   arrows, the beam shimmers, the sectors float. Phones: stacked, no
   arrows. Reduced motion: shown complete and still.
   ===================================================================== */
.hub { position: relative; padding: 76px 0 76px; background: var(--paper); overflow: hidden; overflow: clip; }
.hub-head { text-align: center; max-width: 760px; }
.hub-head .eyebrow { justify-content: center; }
.hub-head h2 { margin: 12px 0 10px; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.25; }
.hub-head h2 span { color: var(--purple); }
.hub-head p { color: #5d5168; font-size: 17px; }

.hub-stage {
  --core: 132px; position: relative; isolation: isolate;
  width: min(1240px, calc(100% - 104px)); margin: 30px auto 0;
  display: grid; grid-template-columns: minmax(0, 1.08fr) var(--core) minmax(0, 1fr); align-items: center; gap: 56px;
}
.hub-cap { font-size: 12px; letter-spacing: .4px; color: #8a7d97; margin-bottom: 14px; }

/* the beam: wide and soft behind the chips, narrowing into the mark, then fanning out */
.hub-glow { position: absolute; inset: -60px -10vw; z-index: -1; pointer-events: none; }
.hub-glow::before, .hub-glow::after { content: ''; position: absolute; inset: 0; }
.hub-glow::before {
  background:
    radial-gradient(ellipse 30% 26% at 50% 52%, rgb(243 239 48 / .55), transparent 70%),
    radial-gradient(ellipse 34% 40% at 72% 50%, rgb(243 239 48 / .32), transparent 72%),
    radial-gradient(ellipse 34% 46% at 26% 52%, rgb(243 239 48 / .26), transparent 72%);
  filter: blur(8px);
}
.hub-glow::after { /* the moving shimmer along the beam, right → left (reading direction) */
  background: linear-gradient(270deg, transparent 0%, rgb(255 253 190 / 0) 30%, rgb(255 253 190 / .7) 45%, rgb(255 253 190 / 0) 60%, transparent 100%) 0 50% / 220% 34% no-repeat;
  mask-image: radial-gradient(ellipse 60% 40% at 50% 52%, #000, transparent);
  opacity: 0;
}

/* ---------- inputs ---------- */
.hb-rows, .hb-rows ul { list-style: none; margin: 0; padding: 0; }
.hb-rows { display: flex; flex-wrap: wrap; gap: 10px; }
.hb-row, .hb-row > ul { display: contents; }
.hb-chip {
  display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 20px; border-radius: 10px;
  font-size: 16px; font-weight: 500; line-height: 1; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .05), 0 1px 0 rgb(255 255 255 / .6) inset;
}
.hb-chip.has-img { padding-inline-start: 6px; }
.hb-chip img { width: 62px; height: 40px; object-fit: cover; border-radius: 6px; }
.t-lime  { background: #eef08a; color: #2a164d; }
.t-lav   { background: #e3dbf3; color: #2a164d; }
.t-paper { background: #ede6dc; color: #2a164d; }
.t-deep  { background: #2a164d; color: #f3ef30; }
.t-deep2 { background: #3d2269; color: #fff; }
.t-plum  { background: #553083; color: #fff; }

/* ---------- the mark ---------- */
.hub-core { display: grid; place-items: center; }
.hub-tile {
  width: var(--core); height: var(--core); border-radius: 30px; display: grid; place-items: center;
  background: var(--brand-grad, #2a164d); box-shadow: 0 24px 60px rgb(42 22 77 / .35), 0 0 0 10px rgb(243 239 48 / .18);
  position: relative;
}
.hub-tile img { width: 46%; height: auto; }
.hub-tile::after { content: ''; position: absolute; inset: -10px; border-radius: 38px; border: 2px solid rgb(243 239 48 / .5); opacity: 0; }

/* ---------- outputs ---------- */
.hb-nodes { list-style: none; margin: 0; padding: 0; position: relative; height: 440px; direction: ltr; }
.hb-node { position: absolute; right: var(--x); top: var(--y); width: var(--sz); display: grid; justify-items: center; }
.hb-av { width: var(--sz); height: var(--sz); border-radius: 50%; overflow: hidden; box-shadow: 0 14px 30px rgb(42 22 77 / .22), 0 0 0 4px #fff; background: #ddd; }
.hb-av img { width: 100%; height: 100%; object-fit: cover; }
.hb-tag { margin-top: -16px; position: relative; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; direction: rtl; box-shadow: 0 6px 14px rgb(42 22 77 / .14); }

/* ---------- arrows ---------- */
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: visible; color: #dfe86a; pointer-events: none; }
.hub-lines path.ln { fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round; opacity: .75; }
.hub-lines circle { fill: #f3ef30; filter: drop-shadow(0 0 4px rgb(243 239 48 / .9)); }

/* ---------- motion ---------- */
.motion-ok .hub:not(.is-in) .hb-chip,
.motion-ok .hub:not(.is-in) .hb-node,
.motion-ok .hub:not(.is-in) .hub-tile { opacity: 0; scale: .6; }
.motion-ok .hub:not(.is-in) .hub-glow { opacity: 0; }
.motion-ok .hb-chip { transition: opacity .5s, scale .7s cubic-bezier(.34,1.56,.64,1); transition-delay: calc(var(--k, 0) * 70ms); }
.motion-ok .hub-tile { transition: opacity .5s 1s, scale .8s 1s cubic-bezier(.34,1.56,.64,1); }
.motion-ok .hub-glow { transition: opacity 1.4s .4s; }
.motion-ok .hb-node { transition: opacity .5s, scale .7s cubic-bezier(.34,1.56,.64,1); transition-delay: calc(1.6s + var(--k) * 110ms); }
.motion-ok .hub-lines path.ln { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1s cubic-bezier(.22,1,.36,1); transition-delay: calc(1.3s + var(--k) * 110ms); }
.motion-ok .hub.is-in .hub-lines path.ln { stroke-dashoffset: 0; }

.motion-ok .hub.is-live .hb-node .hb-av { animation: hb-float 6s ease-in-out infinite; animation-delay: calc(var(--k) * -.8s); }
.motion-ok .hub.is-live .hub-glow::after { animation: hb-shimmer 3.2s linear infinite; }
.motion-ok .hub.is-live .hub-tile::after { animation: hb-ring 2.6s ease-out infinite; }
@keyframes hb-float { 50% { translate: 0 -8px; } }
@keyframes hb-shimmer { 0% { opacity: 1; background-position: -60% 50%; } 100% { opacity: 1; background-position: 160% 50%; } }
@keyframes hb-ring { 0% { opacity: .9; scale: .92; } 100% { opacity: 0; scale: 1.25; } }
.motion-paused .hub *, .motion-paused .hub *::after { animation-play-state: paused !important; }
.hub.is-away *, .hub.is-away *::after { animation-play-state: paused !important; }

@media (max-width: 1150px) {
  .hub-stage { width: calc(100% - 70px); gap: 34px; --core: 104px; }
  .hb-chip { height: 46px; font-size: 14px; padding: 0 14px; }
  .hb-chip img { width: 50px; height: 34px; }
  .hb-nodes { height: 400px; }
  .hb-node { width: calc(var(--sz) * .82); }
  .hb-av { width: calc(var(--sz) * .82); height: calc(var(--sz) * .82); }
  .hb-tag { font-size: 12px; }
}
@media (max-width: 800px) {
  .hub { padding: 70px 0 80px; }
  .hub-head p { font-size: 15px; }
  .hub-stage { width: calc(100% - 40px); grid-template-columns: 1fr; gap: 26px; margin-top: 36px; --core: 92px; }
  .hub-cap { text-align: center; }
  .hb-rows { justify-content: center; gap: 8px; }
  .hb-chip { height: 40px; font-size: 13px; padding: 0 12px; border-radius: 8px; }
  .hb-chip img { width: 42px; height: 28px; }
  .hub-lines { display: none; }
  .hub-glow::before { background: radial-gradient(ellipse 60% 30% at 50% 50%, rgb(243 239 48 / .45), transparent 70%); }
  .hb-nodes { height: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 6px; direction: rtl; }
  .hb-node { position: static; width: auto; }
  .hb-av { width: 68px; height: 68px; }
  .hb-tag { font-size: 11px; padding: 4px 7px; margin-top: -10px; white-space: normal; text-align: center; max-width: 86px; }
}
.hub-head .hub-more{margin-top:14px;color:var(--purple)}
