@font-face {
  font-family: "Portfolio Display";
  src: url("assets/fonts/CHEDROS-Bold.otf") format("opentype");
  font-display: swap;
}

body.portfolio-page {
  --case-accent: #e30626;
  --case-accent-soft: #f6d9dd;
  --case-ink: #171717;
  --case-muted: #636363;
  color: var(--case-ink);
}

.portfolio-main {
  overflow: clip;
  padding-top: clamp(118px, 10vw, 150px);
}

.work-index-hero,
.work-list,
.case-hero__inner,
.case-story__inner,
.case-gallery,
.case-facts__inner,
.case-next__inner {
  width: min(100% - 64px, 1380px);
  margin-inline: auto;
}

.work-index-hero {
  display: grid;
  align-content: end;
  min-height: min(760px, calc(100dvh - 118px));
  padding-block: clamp(78px, 10vw, 150px) clamp(56px, 7vw, 94px);
}

.work-kicker,
.case-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--case-accent);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.work-kicker::before,
.case-kicker::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.work-index-hero h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(4rem, 9vw, 8.6rem);
  line-height: 0.86;
}

.work-index-hero__footer {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.55fr);
  gap: clamp(30px, 8vw, 120px);
  align-items: end;
  margin-top: clamp(48px, 7vw, 96px);
}

.work-index-hero__footer p {
  max-width: 58ch;
  margin: 0;
  color: var(--case-muted);
  font-size: clamp(1.05rem, 1.45vw, 1.4rem);
  line-height: 1.55;
}

.work-index-hero__count {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 12px;
  color: var(--case-muted);
}

.work-index-hero__count strong {
  color: var(--case-ink);
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.8;
}

.work-list {
  padding-bottom: clamp(88px, 10vw, 160px);
}

.work-project {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 44px);
  align-items: center;
  padding-block: clamp(42px, 6vw, 88px);
  border-top: 1px solid rgba(23, 23, 23, 0.18);
  color: inherit;
  text-decoration: none;
}

.work-project:last-child {
  border-bottom: 1px solid rgba(23, 23, 23, 0.18);
}

.work-project__media {
  grid-column: 1 / span 7;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: #e7e6e4;
}

.work-project:nth-child(even) .work-project__media {
  grid-column: 6 / span 7;
  grid-row: 1;
}

.work-project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.work-project__copy {
  grid-column: 9 / -1;
}

.work-project:nth-child(even) .work-project__copy {
  grid-column: 1 / span 4;
  grid-row: 1;
}

.work-project__number {
  display: block;
  margin-bottom: clamp(44px, 7vw, 104px);
  color: var(--case-accent);
  font-weight: 800;
}

.work-project h2 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  line-height: 0.88;
}

.work-project p {
  margin: 24px 0 0;
  color: var(--case-muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.work-project__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.work-project__meta span {
  padding: 8px 12px;
  border: 1px solid rgba(23, 23, 23, 0.18);
  border-radius: 999px;
  color: var(--case-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.work-project__arrow {
  display: grid;
  width: 48px;
  height: 48px;
  margin-top: 34px;
  border: 1px solid rgba(23, 23, 23, 0.26);
  border-radius: 50%;
  place-items: center;
  font-size: 1.4rem;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.work-project:hover .work-project__media img,
.work-project:focus-visible .work-project__media img {
  transform: scale(1.035);
}

.work-project:hover .work-project__arrow,
.work-project:focus-visible .work-project__arrow {
  background: var(--case-ink);
  color: #fff;
  transform: translateX(6px);
}

.work-project:focus-visible {
  outline: 3px solid var(--case-accent);
  outline-offset: 8px;
}

.case-exalt {
  --case-accent: #f0502f;
  --case-accent-soft: #f3d2c8;
}

.case-gaffit {
  --case-accent: #0f83bd;
  --case-accent-soft: #cfe7f2;
}

.case-ironutra {
  --case-accent: #d71920;
  --case-accent-soft: #f0d2d3;
}

.case-hero {
  padding-block: clamp(54px, 7vw, 104px) clamp(58px, 7vw, 102px);
}

.case-hero__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: end;
}

.case-hero__title {
  grid-column: 1 / span 8;
}

.case-hero h1 {
  margin: 0;
  font-size: clamp(5.2rem, 13vw, 12rem);
  line-height: 0.78;
}

.case-hero__lead {
  grid-column: 9 / -1;
  padding-bottom: 10px;
}

.case-hero__lead p {
  margin: 0 0 28px;
  color: var(--case-muted);
  font-size: clamp(1.1rem, 1.55vw, 1.45rem);
  line-height: 1.5;
}

.case-live-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--case-ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease;
}

.case-live-link:hover,
.case-live-link:focus-visible {
  background: var(--case-accent);
  transform: translateY(-3px);
}

.case-live-link:focus-visible {
  outline: 3px solid var(--case-accent-soft);
  outline-offset: 4px;
}

.case-hero__meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(50px, 7vw, 104px);
  padding-top: 24px;
  border-top: 1px solid rgba(23, 23, 23, 0.2);
}

.case-hero__meta div {
  display: grid;
  gap: 7px;
}

.case-hero__meta span {
  color: var(--case-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.case-hero__meta strong {
  font-size: 1rem;
}

.case-cover {
  width: 100%;
  overflow: hidden;
  background: #ddd;
}

.case-cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.case-story {
  padding-block: clamp(86px, 11vw, 170px);
}

.case-story__inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.3fr);
  gap: clamp(44px, 10vw, 160px);
}

.case-story__side {
  display: grid;
  align-content: start;
  gap: 32px;
}

.case-story__side img {
  width: min(100%, 260px);
  max-height: 110px;
  object-fit: contain;
  object-position: left center;
}

.case-story__side p {
  max-width: 24ch;
  margin: 0;
  color: var(--case-muted);
  line-height: 1.55;
}

.case-story__copy h2 {
  max-width: 13ch;
  margin: 0 0 clamp(42px, 6vw, 84px);
  font-size: clamp(3.5rem, 7vw, 7.4rem);
  line-height: 0.9;
}

.case-story__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(30px, 5vw, 70px);
}

.case-story__columns h3 {
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.case-story__columns p {
  margin: 0;
  color: var(--case-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.case-statement {
  display: grid;
  min-height: min(760px, 82dvh);
  padding: clamp(64px, 10vw, 150px);
  background: var(--case-accent);
  color: #fff;
  place-items: center;
  text-align: center;
}

.case-statement p {
  max-width: 15ch;
  margin: 0;
  font-family: "Portfolio Display", "DM Sans", sans-serif;
  font-size: clamp(4rem, 9.2vw, 9.4rem);
  line-height: 0.87;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
  padding-block: clamp(70px, 10vw, 150px);
}

.case-gallery figure {
  grid-column: span 7;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #e3e2df;
}

.case-gallery figure:nth-child(2) {
  grid-column: span 5;
}

.case-gallery figure:nth-child(3) {
  grid-column: 3 / span 8;
}

.case-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.case-gallery figure:nth-child(3) img {
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.case-facts {
  padding-block: clamp(84px, 11vw, 170px);
  border-top: 1px solid rgba(23, 23, 23, 0.16);
}

.case-facts__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1fr);
  gap: clamp(50px, 11vw, 170px);
}

.case-facts h2 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.6rem, 7vw, 7.2rem);
  line-height: 0.9;
}

.case-facts__list {
  display: grid;
  align-content: start;
}

.case-facts__list div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding-block: 25px;
  border-top: 1px solid rgba(23, 23, 23, 0.18);
}

