.case {
  --case-ink: #14211d;
  --case-muted: #6a746f;
  --case-soft: #f4efe5;
  --case-paper: #fffaf0;
  --case-panel: #ffffff;
  --case-line: rgba(30, 61, 54, .14);
  --case-teal: #0e5259;
  --case-teal-dark: #092f34;
  --case-amber: #d79324;
  --case-rust: #93461f;
  --case-shadow: 0 24px 70px rgba(16, 35, 31, .16);
  --case-radius: 8px;
  color: var(--case-ink);
  background:
    linear-gradient(180deg, #f8f4eb 0%, #f3efe6 42%, #fbf8f1 100%);
  padding: 0 0 86px;
}

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

.case__container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.case h1,
.case h2,
.case h3,
.case p {
  margin-top: 0;
}

.case-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  gap: 42px;
  align-items: end;
  min-height: 620px;
  margin: 0 calc(50% - 50vw) 0;
  padding: 132px max(40px, calc((100vw - 1180px) / 2)) 86px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(6, 27, 30, .94) 0%, rgba(6, 27, 30, .72) 44%, rgba(6, 27, 30, .18) 100%),
    url("/portfolio/yantarnyy-arkhipelag/img/movie-background@2x.webp") center / cover no-repeat;
  color: #fffaf0;
}

.case-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(248, 244, 235, 0), #f8f4eb 84%);
  pointer-events: none;
}

.case-header__left,
.case-header__rigth {
  position: relative;
  z-index: 1;
}

.case-header h1 {
  max-width: 900px;
  margin-bottom: 22px;
  font-size: clamp(52px, 8vw, 116px);
  line-height: .88;
  letter-spacing: 0;
  text-wrap: balance;
}

.case-header h1 span {
  color: #f5bc4f;
}

.case-header p {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 250, 240, .82);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}

.case-header__rigth {
  align-self: center;
  padding: 12px;
  border: 1px solid rgba(255, 250, 240, .22);
  border-radius: var(--case-radius);
  background: rgba(255, 250, 240, .11);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .32);
  backdrop-filter: blur(12px);
}

.case-header__rigth img,
.case-feature__developer img,
.case-team__specialist img {
  display: block;
  border-radius: var(--case-radius);
  object-fit: cover;
}

.case-header__rigth img,
.case-feature__developer img {
  width: 100%;
  height: auto;
}

.case-movie {
  position: relative;
  z-index: 2;
  overflow: hidden;
  width: min(1180px, calc(100% - 40px));
  margin: -58px auto 46px;
  border: 1px solid rgba(255, 250, 240, .7);
  border-radius: var(--case-radius);
  background: #d8ded9;
  box-shadow: var(--case-shadow);
}

.case-movie img,
.case-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.case-info {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0 0 76px;
}

.case-info__card {
  position: relative;
  min-height: 164px;
  padding: 26px 28px 24px;
  overflow: hidden;
  border: 1px solid rgba(215, 147, 36, .2);
  border-radius: var(--case-radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 247, 229, .9));
  box-shadow: 0 16px 44px rgba(28, 45, 39, .09);
}

.case-info__card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(14, 82, 89, .16);
  border-radius: 50%;
}

.case-info__icon,
.case-team__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4c86b, #bd711d);
  color: #25180a;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(189, 113, 29, .24);
}

.case-info__card p {
  position: relative;
  z-index: 1;
  margin-bottom: 7px;
  font-size: 31px;
  line-height: 1.05;
  font-weight: 900;
}

.case-info__card span:last-child,
.case-team__specialist>span:last-child {
  position: relative;
  z-index: 1;
  color: var(--case-muted);
}

.case-review,
.case-solutions,
.case-feature,
.case-process,
.case-team {
  position: relative;
  margin-bottom: 88px;
}

.case-review,
.case-solutions,
.case-process,
.case-team {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  column-gap: 64px;
  align-items: start;
}

.case-review h2,
.case-solutions h2,
.case-process h2,
.case-team h2 {
  margin-bottom: 20px;
}

.case h2 {
  color: var(--case-teal-dark);
  font-size: clamp(34px, 5vw, 64px);
  line-height: .94;
  letter-spacing: 0;
  text-wrap: balance;
}

.case h2::before {
  content: "";
  display: block;
  width: 58px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--case-amber), var(--case-teal));
}

.case h3 {
  margin-bottom: 13px;
  color: var(--case-teal-dark);
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
}

.case-paragraph,
.case blockquote p,
.process-slider__slide p {
  max-width: 780px;
  color: var(--case-muted);
  font-size: 19px;
  line-height: 1.72;
  border: 0;
}

.case-paragraph+.case-paragraph {
  margin-top: -4px;
}

.case-thesis {
  position: relative;
  max-width: 840px;
  margin: 30px 0 36px;
  padding: 30px 34px 30px 38px;
  overflow: hidden;
  border: 1px solid rgba(215, 147, 36, .26);
  border-radius: var(--case-radius);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, .98), rgba(244, 232, 207, .88));
  box-shadow: 0 18px 48px rgba(51, 39, 20, .08);
}

.case-thesis::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--case-amber), var(--case-rust));
}

.case-thesis p {
  position: relative;
  margin: 0;
  color: var(--case-ink);
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.42;
  font-weight: 900;
  text-wrap: balance;
}

