/* 01 · Возможности — аккордеон. Логика — assets/js/components/accordion.js */

.acc {
  margin-top: 72px;
  container-type: inline-size;
}

.acc-row {
  position: relative;
  background: var(--bg);
  display: grid;
  grid-template-columns: 72px minmax(0,1fr) minmax(0,400px) 52px;
  column-gap: 24px;
  align-items: start;
  padding: 34px 0 20px;
  border-top: 1px solid var(--fg28);
}

.acc-row:last-child {
  border-bottom: 1px solid var(--fg28);
}

.acc-num {
  padding-top: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  color: rgba(27,23,20,.7);
  transition: color .45s;
}

.is-open .acc-num {
  color: var(--fg);
}

.acc-wb {
  position: relative;
  min-width: 0;
  font-size: min(152px,11.4cqw);
}

.acc-h {
  font-weight: 900;
  font-size: 1em;
  line-height: .86;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

.acc-btn {
  all: unset;
  display: inline-block;
  cursor: pointer;
  font: inherit;
  color: var(--fg);
  transition: transform .85s var(--e1),color .45s;
}

.acc-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.acc-arr {
  position: absolute;
  left: 0;
  top: .2em;
  width: .42em;
  height: .42em;
  color: var(--acc-t);
  opacity: 0;
  transform: translateX(-.35em);
  transition: opacity .45s,transform .85s var(--e1);
  pointer-events: none;
}

.acc-arr path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4.4;
  stroke-linecap: butt;
}

.acc-arr .hd {
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-miterlimit: 4;
}

.is-open .acc-btn {
  transform: translateX(.58em);
  color: var(--acc-t);
}

.is-open .acc-arr {
  opacity: 1;
  transform: none;
}

@media (hover:hover) {
  .acc-row:not(.is-open):hover .acc-btn {
    transform: translateX(.08em);
  }
}

/* высота панели не анимируется (это пересчёт раскладки всей страницы на каждом кадре — в Safari тормоза и следы от линий):
   строка меняет высоту мгновенно, а сдвинувшиеся блоки плавно доезжают на место через translate (FLIP, см. скрипт).
   Свёрнутая панель скрыта и от скринридеров */
.acc-p {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s,visibility 0s .2s;
}

.acc-p>div {
  min-height: 0;
  overflow: hidden;
}

.acc-pi {
  min-height: 174px;
  padding-top: 6px;
}

.is-open .acc-p {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: opacity .55s var(--e3) .2s,visibility 0s;
}

/* снимок текста сворачивающейся строки: остаётся на месте и гаснет, пока его закрывают соседние строки */
.acc-ghost {
  position: absolute;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity .45s var(--e3);
}

.acc-ic {
  justify-self: end;
  width: 52px;
  height: 52px;
  margin-top: calc(min(152px,11.4cqw) * .4 - 26px);
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(27,23,20,.4);
  display: grid;
  place-items: center;
  color: var(--fg);
  cursor: pointer;
  transition: background-color .45s,color .45s,box-shadow .45s,transform .85s var(--e1);
}

.acc-ic svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

@media (hover:hover) {
  /* на тач-экранах :hover «залипает» после тапа — обводку показываем только при настоящем наведении */
  .acc-row:hover .acc-ic {
    box-shadow: inset 0 0 0 1.5px var(--fg);
  }
}

.acc-row.is-open .acc-ic {
  background: var(--acc);
  color: var(--ink);
  box-shadow: none;
  transform: rotate(135deg);
}

.acc-t {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.2;
}

.acc-d {
  margin-top: 12px;
  font-size: 16.5px;
  line-height: 1.5;
  color: rgba(27,23,20,.86);
}

.acc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.acc-tags li {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(27,23,20,.4);
}

@media (min-width:1181px) and (max-width:1320px) {
  /* раскрытое слово сдвигается на .58em — сужаем колонку описания, чтобы «Стратегия» не обрезалась */
  .acc-row {
    grid-template-columns: 72px minmax(0,1fr) minmax(0,330px) 52px;
  }
}

@media (max-width:1180px) {
  .acc-row {
    grid-template-columns: 56px minmax(0,1fr) 52px;
  }
  .acc-p {
    grid-column: 2 / 3;
    grid-row: 2;
  }
  .acc-pi {
    min-height: 0;
    padding: 14px 0 10px;
  }
  .is-open .acc-p {
    margin-top: 8px;
  }
}

@media (max-width:640px) {
  .acc {
    margin-top: 44px;
  }
  .acc-row {
    grid-template-columns: minmax(0,1fr) 44px;
    padding: 26px 0 16px;
  }
  .acc-num {
    display: none;
  }
  .acc-p {
    grid-column: 1/2;
  }
  .acc-wb {
    font-size: 15.5cqw;
  }
  .acc-ic {
    width: 44px;
    height: 44px;
    margin-top: calc(15.5cqw * .4 - 22px);
  }
}
