@font-face {
  font-family: "Onest";
  src: url("assets/onest-cyrillic.woff2?v=f456f282") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Prata";
  src: url("assets/prata-cyrillic.woff2?v=f456f282") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --case-ink: #090c0c;
  --case-ink-soft: #111515;
  --case-paper: #f2eee7;
  --case-paper-bright: #faf8f4;
  --case-muted: #aaa8a3;
  --case-orange: #f04b34;
  --case-amber: #f2a12d;
  --case-gradient: linear-gradient(105deg, #f04435 0%, #f2603d 55%, #f2a42f 100%);
  --case-display: "Prata", Georgia, serif;
  --case-ui: "Onest", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--case-ink);
}

body {
  margin: 0;
  background: var(--case-ink);
  color: var(--case-paper);
  font-family: var(--case-ui);
  font-size: 16px;
  font-weight: 350;
  text-rendering: optimizeLegibility;
}

body.case-lightbox-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  width: 100%;
}

.case-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 70px;
  padding: 0 clamp(20px, 3vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 12, 12, 0.92);
  backdrop-filter: blur(16px);
}

.case-brand {
  display: block;
  width: clamp(145px, 12vw, 180px);
}

.case-brand img {
  width: 100%;
  height: auto;
}

.case-header nav {
  display: flex;
  gap: clamp(18px, 2.5vw, 36px);
  color: #c8c5bf;
  font-size: 13px;
}

.case-header nav a {
  transition: color 180ms ease;
}

.case-header nav a:hover {
  color: #fff;
}

.case-header__cta {
  justify-self: end;
  padding: 11px 17px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  font-size: 13px;
  transition: border-color 180ms ease;
}

.case-header__cta:hover {
  border-color: var(--case-orange);
}

.case-hero {
  height: min(620px, calc(100svh - 70px));
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
}

.case-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 5vw, 72px) clamp(28px, 4.5vw, 70px);
  background:
    radial-gradient(circle at 30% 30%, rgba(86, 48, 36, 0.18), transparent 30%),
    var(--case-ink);
}

.case-eyebrow {
  margin: 0 0 14px;
  color: var(--case-amber);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.case-eyebrow--dark {
  color: #ba4a35;
}

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

h1,
h2 {
  font-family: var(--case-display);
  font-weight: 400;
}

.case-hero h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(42px, 4.3vw, 66px);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.case-hero h1 em,
.case-work__heading h2 em {
  display: block;
  color: #aaa8a3;
  font-style: normal;
  font-weight: 400;
}

.case-hero__lead {
  max-width: 570px;
  margin-bottom: 18px;
  color: #bbb8b1;
  font-size: clamp(15px, 1vw, 17px);
  line-height: 1.55;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.case-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #d7d3cb;
  font-size: 12px;
}

.case-scroll-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 260px);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
  color: #f1ede5;
  font-size: 13px;
}

.case-hero__media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #151919;
}

