/* Страницы кейсов клиентов (/ti-case, /merch-locals, /merch-bytemakushayet): история кейса с фото и бирками */

.case-article {
  width: 100%;
}

.cs {
  --cs-pad: clamp(16px, 3vw, 70px);
  --cs-gap: clamp(14px, 2vw, 32px);
  --cs-r: clamp(22px, 2.4vw, 32px);
  --cs-blue: #0b6fd6;
  --cs-seam: rgba(30, 144, 255, 0.55);
  box-sizing: border-box;
  width: 100%;
  max-width: 1760px;
  margin-inline: auto;
  padding: clamp(96px, 8vw, 130px) var(--cs-pad) clamp(24px, 4vw, 56px);
  color: #000;
  text-shadow: none;
}

.cs *,
.cs *::before,
.cs *::after {
  box-sizing: border-box;
}

/* Первый экран */
.cs-hero {
  display: grid;
  gap: var(--cs-gap);
  align-items: center;
}

.cs-crumb {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--cs-blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cs .cs-kicker {
  margin: 0 0 8px;
  color: #444;
  font-size: clamp(14px, 0.4vw + 11px, 18px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

.cs h1 {
  margin: 0 0 clamp(12px, 1.5vw, 20px);
  color: #000;
  font-size: clamp(30px, 3.4vw, 58px);
  font-weight: 700;
  line-height: 1.12;
}

.cs h1 strong {
  color: var(--cs-blue);
  font-weight: inherit;
}

.cs-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 clamp(16px, 2vw, 24px);
  padding: 0;
  list-style: none;
}

.cs .cs-facts li {
  position: relative;
  padding: 6px 14px 6px 24px;
  border: 1px solid rgba(11, 111, 214, 0.5);
  border-radius: 4px 999px 999px 4px;
  color: var(--cs-blue);
  font-size: clamp(12px, 0.2vw + 11px, 14px);
  font-weight: 900;
  line-height: 1.3;
}

.cs-facts li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 9px;
  width: 6px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transform: translateY(-50%);
}

.cs .cs-facts li:first-child {
  border-color: var(--cs-blue);
  background: var(--cs-blue);
  color: #fff;
}

.cs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: 2px solid var(--cs-blue);
  border-radius: 12px;
  background: var(--cs-blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  text-shadow: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.cs-btn:hover {
  border-color: #0a5fbb;
  background: #0a5fbb;
}

.cs-btn:focus-visible,
.cs-crumb:focus-visible,
.cs-method summary:focus-visible {
  outline: 2px solid #1e90ff;
  outline-offset: 3px;
}

.cs-btn-ghost {
  background: transparent;
  color: var(--cs-blue);
}

.cs-btn-ghost:hover {
  color: #fff;
}

/* Фото: квадрат 19%, шов снаружи не нужен */
.cs-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 16px);
}

.cs-media img,
.cs-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--cs-r);
  background: #eef0fb;
}

/* Ряды истории */
.cs-row {
  display: grid;
  gap: var(--cs-gap);
  align-items: center;
  margin-top: clamp(32px, 5vw, 80px);
  padding-top: clamp(24px, 3vw, 48px);
  border-top: 2px dashed var(--cs-seam);
}

.cs-copy {
  min-width: 0;
}

.cs h2 {
  margin: 0 0 12px;
  color: #000;
  font-size: clamp(24px, 2.4vw, 40px);
  font-weight: 900;
  line-height: 1.15;
}

.cs h3 {
  margin: clamp(18px, 2vw, 28px) 0 8px;
  color: var(--cs-blue);
  font-size: clamp(17px, 0.6vw + 13px, 22px);
  font-weight: 900;
  line-height: 1.25;
}

.cs p,
.cs li {
  color: #444;
  font-size: clamp(15px, 0.2vw + 14px, 17px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: normal;
}

.cs .cs-copy p {
  margin: 0 0 12px;
}

.cs-copy strong,
.cs-copy b {
  color: #000;
  font-weight: 700;
}

.cs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.cs .cs-list li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px dashed var(--cs-seam);
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

/* Методы нанесения: строки с «Подробнее» */
.cs-methods {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.cs-method {
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.cs-method summary {
  position: relative;
  padding: 16px 58px 16px 20px;
  border-radius: 22px;
  color: #000;
  font-size: clamp(15px, 0.3vw + 14px, 18px);
  font-weight: 900;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.cs-method summary::-webkit-details-marker {
  display: none;
}

.cs-method summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--cs-blue);
  border-radius: 50%;
  color: var(--cs-blue);
  font-size: 20px;
  line-height: 1;
  transform: translateY(-50%);
}

.cs-method[open] summary::after {
  content: "\2212";
}

.cs .cs-method-title {
  display: inline;
  margin: 0;
  color: #000;
  font-size: inherit;
  font-weight: inherit;
}

.cs .cs-method > p {
  margin: 0;
  padding: 0 20px 14px;
}

.cs .cs-after-methods {
  margin-top: clamp(20px, 2.4vw, 32px);
}

/* Призыв в конце */
.cs-final {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: clamp(32px, 5vw, 80px);
  padding: clamp(22px, 3vw, 44px);
  border-radius: clamp(28px, 4vw, 64px);
  background: var(--cs-blue);
}

.cs .cs-final-title {
  margin: 0 0 4px;
  color: #fff;
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 900;
  line-height: 1.15;
}

.cs .cs-final-text {
  margin: 0;
  color: #fff;
}

.cs-final .cs-actions .cs-btn {
  border-color: #fff;
  background: #fff;
  color: var(--cs-blue);
}

.cs-final .cs-actions .cs-btn:hover {
  border-color: #e6f0fc;
  background: #e6f0fc;
}

.cs-final .cs-actions .cs-btn-ghost {
  background: transparent;
  color: #fff;
}

.cs-final .cs-actions .cs-btn-ghost:hover {
  background: #fff;
  color: var(--cs-blue);
}

@media (min-width: 1024px) {
  .cs-hero,
  .cs-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .cs-row-flip .cs-media {
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-btn {
    transition: none;
  }
}
