/* thealexantonov.tech — /case/ (добавка к landing.css) */

body.page-case main.wrap {
  padding: clamp(40px, 7vw, 72px) 0 clamp(64px, 8vw, 96px);
}
body.page-case .post > .kicker,
body.page-case .post > h1,
body.page-case .post > .date,
body.page-case .post > h2,
body.page-case .post > p,
body.page-case .post > .story-quote,
body.page-case .post > .story-steps {
  max-width: 760px;
}
body.page-case .post h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
body.page-case .post h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.12;
}

/* коротко о кейсе */
.case-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}
.case-facts > div { padding: 18px 20px 0 0; border-right: 1px solid var(--line); }
.case-facts > div + div { padding-left: 20px; }
.case-facts > div:last-child { border-right: 0; }
.case-facts dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.case-facts dd { margin: 6px 0 0; font-size: 16px; line-height: 1.35; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }

/* таймлайн */
.tl {
  margin: 24px 0 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  box-shadow: var(--shadow);
}
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 18px; }
.tl-head b { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.tl-head span { font-size: 13px; color: var(--muted); }
.tl-grid { position: relative; display: grid; grid-template-columns: minmax(150px, 34%) 1fr; column-gap: 20px; row-gap: 0; }
.tl-grid::after {
  content: "";
  position: absolute;
  right: 0;
  top: 22px;
  bottom: 0;
  border-left: 1.5px dashed var(--accent);
  opacity: .5;
}
.tl-axis {
  grid-column: 2;
  position: relative;
  height: 22px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
}
.tl-axis span {
  position: absolute;
  left: var(--x);
  bottom: 6px;
  transform: translateX(-50%);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.tl-axis span:first-child { transform: none; }
.tl-row { display: contents; }
.tl-name { padding: 12px 0; border-top: 1px solid var(--line); }
.tl-axis + .tl-row .tl-name { border-top: 0; }
.tl-name b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.tl-name span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.tl-track {
  position: relative;
  min-height: 56px;
  border-top: 1px solid var(--line);
  background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 14.9%);
}
.tl-axis + .tl-row .tl-track { border-top: 0; }
.tl-bar {
  position: absolute;
  top: 50%;
  left: var(--s);
  width: calc(var(--e) - var(--s));
  height: 14px;
  transform: translateY(-50%);
  border-radius: 7px;
  background: var(--accent-tint);
  border: 1px solid #b7c3ee;
}
.tl-dot {
  position: absolute;
  top: 50%;
  left: var(--x);
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--accent);
  border-radius: 3px;
}
.tl-row.is-offer .tl-name b { color: var(--accent); }
.tl figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); }
/* позиции на оси — классами: CSP сайта блокирует атрибуты style */
.tl-axis .ax-0 { --x: 0%; }
.tl-axis .ax-1 { --x: 14.9%; }
.tl-axis .ax-2 { --x: 29.8%; }
.tl-axis .ax-3 { --x: 44.7%; }
.tl-axis .ax-4 { --x: 59.6%; }
.tl-axis .ax-5 { --x: 74.5%; }
.tl-axis .ax-6 { --x: 89.4%; }
.tl-bar.bar-1 { --s: 0%; --e: 27.7%; }
.tl-bar.bar-2 { --s: 29.8%; --e: 40.4%; }
.tl-bar.bar-3 { --s: 42.6%; --e: 100%; }
.tl-dot.dot-end { --x: 100%; }

/* главный кейс: продуктовый цикл */
.cycle { margin: 24px 0 20px; display: grid; gap: 10px; }
.cycle-in, .cycle-out {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 15px;
  line-height: 1.35;
}
.cycle-in { background: var(--surface); border: 1px solid var(--line); color: var(--body); }
.cycle-out { background: var(--accent-tint); border: 1px solid #b7c3ee; color: var(--ink); font-weight: 600; }
.cycle-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cycle-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cycle-steps em {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

/* результат: сообщение и оффер в сетке главной */
.result-shots { display: grid; gap: 24px; margin: 24px 0 16px; }
.post .shot { margin: 0; }
.post .shot-offer button { background: var(--bg); }
@media (min-width: 900px) {
  .result-shots { grid-template-columns: 1.1fr .9fr; align-items: start; gap: clamp(24px, 4vw, 40px); }
}

/* кому подойдёт */
.post .fits { margin-bottom: 16px; }
@media (min-width: 900px) {
  .post .fits { grid-template-columns: 1fr 1fr; gap: 8px 32px; max-width: none; }
}

/* финальный блок: две кнопки */
.post .final .actions { margin-top: 28px; }
.post .final .hint { margin-top: 14px; color: rgba(255,255,255,.55); }

@media (max-width: 899px) {
  .case-facts { grid-template-columns: 1fr 1fr; }
  .case-facts > div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
  .case-facts > div:nth-child(2n) { border-right: 0; padding-left: 16px; }
  .case-facts > div:nth-child(2n+1) { padding-left: 0; }
  .case-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
  .cycle-steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .tl { padding: 18px 16px 16px; }
  .tl-grid { grid-template-columns: 1fr; }
  .tl-axis { grid-column: 1; }
  .tl-axis span:nth-child(2n) { display: none; }
  .tl-name { padding: 12px 0 4px; }
  .tl-track { min-height: 36px; border-top: 0; }
  .cycle-steps { grid-template-columns: 1fr; }
  .post .final .actions .btn { width: 100%; }
}

/* меню на мобильных уезжает за правый край и растягивает страницу — режем горизонтальный скролл (фикс лучше перенести в landing.css) */
@media (max-width: 899px) { html { overflow-x: clip; } }
