/* Страницы кейсов и проектов: те же шрифты и палитра, что на главной. */

.case-body {
  background: #fdfdfd;
  color: #312723;
}

/* у main из styles.css старый серый фон — на страницах кейсов он не нужен */
.case-body main {
  background: none;
}

.case-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 2.65vw, 51px);
  background: linear-gradient(180deg, rgba(253, 253, 253, 0.96) 60%, rgba(253, 253, 253, 0));
}

.case-nav__link {
  color: #312723;
  text-decoration: none;
  font-family: "Bimbo", "Cygre Book", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(16px, 1.042vw, 20px);
  line-height: 1.4;
  text-transform: uppercase;
}

.case-nav__link:hover {
  opacity: 0.6;
}

/* --- кейс --- */

.case {
  width: min(100% - 2 * clamp(20px, 2.65vw, 51px), 1400px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 64px) 0 96px;
}

.case__empty {
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
}

.case__labels {
  margin: 0 0 18px;
  font-family: "Bimbo", "Cygre Book", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(16px, 1.042vw, 20px);
  text-transform: uppercase;
}

.case__title {
  margin: 0;
  max-width: 16ch;
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(40px, 5.2vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  text-wrap: balance;
}

.case__nowrap {
  white-space: nowrap;
}

.case__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.case__tag,
.projects__filter {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(255, 255, 255, 0.5),
    0 1.14px 1.14px rgba(253, 219, 146, 0.25),
    0 -2.28px 8.9px rgba(167, 178, 235, 0.38),
    0 1.19px 8.9px rgba(255, 255, 255, 0.38);
  color: #6e6765;
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  text-decoration: none;
  text-transform: lowercase;
  cursor: pointer;
  transition: scale 400ms cubic-bezier(0.34, 1.7, 0.5, 1), color 200ms ease;
}

.case__tag:hover,
.projects__filter:hover {
  scale: 1.05;
}

.case__link {
  color: #312723;
  background: #e8eedf;
}

.projects__filter.is-active {
  color: #312723;
  background: #e8eedf;
}

.case__intro {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: clamp(36px, 4vw, 64px) 0 clamp(40px, 5vw, 80px);
}

.case__intro p {
  margin: 0;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(17px, 1.15vw, 21px);
  line-height: 1.35;
}

.case__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
}

.case__shot {
  margin: 0;
}

/* первая картинка — на всю ширину, как обложка */
.case__shot:first-child {
  grid-column: 1 / -1;
}

.case__shot-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #f1eeec;
  cursor: zoom-in;
}

.case__shot img {
  display: block;
  width: 100%;
  height: auto;
  transition: scale 600ms ease;
}

.case__shot-button:hover img {
  scale: 1.02;
}

.case__shot figcaption {
  margin-top: 10px;
  color: #6e6765;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  text-transform: lowercase;
}

/* подзаголовок одной фразой — о чём проект */
.case__subtitle {
  max-width: 900px;
  margin: 20px 0 0;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(19px, 1.6vw, 28px);
  line-height: 1.25;
}

.case__cover {
  margin: clamp(32px, 4vw, 64px) 0 0;
}

/* вертикальные обложки (плакаты, обои) не растягиваем на несколько экранов: целиком видны в просмотрщике */
.case__cover img {
  max-height: 78vh;
  object-fit: cover;
}

/* раздел: слева название (липнет при прокрутке), справа подзаголовки с текстом */
.case-section {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 3fr;
  gap: 24px clamp(24px, 4vw, 80px);
  margin-top: clamp(56px, 7vw, 112px);
  padding-top: 24px;
  border-top: 1px solid rgba(49, 39, 35, 0.12);
}

.case-section__title {
  position: sticky;
  top: 96px;
  align-self: start;
  margin: 0;
  font-family: "Bimbo", "Cygre Book", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(20px, 1.6vw, 28px);
  line-height: 1.2;
  text-transform: uppercase;
}

.case-section__body {
  display: grid;
  gap: clamp(28px, 3vw, 44px);
  min-width: 0;
}

.case-section__item {
  display: grid;
  gap: 10px;
  max-width: 820px;
}

.case-section__heading {
  margin: 0;
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(19px, 1.3vw, 24px);
  line-height: 1.2;
  text-transform: lowercase;
}

.case-section__text,
.case-section__list {
  margin: 0;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(17px, 1.15vw, 21px);
  line-height: 1.4;
}

