/* =====================================================================
   КЕЙС «ДАЧНЫЙ ОТВЕТ» (01.11.2026) — страница проекта
   /projects/dachnyy-otvet-semeynaya-gostinaya/ (app/case_study.php).
   Только токены и шрифты сайта (src/draft-5.html): страница перекрашивается
   в тёмной теме вместе с сайтом. Префикс .cs-.
   Ковёр — главный объект: крупные кадры, оформление сдержанное, без декора.
   ===================================================================== */

.cs { overflow-x: clip; }
.cs [id] { scroll-margin-top: calc(var(--nav-h, 81px) + 18px); }
.cs-sec { padding-block: clamp(72px, 8.4vw, 140px); }

.cs-h2 {
  font-family: 'Prata', 'Times New Roman', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 1.18rem + 2.7vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -.018em;
  text-wrap: balance;
  color: var(--ink);
}

.cs-prose p { color: var(--ink-2); max-width: 62ch; }
.cs-prose p + p { margin-top: 1em; }

.cs-link {
  display: inline-flex;
  align-items: baseline;
  gap: .45em;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .32em;
  text-decoration-color: var(--line);
  transition: color .3s var(--ease), text-decoration-color .3s var(--ease);
}
.cs-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.cs-link--quiet { font-weight: 500; color: var(--ink-2); }
.cs-link--on-deep { color: var(--on-deep); text-decoration-color: var(--line-deep); }
.cs-link--on-deep:hover { color: var(--on-deep); text-decoration-color: var(--gold); }

/* Снимок, который открывается крупно */
.cs-zoom {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
  cursor: zoom-in;
  background: var(--img-fallback);
}
.cs-zoom:focus-visible { outline-offset: -3px; outline-color: var(--on-photo); box-shadow: inset 0 0 0 5px var(--focus); }
.cs-zoom picture, .cs-zoom img { display: block; width: 100%; height: auto; }
.cs-zoom__ico {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(var(--scrim), .46);
  color: var(--on-photo);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.cs-zoom:hover .cs-zoom__ico, .cs-zoom:focus-visible .cs-zoom__ico { opacity: 1; transform: none; }
@media (hover: none) { .cs-zoom__ico { opacity: .9; transform: none; width: 34px; height: 34px; right: 10px; bottom: 10px; } }

/* Кадр «оседает» при появлении: лёгкий отъезд масштаба, только transform — без сдвига вёрстки */
.cs-media .cs-zoom img { transform: scale(1.045); transition: transform 1.5s var(--ease-out); }
.cs-media.is-in .cs-zoom img { transform: none; }
.cs-media .cs-zoom:hover img { transform: scale(1.012); transition-duration: .9s; }

.cs-media figcaption {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-top: 12px;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.cs-media figcaption::before {
  content: "";
  flex: none;
  width: 22px;
  height: 1px;
  background: var(--gold);
  transform: translateY(-.28em);
}

/* ---------------------------------------------------------------------
   A. Первый экран — редакционный разворот: текст слева, кадр до края справа
   --------------------------------------------------------------------- */
.cs-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: clamp(560px, calc(100svh - var(--nav-h, 81px)), 940px);
  background: var(--bg);
}
.cs-hero__text {
  display: flex;
  flex-direction: column;
  padding-block: clamp(20px, 2.4vw, 36px) clamp(26px, 3vw, 46px);
  padding-inline: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad))) clamp(28px, 4.2vw, 76px);
}
.cs-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .8rem; line-height: 1.4; color: var(--ink-2); }
.cs-crumbs li + li::before { content: "/"; margin-inline: .6em; color: var(--line); }
.cs-crumbs a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
.cs-crumbs a:hover { color: var(--accent); }
.cs-crumbs [aria-current] { color: var(--ink); }