.case-hero__photo {
  position: absolute;
  overflow: hidden;
  margin: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.case-hero__photo img {
  height: 100%;
  object-fit: cover;
}

.case-hero__photo figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 10px;
  background: rgba(9, 12, 12, 0.78);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-hero__photo--main {
  inset: 0 0 0 16%;
}

.case-hero__photo--main img {
  object-position: center;
}

.case-office .case-hero__photo--main img {
  object-position: 50% 58%;
}

.case-hero__photo--process {
  z-index: 2;
  bottom: 4%;
  left: 3%;
  width: 28%;
  height: 36%;
  border: 7px solid var(--case-ink);
}

.case-hero__photo--process img {
  filter: saturate(0.75) contrast(0.96);
}

.case-hero__counter {
  position: absolute;
  z-index: 3;
  top: 22px;
  left: 22px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.case-hero__counter strong {
  font-family: var(--case-display);
  font-size: 28px;
  font-weight: 400;
}

.case-hero__counter span {
  color: #aaa8a3;
  font-size: 12px;
}

.case-intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  padding: clamp(48px, 5vw, 72px) clamp(28px, 5vw, 80px) 34px;
  background: var(--case-paper);
  color: var(--case-ink);
}

.case-intro h2,
.case-compare__copy h2 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(32px, 3.6vw, 50px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.case-intro > p,
.case-compare__copy > p {
  align-self: end;
  max-width: 580px;
  margin-bottom: 4px;
  color: #66625c;
  font-size: 15px;
  line-height: 1.65;
}

.case-gallery-section {
  padding: 0 clamp(28px, 5vw, 80px) clamp(54px, 6vw, 76px);
  background: var(--case-paper);
  color: var(--case-ink);
}

.case-gallery__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 16px 0 24px;
  border-top: 1px solid rgba(9, 12, 12, 0.18);
}

.case-gallery__toolbar > p {
  margin: 0;
  color: #77716a;
  font-size: 12px;
}

.case-segmented {
  display: flex;
  gap: 5px;
  padding: 5px;
  background: #ded9d0;
}

.case-segmented button {
  display: flex;
  gap: 18px;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  color: #655f58;
  cursor: pointer;
  font-size: 13px;
}

.case-segmented button span {
  opacity: 0.55;
}

.case-segmented button.is-active {
  background: var(--case-ink);
  color: var(--case-paper);
}

.case-gallery-grid {
  display: grid;
  grid-auto-rows: clamp(260px, 26vw, 380px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#gallery-process {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-gallery-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #d8d4cc;
  cursor: zoom-in;
}

.case-gallery-card--wide {
  grid-column: auto;
  grid-row: auto;
}

.case-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}

.case-gallery-card:hover img {
  transform: scale(1.025);
}

.case-gallery-card__number,
.case-gallery-card__open {
  position: absolute;
  padding: 8px 10px;
  background: rgba(9, 12, 12, 0.74);
  color: white;
  font-size: 11px;
}

.case-gallery-card__number {
  top: 14px;
  left: 14px;
}

.case-gallery-card__open {
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 14px;
}

.case-gallery-card__open b {
  font-weight: 400;
}

.case-work {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: clamp(54px, 6vw, 76px) clamp(28px, 5vw, 80px);
  background: var(--case-ink);
}

.case-work__heading {
  position: static;
  display: grid;
  grid-template-columns: 0.35fr 1fr;
  gap: 30px;
  align-items: end;
}

.case-work__heading h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(36px, 3.6vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.case-work__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

@media (min-width: 1051px) {
  .case-office .case-work__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .case-office .case-work__list h3 {
    font-size: clamp(21px, 1.7vw, 27px);
  }
}

.case-work__list article {
  display: block;
  padding: 22px 20px 0;
  border-bottom: 0;
}

.case-work__list article:first-child {
  padding-left: 0;
}

.case-work__list article:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.case-work__list article > span {
  display: block;
  margin-bottom: 18px;
  color: var(--case-orange);
  font-size: 12px;
}

.case-work__list h3 {
  margin-bottom: 10px;
  font-family: var(--case-display);
  font-size: clamp(23px, 2vw, 30px);
  font-weight: 400;
}

.case-work__list p {
  max-width: 620px;
  margin-bottom: 0;
  color: #aaa8a3;
  font-size: 14px;
  line-height: 1.58;
}

.case-compare {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 48px;
  padding: clamp(54px, 6vw, 76px) clamp(28px, 5vw, 80px);
  background: var(--case-paper-bright);
  color: var(--case-ink);
}

.case-compare__copy {
  align-self: center;
}

.case-compare__copy h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 3.5vw, 46px);
}

.case-compare__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.case-compare__pair figure {
  position: relative;
  height: clamp(340px, 34vw, 440px);
  margin: 0;
  overflow: hidden;
  background: #d7d3cb;
}

.case-compare__pair img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-compare__pair figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  padding: 14px 16px;
  background: rgba(9, 12, 12, 0.84);
  color: white;
  font-size: 12px;
}

