/* ═══════════════════════════════════════════════════════════════
   Cases section — реализованные объекты HELIX PRO
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tab strip ─────────────────────────────────────────────── */
.cases-tabs {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 32px;
  padding: 6px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--color-border-1);
}
.cases-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: background 160ms;
  min-width: 0;
}
.cases-tab:hover { background: #F5F5F4; }
.cases-tab.active { background: #0A0A0A; }
.cases-tab.active .cases-tab-num,
.cases-tab.active .cases-tab-title { color: #fff; }
.cases-tab.active .cases-tab-place { color: #B5B5B5; }
.cases-tab.active .cases-tab-num { background: #E3421F; color: #fff; }
.cases-tab-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: #F5F5F4;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font: 900 12px var(--font-family-sans);
  color: #0A0A0A;
  letter-spacing: -0.01em;
  transition: all 160ms;
}
.cases-tab-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cases-tab-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #0A0A0A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.cases-tab-place {
  font-size: 10.5px;
  color: var(--color-fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* ─── Case shell — 2 columns ────────────────────────────────── */
.case-shell {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ─── Photos column ─────────────────────────────────────────── */
.case-photos { display: flex; flex-direction: column; gap: 12px; }

.case-photo-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #2E2E2E;
  cursor: zoom-in;
  transition: transform 280ms;
}
.case-photo-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.case-photo-hero:hover img { transform: scale(1.03); }

.case-photo-badge {
  position: absolute;
  top: 18px; left: 18px;
  background: #E3421F;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
}
.case-photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.92), transparent 80%);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 32px 20px 18px;
  line-height: 1.4;
  z-index: 2;
}
.case-photo-zoom {
  position: absolute;
  top: 18px; right: 18px;
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 200ms;
  z-index: 2;
}
.case-photo-hero:hover .case-photo-zoom { opacity: 1; }

.case-photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.case-photo-thumb {
  aspect-ratio: 1/1;
  border-radius: 6px;
  overflow: hidden;
  background: #2E2E2E;
  cursor: zoom-in;
  position: relative;
  transition: transform 200ms;
}
.case-photo-thumb:hover { transform: translateY(-2px); }
.case-photo-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95);
}

/* Empty state */
.case-photos-empty {
  border: 1.5px dashed var(--color-border-2);
  background: #fff;
  border-radius: 12px;
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  color: var(--color-fg-3);
}
.case-photos-empty-num {
  font-size: 64px;
  font-weight: 900;
  color: #E3421F;
  opacity: 0.20;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}
.case-photos-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-fg-2);
  letter-spacing: -0.005em;
}
.case-photos-empty-sub {
  font-size: 13px;
  line-height: 1.55;
  max-width: 280px;
}

/* ─── Content column ────────────────────────────────────────── */
.case-content { display: flex; flex-direction: column; gap: 26px; }

.case-head { display: flex; flex-direction: column; gap: 12px; }
.case-type-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.case-num {
  font-size: 14px;
  font-weight: 900;
  color: #E3421F;
  letter-spacing: 0.04em;
}
.case-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg-3);
}
.case-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.018em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
.case-meta-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.case-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-fg-2);
}
.case-meta-item svg { color: var(--color-fg-3); }
.case-object {
  font-size: 14px;
  color: var(--color-fg-2);
  font-style: italic;
  border-left: 2px solid var(--color-border-1);
  padding-left: 12px;
  margin-top: 4px;
}

/* Stats triple */
.case-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 22px 0;
  border-top: 1px solid var(--color-border-1);
  border-bottom: 1px solid var(--color-border-1);
}
.case-stat { display: flex; flex-direction: column; gap: 6px; }
.case-stat-num {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.022em;
  line-height: 1;
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
  text-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-stat-unit {
  font-size: 14px;
  color: var(--color-fg-3);
  font-weight: 500;
  margin-left: 3px;
}
.case-stat-label {
  font-size: 11.5px;
  color: var(--color-fg-3);
  line-height: 1.4;
}

/* Block sections */
.case-block { display: flex; flex-direction: column; gap: 8px; }
.case-block-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #E3421F;
}
.case-soil {
  font-size: 14.5px;
  color: var(--color-fg-1);
  font-weight: 500;
}
.case-challenge {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-fg-2);
  margin: 0;
  text-wrap: pretty;
}

.case-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-details li {
  font-size: 14px;
  color: var(--color-fg-2);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.45;
}

/* Quote from прораб */
.case-quote {
  background: #0A0A0A;
  color: #fff;
  border-radius: 10px;
  padding: 26px 28px 22px;
  margin: 0;
  position: relative;
  overflow: hidden;
}
.case-quote-mark {
  position: absolute;
  top: -12px;
  right: 18px;
  font-size: 84px;
  color: #E3421F;
  font-weight: 900;
  line-height: 1;
  opacity: 0.5;
}
.case-quote p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.55;
  color: #fff;
  font-weight: 500;
  position: relative;
  z-index: 1;
}
.case-quote footer {
  font-size: 11.5px;
  color: #808080;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Bottom strip */
.cases-bottom {
  margin-top: 40px;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid var(--color-border-1);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cases-bottom-counter {
  font-size: 13px;
  color: var(--color-fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.cases-bottom-counter span {
  color: #E3421F;
  font-size: 24px;
  font-weight: 900;
  margin-right: 4px;
  letter-spacing: -0.02em;
}
.cases-bottom-stat {
  font-size: 15px;
  color: var(--color-fg-2);
  font-weight: 500;
}
.cases-bottom-stat b { color: #0A0A0A; font-weight: 800; }

/* ─── Lightbox ──────────────────────────────────────────────── */
.case-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.94);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 80px;
  animation: fadeIn 200ms;
}
.case-lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
}
.case-lightbox-close:hover { background: rgba(255,255,255,0.16); }

.case-lightbox-inner {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: scaleIn 240ms cubic-bezier(0.2,0.8,0.2,1);
}
.case-lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.case-lightbox-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-align: center;
  max-width: 800px;
}
.case-lightbox-counter {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E3421F;
}
.case-lightbox-caption {
  font-size: 15px;
  color: #fff;
  font-weight: 500;
  line-height: 1.5;
}

.case-lightbox-nav {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 160ms;
}
.case-lightbox-nav:hover { background: rgba(255,255,255,0.18); }
.case-lightbox-nav.prev { left: 24px; }
.case-lightbox-nav.next { right: 24px; }
.case-lightbox-nav svg { width: 22px; height: 22px; }