.cs-kicker {
  margin-top: auto;
  padding-top: clamp(28px, 4vw, 56px);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.cs-h1 { margin-top: clamp(18px, 2vw, 28px); }
.cs-h1__pre {
  display: block;
  margin-bottom: .7em;
  font-family: 'Onest', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, .92rem + .36vw, 1.24rem);
  line-height: 1.35;
  letter-spacing: .005em;
  color: var(--ink-2);
}
.cs-h1__main {
  display: block;
  font-size: clamp(2.6rem, 1.15rem + 3.9vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -.026em;
  text-wrap: balance;
}
/* открывающая кавычка висит за полем — буквы начинаются по одной линии с текстом; только там, где поле широкое */
@media (min-width: 1100px) { .cs-h1__main { text-indent: -.4em; } }
.cs-hero__lede {
  margin-top: clamp(20px, 2.2vw, 32px);
  max-width: 34ch;
  font-size: clamp(1.04rem, .98rem + .3vw, 1.22rem);
  line-height: 1.55;
  color: var(--ink-2);
}
.cs-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 28px;
  margin-top: clamp(26px, 3vw, 42px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.cs-date { display: flex; gap: .8em; align-items: baseline; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .92rem; color: var(--ink); }
.cs-date span { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.cs-hero__links { display: flex; flex-wrap: wrap; gap: 10px 26px; }

.cs-toc { margin-top: auto; padding-top: clamp(28px, 4vw, 56px); }
.cs-toc ol { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .84rem; }
.cs-toc a { color: var(--ink-2); text-decoration: none; transition: color .25s var(--ease); }
.cs-toc a:hover { color: var(--accent); }

/* Ковёр во всех кадрах выпуска — в нижней четверти. Кадр слегка приближен к нижнему краю: ковёр поднимается в
   поле зрения, потолок уходит. Приближение небольшое — исходник 1248 px; с оригиналами редакции его можно усилить. */
.cs-hero__media { position: relative; min-height: 100%; --cs-zoom: 1.16; }
.cs-hero__media .cs-zoom { position: absolute; inset: 0; }
.cs-hero__media picture, .cs-hero__media img { width: 100%; height: 100%; }
.cs-hero__media img { object-fit: cover; object-position: 46% 100%; transform: scale(var(--cs-zoom)); transform-origin: 46% 100%; }

/* Появление первого экрана: строки поднимаются по очереди, кадр мягко отъезжает — только transform и opacity */
@keyframes cs-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cs-settle { from { transform: scale(calc(var(--cs-zoom, 1) * 1.06)); } to { transform: scale(var(--cs-zoom, 1)); } }
.cs-hero__text > * { animation: cs-rise .9s var(--ease-out) both; }
.cs-hero__text > :nth-child(2) { animation-delay: .08s; }
.cs-hero__text > :nth-child(3) { animation-delay: .16s; }
.cs-hero__text > :nth-child(4) { animation-delay: .26s; }
.cs-hero__text > :nth-child(5) { animation-delay: .34s; }
.cs-hero__text > :nth-child(6) { animation-delay: .42s; }
.cs-hero__media img { animation: cs-settle 1.8s var(--ease-out) both; }

/* ---------------------------------------------------------------------
   Общие пары «подпись — значение» (факты результата, роли ковра)
   --------------------------------------------------------------------- */
.cs-res__facts dt, .cs-flow__n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------------
   B. Результат — ковёр целиком, самый крупный кадр страницы
   --------------------------------------------------------------------- */
.cs-res { padding-top: clamp(64px, 7vw, 120px); }
.cs-res__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(28px, 3.6vw, 56px);
}
.cs-res__lede { color: var(--ink-2); max-width: 46ch; }
.cs-res__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 56px);
  margin-top: clamp(36px, 4.4vw, 64px);
}
.cs-res__facts > div { padding-block: 14px 18px; border-top: 1px solid var(--line); }
.cs-res__facts dd { margin: 6px 0 0; font-size: .98rem; line-height: 1.45; color: var(--ink); }

/* ---------------------------------------------------------------------
   C. Задача архитектора — текст держится, справа архитектура и роли ковра
   --------------------------------------------------------------------- */
.cs-task { background: var(--surface); }
.cs-task__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 120px);
  align-items: start;
}
.cs-task__text { position: sticky; top: calc(var(--nav-h, 81px) + 40px); }
.cs-task__lede {
  margin: .75em 0 1.1em;
  font-family: 'Prata', 'Times New Roman', Georgia, serif;
  font-size: clamp(1.28rem, 1rem + .95vw, 1.95rem);
  line-height: 1.4;
  letter-spacing: -.008em;
  color: var(--ink);
}
.cs-roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(32px, 3.6vw, 52px);
}
.cs-roles > div { padding-block: 14px 18px; border-top: 1px solid var(--line); }
.cs-roles dt {
  font-family: 'Prata', 'Times New Roman', Georgia, serif;
  font-size: clamp(1.1rem, 1rem + .35vw, 1.3rem);
  line-height: 1.25;
  color: var(--ink);
}
.cs-roles dd { margin: 4px 0 0; font-size: .92rem; line-height: 1.5; color: var(--ink-2); }

/* ---------------------------------------------------------------------
   D. Два характера одной фактуры — высокий крупный план, переход ворса, край в свете
   Контраст масштабов: вертикальный кадр в полстраницы, рядом — меньший и ниже, затем широкая полоса.
   --------------------------------------------------------------------- */