.case-section__list {
  display: grid;
  gap: 6px;
  padding-left: 1.1em;
}

/* картинки под всем разделом — во всю ширину страницы */
.case-section__wide {
  grid-column: 1 / -1;
}

.case__footer {
  display: grid;
  gap: 28px;
  margin-top: clamp(64px, 8vw, 128px);
  padding-top: 24px;
  border-top: 1px solid rgba(49, 39, 35, 0.12);
}

.case__more-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.case__more-head .case-section__title {
  position: static;
}

.case__next {
  display: grid;
  gap: 8px;
  color: #312723;
  text-decoration: none;
}

.case__next-label,
.case__all {
  font-family: "Bimbo", "Cygre Book", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(16px, 1.042vw, 20px);
  text-transform: uppercase;
  color: #312723;
  text-decoration: none;
}

.case__next-title {
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(28px, 3vw, 52px);
  line-height: 1;
  text-transform: lowercase;
}

.case__next:hover .case__next-title,
.case__all:hover {
  opacity: 0.6;
}

/* --- просмотр на весь экран --- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: rgba(253, 253, 253, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 0;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100svh - 120px);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(49, 39, 35, 0.16);
}

.lightbox__caption {
  color: #6e6765;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 28px;
}

.lightbox__close,
.lightbox__arrow {
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #312723;
  font-family: "Bimbo", "Cygre Book", "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  text-transform: uppercase;
  cursor: pointer;
}

.lightbox__arrow {
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 32px;
}

/* --- сетка проектов --- */

.projects {
  width: min(100% - 2 * clamp(20px, 2.65vw, 51px), 1600px);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 48px) 0 96px;
}

.projects__title {
  margin: 0;
  font-family: "AKONY", "Michroma", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 7.85vw, 151px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #312723;
  opacity: 0.7;
  text-transform: uppercase;
}

.projects__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 clamp(32px, 4vw, 56px);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: clamp(24px, 2.5vw, 40px);
}

.project-card {
  display: grid;
  gap: 10px;
  color: #312723;
  text-decoration: none;
}

.project-card__cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  background: #f1eeec;
  transition: scale 500ms cubic-bezier(0.34, 1.4, 0.5, 1);
}

.project-card:hover .project-card__cover {
  scale: 1.02;
}

.project-card__title {
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(18px, 1.3vw, 24px);
  line-height: 1.1;
  text-transform: lowercase;
}

.project-card__tags {
  color: #6e6765;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
}

/* --- архив инструментов: слева описание, справа файлы на скачивание --- */

.tools__lead {
  margin: 8px 0 clamp(32px, 4vw, 56px);
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(19px, 1.6vw, 28px);
}

.tools {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px clamp(24px, 4vw, 80px);
  padding: 28px 0;
  border-top: 1px solid rgba(49, 39, 35, 0.12);
}

.tools__title {
  margin: 0 0 10px;
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 40px);
  line-height: 1;
  text-transform: lowercase;
}

.tools__text {
  margin: 0;
  max-width: 560px;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(17px, 1.15vw, 21px);
  line-height: 1.35;
}