.case-banner {
  grid-column: 1 / -1;
  overflow: hidden;
  margin: 42px 0 0;
  border-radius: var(--case-radius);
  background: #d8ded9;
  box-shadow: var(--case-shadow);
}

.case-feature {
  padding: 54px;
  border-radius: var(--case-radius);
  background:
    linear-gradient(135deg, rgba(9, 47, 52, .96), rgba(14, 82, 89, .9)),
    url("/portfolio/yantarnyy-arkhipelag/img/banner-6.webp") center / cover no-repeat;
  color: #fffaf0;
  box-shadow: var(--case-shadow);
}

.case-feature h2 {
  color: #fffaf0;
}

.case-feature h2::before {
  background: linear-gradient(90deg, #f6c767, #fff3d5);
}

.case-feature__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 38px;
  align-items: center;
  margin-top: 30px;
}

.case blockquote {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}

.case-feature blockquote p {
  max-width: 830px;
  color: rgba(255, 250, 240, .88);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.25;
  font-weight: 800;
}

.case-feature__text>p {
  margin-bottom: 0;
  color: #fffaf0;
  font-weight: 800;
}

.case-feature__text>p span {
  color: rgba(255, 250, 240, .66);
  font-weight: 500;
}

.case-feature__developer {
  padding: 10px;
  border: 1px solid rgba(255, 250, 240, .24);
  border-radius: var(--case-radius);
  background: rgba(255, 250, 240, .12);
}

.case-feature__developer picture {
  display: block;
}

.case-feature .case-thesis {
  max-width: none;
  margin-bottom: 0;
  background: rgba(255, 250, 240, .12);
  border-color: rgba(255, 250, 240, .22);
}

.case-feature .case-thesis p {
  color: #fffaf0;
}

.process-slider {
  counter-reset: rule-step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 42px 0;
}

.process-slider__slide {
  position: relative;
  min-height: 260px;
  padding: 78px 22px 24px;
  overflow: hidden;
  border: 1px solid var(--case-line);
  border-radius: var(--case-radius);
  background:
    linear-gradient(180deg, #ffffff, #fbf7ed);
  box-shadow: 0 14px 34px rgba(30, 55, 49, .08);
}

.process-slider__slide::before {
  counter-increment: rule-step;
  content: counter(rule-step);
  position: absolute;
  top: 18px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eaf2ee;
  color: var(--case-teal);
  font-weight: 900;
}

.process-slider__slide h3 {
  min-height: 52px;
}

.process-slider__slide p {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.55;
}

.case-team__specialists {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.case-team__specialist {
  padding: 24px;
  border: 1px solid var(--case-line);
  border-radius: var(--case-radius);
  background: var(--case-panel);
  box-shadow: 0 14px 34px rgba(30, 55, 49, .08);
}

.case-team__avatar {
  margin-bottom: 22px;
  background: linear-gradient(135deg, #174f55, #0b3236);
  color: #f5c96b;
}

.case-team__specialist picture {
  display: block;
  width: 80px;
  height: 80px;
  margin-bottom: 22px;
}

.case-team__specialist img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.case-team__specialist p {
  margin-bottom: 7px;
  color: var(--case-ink);
  font-size: 21px;
  line-height: 1.22;
  font-weight: 900;
}

@media (min-width: 901px) {

  .case-review> :not(h2),
  .case-solutions> :not(h2),
  .case-process> :not(h2),
  .case-team> :not(h2) {
    grid-column: 2;
  }

  .case-process>.case-paragraph,
  .case-process>.process-slider,
  .case-process>.case-thesis {
    grid-column: 1 / -1;
  }



  .case-review>.case-banner,
  .case-solutions>.case-banner,
  .case-process>.case-banner,
  .case-team>.case-banner {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1050px) {

  .process-slider,
  .case-team__specialists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .case__container {
    width: min(100% - 28px, 1180px);
  }

  .case-header {
    grid-template-columns: 1fr;
    min-height: 560px;
    padding: 108px 24px 74px;
  }

  .case-header__rigth,
  .case-feature__developer {
    max-width: 220px;
  }

  .case-review,
  .case-solutions,
  .case-process,
  .case-team {
    display: block;
  }

  .case-review h2,
  .case-solutions h2,
  .case-process h2,
  .case-team h2 {
    position: static;
    margin-bottom: 22px;
  }

  .case-feature,
  .case-feature__content {
    display: block;
  }

  .case-feature {
    padding: 34px 24px;
  }

  .case-feature__developer {
    margin-top: 28px;
  }

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

@media (max-width: 560px) {
  .case {
    padding-bottom: 54px;
  }

  .case__container {
    width: min(100% - 20px, 1180px);
  }

  .case-header {
    min-height: 520px;
    margin-bottom: 0;
    padding: 92px 18px 68px;
  }

  .case-movie {
    width: min(100% - 20px, 1180px);
    margin-top: -34px;
  }

  .process-slider,
  .case-team__specialists {
    grid-template-columns: 1fr;
  }

  .case-info {
    margin-bottom: 58px;
  }

  .case-review,
  .case-solutions,
  .case-feature,
  .case-process,
  .case-team {
    margin-bottom: 66px;
  }

  .case-paragraph,
  .case blockquote p {
    font-size: 16px;
  }

  .case-thesis {
    padding: 24px 22px 24px 28px;
  }
}