.cs-h2--xl {
  font-size: clamp(2.5rem, 1.2rem + 4.4vw, 5.6rem);
  line-height: 1.0;
  letter-spacing: -.028em;
}
.cs-tex__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(40px, 5.4vw, 88px);
}
.cs-tex__lede { color: var(--ink-2); max-width: 42ch; }
.cs-tex__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 3.6vw, 64px);
  align-items: start;
}
.cs-tex__right { display: grid; gap: clamp(36px, 4.4vw, 72px); padding-top: clamp(0px, 12vw, 200px); }
.cs-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(20px, 3vw, 48px);
}
.cs-parts > div { padding-top: 16px; border-top: 1px solid var(--line); }
.cs-parts dt {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Prata', 'Times New Roman', Georgia, serif;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.2rem);
  line-height: 1.1;
  color: var(--ink);
}
/* Знак рядом со словом — сама разница фактур: ровная линия поля и рваная линия края */
.cs-parts dt::after {
  content: "";
  width: 42px;
  height: 10px;
  flex: none;
  background: no-repeat center / 42px 10px;
}
.cs-parts > div:first-child dt::after { background-image: linear-gradient(var(--gold), var(--gold)); background-size: 42px 1.5px; }
.cs-parts > div:last-child dt::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 10'%3E%3Cpath d='M0 6 L3 3 L5 7 L8 2 L10 6 L13 1 L15 7 L18 3 L21 8 L23 2 L26 6 L28 3 L31 8 L33 2 L36 6 L38 3 L42 7' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") center / 42px 10px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 10'%3E%3Cpath d='M0 6 L3 3 L5 7 L8 2 L10 6 L13 1 L15 7 L18 3 L21 8 L23 2 L26 6 L28 3 L31 8 L33 2 L36 6 L38 3 L42 7' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") center / 42px 10px no-repeat;
  background: var(--gold);
}
.cs-parts dd { margin: 10px 0 0; font-size: .95rem; line-height: 1.55; color: var(--ink-2); }

/* широкая полоса: край в дневном свете, кадр подрезан по высоте — читается контур, а не мебель */
.cs-tex__light { width: 82%; margin: clamp(56px, 7vw, 120px) 0 0 auto; }
.cs-tex__light .cs-zoom { aspect-ratio: 2.1 / 1; }
.cs-tex__light .cs-zoom picture, .cs-tex__light .cs-zoom img { height: 100%; }
.cs-tex__light .cs-zoom img { object-fit: cover; object-position: 50% 68%; }

/* ---------------------------------------------------------------------
   E. Ручное производство — шаги по линии; фото процесса (если есть) — лентой над шагами
   --------------------------------------------------------------------- */
.cs-prod { background: var(--bg-2); }
.cs-prod__head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(44px, 5.4vw, 88px);
}
.cs-prod__lede { color: var(--ink-2); max-width: 46ch; }
.cs-prod__photos {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: clamp(16px, 2.4vw, 36px);
  align-items: start;
  margin-bottom: clamp(44px, 5vw, 80px);
}
.cs-prod__ph--2 { margin-top: clamp(0px, 6vw, 96px); }
.cs-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 clamp(16px, 2.2vw, 36px);
  border-top: 1px solid var(--line);
}
.cs-flow li { position: relative; padding-top: 30px; }
/* точка этапа на общей линии */
.cs-flow li::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1.5px var(--gold);
}
.cs-flow__n { display: block; color: var(--gold-ink); }
.cs-flow h3 {
  margin: 10px 0 8px;
  font-family: 'Prata', 'Times New Roman', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.15rem, 1rem + .5vw, 1.45rem);
  line-height: 1.2;
  color: var(--ink);
}
.cs-flow p { font-size: .93rem; line-height: 1.55; color: var(--ink-2); }
.cs-prod__more { margin-top: clamp(36px, 4vw, 60px); }

/* ---------------------------------------------------------------------
   F. Видео — вечерняя подложка сайта, официальный плеер по нажатию
   --------------------------------------------------------------------- */
