/* 02 · Кейсы — сетка карточек */

.cases-stat {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cases-stat-v {
  font-weight: 600;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -.02em;
}

.cases-stat-t {
  max-width: 240px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mute);
}

/* ——— кейсы ——— */
.cases {
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  gap: 20px;
  margin-top: 60px;
}

.case {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  padding: 8px;
  border: 1px solid transparent;
  background: linear-gradient(180deg,#101116,#0A0B0E) padding-box,
    linear-gradient(145deg,rgba(255,255,255,.72),rgba(255,255,255,.1) 22%,rgba(255,255,255,.36) 48%,rgba(255,255,255,.06) 72%,rgba(255,255,255,.5)) border-box;
  transition: transform .7s var(--ease),box-shadow .7s;
  min-width: 0;
}

.case:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.95);
}

.c7 {
  grid-column: span 7;
}

.c5 {
  grid-column: span 5;
}

.case-vis {
  position: relative;
  height: 400px;
  border-radius: 19px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
  isolation: isolate;
  container-type: size;
}

/* (без нижней виньетки — макет целиком помещается в кадр) */
.case-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  padding: 28px 24px 22px;
}

.case-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* точка тега стоит у первой строки (а не по центру блока), если тег переносится */
.case-tag {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #A2A7AF;
}

.case-tag i {
  width: 6px;
  height: 6px;
  margin-top: calc(.8em - 3px);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255,77,0,.8);
  flex-shrink: 0;
}

.case-tag s {
  text-decoration: none;
  width: 6px;
  height: 6px;
  margin-top: calc(.8em - 3px);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  flex-shrink: 0;
}

.case-n {
  font: 400 13px/1.4 var(--f-disp);
  letter-spacing: .1em;
  color: #858A93;
  white-space: nowrap;
}

.case-h {
  margin: 4px 0 0;
  font: 600 clamp(24px,2.2vw,30px)/1.12 var(--f-disp);
  letter-spacing: -.015em;
  color: var(--ink2);
}

.case-p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.62;
  color: #AEB2BA;
  max-width: 640px;
}

.case-done {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #8E939C;
  max-width: 640px;
}

.case-done b {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #C7CBD2;
}

.case-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: 14px;
  color: var(--mute);
}

.case-stack {
  font: 400 12px/1.4 var(--f-disp);
  letter-spacing: .12em;
  color: #7E838C;
}

.go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #E9EBEF;
  text-decoration: none;
  font-size: 14px;
  transition: color .25s;
}

.go svg {
  transition: transform .35s var(--ease);
}

.go:hover {
  color: var(--accent2);
}

.go:hover svg {
  transform: translate(2px,-2px);
}

/* плашка растёт вместе с текстом: при переносе строка не вылезает за контур */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1.3;
  color: #EEF0F3;
  border: 1px solid transparent;
  background: linear-gradient(#111216,#111216) padding-box,
    linear-gradient(135deg,rgba(255,255,255,.7),rgba(255,255,255,.1) 45%,rgba(255,255,255,.45)) border-box;
}

.badge svg {
  flex-shrink: 0;
}

@media (max-width:1360px) and (min-width:1181px) {
  /* в паре c7 + c5 тег узкой карточки переносится — резервируем две строки, чтобы заголовки стояли на одной линии */
  .case-meta {
    min-height: 38px;
  }
}

@media (max-width:1180px) {
  .c7,
  .c5 {
    grid-column: span 12;
  }
  .case-vis {
    height: auto;
    aspect-ratio: 16/9.5;
  }
}

@media (max-width:640px) {
  .cases {
    margin-top: 40px;
  }
  .case-vis {
    aspect-ratio: 4/3.4;
  }
  .cases-stat-v {
    font-size: 48px;
  }
  .cases-stat {
    gap: 16px;
  }
  /* телефон: тег кейса укладывается в две строки, а не в три (точка — у первой строки) */
  .case-meta {
    gap: 12px;
  }
  .case-tag {
    letter-spacing: .1em;
  }
}

@media (max-width:400px) {
  .case-tag {
    font-size: 11px;
  }
}

@media (max-width:360px) {
  /* «В реестре отечественного ПО» остаётся в одну строку на 320px */
  .badge {
    padding: 5px 10px;
    gap: 6px;
    font-size: 12px;
  }
}
