/* ============================================================
   Sekcja 06 — Marki, które postawiły na Algae Ink™
   Figma: 861:1938 (Home: 861:1769)
   ============================================================ */

.s-marki {
  --logo-size: 111px;
  --marquee-gap: 12px;
  padding: 120px 0;
  overflow: hidden;
}

.s-marki__title {
  margin: 0 auto 64px;
  padding: 0 var(--page-margin);
  text-align: center;
}

/* maska dla linii nagłówka (SplitText, wrap w JS) */
.s-marki__line-mask {
  overflow: hidden;
}

/* ------------------------------------------------------------
   Automatyczny slider logotypów (marquee)
   ------------------------------------------------------------ */

.s-marki__marquee {
  width: 100%;
  margin-bottom: 64px;
  overflow: hidden;
}

.s-marki__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: s-marki-scroll 40s linear infinite;
}

.s-marki__marquee:hover .s-marki__track {
  animation-play-state: paused;
}

@keyframes s-marki-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.s-marki__group {
  display: flex;
  gap: var(--marquee-gap);
  padding-right: var(--marquee-gap);
}

.s-marki__logo {
  flex: none;
  width: var(--logo-size);
  height: var(--logo-size);
  background: var(--c-cream);
  border: var(--border);
  border-radius: calc(var(--logo-size) / 2);
  overflow: hidden;
}

.s-marki__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  -webkit-user-drag: none;
  user-select: none;
}

/* pigułka Stella McCartney (logo poziome) */
.s-marki__logo--wide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--logo-size) * 1.61);
}

.s-marki__logo--wide img {
  width: 85%;
  height: 69%;
  object-fit: contain;
}

/* ------------------------------------------------------------
   Galeria realizacji (drag-scroll + kropka „przewiń")
   ------------------------------------------------------------ */

.s-marki__gallery {
  position: relative;
}

.s-marki__scroller {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none; /* brak zaznaczania etykiet podczas drag-scrolla */
  -webkit-user-select: none;
}

.s-marki__scroller::-webkit-scrollbar {
  display: none;
}

.s-marki.is-dragging .s-marki__scroller {
  cursor: grabbing;
}

/* gdy działa custom cursor, chowamy systemowy */
.s-marki__gallery.has-cursor .s-marki__scroller {
  cursor: none;
}

/* Figma 891:1964: karty wyrównane do GÓRY (wszystkie top:0 w ramce 556px),
   różne wysokości 404/507/556 dają nierówną dolną krawędź */
.s-marki__strip {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: max-content;
  padding: 0 var(--page-margin);
  transform-origin: center center;
  will-change: transform;
}

.s-marki__card {
  position: relative;
  flex: none;
  width: 408px;
  height: 404px;
  margin: 0;
  border-radius: 27.4px; /* Figma: 27.415 */
  overflow: hidden;
}

.s-marki__card--m { height: 507px; }
.s-marki__card--l { height: 556px; }

.s-marki__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.s-marki__label {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  background: var(--c-cream);
  border: var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-mono-sm);
  line-height: 1;
  white-space: nowrap;
}

/* czarna kropka „przewiń" pod kursorem */
.s-marki__cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-black);
  color: var(--c-cream);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: var(--fw-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0; /* Body Mono 14: letter-spacing 0 (typografia.md) */
  text-transform: uppercase;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .s-marki__track { animation: none; }
}

.s-marki.is-reduced .s-marki__track {
  animation: none;
}

/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */

@media (max-width: 767px) {
  .s-marki {
    --logo-size: 80px;
    padding: 80px 0;
  }

  .s-marki__title {
    margin-bottom: 40px;
  }

  .s-marki__marquee {
    margin-bottom: 40px;
  }

  .s-marki__strip {
    gap: 12px;
  }

  .s-marki__card {
    width: 280px;
    height: 300px;
    border-radius: 20px;
  }

  .s-marki__card--m { height: 356px; }
  .s-marki__card--l { height: 390px; }

  .s-marki__label {
    bottom: 12px;
    padding: 10px 16px;
    font-size: 12px;
  }

  .s-marki__cursor {
    display: none;
  }
}