.cs-video { background: var(--deep); color: var(--on-deep); }
.cs-video .cs-h2 { color: var(--on-deep); }
.cs-video__head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(20px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(28px, 3.6vw, 52px);
}
.cs-video__meta p { color: var(--on-deep-2); max-width: 48ch; }
.cs-video__meta .cs-video__show {
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}
.cs-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--deep-2);
}
.cs-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cs-video__facade { position: absolute; inset: 0; display: block; color: var(--on-photo); text-decoration: none; }
.cs-video__poster, .cs-video__poster img { display: block; width: 100%; height: 100%; }
.cs-video__poster img { object-fit: cover; object-position: 50% 70%; transition: transform 1.2s var(--ease-out); }
.cs-video__facade:hover .cs-video__poster img { transform: scale(1.02); }
.cs-video__facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--scrim), .78) 0%, rgba(var(--scrim), .28) 46%, rgba(var(--scrim), .08) 100%);
}
.cs-video__facade--plain::after { display: none; }
.cs-video__play {
  position: absolute;
  z-index: 1;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 24px);
  padding: clamp(18px, 3.2vw, 48px);
}
.cs-video__facade--plain .cs-video__play { inset: 0; justify-content: center; }
.cs-video__btn {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(56px, 5.4vw, 76px);
  height: clamp(56px, 5.4vw, 76px);
  border: 1px solid rgba(244, 238, 227, .7);
  border-radius: 50%;
  padding-left: 4px;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.cs-video__facade:hover .cs-video__btn, .cs-video__facade:focus-visible .cs-video__btn {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-gold);
  transform: scale(1.04);
}
.cs-video__facade:focus-visible { outline: 2px solid var(--on-photo); outline-offset: -6px; }
.cs-video__label { display: grid; gap: 4px; }
.cs-video__cta { font-family: 'Prata', 'Times New Roman', Georgia, serif; font-size: clamp(1.3rem, 1.05rem + .9vw, 1.9rem); line-height: 1.15; }
.cs-video__note { font-size: .82rem; color: var(--on-photo-2); }
.cs-video__src { margin-top: 18px; }

/* ---------------------------------------------------------------------
   G. Авторы проекта — титры: кто что сделал
   --------------------------------------------------------------------- */
.cs-authors__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 5vw, 96px);
  align-items: start;
}
.cs-authors__list > div {
  display: grid;
  grid-template-columns: minmax(9em, 12em) minmax(0, 1fr);
  gap: 16px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.cs-authors__list > div:last-child { border-bottom: 1px solid var(--line); }
.cs-authors__list dt {
  padding-top: .55em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cs-authors__list dd { margin: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 6px 24px; align-items: baseline; }
.cs-authors__name {
  font-family: 'Prata', 'Times New Roman', Georgia, serif;
  font-size: clamp(1.3rem, 1.05rem + .85vw, 1.85rem);
  line-height: 1.2;
  color: var(--ink);
}
.cs-authors__note { font-size: .94rem; line-height: 1.5; color: var(--ink-2); }
.cs-authors__foot { margin-top: 28px; max-width: 64ch; font-size: .95rem; color: var(--ink-2); }
.cs-credit { display: block; margin-top: 8px; font-size: .82rem; color: var(--ink-3); }

/* ---------------------------------------------------------------------
   По теме в Журнале — тихий список под титрами «Авторов проекта» (только опубликованные статьи).
   Не отдельный раздел: слово владельца 01.11 — «не должен отвлекать от главного содержания».
   --------------------------------------------------------------------- */
.cs-read { margin-top: clamp(36px, 4vw, 56px); padding-top: 18px; border-top: 1px solid var(--line-soft); max-width: 64ch; }
.cs-read__title { margin: 0 0 10px; font-family: 'Onest', system-ui, sans-serif; font-size: .82rem; font-weight: 600; line-height: 1.4; color: var(--ink-3); }
.cs-read__list { display: grid; gap: 6px; }
.cs-read__list a { font-size: .92rem; line-height: 1.5; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: .28em; transition: color .25s var(--ease), text-decoration-color .25s var(--ease); }
.cs-read__list a:hover { color: var(--accent); text-decoration-color: currentColor; }
.cs-read__arr { color: var(--gold-ink); }

/* ---------------------------------------------------------------------
   H. Финальное приглашение — страница заканчивается изделием; одна главная кнопка
   --------------------------------------------------------------------- */
.cs-cta { background: var(--surface); }
.cs-cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 96px);
  align-items: end;
}
.cs-cta__body { display: contents; }
.cs-cta--media .cs-cta__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
.cs-cta--media .cs-cta__body { display: block; }
.cs-cta__media .cs-zoom { aspect-ratio: 4 / 5; }
.cs-cta__media .cs-zoom picture, .cs-cta__media .cs-zoom img { height: 100%; }
.cs-cta__media .cs-zoom img { object-fit: cover; object-position: 22% 62%; }
.cs-cta__title {
  font-size: clamp(2.1rem, 1.15rem + 3.1vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -.022em;
  text-wrap: balance;
  color: var(--ink);
}
.cs-cta--media .cs-cta__side { margin-top: clamp(24px, 3vw, 40px); }
.cs-cta__side p { color: var(--ink-2); max-width: 46ch; }
.cs-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; margin-top: 26px; }

