/* ==========================================================================
   Blok „Branże – plansza z nićmi” (.zn-sectors): plansza 3 × 3, tytuł w kole w środku,
   nici do każdej branży (view.js przelicza je w pikselach i rysuje raz; bez JS stoją od razu).
   Źródło (prototyp): assets/css/podstrony/zaufali-nam.css (4. Branże).
   ========================================================================== */

.sect.zn-sectors { padding-block: clamp(3rem, 5.5vw, 4.75rem); }

.zn-board { position: relative; }
.zn-board__list {
  position: relative; z-index: 1; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: clamp(1.25rem, 2.2vw, 1.75rem);
}
.zn-board__list > :nth-child(4) { grid-column: 1; grid-row: 2; }
.zn-board__list > :nth-child(5) { grid-column: 3; grid-row: 2; }
.zn-board__list > :nth-child(n+6) { grid-row: 3; }
.zn-board__threads { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.zn-board__threads path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.zn-board__threads .track path { stroke: var(--orange-100); stroke-width: 2; }
.zn-board__threads .draw path {
  stroke: var(--orange); stroke-width: 2;
  transition: stroke-dashoffset 1.2s var(--ease) var(--d, 0s), stroke-width .25s, opacity .25s;
}
.zn-board__threads .draw path:nth-child(2) { --d: .08s; }
.zn-board__threads .draw path:nth-child(3) { --d: .16s; }
.zn-board__threads .draw path:nth-child(4) { --d: .24s; }
.zn-board__threads .draw path:nth-child(5) { --d: .32s; }
.zn-board__threads .draw path:nth-child(6) { --d: .4s; }
.zn-board__threads .draw path:nth-child(7) { --d: .48s; }
.zn-board__threads .draw path:nth-child(8) { --d: .56s; }
/* the section's own head sits in the hub: a white disc with an orange ring in the middle cell */
.zn-board__hub {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(14rem, 18.5vw, 16.5rem); aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 1.5rem; background: #fff;
  box-shadow: inset 0 0 0 2.5px var(--orange), 0 0 0 12px rgba(248, 120, 49, .07), var(--shadow-float);
}
.zn-board__hub .eyebrow.eyebrow { margin: 0 0 .85rem; }
.zn-board__hub h2 { margin: 0; max-width: 9ch; font-size: clamp(1.625rem, 1.15rem + 1.05vw, 2.125rem); line-height: 1.08; }

.zn-sector {
  display: flex; flex-direction: column; gap: .65rem; min-width: 0;
  padding: clamp(1.1rem, 1.8vw, 1.5rem); border-radius: var(--radius-lg); background: #fff;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.zn-sector:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-float); transform: translateY(-3px); }
.zn-sector__top { display: flex; align-items: center; gap: .8rem; }
.zn-sector__ico {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy-50); color: var(--navy); transition: background-color .3s, color .3s;
}
.zn-sector__ico .icon { width: 1.15rem; height: 1.15rem; }
.zn-sector:hover .zn-sector__ico { background: var(--navy-900); color: var(--orange-400); }
.zn-sector h3 { margin: 0; font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); }
.zn-sector > p { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
/* "Liczy się" and the case link share a row; the needs follow as pills */
.zn-sector__need {
  margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k case" "pills pills";
  align-items: center; gap: .5rem 1rem;
}
.zn-sector__k { grid-area: k; font: 500 .75rem/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.zn-sector__pills.zn-sector__pills { grid-area: pills; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; color: var(--navy-900); }
.zn-sector__pills b {
  padding: .2rem .7rem; border-radius: var(--radius-pill); background: var(--orange-50); box-shadow: inset 0 0 0 1px var(--orange-100);
  font-size: .9375rem; font-weight: 500; line-height: 1.35;
}
.zn-sector__case {
  grid-area: case; display: inline-flex; align-items: center; gap: .4rem;
  font: 500 .875rem/1.3 var(--font-ui); color: var(--navy); text-decoration: underline; text-decoration-color: var(--orange);
  text-decoration-thickness: 1.5px; text-underline-offset: .25em;
}
.zn-sector__case .icon { width: 1rem; height: 1rem; transition: transform .3s var(--ease); }
.zn-sector__case:hover { color: var(--navy-900); }
.zn-sector__case:hover .icon { transform: translateX(3px); }

/* the hovered sector's thread thickens, the others step back */
.zn-board:has(.zn-sector:hover, .zn-sector:focus-within) .draw path { opacity: .35; }
.zn-board:has(.zn-sector:nth-child(1):is(:hover, :focus-within)) .draw path:nth-child(1),
.zn-board:has(.zn-sector:nth-child(2):is(:hover, :focus-within)) .draw path:nth-child(2),
.zn-board:has(.zn-sector:nth-child(3):is(:hover, :focus-within)) .draw path:nth-child(3),
.zn-board:has(.zn-sector:nth-child(4):is(:hover, :focus-within)) .draw path:nth-child(4),
.zn-board:has(.zn-sector:nth-child(5):is(:hover, :focus-within)) .draw path:nth-child(5),
.zn-board:has(.zn-sector:nth-child(6):is(:hover, :focus-within)) .draw path:nth-child(6),
.zn-board:has(.zn-sector:nth-child(7):is(:hover, :focus-within)) .draw path:nth-child(7),
.zn-board:has(.zn-sector:nth-child(8):is(:hover, :focus-within)) .draw path:nth-child(8) { opacity: 1; stroke-width: 3.5; }

@media (max-width: 900px) {
  .zn-board__threads { display: none; }
  .zn-board__hub {
    position: static; transform: none; width: auto; aspect-ratio: auto; margin-bottom: clamp(2rem, 5vw, 2.5rem);
    padding: 0; border-radius: 0; background: none; box-shadow: none; align-items: flex-start; text-align: left;
  }
  .zn-board__hub .eyebrow.eyebrow { margin-bottom: 1.25rem; }
  .zn-board__hub h2 { max-width: 18ch; font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem); line-height: 1.12; }
  .zn-board__list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .zn-board__list > :nth-child(n) { grid-column: auto; grid-row: auto; }
}

@media (max-width: 600px) {
  .zn-board__list { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .zn-sector { transition: none; }
  .zn-board__threads .draw path { transition: none; }
}
