/* Стили страницы кейса (cases/*.html): шапка кейса, метрики, задачи,
   схемы, скриншоты, навигация между кейсами. Подключается после common.css. */

.headRule .idx {
  font-family: var(--fm);
  font-size: 12.5px;
  color: var(--dim);
  letter-spacing: .12em;
  text-transform: uppercase;
  flex-shrink: 0;
  padding-top: 4px;
}

/* ---------- страница кейса ---------- */
.caseHero {
  padding: 34px 0 44px;
}

.crumb {
  font-family: var(--fm);
  font-size: 12.5px;
  color: var(--dim);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.crumb a {
  color: var(--acc-ink);
  text-decoration: none;
}

.crumb a:hover {
  text-decoration: underline;
}

.caseHero h1 {
  font-size: clamp(29px,4.9vw,62px);
  max-width: 19ch;
  margin-top: 18px;
}

.caseHero .lead {
  margin-top: 22px;
}

/* Ссылка на живой продукт: единственное, что клиент может проверить сам. */
.live {
  margin-top: 26px;
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--fm);
  font-size: 13.5px;
}

.live span {
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 1.3px;
  font-size: 11.5px;
}

.live a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--acc);
  padding-bottom: 3px;
}

.live a:hover {
  color: var(--acc-ink);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(var(--mc,4),1fr);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line-2);
}

@media(max-width:880px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width:520px) {
  .metrics {
    grid-template-columns: 1fr;
  }
}

.metrics div {
  padding: 24px 30px 30px;
  border-right: 1px solid var(--line);
}

.metrics div:first-child {
  padding-left: 0;
}

.metrics div:last-child {
  border-right: 0;
  padding-right: 0;
}

@media(max-width:880px) {
  .metrics div:nth-child(odd) {
    padding-left: 0;
  }
  .metrics div:nth-child(even) {
    border-right: 0;
    padding-right: 0;
  }
  .metrics div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media(max-width:520px) {
  .metrics div {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .metrics div:last-child {
    border-bottom: 0;
  }
}

.metrics b {
  display: block;
  font-family: var(--fd);
  font-size: 48px;
  font-weight: 700;
  line-height: .94;
}

/* Значение без цифры – это формулировка, а не метрика: кегль 48 обещал бы число. */
.metrics b.word {
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: .2px;
  padding-top: 16px;
}

@media(max-width:520px) {
  .metrics b.word {
    padding-top: 0;
  }
}

.metrics span {
  display: block;
  font-size: 14.5px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.45;
  max-width: 27ch;
}

.two {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 46px;
  align-items: start;
}

@media(max-width:920px) {
  .two {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.two h3 {
  font-family: var(--fm);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--dim);
  text-transform: uppercase;
  padding-top: 8px;
  line-height: 1.6;
}

.prose p {
  margin: 0 0 16px;
  max-width: 70ch;
  color: var(--ink-2);
}

.prose p:last-child {
  margin: 0;
}

/* Два уровня: слева – что это, справа – чем именно. Отглагольные шапки сняты. */
.tasks {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-2);
}

.tasks li {
  display: grid;
  grid-template-columns: minmax(170px,27%) 1fr;
  gap: 26px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.tasks b {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.tasks span {
  font-size: 17.5px;
  color: var(--muted);
  line-height: 1.5;
}

@media(max-width:700px) {
  .tasks li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Главная работа: там, где в акцентном блоке не осталось ни одной цифры. */
.keyTask {
  margin: 0 0 28px;
  padding: 0 0 0 22px;
  border-left: 5px solid var(--acc);
}

.keyTask b {
  display: block;
  font-family: var(--fd);
  font-size: clamp(24px,2.7vw,36px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: .3px;
  color: var(--ink);
}

.keyTask span {
  display: block;
  margin-top: 12px;
  font-size: 17.5px;
  color: var(--muted);
  max-width: 58ch;
}

/* Группы – только для длинных списков. */
.lay {
  margin: 0 0 34px;
  padding: 0;
}

.lay:last-child {
  margin-bottom: 0;
}

.lay h4 {
  margin: 0 0 8px;
  font-family: var(--fm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--acc-ink);
}

figure.fig {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 28px 26px 20px;
  overflow-x: auto;
}

figure.fig svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 660px;
}

/* Линейка – структура блока, поэтому во всю его ширину. Сам текст оставляем
   в читаемой мере: на всю ширину схемы строка была бы больше ста знаков. */
figure.fig figcaption span {
  display: block;
  max-width: 72ch;
}

.figBlock {
  display: grid;
  gap: 26px;
  margin-top: 34px;
}

.shots {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 22px;
  margin-top: 34px;
}

.shots.one {
  grid-template-columns: 1fr;
}

.shots.phones {
  grid-template-columns: repeat(4,1fr);
}

@media(max-width:900px) {
  .shots.phones {
    grid-template-columns: repeat(2,1fr);
  }
}

.shot.phone img {
  max-width: 380px;
  margin: 0 auto;
}

.shots.phones .shot.phone img {
  max-width: none;
}

.shots.phones figcaption {
  padding: 14px 16px 16px;
  font-size: 13.5px;
}

@media(max-width:820px) {
  .shots {
    grid-template-columns: 1fr;
  }
}

.shot {
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  flex: 1 0 auto;
  object-fit: contain;
  object-position: center;
  background: #FAFBFC;
  border-bottom: 1px solid var(--line);
}

.shot.tall img {
  max-width: 720px;
  margin: 0 auto;
}

.shot figcaption {
  margin: 0;
  padding: 17px 22px 19px;
  border-top: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  max-width: none;
  flex: 0 0 auto;
}

.stackRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stackRow span {
  font-family: var(--fm);
  font-size: 13.5px;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 7px 11px;
}

.next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}

@media(max-width:780px) {
  .next {
    grid-template-columns: 1fr;
  }
}

.next a {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 24px 22px;
  text-decoration: none;
  display: block;
}

.next a:hover {
  border-color: var(--ink);
}

.next span {
  font-family: var(--fm);
  font-size: 11.5px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--dim);
  display: block;
  margin-bottom: 12px;
}

.next b {
  font-family: var(--fd);
  font-size: 27px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
  overflow-wrap: normal;
}

.backLink {
  font-family: var(--fm);
  font-size: 13.5px;
  color: var(--acc-ink);
  text-decoration: none;
  display: inline-block;
  margin-top: 30px;
}

.backLink:hover {
  text-decoration: underline;
}

/* Отступы секций и элементов (раньше были в атрибутах style="" в HTML) */
section.sec-flush {
  padding-top: 0;
}

section.sec-tight {
  padding-top: 0;
  padding-bottom: 44px;
}

section.sec-compact {
  padding-top: 8px;
  padding-bottom: 44px;
}

.tags.tags-spaced {
  margin-top: 16px;
}

.metrics.metrics-1 {
  --mc: 1;
}

.metrics.metrics-2 {
  --mc: 2;
}
