/* Editorial layout для детальных кейсов /pages/cases/*.
   Long-form journal-стиль: крупная типография, drop cap, pull quotes,
   marginalia на полях, асимметричный hero. Подключается рядом с
   colors_and_type.css. Класс-якорь: .ce (case-editorial). */

.ce-page {
  background: #fff;
  color: var(--navy-900);
}

/* ==================== HERO ==================== */
.ce-hero {
  position: relative;
  background: var(--navy-900);
  color: #fff;
  padding: 96px 0 72px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ce-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 30% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, black 30%, transparent 80%);
}
.ce-hero__inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.ce-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  margin-bottom: 32px;
}
.ce-hero__eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: rgba(255,255,255,0.4);
}
.ce-hero__title {
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  color: #fff;
  margin: 0 0 28px;
  max-width: 960px;
}
.ce-hero__lead {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
  max-width: 720px;
  margin: 0;
  font-weight: 400;
}
.ce-hero__meta {
  display: flex; gap: 32px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 13px;
  color: rgba(255,255,255,0.62);
  letter-spacing: 0.04em;
}
.ce-hero__meta b { color: #fff; font-weight: 500; }

/* ==================== STATS STRIP ==================== */
.ce-stats {
  background: var(--navy-900);
  padding: 0 0 72px;
  color: #fff;
}
.ce-stats__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.ce-stats__item {
  padding: 32px 24px 0 0;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.ce-stats__item:last-child { border-right: 0; padding-right: 0; }
.ce-stats__num {
  font-size: clamp(36px, 3.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.ce-stats__num-unit {
  font-size: 0.4em;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
  margin-left: 6px;
  letter-spacing: 0;
}
.ce-stats__label {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* ==================== ARTICLE ==================== */
.ce-article {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 32px 64px;
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.ce-article__main {
  font-size: 19px;
  line-height: 1.7;
  color: var(--navy-900);
}
.ce-article__main h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 64px 0 24px;
  position: relative;
  padding-top: 32px;
}
.ce-article__main h2::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 48px; height: 2px;
  background: var(--brand-red);
}
.ce-article__main h2:first-child { margin-top: 0; }
.ce-article__main p {
  margin: 0 0 22px;
}
/* Drop cap на ПЕРВОМ параграфе после первого h2 (или первом параграфе main) */
.ce-article__main > p:first-child::first-letter,
.ce-article__main h2:first-child + p::first-letter {
  font-size: 64px;
  font-weight: 500;
  float: left;
  line-height: 0.9;
  margin: 4px 12px 0 0;
  color: var(--brand-red);
  letter-spacing: -0.04em;
}
.ce-article__main ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.ce-article__main ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}
.ce-article__main ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 14px;
  width: 16px; height: 1px;
  background: var(--navy-600);
}

/* Pull quote — большая выноска внутри текста */
.ce-pullquote {
  margin: 48px -32px;
  padding: 32px 0 32px 64px;
  border-left: 3px solid var(--brand-red);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--navy-900);
  font-style: italic;
}
.ce-pullquote::before {
  content: "« ";
  color: var(--brand-red);
  font-style: normal;
}
.ce-pullquote::after {
  content: " »";
  color: var(--brand-red);
  font-style: normal;
}
.ce-pullquote-source {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-500);
}

/* ==================== MARGINALIA (правая колонка) ==================== */
.ce-article__aside {
  position: sticky;
  top: 100px;
  font-size: 14px;
  line-height: 1.5;
}
.ce-aside-card {
  padding: 24px;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  margin-bottom: 16px;
}
.ce-aside-card__eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--navy-600);
  margin-bottom: 12px;
}
.ce-aside-card__title {
  font-size: 17px; font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--navy-900);
  margin-bottom: 12px;
  line-height: 1.3;
}
.ce-aside-card__body {
  color: var(--grey-700);
  font-size: 14px;
  line-height: 1.55;
}
.ce-aside-card__big {
  font-size: 36px; font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin: 8px 0 6px;
}
.ce-aside-card__big-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--grey-500);
  margin-left: 6px;
  letter-spacing: 0;
}

/* ==================== KEY RESULT BAND ==================== */
.ce-result {
  background: linear-gradient(180deg, #fff 0%, var(--navy-100) 100%);
  padding: 80px 0;
  border-top: 1px solid var(--grey-200);
}
.ce-result__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.ce-result__eyebrow {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand-red);
  margin-bottom: 18px;
}
.ce-result__title {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 500;
  color: var(--navy-900);
  margin: 0;
}
.ce-result__body p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--grey-700);
  margin: 0 0 14px;
}
.ce-result__body p:last-child { margin: 0; }

/* ==================== CTA BAND ==================== */
.ce-cta {
  background: var(--navy-900);
  color: #fff;
  padding: 64px 0;
}
.ce-cta__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.ce-cta__h {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  color: #fff;
}
.ce-cta__sub {
  margin: 0;
  font-size: 16px;
  color: rgba(255,255,255,0.62);
  line-height: 1.5;
  max-width: 540px;
}
.ce-cta__btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--brand-red);
  color: #fff !important;
  padding: 16px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: transform 200ms, box-shadow 200ms;
}
.ce-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(200,16,46,0.5);
}

/* ==================== RELATED CASES ==================== */
.ce-related {
  padding: 56px 0 32px;     /* было 72/72 — снизу слишком много пустоты до футера */
  border-top: 1px solid var(--grey-200);
}
.ce-related__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.ce-related__h {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin: 0 0 28px;
}
.ce-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ce-related__card {
  display: block;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  text-decoration: none;
  color: var(--navy-900);
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.ce-related__card:hover {
  border-color: var(--navy-600);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px rgba(19,64,116,0.18);
}
.ce-related__card-year {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand-red);
  margin-bottom: 12px;
}
.ce-related__card-title {
  font-size: 19px; font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 16px;
}
.ce-related__card-meta {
  font-size: 13px;
  color: var(--grey-500);
  display: flex; gap: 14px;
  font-variant-numeric: tabular-nums;
}

/* ==================== MOBILE ==================== */
@media (max-width: 1023px) {
  .ce-hero { padding: 64px 0 48px; }
  .ce-stats__inner {
    grid-template-columns: 1fr 1fr;
  }
  .ce-stats__item {
    padding: 24px 18px 0 0;
    border-right: 1px solid rgba(255,255,255,0.08);
  }
  .ce-stats__item:nth-child(2n) { border-right: 0; padding-right: 0; }
  .ce-stats__item:nth-child(3),
  .ce-stats__item:nth-child(4) {
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 8px;
  }
  .ce-article {
    grid-template-columns: 1fr;
    padding: 64px 24px 48px;
    gap: 48px;
  }
  .ce-article__aside { position: static; }
  .ce-pullquote {
    margin: 36px 0;
    padding: 24px 0 24px 24px;
  }
  .ce-result__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ce-related__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .ce-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 480px) {
  .ce-hero__title { font-size: 36px; }
  .ce-article__main { font-size: 17px; }
  .ce-article__main > p:first-child::first-letter,
  .ce-article__main h2:first-child + p::first-letter {
    font-size: 52px;
  }
}
