/* Страница «О компании» (/o-kompanii/): первый экран с фото команды,
   история (схема этапов), преимущества (мозаика цифр), реквизиты. */

/* ---------- Первый экран: фото команды под прозрачной шапкой ---------- */
.about-page .about-hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* сплошной тёмный фон — по нему js/header-tone.js красит шапку в светлое */
  background: #2b2a29;
  color: #fff;
}
/* кадр обрезан снизу примерно до шорт: сцена остаётся целой, лишнее прячет overflow */
.about-page .about-hero { aspect-ratio: 1535 / 800; }
/* Единый мягкий слой поверх фотографии: он не обрывается по нижней границе
   блока заголовка и постепенно растворяется перед людьми. */
.about-page .about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgb(24 22 20 / 84%) 0%,
    rgb(24 22 20 / 72%) 22%,
    rgb(24 22 20 / 52%) 42%,
    rgb(24 22 20 / 28%) 60%,
    rgb(24 22 20 / 0%) 78%);
}
/* Сгенерирован только верх офиса (1600px), вся группа ниже — исходное фото.
   Верх кадра уходит под заголовок: его высота остаётся в обычном потоке,
   поэтому текст не наезжает на людей даже на узком экране. */
.about-hero__scene {
  position: relative;
  order: 1;
  width: 100%;
  aspect-ratio: 1535 / 1024;
  margin: 0;
}
.about-hero__photo { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Затемнение плавно заканчивается на потолке, выше голов людей. */
.about-hero__people::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 0;
  right: 0;
  height: 7%;
  z-index: -1;
  background: linear-gradient(180deg, rgb(24 22 20 / 40%), rgb(24 22 20 / 0%));
  pointer-events: none;
}
.about-hero__head {
  position: absolute;
  inset: 0 0 auto;
  order: 0;
  z-index: 2;
  isolation: isolate;
  width: 100%;
  padding-top: var(--header-h);
  padding-bottom: clamp(24px, 2.5vw, 48px);
  background: transparent;
  text-align: center;
  pointer-events: none;
}
/* Фотография видна под меню и H1; затемнение — на всю ширину экрана. */
.about-hero__head::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: transparent;
  pointer-events: none;
}
.about-hero__people { display: none; }
.about-hero__head a { pointer-events: auto; }
.about-hero .breadcrumbs { margin-bottom: 8px; color: rgb(255 255 255 / 62%); }
.about-hero .breadcrumbs a:hover { color: #fff; }
.about-hero .about-hero__title { margin-top: clamp(16px, 3vw, 56px); color: #fff; }
.about-hero .about-hero__lead { max-width: 820px; margin: 24px auto 0; color: rgb(255 255 255 / 86%); }

/* Люди на фото: зона наведения — от головы до пояса */
.about-hero__people { position: absolute; inset: 0; height: auto; z-index: 3; margin: 0; padding: 0; list-style: none; }
.about-person { position: absolute; left: var(--l); top: var(--t); width: 7.08%; height: var(--h); }
.about-person:hover, .about-person.is-open, .about-person:focus-within { z-index: 3; }
.about-person__spot { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: pointer; }
/* метка на груди: подсказывает, что на человека можно навести */
.about-person__spot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #fff;
  outline: 4px solid rgb(255 255 255 / 32%);
  transition: transform var(--dur-fast) var(--ease), outline-color var(--dur-fast) var(--ease);
}
.about-person:hover .about-person__spot::after,
.about-person.is-open .about-person__spot::after { transform: scale(1.3); outline-color: rgb(255 255 255 / 55%); }
.about-person__spot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 12px; }
.about-person__card {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  max-width: 260px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  color: var(--color-ink);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
}
.about-person--left .about-person__card { left: 0; transform: translate(0, 6px); }
.about-person--right .about-person__card { left: auto; right: 0; transform: translate(0, 6px); }
.about-person:hover .about-person__card,
.about-person:focus-within .about-person__card,
.about-person.is-open .about-person__card { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.about-person--left:hover .about-person__card, .about-person--left:focus-within .about-person__card, .about-person--left.is-open .about-person__card,
.about-person--right:hover .about-person__card, .about-person--right:focus-within .about-person__card, .about-person--right.is-open .about-person__card { transform: none; }
.about-person__name { font-size: 16px; line-height: 1.35; font-weight: 500; color: var(--color-ink); text-decoration: none; }
.about-person__name:hover { color: var(--color-accent-hover); }
.about-person__role { margin-bottom: 6px; font-size: 14px; line-height: 1.4; color: var(--color-muted); }
.about-person__contact { font-size: 14px; line-height: 1.5; color: var(--color-accent); text-decoration: none; }
.about-person__contact:hover { color: var(--color-accent-hover); }

/* Телефон и планшет: тот же целый горизонтальный кадр под заголовком. */
@media (max-width: 900px) {
  .about-hero__head { padding-top: calc(var(--header-h) + 8px); padding-bottom: 24px; }
  .about-person__card { max-width: 220px; padding: 12px 14px; }
  .about-hero .about-hero__title { margin-top: 8px; }
  .about-hero .about-hero__lead { margin-top: 16px; }
}

/* ---------- История: горизонтальная лента годов на всех экранах ---------- */
.about-page #istoriya { container-type: inline-size; }
.about-history {
  --carousel-edge: max(var(--gutter), calc((100cqw - var(--container)) / 2));
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: clamp(260px, 26vw, 360px);
  align-items: start;
  gap: var(--space-md);
  width: 100cqw;
  margin-inline: calc((100% - 100cqw) / 2);
  padding-top: var(--space-2xs);
  padding-inline: var(--carousel-edge);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--carousel-edge);
}
.about-history .process-phase {
  padding: 60px 0 0;
  scroll-snap-align: start;
}
.about-history .process-phase::before {
  display: block;
  top: 20px;
  bottom: auto;
  left: 0;
  right: calc(-1 * var(--space-md));
  width: auto;
  height: 1px;
}
.about-history .process-phase:last-child::before { display: none; }
.about-history .process-phase__dot { top: 0; left: 0; }
.about-history .process-phase__head { padding-top: 0; }
.about-history .process-step__num { font-variant-numeric: lining-nums; }
.about-history .process-step__title a,
.about-history .process-step__text a { color: inherit; text-decoration: none; }
.about-history .process-step__title a:hover,
.about-history .process-step__title a:focus-visible,
.about-history .process-step__text a:hover,
.about-history .process-step__text a:focus-visible { color: var(--color-accent); }

