/* Страница «Помощь»: контакты кураторов. Каркас и шапка — как у посадочной (.landing). */

.help__home {
  text-decoration: none;
}

.help__main {
  flex-grow: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 72px;
  /* Обе колонки одной высоты: верх бейджа — по верху карточек, низ панели — по их низу. */
  align-content: center;
  align-items: stretch;
}

/* ---------- Вступление ---------- */
.help__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: help-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}

.help__title {
  margin-top: 28px;
  font-family: var(--font-heading);
  font-size: 64px;
  line-height: 68px;
  font-weight: 700;
  letter-spacing: -.042em;
}

.help__lead {
  margin-top: 24px;
  max-width: 460px;
  margin-bottom: 32px;
  font-size: 19px;
  line-height: 29px;
  color: var(--ink2);
  text-wrap: pretty;
}

/* Общие контакты — тёмная панель, как «Как это работает» на посадочной. */
.help__common {
  margin-top: auto;
  width: 100%;
  padding: 24px 24px 12px;
  border-radius: 28px;
  background: var(--dark);
  color: var(--dark-ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 40px 80px -48px rgba(0, 29, 36, .6);
}

.help__common-cap {
  color: var(--dark-muted);
}

.help__common-list {
  margin-top: 8px;
}

.help__common-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  color: inherit;
  text-decoration: none;
}

li:not(:last-child) > .help__common-row {
  border-bottom: 1px solid var(--dark-line);
}

.help__common-label {
  font-size: 14px;
  color: var(--dark-muted);
}

.help__common-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: color .15s;
}

.help__common-value svg {
  color: var(--emerald);
  flex-shrink: 0;
}

.help__common-row:hover {
  color: inherit;
}

.help__common-row:hover .help__common-value {
  color: #FFFFFF;
  text-decoration: underline;
  text-decoration-color: var(--emerald);
  text-underline-offset: 3px;
}

/* ---------- Карточки кураторов ---------- */
.help__team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.curator {
  display: flex;
  animation: help-rise .55s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(.08s + var(--i, 0) * .08s);
}

.curator__card {
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 29, 36, .04), 0 1px 2px rgba(16, 63, 69, .06);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}

/* Портреты вырезаны из фона и приведены к одному кадру 4:5 (глаза на одной линии,
   лица одного размера) — поэтому фон и пропорции у всех карточек одинаковые. */
.curator__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 80% at 50% 30%, #1B5057 0%, var(--brand-teal) 55%, #0B2F34 100%);
}

/* Линия Emerald под портретом — деликатный акцент, раскрывается при наведении. */
.curator__photo::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--emerald);
  transform: scaleX(.18);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

.curator__photo img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  filter: saturate(.9);
  transform: scale(1);
  transform-origin: 50% 36%;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .6s;
}

/* Порядковый номер, как в референсе, — крупный и почти прозрачный, за портретом. */
.curator__index {
  position: absolute;
  z-index: -1;
  top: 12px;
  left: 20px;
  font-family: var(--font-heading);
  font-size: 96px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
  color: rgba(244, 242, 242, .08);
  transition: color .45s, transform .6s cubic-bezier(.2, .8, .2, 1);
}

.curator__body {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 16px;
}

.curator__role {
  color: var(--ink3);
}

.curator__name {
  margin-top: 6px;
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.curator__actions {
  margin-top: 14px;
  margin-inline: -8px;
  display: flex;
  flex-direction: column;
}

.curator__action {
  min-height: 52px;
  padding: 6px 8px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s;
}

.curator__action:hover {
  color: var(--ink);
  background: var(--panel);
}

.curator__action:active {
  background: var(--emerald-wash);
}

.curator__action-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--emerald-wash);
  color: var(--emerald);
  transition: background-color .15s, color .15s;
}

.curator__action:hover .curator__action-icon {
  background: var(--acc);
  color: var(--on-acc);
}

.curator__action-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.curator__action-label {
  font-size: 12px;
  line-height: 16px;
  color: var(--ink3);
}

.curator__action-value {
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* Оживление карточки — только на устройствах с настоящим наведением. */
@media (hover: hover) {
  .curator__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 0 1px rgba(0, 29, 36, .04), 0 32px 64px -36px rgba(0, 29, 36, .45);
  }

  .curator__card:hover .curator__photo img {
    transform: scale(1.045);
    filter: saturate(1.02);
  }

  .curator__card:hover .curator__photo::after {
    transform: scaleX(1);
  }

  .curator__card:hover .curator__index {
    color: rgba(11, 171, 132, .22);
    transform: translateY(4px);
  }
}

/* Клавиатура: фокус на контакте тоже раскрывает акцент карточки. */
.curator__card:focus-within .curator__photo::after {
  transform: scaleX(1);
}

@keyframes help-rise {
  from { opacity: 0; transform: translateY(14px); }
}

/* ---------- Промежуточные ширины ---------- */
@media (max-width: 1199px) and (min-width: 900px) and (min-height: 501px), (max-width: 1199px) and (min-width: 1025px) {
  .help__main {
    column-gap: 40px;
  }

  .help__title {
    font-size: 48px;
    line-height: 52px;
  }

  .help__team {
    gap: 16px;
  }
}

