/* ==========================================================================
   NOMADO — Секция «Люди Nomado» (светлая)
   Движущаяся лента лиц команды (marquee), крупное 157, карточки историй
   «Мой путь в Nomado» и оранжевый блок «Одна команда без границ».
   ========================================================================== */

.people {
  --ink: #14100e;
  --muted: #6f645e;
  position: relative; padding-block: var(--nm-section-gap);
  background: transparent; color: var(--ink); overflow: hidden;
}
.people__inner { position: relative; z-index: 1; width: 100%; max-width: var(--nm-content);
  margin-inline: auto; padding-inline: var(--nm-gutter); }

/* ------------------------------------------------------------- шапка */
.people__head { max-width: 1200px; margin: 0 auto clamp(30px, 3.4vw, 48px); text-align: center; }
.people__eyebrow {
  display: inline-flex; align-items: center; gap: .6em; margin: 0 0 clamp(14px, 1.6vw, 20px);
  font-size: clamp(.72rem, .95vw, .85rem); font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase; color: var(--nm-orange);
}
.people__eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--nm-orange); border-radius: 2px; }
.people__title {
  margin: 0 0 clamp(18px, 2vw, 26px); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.02em; line-height: 1.0; font-size: clamp(2rem, 4.6vw, 3.7rem); color: var(--ink);
}
.people__title em { font-style: normal; color: var(--nm-orange); }
.people__lead p { margin: 0 0 .8em; color: var(--muted); line-height: 1.68;
  font-size: clamp(.98rem, 1.15vw, 1.1rem); }
.people__lead p:last-child { margin-bottom: 0; }
.people__lead b { color: var(--ink); font-weight: 700; }

