/* ── Case Study Page ─────────────────────────────────────────────────────── */

.case-body {
  background-color: #ffffff;
  color: #000000;
}

/* Nav overrides for white page */
.case-body .header {
  background: transparent;
}

.case-body .header::before {
  background: transparent;
  transition: background 0.3s ease;
}

.case-body .header.scrolled::before {
  background: rgba(255, 255, 255, 0.08);
}

.case-body .nav-center {
  background-color: #edeef2;
}

.case-body .nav-item {
  color: #000000;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.case-main {
  padding-top: 224px; /* 124px header + 100px top gap */
  padding-bottom: 120px;
}

.cs-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
}

/* 100px gap between sections */
.cs-section + .cs-section {
  margin-top: 100px;
}

/* Two-column flex row */
.cs-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  word-break: break-word;
}

.cs-col-left {
  width: 488px;
  flex-shrink: 0;
}

/* Right: flexible (for text sections) */
.cs-col-right {
  flex: 1 0 0;
  min-width: 0;
  padding-top: 8px;
}

/* ── Typography ──────────────────────────────────────────────────────────── */

/* Section heading label */
.cs-label {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 64px;
  letter-spacing: -2.75px;
  line-height: 1.0;
  color: #000000;
  margin: 0;
}

/* Hero title */
.cs-title {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 64px;
  letter-spacing: -2.75px;
  line-height: 1.0;
  color: #000000;
  margin: 0;
}

/* Subtitle / body text */
.cs-text {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -1px;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.8);
  margin: 0;
}

.cs-hero-right .cs-text {
  font-size: 32px;
}

/* Pre-wrap text (used in before/after описаниях с разделителем) */
.cs-text-prewrap {
  white-space: pre-wrap;
}

/* Hero right column stacks: subtitle → meta (gap 40px) */
.cs-hero-right {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 8px;
}

/* Meta row */
.cs-meta {
  display: flex;
  gap: 0;
  align-items: center;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 350px;
}

.cs-meta-label {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.5);
  margin: 0;
}

.cs-meta-value {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.8);
  margin: 0;
}

/* Stats */
.cs-stats {
  display: flex;
  gap: 0;
  align-items: center;
}

.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 350px;
}

.cs-stat-value {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 64px;
  letter-spacing: -1px;
  line-height: 1.2;
  color: #f04b23;
  opacity: 0.8;
  margin: 0;
}

.cs-stat-desc {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.8);
  margin: 0;
  max-width: 310px;
}

/* Left column stacks label + text (gap 24px) */
.cs-col-text-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Phone strip (2–3 phones) ────────────────────────────────────────────── */

.cs-phone-strip {
  background-color: #edeef2;
  height: 539px;
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  width: 100%;
  margin-top: 40px;
}

.cs-phone-strip-inner {
  display: flex;
  gap: 32px;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 48px;
}

.cs-phone {
  width: 320px;
  height: 694px;
  border-radius: 40px;
  border: 2px solid rgba(255, 255, 255, 0.04);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

/* ── Single phone panel (808px right column) ─────────────────────────────── */

.cs-phone-panel {
  background-color: #edeef2;
  height: 778px;
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  width: 808px;
  flex-shrink: 0;
}

.cs-phone-single {
  width: 314px;
  height: 682px;
  border-radius: 40px;
  border: 2px solid rgba(255, 255, 255, 0.04);
  object-fit: cover;
  position: absolute;
  left: calc(50% - 3px);
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
}

/* ── Sticky problems scroll ──────────────────────────────────────────────── */

.cs-problems-wrapper {
  height: 300vh;
  position: relative;
}

.cs-problems-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 124px;
  padding-bottom: 28px;
  box-sizing: border-box;
}

.cs-problem-slide {
  position: absolute;
  width: 100%;
  pointer-events: none;
}

.cs-problem-slide .cs-col-left {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.cs-problem-slide .cs-phone-panel {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.cs-problem-slide.active {
  pointer-events: auto;
}

.cs-problem-slide.active .cs-col-left {
  opacity: 1;
  transform: translateY(0);
}

.cs-problem-slide.active .cs-phone-panel {
  opacity: 1;
}

.cs-problem-slide.leaving .cs-col-left {
  opacity: 0;
  transform: translateY(-20px);
}

.cs-problems-sticky .cs-phone-panel {
  height: 740px;
}


/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
  .cs-container { padding: 0 40px; }

  .cs-row { flex-direction: column; }

  .cs-col-left,
  .cs-phone-panel { width: 100%; }

  .cs-phone-panel {
    width: 100%;
    height: 480px;
  }

  .cs-phone-single {
    width: 200px;
    height: 434px;
  }

  .cs-label,
  .cs-title { font-size: 48px; }

  .cs-text,
  .cs-meta-label,
  .cs-meta-value,
  .cs-stat-desc { font-size: 24px; }

  .cs-stat-value { font-size: 48px; }
}

@media (max-width: 768px) {
  .case-main { padding-top: 180px; }

  .cs-container { padding: 0 20px; }

  .cs-section + .cs-section { margin-top: 60px; }

  .cs-label,
  .cs-title { font-size: 36px; letter-spacing: -1.5px; }

  .cs-text,
  .cs-meta-label,
  .cs-meta-value,
  .cs-stat-desc { font-size: 18px; }

  .cs-stat-value { font-size: 40px; }

  .cs-phone-strip { height: 380px; border-radius: 48px; margin-top: 32px; }

  .cs-phone { width: 220px; height: 477px; }

  .cs-phone-strip-inner { gap: 16px; top: 32px; }
}

/* ── Landscape / content image strip ────────────────────────────────────── */

.cs-strip-landscape {
  background-color: #edeef2;
  height: 539px;
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  width: 100%;
  margin-top: 40px;
}

/* ── Small phone (гипотеза 1 style, w205 × h444) ────────────────────────── */

.cs-phone-sm {
  width: 205px;
  height: 444px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.04);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.cs-phone-sm-wrap {
  width: 206px;
  height: 446px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.04);
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  .cs-strip-landscape { height: 280px; border-radius: 48px; }
  .cs-phone-sm, .cs-phone-sm-wrap { width: 140px; height: 304px; }
}

/* ── Scroll reveal ───────────────────────────────────────────────────────── */

.cs-reveal {
  opacity: 0;
  transform: perspective(1200px) translateY(40px);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.15s,
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.cs-reveal.cs-revealed {
  opacity: 1;
  transform: perspective(1200px) translateY(0);
}