/* ---------- Телефон ---------- */
/* Телефон; невысокий горизонтальный экран до 1024 px — тоже мобильная раскладка. */
@media (max-width: 899px), (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  .help__main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    padding: 28px 20px 0;
  }

  .help__intro {
    max-width: 560px;
  }

  .help__title {
    margin-top: 20px;
    font-size: 36px;
    line-height: 40px;
    letter-spacing: -.04em;
  }

  .help__lead {
    margin-top: 16px;
    font-size: 17px;
    line-height: 26px;
  }

  /* На телефоне общие контакты — после карточек кураторов. */
  .help__common {
    order: 2;
    max-width: 560px;
    margin-top: 0;
    padding: 20px 20px 8px;
    border-radius: 24px;
  }

  .help__intro {
    display: contents;
  }

  .help__intro > .pill,
  .help__title,
  .help__lead {
    align-self: flex-start;
  }

  .help__intro > .pill {
    height: 28px;
    padding: 0 12px 0 10px;
    border-radius: 14px;
    gap: 7px;
    font-size: 12px;
  }

  .help__title {
    margin-top: -8px;
  }

  .help__lead {
    margin-top: -12px;
    margin-bottom: 0;
  }

  /* Карточки одной высоты (строки сетки 1fr). */
  .help__team {
    order: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    gap: 12px;
    max-width: 560px;
  }

  /* Цифровая визитка: портрет слева на всю высоту карточки (~40% ширины),
     справа — должность, имя и сразу под ним контакты. */
  .curator__card {
    display: grid;
    grid-template-columns: minmax(120px, 38%) minmax(0, 1fr);
    border-radius: 24px;
  }

  .curator__photo {
    aspect-ratio: auto;
    height: 100%;
    min-height: 208px;
  }

  /* Кадр 4:5 шире колонки — срезаются только поля по бокам; голова в верхней трети. */
  .curator__photo img {
    position: absolute;
    inset: 0;
    object-position: 50% 8%;
  }

  .curator__photo::after {
    transform: scaleX(1);
    height: 2px;
  }

  .curator__index {
    display: none;
  }

  .curator__body {
    justify-content: center;
    padding: 16px 10px 12px 14px;
  }

  .curator__role {
    font-size: 11px;
    line-height: 14px;
  }

  .curator__name {
    margin-top: 4px;
    font-size: 19px;
    line-height: 24px;
  }

  .curator__actions {
    margin: 10px 0 0 -6px;
    gap: 2px;
  }

  .curator__action {
    min-height: 48px;
    padding: 4px 6px;
    gap: 8px;
  }

  .curator__action-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .curator__action-label {
    font-size: 11px;
    line-height: 14px;
  }

  .curator__action-value {
    font-size: 14px;
    line-height: 19px;
    overflow-wrap: normal;
  }

  /* Номер и домен не рвутся по дефису; адрес переносится только после «@». */
  .curator__action-value.num,
  .curator__email-part {
    white-space: nowrap;
  }

  .help__footer {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .help__intro,
  .curator {
    animation: none;
  }

  .curator__card,
  .curator__photo img,
  .curator__photo::after,
  .curator__index {
    transition: none;
  }
}

.nowrap {
  white-space: nowrap;
}

/* ---------- Невысокий горизонтальный экран (телефон боком) ----------
   Карточки кураторов — в две колонки, шапка и заголовок компактнее. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  .help__header {
    height: 56px;
    padding: 12px 24px 0;
  }

  .help__header .logo {
    height: 36px;
  }

  .help__main {
    padding: 16px 24px 0;
    gap: 24px;
  }

  .help__title {
    font-size: 30px;
    line-height: 34px;
  }

  .help__team,
  .help__common {
    max-width: none;
  }

  .help__team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .curator__card {
    grid-template-columns: minmax(128px, 38%) minmax(0, 1fr);
  }

  .curator__photo {
    min-height: 196px;
  }

  .help__common .help__common-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }

  .help__common li:not(:last-child) > .help__common-row {
    border-bottom: 0;
  }
}

/* ---------- Телефон вертикально: компактная визитка ----------
   Фото уже (~29% ширины), карточка ниже, справа больше места — номер и адрес в одну строку. */
@media (max-width: 599px) and (orientation: portrait) {
  .curator__card {
    grid-template-columns: 96px minmax(0, 1fr);
    border-radius: 20px;
  }

  .curator__photo {
    min-height: 0;
  }

  .curator__photo img {
    object-position: 50% 6%;
  }

  .curator__body {
    padding: 12px 8px 10px 14px;
  }

  .curator__role {
    font-size: 10px;
    line-height: 13px;
    letter-spacing: .05em;
  }

  .curator__name {
    margin-top: 2px;
    font-size: 17px;
    line-height: 22px;
  }

  .curator__actions {
    margin: 6px 0 0 -4px;
    gap: 0;
  }

  .curator__action {
    min-height: 42px;
    padding: 3px 4px;
    gap: 8px;
    border-radius: 10px;
  }

  .curator__action-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }

  .curator__action-icon svg {
    width: 14px;
    height: 14px;
  }

  .curator__action-label {
    font-size: 10px;
    line-height: 12px;
  }

  .curator__action-value {
    font-size: 13px;
    line-height: 17px;
    letter-spacing: -.005em;
  }
}
