/* ═══ Кейсы — горизонтальная карусель ═══ */

.cases {
  --title-w: 24ch;
  --title-mb: 56px;
  padding: var(--sec-pad) 0;
}

/* Заголовок выравнивается по левому краю контента, а трек уходит за край экрана */
.cases__head {
  padding-left: max(var(--gutter), calc((100vw - var(--content-w)) / 2));
  padding-right: var(--gutter);
}

.cases__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 0 max(var(--gutter), calc((100vw - var(--content-w)) / 2));
  scroll-padding-left: max(var(--gutter), calc((100vw - var(--content-w)) / 2));
  cursor: grab;
}
.cases__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.case {
  flex: 0 0 auto;
  width: min(560px, 84vw);
  scroll-snap-align: start;
}

.case__cover {
  aspect-ratio: 16 / 10;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.case__cover--mock { background: linear-gradient(150deg, #1b1b1b, #101010); }
.case__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case__body { margin-top: 22px; }

.case__tag {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sub);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 4px 9px;
}

.case__title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.25;
}

.case__desc {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--sub);
}

.case__metrics {
  display: flex;
  gap: 36px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.case__metric-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.case__metric-label {
  font-size: 12px;
  color: var(--sub);
  margin-top: 4px;
}

/* Прогресс — тонкая линия, а не точки */
.cases__footer {
  max-width: var(--content-w);
  margin: 44px auto 0;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 20px;
}
.cases__rail {
  flex: 1;
  height: 1px;
  background: var(--line);
  position: relative;
}
.cases__progress {
  position: absolute;
  top: -.5px;
  left: 0;
  height: 2px;
  width: 20%;
  background: var(--fg);
  transition: width .12s linear;
}
.cases__hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sub);
  white-space: nowrap;
}

/* ─── Мокапы обложек кейсов ─── */

.shot { position: absolute; inset: 0; }
.shot__chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 34px;
  background: #0d0d0d;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}
.shot__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.shot__url {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: #5a5a5a;
}
.shot__body {
  position: absolute;
  top: 34px; left: 0; right: 0; bottom: 0;
  padding: 26px;
}

.shot__body--rows { display: flex; flex-direction: column; gap: 9px; }
.shot__label { height: 10px; width: 38%; background: #2f2f2f; border-radius: 2px; margin-bottom: 6px; }
.shot__row { height: 26px; background: #191919; border: 1px solid var(--line); border-radius: 3px; }

.shot__body--split { display: flex; gap: 12px; }
.shot__chart {
  flex: 0 0 34%;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 14px;
}
.shot__bar { flex: 1; border-radius: 2px; background: #333; }
.shot__bar--2 { height: 64%; background: #444; }
.shot__bar--1 { height: 38%; }
.shot__bar--3 { height: 88%; background: #e0e0e0; }
.shot__bar--4 { height: 52%; }
.shot__list { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.shot__list-row { height: 24px; background: #191919; border: 1px solid var(--line); border-radius: 3px; }

.shot__body--flow { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.shot__nodes { display: flex; align-items: center; gap: 14px; }
.shot__node { width: 56px; height: 56px; border: 1px solid #3a3a3a; border-radius: 6px; }
.shot__node--active { border-color: #e0e0e0; }
.shot__wire {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, #3a3a3a 0 6px, transparent 6px 12px);
}
.shot__caption { height: 10px; width: 60%; background: #242424; border-radius: 2px; margin: 0 auto; }

.shot__body--tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}
.shot__tile { background: #191919; border: 1px solid var(--line); border-radius: 4px; }
.shot__tile--active { background: #1f1f1f; border-color: #3a3a3a; }