.case-facts__list div:last-child {
  border-bottom: 1px solid rgba(23, 23, 23, 0.18);
}

.case-facts__list span {
  color: var(--case-accent);
  font-weight: 800;
}

.case-facts__list p {
  margin: 0;
  color: var(--case-muted);
  line-height: 1.5;
}

.case-next {
  padding-block: clamp(84px, 10vw, 150px);
  background: var(--case-ink);
  color: #fff;
}

.case-next__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
}

.case-next span {
  display: block;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.case-next a {
  color: inherit;
  text-decoration: none;
}

.case-next h2 {
  margin: 0;
  font-size: clamp(3.6rem, 8vw, 8rem);
  line-height: 0.84;
}

.case-next__arrow {
  display: grid;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  place-items: center;
  font-size: 2rem;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.case-next a:hover .case-next__arrow,
.case-next a:focus-visible .case-next__arrow {
  background: #fff;
  color: var(--case-ink);
  transform: translateX(6px);
}

.case-next a:focus-visible {
  outline: 3px solid var(--case-accent);
  outline-offset: 8px;
}

@media (max-width: 900px) {
  .work-index-hero__footer,
  .case-story__inner,
  .case-facts__inner {
    grid-template-columns: 1fr;
  }

  .work-index-hero__count {
    justify-content: flex-start;
  }

  .work-project__media,
  .work-project:nth-child(even) .work-project__media {
    grid-column: 1 / span 7;
  }

  .work-project__copy,
  .work-project:nth-child(even) .work-project__copy {
    grid-column: 8 / -1;
  }

  .case-hero__title,
  .case-hero__lead {
    grid-column: 1 / -1;
  }

  .case-hero__lead {
    max-width: 620px;
    margin-top: 24px;
  }

  .case-story__side {
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    align-items: center;
  }

  .case-story__side p {
    max-width: 44ch;
  }
}

@media (max-width: 700px) {
  .work-index-hero,
  .work-list,
  .case-hero__inner,
  .case-story__inner,
  .case-gallery,
  .case-facts__inner,
  .case-next__inner {
    width: min(100% - 36px, 1380px);
  }

  .work-index-hero {
    min-height: auto;
    padding-top: 72px;
  }

  .work-index-hero h1 {
    font-size: clamp(3.6rem, 18vw, 5.8rem);
  }

  .work-project {
    grid-template-columns: 1fr;
  }

  .work-project__media,
  .work-project:nth-child(even) .work-project__media,
  .work-project__copy,
  .work-project:nth-child(even) .work-project__copy {
    grid-column: 1;
    grid-row: auto;
  }

  .work-project__number {
    margin-bottom: 26px;
  }

  .case-hero h1 {
    font-size: clamp(4.6rem, 23vw, 7rem);
  }

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

  .case-cover {
    height: 64dvh;
    min-height: 440px;
  }

  .case-story__side,
  .case-story__columns,
  .case-facts__inner {
    grid-template-columns: 1fr;
  }

  .case-story__side img {
    max-width: 220px;
  }

  .case-statement {
    min-height: 66dvh;
    padding-inline: 18px;
  }

  .case-statement p {
    font-size: clamp(3.4rem, 17vw, 6rem);
  }

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

  .case-gallery figure,
  .case-gallery figure:nth-child(2),
  .case-gallery figure:nth-child(3) {
    grid-column: 1;
  }

  .case-gallery img {
    min-height: 360px;
  }

  .case-next__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-project__media img,
  .work-project__arrow,
  .case-live-link,
  .case-next__arrow {
    transition: none;
  }
}
