/* Project stories share the portfolio's type and palette. */
.case-studies {
  background: #eeeee7;
}
.case-studies .section-heading > div {
  display: block;
  max-width: 850px;
}
.case-studies .section-heading h2 {
  font-size: clamp(40px, 5vw, 66px);
}
.case-studies .case-section-intro {
  max-width: 570px;
  margin-top: 24px;
  color: var(--muted);
}
.case-teasers {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px 42px;
}
.case-teaser {
  min-width: 0;
  border-top: 1px solid #bdc6b9;
  padding-top: 24px;
}
.case-teaser:first-child {
  grid-row: span 2;
}
.case-teaser > a {
  display: block;
}
.case-teaser img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 22px;
}
.case-teaser:not(:first-child) > a {
  display: grid;
  grid-template-columns: 38% 1fr;
  align-items: start;
  gap: 25px;
}
.case-teaser:not(:first-child) img {
  margin: 0;
}
.case-teaser .case-category {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 12px;
}
.case-teaser h3 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
  margin-bottom: 16px;
}
.case-teaser:not(:first-child) h3 {
  font-size: 30px;
}
.case-teaser p {
  font-size: 18px;
  line-height: 1.65;
}
.case-teaser .case-read {
  display: inline-block;
  margin-top: 22px;
  border-bottom: 1px solid #8c9a85;
  padding-bottom: 5px;
  font-size: 18px;
}
.case-teaser a:hover .case-read {
  color: var(--green);
  border-color: var(--green);
}
.project-study-link {
  display: inline-block;
  margin-top: 12px;
  border-bottom: 1px solid #65735a;
  padding-bottom: 4px;
  font-size: 18px;
  color: #c2e6c6;
}
.project-study-link:hover {
  color: #6ed695;
}
.case-page {
  --case-accent: #267548;
  --case-surface: #e0e9dd;
}
.case-page-postzapai {
  --case-accent: #355e91;
  --case-surface: #dce6f4;
}
.case-page-khyati-retail {
  --case-accent: #805d39;
  --case-surface: #eaded0;
}
.case-page .case-shell {
  width: min(1320px, calc(100% - 112px));
  margin-inline: auto;
}
.case-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #10120f;
  color: #f8f8f2;
  border-bottom: 1px solid #35452e;
}
.case-header-inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.case-brand img {
  width: 205px;
  height: auto;
}
.case-header nav {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 18px;
}
.case-header nav a:last-child {
  border-bottom: 1px solid #829575;
  padding-bottom: 5px;
}
.case-reading-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 3px;
  background: #44ce78;
  transform-origin: left;
  transform: scaleX(0);
}
.case-hero {
  padding-block: 65px 50px;
}
.case-back {
  display: inline-block;
  font-size: 18px;
  margin-bottom: 50px;
  border-bottom: 1px solid #9ba895;
  padding-bottom: 5px;
}
.case-kicker {
  font-size: 18px;
  color: var(--case-accent);
  margin-bottom: 22px;
}
.case-hero h1 {
  font-size: clamp(64px, 8.3vw, 118px);
  font-weight: 500;
  line-height: 0.98;
  margin-bottom: 26px;
}
.case-hero .case-deck {
  font-family: var(--display);
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  max-width: 930px;
}
.case-hero .case-summary {
  font-size: 20px;
  max-width: 720px;
  margin-top: 27px;
  color: var(--muted);
}
.case-facts {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 30px;
  margin-top: 50px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.case-facts dt {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 8px;
}
.case-facts dd {
  font-size: 18px;
  margin: 0;
}
.case-facts dd a {
  border-bottom: 1px solid #a6b49e;
}
.case-cover {
  background: var(--case-surface);
  margin-bottom: 70px;
}
.case-cover img {
  width: min(100%, 1400px);
  margin-inline: auto;
}
.case-cover figcaption {
  padding: 16px 28px;
  text-align: center;
  font-size: 18px;
  color: #465242;
}
.case-editorial {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 80px;
}
.case-contents {
  position: sticky;
  top: 145px;
  padding-bottom: 30px;
}
.case-contents > p {
  margin-bottom: 18px;
  font-size: 18px;
  color: var(--muted);
}
.case-contents a {
  display: block;
  padding: 10px 0 10px 15px;
  border-left: 2px solid #d3d8ce;
  font-size: 18px;
  line-height: 1.5;
}
.case-contents a[aria-current="location"] {
  border-color: var(--case-accent);
  color: var(--case-accent);
}
.case-article {
  min-width: 0;
}
.case-chapter {
  scroll-margin-top: 20px;
  padding-bottom: 72px;
}
.case-chapter + .case-chapter {
  border-top: 1px solid var(--line);
  padding-top: 48px;
}
.case-chapter h2 {
  font-size: clamp(34px, 4vw, 49px);
  font-weight: 500;
  margin-bottom: 27px;
}
.case-chapter h3 {
  font-size: 27px;
  line-height: 1.18;
  margin: 35px 0 16px;
}
.case-chapter p {
  font-size: 18px;
  line-height: 1.85;
  max-width: 72ch;
}
.case-chapter p + p {
  margin-top: 22px;
}
.case-chapter .case-lead {
  font-size: 23px;
  line-height: 1.6;
  color: #1e3328;
}
.case-chapter .case-pull {
  font-family: var(--display);
  font-size: clamp(28px, 3.6vw, 43px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  border-left: 3px solid var(--case-accent);
  padding-left: 25px;
  margin: 35px 0;
  color: var(--ink);
}
.case-screen-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-block: 32px;
}
.case-screen-grid img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: var(--case-surface);
}
.case-screen-grid figure {
  min-width: 0;
}
.case-screen-grid figcaption {
  font-size: 18px;
  line-height: 1.6;
  margin-top: 18px;
  color: var(--muted);
}
.case-screen-grid figcaption strong {
  display: block;
  color: var(--ink);
  margin-bottom: 8px;
  font-weight: 500;
}
.case-screen-grid a {
  display: block;
}
.case-screen-grid a:hover {
  outline: 2px solid var(--case-accent);
  outline-offset: 5px;
}
.case-screen-links {
  font-size: 18px;
  color: var(--muted);
  margin-top: 12px;
}
.case-browser-captures {
  display: grid;
  grid-template-columns: 1.6fr 0.65fr;
  gap: 25px;
  align-items: start;
  margin-block: 35px;
}
.case-browser-captures figure {
  min-width: 0;
}
.case-browser-captures img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.case-browser-captures figcaption {
  margin-top: 15px;
  font-size: 18px;
  color: var(--muted);
}
.case-link-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}
.case-link-list li + li {
  margin-top: 12px;
}
.case-link-list a {
  display: inline-block;
  border-bottom: 1px solid #9ba895;
  font-size: 18px;
}
.case-next {
  margin-top: 35px;
  padding-block: 55px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 35px;
  align-items: center;
  justify-content: space-between;
}
.case-next p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 15px;
}
.case-next a {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.case-footer {
  background: #10120f;
  color: #edf1e7;
  padding-block: 42px;
}
.case-footer .case-shell {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  flex-wrap: wrap;
}
.case-footer p,
.case-footer a {
  font-size: 18px;
}
.case-page :focus-visible {
  outline: 2px solid var(--case-accent);
  outline-offset: 6px;
}
.case-header :focus-visible,
.case-footer :focus-visible {
  outline-color: #6ed695;
}
@media (max-width: 1050px) {
  .case-teasers {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .case-teaser:first-child {
    grid-row: auto;
    grid-column: 1 / -1;
  }
  .case-teaser:first-child > a {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
  }
  .case-teaser:not(:first-child) > a {
    display: block;
  }
  .case-teaser:not(:first-child) img {
    margin-bottom: 22px;
  }
  .case-editorial {
    grid-template-columns: 185px minmax(0, 1fr);
    gap: 40px;
  }
  .case-screen-grid {
    gap: 15px;
  }
}
@media (max-width: 760px) {
  .case-page .case-shell {
    width: calc(100% - 40px);
  }
  .case-header-inner {
    min-height: 82px;
    gap: 20px;
  }
  .case-brand img {
    width: 145px;
  }
  .case-header nav {
    gap: 18px;
  }
  .case-header nav a:first-child {
    display: none;
  }
  .case-hero {
    padding-block: 35px;
  }
  .case-back {
    margin-bottom: 35px;
  }
  .case-hero h1 {
    font-size: clamp(50px, 12vw, 76px);
    overflow-wrap: anywhere;
  }
  .case-hero .case-deck {
    font-size: 34px;
  }
  .case-hero .case-summary {
    font-size: 18px;
  }
  .case-facts {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 35px;
  }
  .case-cover {
    margin-bottom: 40px;
  }
  .case-cover figcaption {
    padding: 16px 20px;
    text-align: left;
  }
  .case-editorial {
    display: block;
  }
  .case-contents {
    position: static;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--line);
  }
  .case-contents a {
    padding-block: 8px;
  }
  .case-chapter {
    scroll-margin-top: 20px;
    padding-bottom: 45px;
  }
  .case-chapter + .case-chapter {
    padding-top: 35px;
  }
  .case-chapter h2 {
    font-size: 36px;
  }
  .case-chapter .case-lead {
    font-size: 21px;
  }
  .case-screen-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .case-screen-grid img {
    max-width: 360px;
    margin-inline: auto;
  }
  .case-browser-captures {
    grid-template-columns: 1fr;
  }
  .case-browser-captures figure:last-child {
    max-width: 300px;
  }
  .case-next {
    display: block;
    margin-top: 0;
    padding-block: 35px;
  }
  .case-next > a {
    display: inline-block;
    margin-top: 30px;
    font-size: 22px;
  }
  .case-teasers {
    grid-template-columns: 1fr;
  }
  .case-teaser:first-child {
    grid-column: auto;
  }
  .case-teaser:first-child > a {
    display: block;
  }
  .case-teaser h3,
  .case-teaser:not(:first-child) h3 {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .case-page {
    scroll-behavior: auto;
  }
}