.tools__files {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools__file {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(255, 255, 255, 0.5),
    0 -2.28px 8.9px rgba(167, 178, 235, 0.38),
    0 1.19px 8.9px rgba(255, 255, 255, 0.38);
  color: #312723;
  text-decoration: none;
  transition: scale 400ms cubic-bezier(0.34, 1.7, 0.5, 1);
}

.tools__file:hover {
  scale: 1.02;
}

.tools__file-name {
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.tools__file-note {
  color: #6e6765;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
}

.tools__file-icon {
  margin-left: auto;
  font-size: 18px;
}

.tools__soon {
  color: #6e6765;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

@media (max-width: 760px) {
  .tools__item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  /* длинные слова через дефис не переносятся — кегль от ширины экрана, чтобы влезали */
  .case__title {
    font-size: clamp(24px, 7.4vw, 56px);
    line-height: 1;
  }

  .projects__title {
    font-size: 8.9vw;
  }

  .case-section {
    grid-template-columns: 1fr;
  }

  .case-section__title {
    position: static;
  }

  .case__gallery {
    grid-template-columns: 1fr;
  }

  .lightbox {
    grid-template-columns: 1fr;
    padding: 64px 12px 24px;
  }

  .lightbox__arrow {
    display: none;
  }
}

.tools__image {
  display: block;
  width: 100%;
  max-width: 560px;
  margin-top: 20px;
  border-radius: 18px;
}

/* --- доска из Figma: превью на странице и просмотр на весь экран --- */

.case__board-button {
  position: relative;
  cursor: zoom-in;
}

.case__board-label {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 30px;
  background:
    radial-gradient(60% 50% at 25% 15%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%),
    rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(8px) saturate(1.6);
  backdrop-filter: blur(8px) saturate(1.6);
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(255, 255, 255, 0.5),
    0 -2.28px 8.9px rgba(167, 178, 235, 0.38),
    0 8px 22px rgba(80, 70, 90, 0.12);
  color: #312723;
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  text-transform: lowercase;
  transition: scale 500ms cubic-bezier(0.34, 1.7, 0.5, 1);
}

.case__board-button:hover .case__board-label {
  scale: 1.06;
}

.board {
  position: fixed;
  inset: 0;
  z-index: 60;
  /* тот же серый, что у доски в Figma, — края картинки не видны */
  background: #f5f5f5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 360ms ease, visibility 0s linear 360ms;
}

.board.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 360ms ease;
}

/* OpenSeadragon ставит контейнеру position: relative — поэтому размеры задаём явно */
.board__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.board__canvas:active {
  cursor: grabbing;
}

.board__hint {
  position: absolute;
  left: 50%;
  top: 28px;
  margin: 0;
  translate: -50% 0;
  color: #6e6765;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  white-space: nowrap;
  pointer-events: none;
  animation: boardHint 5s ease forwards;
}

.board__controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 10px;
}

.board__button {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 30px;
  background:
    radial-gradient(60% 50% at 25% 15%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%),
    rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(8px) saturate(1.6);
  backdrop-filter: blur(8px) saturate(1.6);
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(255, 255, 255, 0.5),
    0 -2.28px 8.9px rgba(167, 178, 235, 0.38),
    0 8px 22px rgba(80, 70, 90, 0.12);
  color: #312723;
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: scale 400ms cubic-bezier(0.34, 1.7, 0.5, 1);
}

.board__button--wide {
  font-size: 16px;
  text-transform: lowercase;
}

.board__button:hover {
  scale: 1.08;
}

.showcase__close.board__close {
  position: absolute;
  top: 20px;
  right: 24px;
}

/* мини-карта OpenSeadragon: та же стеклянная рамка */
.board .navigator {
  margin: 0 0 24px 24px !important;
  border: 0 !important;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 8px 22px rgba(80, 70, 90, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.board .displayregion {
  border: 2px solid #ff9f3c !important;
  border-radius: 4px;
}

@keyframes boardHint {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 760px) {
  .case__board-label {
    right: 10px;
    bottom: 10px;
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
  }

  .board__hint {
    top: 74px;
    font-size: 13px;
  }

  .board__controls {
    right: 12px;
    bottom: 12px;
  }

  /* на телефоне мини-карта занимает слишком много места */
  .board .navigator {
    display: none !important;
  }
}

/* --- канвас Obsidian на весь экран (canvas-board.js) --- */

.canvas-board {
  overflow: hidden;
  touch-action: none;
  user-select: none;
  background-color: #f5f5f5;
  background-image: radial-gradient(rgba(49, 39, 35, 0.12) 1px, transparent 1.2px);
  background-size: 24px 24px;
}

.canvas-board__world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

.canvas-board__world.is-animating {
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.canvas-board__group,
.canvas-board__node {
  position: absolute;
  box-sizing: border-box;
}

.canvas-board__group {
  --c: #b9b3ae;
  border: 3px solid color-mix(in srgb, var(--c) 55%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--c) 7%, transparent);
}

.canvas-board__group-label {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  padding: 6px 16px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 18%, #fff);
  color: #312723;
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: 28px;
  line-height: 1.2;
  white-space: nowrap;
}

.canvas-board__edges {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
}

.canvas-board__edges path {
  fill: none;
  stroke: #a39d99;
  stroke-width: 3;
}

.canvas-board__edges text {
  fill: #6e6765;
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #f5f5f5;
  stroke-width: 6px;
}

.canvas-board__node {
  --c: #d9d4d0;
  overflow: hidden;
  border: 2px solid var(--c);
  border-radius: 10px;
  background: #fff;
  color: #312723;
  box-shadow: 0 2px 10px rgba(49, 39, 35, 0.06);
}

.canvas-board__node.has-color {
  background: color-mix(in srgb, var(--c) 9%, #fff);
}

.canvas-board__node--text {
  padding: 10px 22px;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  user-select: text;
}

.canvas-board__node--text h1,
.canvas-board__node--text h2,
.canvas-board__node--text h3,
.canvas-board__node--text h4,
.canvas-board__node--text h5,
.canvas-board__node--text h6 {
  margin: 10px 0 6px;
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.2;
}

.canvas-board__node--text h1 { font-size: 30px; }
.canvas-board__node--text h2 { font-size: 25px; }
.canvas-board__node--text h3 { font-size: 21px; }
.canvas-board__node--text h4,
.canvas-board__node--text h5,
.canvas-board__node--text h6 { font-size: 18px; }

.canvas-board__node--text p,
.canvas-board__node--text ul,
.canvas-board__node--text ol,
.canvas-board__node--text blockquote {
  margin: 6px 0;
}

.canvas-board__node--text ul,
.canvas-board__node--text ol {
  padding-left: 1.3em;
}

.canvas-board__node--text blockquote {
  padding-left: 12px;
  border-left: 3px solid #d9d4d0;
  color: #6e6765;
}

.canvas-board__node--text mark {
  background: #fff1a8;
}

.canvas-board__node--text code {
  padding: 0 4px;
  border-radius: 4px;
  background: #f1eeec;
  font-size: 0.9em;
}

.canvas-board__node--text a,
.canvas-board__link-host {
  color: #7852ee;
}

.canvas-board__node--file {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.canvas-board__node--file img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.canvas-board__node--link {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px;
  text-decoration: none;
}

.canvas-board__link-host {
  font-family: "Cygre Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: 26px;
}

.canvas-board__link-url {
  color: #6e6765;
  font-family: "Cygre Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  overflow-wrap: anywhere;
}

/* у канваса нет мини-карты OpenSeadragon — подсказка и кнопки те же */
.board.is-canvas .board__canvas {
  cursor: grab;
}

/* вертикальный ролик внутри раздела кейса */
.case__video {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-top: 18px;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  background: #1d1916;
  object-fit: cover;
}

.case__video--wide {
  max-width: 100%;
  aspect-ratio: auto;
}

/* сайт целиком: окно браузера и телефон, страница прокручивается внутри рамки */
.case__screens {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 28px;
  margin-top: 22px;
}

.case__screen {
  margin: 0;
}

.case__screen figcaption {
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.7;
}

.case__screen-view {
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  scrollbar-width: thin;
}

.case__screen-view img {
  display: block;
  width: 100%;
  height: auto;
}

.case__screen--desktop {
  flex: 1 1 520px;
  min-width: 0;
}

.case__screen--desktop .case__screen-view {
  height: min(560px, 62vh);
  border: 1px solid rgba(49, 39, 35, 0.14);
  border-top: 28px solid #e6e2dc;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(49, 39, 35, 0.12);
}

.case__screen--phone {
  flex: 0 0 auto;
}

.case__screen--phone .case__screen-view {
  width: 250px;
  height: 520px;
  border: 10px solid #1f1b19;
  border-radius: 36px;
  box-shadow: 0 18px 40px rgba(49, 39, 35, 0.16);
}

@media (max-width: 760px) {
  .case__screens {
    justify-content: center;
  }

  .case__screen--desktop {
    flex-basis: 100%;
  }
}

/* презентация листалкой */
.case__deck {
  margin-top: 22px;
}

.case__deck-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(49, 39, 35, 0.12);
  outline-offset: 4px;
}

.case__deck-track::-webkit-scrollbar {
  display: none;
}

.case__deck-slide {
  flex: 0 0 100%;
  padding: 0;
  border: 0;
  background: #fff;
  scroll-snap-align: start;
  cursor: zoom-in;
}

.case__deck-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.case__deck-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}

.case__deck-nav {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(49, 39, 35, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: #312723;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 180ms ease, opacity 180ms ease;
}

.case__deck-nav:hover:not(:disabled) {
  background: #fff;
}

.case__deck-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.case__deck-count {
  min-width: 64px;
  text-align: center;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}
