/* ════════════════════════════════════════════
   SECTIONS / ABOUT — АКТ II: тренеры, команда, безопасность
   ═════════════════════════════════════════════ */

/* ── ACT II — Тренеры (editorial) ── */
.coach .story__eyebrow {
  font-size: 12.5px;
}

.coach {
  --coach-gap: clamp(24px, 4vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: var(--coach-gap);
  align-items: center;
  padding: clamp(36px, 5vw, 70px) var(--a-gut);
  max-width: 1500px;
  margin: 0 auto;
}

.coach--flip .coach__media {
  order: 2;
}

.coach__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

/* В блоке с галереей обрезку фото делает внутренняя рамка,
   а сама .coach__media перестаёт клипить — тогда кнопка
   может выйти за правый край фото в зазор между колонками */
.coach__media[data-gallery] {
  overflow: visible;
  aspect-ratio: auto;
}

/* Рамка фото — размеры как в старой версии (ограничение высоты),
   но с сохранением галереи и всех наших улучшений */
.coach__media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: min(720px, 72vh);
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

/* ── Галерея тренера (data-gallery) ──
   Рамка (.coach__media) остаётся прежней: aspect-ratio + overflow.
   Слайды лежат слоями в одной и той же рамке, виден только is-active. */
.coach__media[data-gallery] .coach__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: transform 1600ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 400ms ease;
}

.coach__media[data-gallery] .coach__img.is-active {
  opacity: 1;
}

/* Фото в полный рост — кадрируем по центру, а не по лицу
   (специфичность выше, чем у .coach__img с его center 28%) */
.coach__media[data-gallery] .coach__img--full {
  object-position: center center;
}

/* Кнопка «следующее фото» — белый шеврон в зазоре между фото и текстом,
   ровно по центру зазора при любой ширине экрана (var(--coach-gap)) */
.coach__next {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(calc(var(--coach-gap) / 2 - 50%), -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--white);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
  transition: transform var(--duration-fast), opacity var(--duration-fast);
}

.coach__next:hover {
  transform: translate(calc(var(--coach-gap) / 2 - 50% + 3px), -50%);
}

.coach__next:active {
  transform: translate(calc(var(--coach-gap) / 2 - 50% + 1px), -50%);
  opacity: 0.75;
}

/* Зеркальный вариант для coach--flip (Софья): шеврон < слева от фото,
   ровно в центре зазора между текстом и фото */
.coach__prev {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translate(calc(50% - var(--coach-gap) / 2), -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--white);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
  transition: transform var(--duration-fast), opacity var(--duration-fast);
}

.coach__prev:hover {
  transform: translate(calc(50% - var(--coach-gap) / 2 - 3px), -50%);
}

.coach__prev:active {
  transform: translate(calc(50% - var(--coach-gap) / 2 - 1px), -50%);
  opacity: 0.75;
}

.coach__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: contrast(1.06) saturate(0.82);
  transform: scale(1.05);
  transition: transform 1600ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible .coach__img {
  transform: scale(1);
}

.coach__name {
  font-family: var(--a-display);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.94;
  text-transform: uppercase;
  color: var(--a-ink);
}

.coach__name span {
  color: var(--a-body);
  font-weight: 300;
}

.coach__figure {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 28px 0 22px;
  padding-top: 22px;
  border-top: 1px solid var(--a-line);
}

.coach__figure-num {
  font-family: var(--a-display);
  font-weight: 700;
  font-size: clamp(52px, 6.5vw, 92px);
  line-height: 0.8;
  color: var(--a-accent);
}

/* Длинные подписи (как у Софьи) выравниваем по центру цифры,
   а не по её базовой линии — блок не «съезжает» вниз */
.coach__figure-cap {
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--a-dim);
  max-width: 22ch;
}

.coach__figure-cap--long {
  align-self: center;
}

.coach__facts {
  display: grid;
  gap: 14px;
}

.coach__facts li {
  position: relative;
  padding-left: 20px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--a-body);
}

.coach__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 1px;
  background: var(--a-dim);
}

/* ── Команда — RAVE Boxing Club ── */
.team-row-wrap {
  padding-block: clamp(20px, 3vw, 40px) clamp(50px, 7vw, 90px);
  max-width: 1500px;
  margin: 0 auto;
}

.team-row-wrap .story__eyebrow {
  margin-bottom: clamp(24px, 3.5vw, 40px);
}

.team-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 52px) clamp(20px, 3vw, 36px);
  list-style: none;
}

.team-card {
  width: clamp(140px, 15vw, 200px);
  /* запас снизу и по бокам, чтобы увеличенная карточка не обрезалась
     соседями по вёрстке и не задевала текст под ней */
  margin-bottom: 24px;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top center;
}

.team-card__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 3px;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.75);
  outline: 1px solid rgba(236, 231, 225, 0.1);
  outline-offset: -1px;
}

.team-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.85);
}

.team-card__name {
  margin-top: 12px;
  font-family: var(--a-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--a-ink);
  text-align: center;
}

.team-card__info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 12px 12px;
  background: linear-gradient(to top, rgba(10, 9, 8, 0.92) 20%, rgba(10, 9, 8, 0) 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms ease, transform 320ms ease;
}

.team-card__desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--a-ink);
}

.team-card:hover,
.team-card:focus-within {
  z-index: 5;
  transform: scale(1.5);
}

.team-card:hover .team-card__info,
.team-card:focus-within .team-card__info {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {

  /* На телефоне нет курсора — есть тап. Оставляем то же появление подписи
     по :active/:focus-within, но без укрупнения (чтобы не "прыгало"
     при каждом касании). Полностью статично показать подпись нельзя —
     она физически внутри рамки с overflow:hidden и fixed aspect-ratio. */
  .team-card:hover,
  .team-card:focus-within {
    transform: none;
  }

  .team-card:active .team-card__info,
  .team-card:focus-within .team-card__info {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Безопасность ── */
.safety {
  padding-block: clamp(70px, 10vw, 140px);
  max-width: 1500px;
  margin: 0 auto;
}

.safety__head {
  margin-bottom: clamp(32px, 4vw, 56px);
}

.safety__grid {
  display: grid;
  grid-template-columns: 1fr;
}

.safety__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
}

.safety__list li {
  border-top: 1px solid var(--a-line);
  padding-top: 18px;
}

.safety__list svg {
  width: 26px;
  height: 26px;
  color: var(--a-dim);
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 14px;
}

.safety__list h4 {
  font-family: var(--a-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--a-ink);
  margin-bottom: 8px;
}

.safety__list p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--a-body);
}