/* ------------------------------------------- лента лиц (marquee) */
.people__faces {
  margin: clamp(30px, 3.6vw, 52px) 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.people__row { display: flex; gap: clamp(12px, 1.2vw, 18px); width: max-content; }
.people__row + .people__row { margin-top: clamp(12px, 1.2vw, 18px); }
.people__row--a { animation: faces-left 52s linear infinite; }
.people__row--b { animation: faces-right 60s linear infinite; }
@keyframes faces-left  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes faces-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.face {
  flex: none; width: clamp(54px, 5vw, 78px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; color: rgba(20, 16, 14, .38);
  background: linear-gradient(160deg, #f2e5dd, #e7d2c7); border: 1px solid rgba(20, 16, 14, .08);
}
.face svg { width: 46%; height: auto; }
.face:nth-child(3n)   { background: linear-gradient(160deg, #ffd9c6, #ffb59a); }
.face:nth-child(4n)   { background: linear-gradient(160deg, #fff, #efe4dd); }
.face:nth-child(5n)   { background: linear-gradient(160deg, #ffcbb2, #f6a887); }
.face--more { background: linear-gradient(150deg, #ff6a1a, #f23500); color: #fff;
  font-weight: 800; font-size: clamp(.72rem, .9vw, .82rem); letter-spacing: .02em; }

/* ------------------------------------------- крупная подпись 157 */
.people__count {
  display: flex; align-items: baseline; justify-content: center; gap: .5em;
  margin: 0 auto clamp(38px, 4.5vw, 64px); text-align: center;
}
.people__count b { font-weight: 800; line-height: .85; letter-spacing: -.03em;
  font-size: clamp(3rem, 6vw, 5rem); color: var(--nm-orange); }
.people__count span { color: var(--muted); font-weight: 600;
  font-size: clamp(1rem, 1.2vw, 1.18rem); max-width: 18ch; text-align: left; line-height: 1.3; }

/* ------------------------------------------- карточки историй */
.people__stories-head { text-align: center; margin: 0 0 clamp(26px, 3.2vw, 46px); }
.people__stories-head h3 {
  position: relative; display: inline-block; margin: 0; padding-bottom: clamp(12px, 1.3vw, 18px);
  font-weight: 800; text-transform: uppercase; letter-spacing: -.01em;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem); color: var(--ink);
}
.people__stories-head h3::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: clamp(50px, 6vw, 92px); height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--nm-orange), var(--nm-orange-light)); }

.people__stories { margin-bottom: clamp(38px, 4.5vw, 64px); }
.people__slider { position: relative; }
/* горизонтальный трек со снапом */
.pstory-track {
  display: flex; gap: clamp(16px, 1.6vw, 24px);
  /* стартуем без scroll-контейнера — иначе браузер трогает скролл при загрузке
     и обнуляет запись LCP (NO_LCP). Скролл включаем классом .sc после load. */
  overflow-x: clip;
  scroll-snap-type: x proximity; scroll-behavior: smooth; padding: 4px 2px 10px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.pstory-track.sc { overflow-x: auto; }
.pstory-track::-webkit-scrollbar { display: none; }

/* компактная красно-оранжевая карточка (градиент Figma) */
.pstory {
  position: relative; overflow: hidden; scroll-snap-align: start;
  /* десктоп: в экран влезает 2 карточки + краешек 3-й */
  flex: 0 0 47%; display: flex; flex-direction: column;
  min-height: clamp(300px, 28vw, 360px);
  padding: clamp(26px, 2.6vw, 40px); border-radius: var(--nm-radius); color: #fff;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(120% 92% at 86% -6%, rgba(242, 53, 0, .24) 0%, rgba(120, 30, 0, .1) 44%, transparent 60%),
    linear-gradient(155deg, #2E0C03 0%, #180400 55%, #0A0201 100%);
  box-shadow: none;
}
.pstory::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url('../bg/world-map-dots.webp') center / cover no-repeat; opacity: .06;
}
.pstory > * { position: relative; z-index: 1; }
.pstory__top { display: flex; align-items: flex-start; gap: 13px; margin-bottom: clamp(15px, 1.7vw, 20px); }
.pstory__ava { width: clamp(48px, 4.4vw, 58px); aspect-ratio: 1; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .32); }
.pstory__ava svg { width: 46%; height: auto; }
.pstory__name { margin: 0; font-weight: 800; letter-spacing: -.01em; color: #fff;
  font-size: clamp(1rem, 1.25vw, 1.16rem); }
.pstory__role { margin: .15em 0 0; color: var(--nm-orange); font-weight: 600;
  font-size: clamp(.8rem, .92vw, .88rem); }
.pstory__text { margin: 0; color: rgba(255, 255, 255, .92); line-height: 1.6;
  font-size: clamp(.94rem, 1.05vw, 1.02rem); }
.pstory__text + .pstory__text { margin-top: .7em; }
.pstory--tpl .pstory__text { font-style: italic; color: rgba(255, 255, 255, .82); }

/* стрелки навигации */
.people__nav { display: flex; justify-content: center; gap: 12px; margin-top: clamp(18px, 2vw, 26px); }
.people__arrow {
  width: clamp(44px, 3.6vw, 54px); aspect-ratio: 1; border-radius: 50%; cursor: pointer; flex: none;
  display: grid; place-items: center; color: var(--ink); font-family: inherit;
  background: #fff; border: 1px solid rgba(20, 16, 14, .14); box-shadow: 0 14px 30px -16px rgba(20, 16, 14, .4);
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.people__arrow:hover { background: var(--nm-orange); color: #fff; border-color: var(--nm-orange); transform: translateY(-2px); }
.people__arrow svg { width: 38%; height: auto; }

/* -------------------- блок «Одна команда без границ» -------------------- */
.people__team {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 3vw, 50px); align-items: center;
  padding: clamp(28px, 3.2vw, 48px) clamp(26px, 3.2vw, 52px); border-radius: var(--nm-radius);
  background: linear-gradient(120deg, #ff6a1a 0%, #f23500 52%, #c8340c 100%); color: #fff;
  box-shadow: 0 30px 66px -34px rgba(242, 53, 0, .7);
}
.people__team::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url('../bg/world-map-dots.webp') center / cover no-repeat; opacity: .14; mix-blend-mode: overlay;
}
.people__team > * { position: relative; z-index: 1; }
.people__team h3 { margin: 0 0 .5em; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em;
  line-height: 1.1; font-size: clamp(1.5rem, 2.8vw, 2.3rem); }
.people__team p { margin: 0; color: rgba(255, 255, 255, .95); line-height: 1.6;
  font-size: clamp(1rem, 1.15vw, 1.12rem); max-width: 60ch; }
.people__cities { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.people__cities li {
  font-weight: 700; font-size: clamp(.86rem, 1vw, .96rem); color: #fff; white-space: nowrap;
  padding: .55em 1.1em; border-radius: var(--nm-radius-pill);
  background: rgba(0, 0, 0, .18); border: 1px solid rgba(255, 255, 255, .32);
}

/* ------------------------------------------------------------- появление */
.js .people [data-io] { opacity: 0; transform: translateY(24px); }
.js .people [data-io].io-in { opacity: 1; transform: none;
  transition: opacity .7s ease, transform .8s cubic-bezier(.19, .9, .22, 1); }

/* ------------------------------------------------------------- адаптив */
@media (max-width: 900px) {
  .people__stories { grid-template-columns: 1fr; }
  .people__team { grid-template-columns: 1fr; }
}
/* на мобилке убираем стрелки — слайдер листается свайпом */
@media (max-width: 640px) {
  .people__nav { display: none; }
  /* слайдер уходит вправо до края экрана (а не до контейнера) */
  .people { overflow: visible; }
  .people__stories { margin-right: calc(50% - 50vw); }
  .pstory-track { padding-right: clamp(9px, 3vw, 20px); }
  /* широкие карточки: одна почти на весь экран + краешек следующей */
  .pstory { flex: 0 0 86%; min-height: 0; }
  /* шапка в столбик: сначала фото, потом имя, потом должность */
  .pstory__top { flex-direction: column; align-items: flex-start; gap: clamp(10px, 2.6vw, 14px); }
}
@media (prefers-reduced-motion: reduce) {
  .people__row--a, .people__row--b { animation: none; }
  .js .people [data-io] { opacity: 1; transform: none; }
}