/* ---------- Реквизиты ---------- */
.about-page #requisites .requisites { background: var(--color-bg-soft, #f3f1ee); }
@media (max-width: 900px) { .about-person__spot::after { width: 8px; height: 8px; margin-left: -4px; outline-width: 3px; } }

/* Параллакс первого экрана: двигает js/about-hero.js через --hy */
.about-plx .about-hero__scene {
  transform: translate3d(0, var(--hy, 0px), 0) scale(1.06);
  transform-origin: 50% 100%;
  will-change: transform;
}

/* Телефон: сверху крупное фото команды, внизу оно уходит в тёмный цвет,
   и уже на тёмном фоне — заголовок и описание */
@media (max-width: 640px) {
  .about-page .about-hero { aspect-ratio: auto; }
  .about-hero__scene { flex: none; aspect-ratio: auto; height: 118vw; }
  .about-hero__photo { object-position: 50% 80%; }
  .about-page .about-hero::before { display: none; }
  .about-hero__scene::after {
    content: "";
    position: absolute;
    inset: -2px 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg,
      rgb(24 22 20 / 88%) 0%,
      rgb(24 22 20 / 66%) 12%,
      rgb(24 22 20 / 32%) 24%,
      rgb(24 22 20 / 0%) 36%,
      rgb(43 42 41 / 0%) 50%,
      rgb(43 42 41 / 72%) 76%,
      #2b2a29 94%);
  }
  .about-hero__head { position: static; order: 2; margin-top: 0; padding: 8px var(--gutter) 48px; }
  .about-hero__head nav { position: absolute; left: 0; right: 0; top: calc(var(--header-h) + 8px); z-index: 3; }
  .about-hero__head nav .breadcrumbs { padding-inline: var(--gutter); }
  .about-hero .about-hero__title { margin-top: 0; }
  .about-hero .about-hero__title, .about-hero .about-hero__lead { position: relative; z-index: 2; }
}

/* Стрелки листания истории — над лентой, справа */
.about-history-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-md); }
.about-history-head .section__head { margin-bottom: 0; }
.about-history-head .about-history__nav { flex-shrink: 0; margin-top: 0; }
#istoriya .about-history-head + .about-history { margin-top: 56px; }
@media (max-width: 760px) { .about-history-head { align-items: flex-end; gap: 16px; } }

.about-hero .about-hero__cta { margin: 32px 0 0; text-align: center; position: relative; z-index: 2; }
@media (max-width: 760px) { .about-hero .about-hero__cta { margin-top: 24px; } }
