/* ===========================================================================
   CE-26 · Macierz etapów i ról (stages and roles matrix)
   Rebuilt 26.09.2026 after Figma crear-v2.0, frame 608:1127, node 608:1240
   (the old lo-fi form – a row per stage with chips on the right – is gone;
   CE-26 lives on O nas only).
   Root:     section.ce-roles-matrix (background #F4F4F4)
   Design:   160 px padding; the H2 in 56 px Expanded Regular (line 1.05,
             −2.24 px, #1D1D1E), 64 px, a 1 px rule #D2D2D2 across the
             width, 40 px, a row: the eyebrow on the left, the intro in 20 px
             TT Hoves Pro (line 1.4, −0.2 px, 692 px) on the right; 120 px to
             five columns of 279 px. A column: the stage head – a 1.5 px rule
             #1D1D1E on its left, padding 12 / 24, „(01)” in 17 px TT Hoves
             Pro Medium, 28 px, the stage name in 26 px Expanded Regular
             (−1.04 px) – then 40 px to the roles: a 326 px tall field with
             dotted vertical lines every fifth of the column (the first
             one darker), the chips from 24 px in and 41 px down, 10 px
             apart: white, radius 4, 32 px tall, padding 7 / 12 / 8, 15 px TT
             Hoves Pro Medium, uppercase, +0.6 px, #0A2526.
   Parts:    __head (__title H2 with .lf-h2, __rule, __meta: __eyebrow with
             .lf-eyebrow, __intro), __cols (ol, five stages), __col (li),
             __stage (__num „(01)”, aria-hidden – the <ol> numbers them;
             __name H3), __chips (ul: the dotted field), __chip (li: one role;
             data-role = the role's key, shared by every chip of that role)
   States:   .is-lit on the chips of the role under the mouse,
             .has-lit on the root (the other chips dim) – ce/CE-26-roles-matrix.js
   Mechanics: the scroll-in is the site.js kit (the H2 letter by letter,
             data-appear on the head row, the stage heads and the chips in a
             cascade). Hovering a role lights that role in every
             stage it takes part in – Project Manager runs through all five.
   Layout:   1:1 at 1440 px, proportionally below; ≤ 1100 px two columns,
             ≤ 640 px one column with the chips wrapping in a row.
   Rule:     roles only – no photos and no names (strategy, 15.06.2026)
   Base:     o-nas.html#zespol · registry: ce-registry.js → CE-26
   =========================================================================== */

.ce-roles-matrix {
  --rm-u: min(1px, 100vw / 1440);        /* 1 design px, never above 1 px */
  padding-block: clamp(96px, 11.11vw, 160px);
  background: var(--ui-soft);
}

/* ---- head --------------------------------------------------------------------- */
.ce-roles-matrix__head { margin-bottom: clamp(64px, 8.33vw, 120px); }
.ce-roles-matrix__title {
  max-width: none;
  font-size: clamp(2rem, 3.889vw, 56px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.04em;                /* −2.24 px at 56 px */
  color: var(--ui-ink);
}
.ce-roles-matrix__rule {
  height: 1px;
  margin: clamp(40px, 4.44vw, 64px) 0 clamp(28px, 2.78vw, 40px);
  border: 0;
  background: #D2D2D2;
}
.ce-roles-matrix__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 48px;
}
.ce-roles-matrix__eyebrow { flex: none; color: rgba(29, 29, 30, .6); }
.ce-roles-matrix__intro {
  width: min(692px, 48.06vw);
  font-size: clamp(1.0625rem, 1.389vw, 20px);
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--ui-ink);
}