/* ---------------------------------------------------------------------
   Окно просмотра (case-study.js)
   --------------------------------------------------------------------- */
.cs-viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(var(--scrim), .96);
  color: var(--on-photo);
}
.cs-viewer::backdrop { background: transparent; }
.cs-viewer__stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  padding: clamp(56px, 6vh, 72px) clamp(12px, 6vw, 96px) clamp(14px, 2.4vh, 24px);
}
/* картинка вписывается в строку сетки: у абсолютного <picture> размер определён, и max-height: 100% работает */
.cs-viewer__fig { position: relative; min-height: 0; margin: 0; }
.cs-viewer__fig picture { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.cs-viewer__fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.cs-viewer__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 14px; font-size: .84rem; color: var(--on-photo-2); }
.cs-viewer__count { font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--on-photo); }
.cs-viewer button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(244, 238, 227, .34);
  border-radius: 50%;
  background: rgba(244, 238, 227, .06);
  color: var(--on-photo);
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.cs-viewer button:hover { background: rgba(244, 238, 227, .16); border-color: rgba(244, 238, 227, .6); }
.cs-viewer button:focus-visible { outline: 2px solid var(--on-photo); outline-offset: 3px; }
.cs-viewer__close { top: 12px; right: 12px; }
.cs-viewer__prev, .cs-viewer__next { top: 50%; transform: translateY(-50%); }
.cs-viewer__prev { left: 12px; }
.cs-viewer__next { right: 12px; }

/* Метка макета: снимки без прав — только локально */
.cs-badge {
  position: fixed;
  z-index: 2147483000;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  max-width: calc(100vw - 28px);
  padding: 9px 16px;
  border-radius: 999px;
  background: #211D17;
  color: #F2ECE1;
  font: 600 12px/1.3 system-ui, sans-serif;
  letter-spacing: .04em;
  text-align: center;
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   Адаптивность
   --------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .cs-authors__list dd { grid-template-columns: 1fr; }
  .cs-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; border-top: 0; }
  .cs-flow li { border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .cs-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .cs-hero__media { order: -1; aspect-ratio: 1 / 1; max-height: 72svh; min-height: 0; }
  .cs-hero__media { --cs-zoom: 1.14; }
  .cs-hero__media img { object-position: 60% 100%; transform-origin: 60% 100%; }
  .cs-hero__text { padding-inline: var(--pad); padding-top: 16px; }
  .cs-kicker { margin-top: 0; padding-top: 22px; }
  .cs-toc { margin-top: 0; }

  .cs-res__head, .cs-task__grid, .cs-tex__head, .cs-tex__grid, .cs-prod__head, .cs-prod__photos,
  .cs-video__head, .cs-authors__grid, .cs-cta__grid, .cs-cta--media .cs-cta__grid { grid-template-columns: minmax(0, 1fr); }
  .cs-res__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-task__text { position: static; }
  .cs-tex__right { padding-top: 0; }
  .cs-tex__edge { width: 86%; }
  .cs-tex__light { width: 100%; }
  .cs-tex__light .cs-zoom { aspect-ratio: 3 / 2; }
  .cs-prod__ph--2 { margin-top: 0; }
  .cs-cta__media .cs-zoom { aspect-ratio: 3 / 2; }
}

@media (max-width: 560px) {
  .cs-roles, .cs-parts { grid-template-columns: minmax(0, 1fr); }
  .cs-res__facts { column-gap: 18px; }
  .cs-res__facts dd { font-size: .9rem; }
  .cs-authors__list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cs-tex__edge { width: 100%; }
  /* шаги — вертикальной линией: точки на ней, текст справа */
  .cs-flow { grid-template-columns: minmax(0, 1fr); row-gap: 0; border-left: 1px solid var(--line); margin-left: 4px; }
  .cs-flow li { border-top: 0; padding: 0 0 26px 24px; }
  .cs-flow li::before { top: 2px; left: -5px; }
  .cs-hero__meta { flex-direction: column; align-items: flex-start; }
  .cs-video__note { display: none; }
  .cs-viewer__prev, .cs-viewer__next { top: auto; bottom: 12px; transform: none; }
  .cs-viewer__stage { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-hero__text > *, .cs-hero__media img { animation: none; }
  .cs-media .cs-zoom img, .cs-media.is-in .cs-zoom img, .cs-media .cs-zoom:hover img,
  .cs-video__facade:hover .cs-video__poster img { transform: none; transition: none; }
  .cs-zoom__ico, .cs-video__btn, .cs-read__list a { transition: none; }
}