.case-compare__pair figcaption span {
  display: block;
  margin-bottom: 4px;
  color: var(--case-amber);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-contact {
  padding: clamp(52px, 6vw, 76px) clamp(28px, 6vw, 100px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 25%, rgba(126, 63, 40, 0.24), transparent 32%),
    #0b0e0e;
}

.case-contact h2 {
  max-width: 900px;
  margin: 0 auto 16px;
  font-size: clamp(36px, 4vw, 54px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.case-contact > p:not(.case-eyebrow) {
  max-width: 610px;
  margin: 0 auto 26px;
  color: #aaa8a3;
  line-height: 1.7;
}

.case-contact > div {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.case-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 205px;
  padding: 14px 20px;
  border: 1px solid transparent;
  font-size: 13px;
}

.case-button--primary {
  background: var(--case-gradient);
  color: white;
}

.case-button--outline {
  border-color: rgba(255, 255, 255, 0.25);
}

.case-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(28px, 5vw, 80px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #777a77;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.case-footer a {
  color: #c5c3bd;
}

.case-lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(3, 5, 5, 0.94);
  backdrop-filter: blur(10px);
}

.case-lightbox img {
  width: auto;
  max-width: min(92vw, 1200px);
  height: auto;
  max-height: 88vh;
  object-fit: contain;
}

.case-lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: transparent;
  color: white;
  cursor: pointer;
  font-size: 30px;
}

@media (max-width: 1050px) {
  .case-header {
    grid-template-columns: 1fr auto;
  }

  .case-header nav {
    display: none;
  }

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

  .case-hero__copy {
    padding-inline: 32px;
  }

  .case-hero h1 {
    font-size: clamp(40px, 5.4vw, 56px);
  }

  .case-intro,
  .case-work,
  .case-compare {
    gap: 32px;
  }

  .case-gallery-grid {
    grid-auto-rows: clamp(240px, 30vw, 320px);
  }

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

  .case-work__list article {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .case-work__list article:nth-child(odd) {
    padding-left: 0;
  }

  .case-work__list article:nth-child(even) {
    border-right: 0;
  }

  .case-compare__pair figure {
    height: 380px;
  }
}

@media (max-width: 760px) {
  .case-header {
    min-height: 70px;
    padding-inline: 18px;
  }

  .case-brand {
    width: 146px;
  }

  .case-header__cta {
    padding: 11px 13px;
    font-size: 11px;
  }

  .case-hero {
    height: auto;
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .case-hero__copy {
    padding: 48px 22px 40px;
  }

  .case-hero h1 {
    font-size: clamp(38px, 11vw, 50px);
  }

  .case-tags {
    margin-bottom: 24px;
  }

  .case-hero__media {
    min-height: 380px;
  }

  .case-hero__photo--main {
    left: 10%;
  }

  .case-hero__photo--process {
    width: 34%;
    height: 42%;
    border-width: 5px;
  }

  .case-intro,
  .case-work,
  .case-compare {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-inline: 22px;
  }

  .case-intro h2,
  .case-compare__copy h2 {
    font-size: clamp(32px, 9vw, 42px);
  }

  .case-intro {
    padding-top: 44px;
    padding-bottom: 28px;
  }

  .case-gallery-section {
    padding-inline: 22px;
    padding-bottom: 54px;
  }

  .case-gallery__toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 0 18px;
  }

  .case-gallery__toolbar > p {
    display: none;
  }

  .case-segmented {
    width: 100%;
  }

  .case-segmented button {
    flex: 1;
    justify-content: space-between;
    gap: 10px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .case-gallery-grid {
    grid-auto-rows: clamp(220px, 62vw, 310px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #gallery-process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-gallery-card--wide {
    grid-column: auto;
    grid-row: auto;
  }

  .case-work__heading {
    position: static;
    display: block;
  }

  .case-work {
    padding-top: 52px;
    padding-bottom: 52px;
  }

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

  .case-work__list article {
    grid-template-columns: 45px 1fr;
    display: grid;
    gap: 12px;
    padding: 20px 0;
    border-right: 0;
  }

  .case-work__list article > span {
    margin-bottom: 0;
  }

  .case-compare__pair {
    gap: 8px;
  }

  .case-compare__pair figure {
    height: 320px;
  }

  .case-compare__pair figcaption {
    right: 8px;
    bottom: 8px;
    left: 8px;
    padding: 10px;
  }

  .case-contact {
    padding-top: 50px;
    padding-bottom: 50px;
    padding-inline: 22px;
  }

  .case-contact > div {
    flex-direction: column;
  }

  .case-footer {
    flex-direction: column;
    padding-inline: 22px;
  }
}

@media (max-width: 480px) {
  .case-header__cta {
    max-width: 124px;
    padding: 9px 10px;
    text-align: center;
    line-height: 1.2;
  }

  .case-hero__media {
    min-height: 330px;
  }

  .case-hero__counter {
    top: 20px;
    left: 18px;
  }

  .case-segmented button span {
    display: none;
  }

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

  .case-compare__pair figure {
    height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .case-gallery-card img {
    transition: none;
  }
}