/* ---- columns -------------------------------------------------------------------- */
.ce-roles-matrix__cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ce-roles-matrix__stage {
  display: flex;
  flex-direction: column;
  gap: calc(28 * var(--rm-u));
  padding: calc(12 * var(--rm-u)) calc(24 * var(--rm-u));
  border-left: 1.5px solid var(--ui-ink);
  color: var(--ui-ink);
}
.ce-roles-matrix__num {
  font-size: clamp(.875rem, 1.18vw, 17px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.ce-roles-matrix__name {
  font-size: clamp(1.125rem, 1.806vw, 26px);
  font-weight: 400;
  line-height: normal;
  letter-spacing: -.04em;                /* −1.04 px at 26 px */
}

/* The dotted field: five dotted lines per column – the column's own edge
   darker (1 px dots every 6 px), four lighter ones (half-opacity dots) at
   every fifth of the width – and a light one closing the last column. */
.ce-roles-matrix__chips {
  --rm-dot: linear-gradient(to bottom, var(--ui-ink) 0 1px, transparent 1px);
  --rm-dot-soft: linear-gradient(to bottom, rgba(29, 29, 30, .35) 0 1px, transparent 1px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(10 * var(--rm-u));
  min-height: calc(326 * var(--rm-u));
  margin-top: calc(40 * var(--rm-u));
  padding: calc(41 * var(--rm-u)) 8px calc(24 * var(--rm-u)) calc(24 * var(--rm-u));
  background-image: var(--rm-dot), var(--rm-dot-soft), var(--rm-dot-soft), var(--rm-dot-soft), var(--rm-dot-soft);
  background-size: 1px 6px;
  background-repeat: repeat-y;
  background-position: 0 0, 20% 0, 40% 0, 60% 0, 80% 0;
}
.ce-roles-matrix__col:last-child .ce-roles-matrix__chips {
  background-image: var(--rm-dot), var(--rm-dot-soft), var(--rm-dot-soft), var(--rm-dot-soft), var(--rm-dot-soft), var(--rm-dot-soft);
  background-position: 0 0, 20% 0, 40% 0, 60% 0, 80% 0, 100% 0;
}

.ce-roles-matrix__chip {
  display: flex;
  align-items: center;
  max-width: 100%;
  min-height: calc(32 * var(--rm-u));
  padding: .4667em .8em .5333em;         /* 7 / 12 / 8 px at 15 px */
  border-radius: 4px;
  background: #fff;
  color: var(--ui-text);
  font-size: max(11px, 15 * var(--rm-u));
  font-weight: 500;
  line-height: normal;
  letter-spacing: .04em;                 /* +0.6 px at 15 px */
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
  transition: background-color .3s var(--ease-out-quart), color .3s var(--ease-out-quart);
}
/* the kit's data-appear transition (opacity, transform with the cascade
   delay) plus the colours of the lit state, without that delay */
@media (prefers-reduced-motion: no-preference) {
  .cr-js .ce-roles-matrix__chip[data-appear] {
    transition: opacity .8s var(--ease-out-quart) var(--appear-delay, 0ms), transform .8s var(--ease-out-quart) var(--appear-delay, 0ms),
                background-color .3s var(--ease-out-quart), color .3s var(--ease-out-quart);
  }
}

/* one role lit across the stages (JS); the rest fade by colour, not by
   opacity – opacity belongs to the scroll-in */
.ce-roles-matrix.has-lit .ce-roles-matrix__chip {
  background: rgba(255, 255, 255, .55);
  color: rgba(10, 37, 38, .35);
}
.ce-roles-matrix.has-lit .ce-roles-matrix__chip.is-lit {
  background: var(--ui-ink);
  color: #fff;
}

/* ---- narrower ------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ce-roles-matrix { --rm-u: .9px; }
  .ce-roles-matrix__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .ce-roles-matrix__chips { min-height: 0; }
  .ce-roles-matrix__col:last-child .ce-roles-matrix__chips {
    background-image: var(--rm-dot), var(--rm-dot-soft), var(--rm-dot-soft), var(--rm-dot-soft), var(--rm-dot-soft);
    background-position: 0 0, 20% 0, 40% 0, 60% 0, 80% 0;
  }
}
@media (max-width: 900px) {
  .ce-roles-matrix__meta { flex-direction: column; }
  .ce-roles-matrix__intro { width: auto; max-width: 692px; }
}
@media (max-width: 640px) {
  .ce-roles-matrix { --rm-u: .8px; }
  .ce-roles-matrix__cols { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .ce-roles-matrix__chips {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 0 4px 20px;
    margin-top: 16px;
    background-image: var(--rm-dot);
    background-position: 0 0;
  }
  .ce-roles-matrix__col:last-child .ce-roles-matrix__chips { background-image: var(--rm-dot); background-position: 0 0; }
  .ce-roles-matrix__chip { font-size: 12px; white-space: normal; }
}
