/* Sekcja zespolu v4: grid pracownikow. Markup: parts/team-v4.php */

.netim-team-v4 {
  --nt-navy: #050a30;
  --nt-navy-2: #081046;
  --nt-paper: #fafbff;
  --nt-soft: #f1f4fb;
  --nt-mint: #80dfa0;
  --nt-blue: #1e5e9f;
  --nt-mute: #5b6385;
  --nt-line: #d8defa;
  --nt-ease: cubic-bezier(.23, 1, .32, 1);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 96px 0 104px;
  background:
    radial-gradient(circle at 6% 0%, rgba(38, 167, 240, .06), transparent 32%),
    var(--nt-soft);
  color: var(--nt-navy);
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;

  img, svg { display: block; max-width: 100%; }

  .nt-sigil {
    position: absolute;
    width: 280px;
    color: var(--nt-blue);
    opacity: .06;
    pointer-events: none;
    left: -32px;
    top: -20px;
  }

  .shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 0 32px;
  }

  .head {
    display: grid;
    gap: 20px;
    align-items: end;
    margin-bottom: 48px;
  }

  .head h2 {
    margin: 0;
    font-size: clamp(30px, 3.8vw, 50px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.022em;
    text-wrap: balance;
    color: var(--nt-navy);
  }

  .head h2 em { font-style: italic; color: var(--nt-blue); }

  .head .note {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.66;
    color: var(--nt-mute);
    max-width: 46ch;
  }

  .head .note b { color: var(--nt-navy); font-weight: 700; }

  .grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .tm {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 0 0 calc((100% - 20px) / 2);
    animation: nt-enter .6s var(--nt-ease) both;
    transition: transform .3s var(--nt-ease);
  }

  .tm:hover { transform: translateY(-5px); }

  .tm:nth-child(2) { animation-delay: 50ms; }
  .tm:nth-child(3) { animation-delay: 100ms; }
  .tm:nth-child(4) { animation-delay: 150ms; }
  .tm:nth-child(5) { animation-delay: 200ms; }
  .tm:nth-child(6) { animation-delay: 250ms; }
  .tm:nth-child(7) { animation-delay: 300ms; }
  .tm:nth-child(8) { animation-delay: 350ms; }
  .tm:nth-child(9) { animation-delay: 400ms; }

  .tm-photo {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, var(--nt-navy-2), var(--nt-navy));
    aspect-ratio: 3 / 3.5;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 24px 40px -28px rgba(5, 10, 48, .45);
    transition: box-shadow .3s var(--nt-ease);
  }

  .tm:hover .tm-photo {
    box-shadow: 0 0 0 1.5px rgba(128, 223, 160, .55), 0 34px 54px -28px rgba(5, 10, 48, .55);
  }

  .tm-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    transition: transform .5s var(--nt-ease);
  }

  .tm:hover .tm-photo img { transform: scale(1.04); }

  .tm-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(5, 10, 48, .5));
    opacity: 0;
    transition: opacity .3s var(--nt-ease);
  }

  .tm:hover .tm-photo::after { opacity: 1; }

  .tm-corner {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(5, 10, 48, .58);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--nt-mint);
    font-size: 10px;
    font-style: italic;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .tm-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.014em;
    line-height: 1.2;
    color: var(--nt-navy);
  }

  .tm-role {
    margin-top: 3px;
    font-size: 12.5px;
    font-style: italic;
    font-weight: 500;
    color: var(--nt-mute);
    line-height: 1.35;
  }

  @media (min-width: 640px) {
    .tm { flex: 0 0 calc((100% - 2 * 20px) / 3); }
  }

  @media (min-width: 900px) {
    .head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 60px; }
  }

  @media (min-width: 960px) {
    .tm { flex: 0 0 calc((100% - 4 * 20px) / 5); }
  }

  @media (max-width: 600px) {
    padding: 70px 0 80px;
    .shell { padding: 0 20px; }
    .tm-name { font-size: 15px; }
    .nt-sigil { width: 200px; }
  }
}

@keyframes nt-enter {
  from { opacity: 0; filter: blur(2px); transform: translateY(10px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
