.case-study-page {
  --case-lime: #a8bd27;
  --case-lilac: #d9c8e7;
  --case-cream: #f3efe7;
  background: #ffffff;
}

.case-study-page .site-header {
  background: rgba(255, 255, 255, 0.92);
}

.case-hero {
  overflow: hidden;
  padding: clamp(64px, 9vw, 128px) 0 clamp(72px, 10vw, 142px);
  background:
    radial-gradient(circle at 82% 18%, rgba(168, 189, 39, 0.18), transparent 24%),
    radial-gradient(circle at 62% 84%, rgba(217, 200, 231, 0.16), transparent 28%),
    var(--ink);
  color: #ffffff;
}

.case-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(520px, 1.22fr);
  gap: clamp(48px, 7vw, 100px);
  align-items: center;
}

.case-eyebrow,
.case-index {
  margin: 0;
  color: var(--yellow);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-title {
  display: block;
  max-width: 760px;
  margin: 20px 0 0;
  font-family:
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(44px, 5.6vw, 82px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.case-title span {
  display: block;
  margin-top: 0.22em;
  color: var(--case-lime);
  font: inherit;
}

.case-lead {
  max-width: 670px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 650;
  line-height: 1.62;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.case-button-primary {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--ink);
}

.case-button-ghost {
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.case-hero-collage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
  align-items: center;
  height: 640px;
  transform: rotate(1.5deg);
}

.case-hero-collage figure {
  overflow: hidden;
  height: 82%;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: #ffffff;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.32);
}

.case-hero-collage figure:nth-child(1) {
  height: 78%;
  transform: translateY(8%);
}

.case-hero-collage figure:nth-child(2) {
  height: 100%;
  transform: translateY(-6%);
}

.case-hero-collage figure:nth-child(3) {
  height: 84%;
  transform: translateY(5%);
}

.case-hero-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.case-facts {
  border-bottom: 1px solid var(--line-dark);
  background: var(--case-cream);
}

.case-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.case-facts-grid div {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 160px;
  padding: 28px clamp(18px, 2.4vw, 34px);
  border-right: 1px solid rgba(23, 22, 21, 0.16);
}

.case-facts-grid div:first-child {
  border-left: 1px solid rgba(23, 22, 21, 0.16);
}

.case-facts-grid span,
.boundary-grid > article > span,
.value-grid article > span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.case-facts-grid strong {
  font-size: 17px;
  line-height: 1.48;
}

.case-feedback-compact {
  border-bottom: 1px solid var(--line-dark);
  background: var(--case-lilac);
}

.trust-strip {
  display: grid;
  grid-template-columns: minmax(120px, 0.24fr) minmax(0, 1fr) minmax(240px, 0.5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding-top: clamp(54px, 7vw, 82px);
  padding-bottom: clamp(54px, 7vw, 82px);
}

.trust-strip .case-index {
  color: var(--ink);
}

.trust-strip h2 {
  margin: 0;
  font-family:
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(28px, 3.7vw, 52px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.trust-strip > p:last-child {
  margin: 0;
  color: var(--soft-ink);
  font-size: 16px;
  line-height: 1.72;
}

.case-chapter {
  padding: clamp(82px, 11vw, 152px) 0;
  border-bottom: 1px solid var(--line);
}

.case-chapter-grid,
.feedback-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1fr);
  gap: clamp(42px, 8vw, 112px);
  align-items: start;
}

.case-chapter-heading {
  position: sticky;
  top: 106px;
}

.case-chapter-heading h2,
.case-story-heading h2,
.case-cta h2 {
  margin: 14px 0 0;
  font-family:
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(36px, 4.8vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.case-chapter-heading-wide {
  position: static;
  max-width: 820px;
  margin-bottom: clamp(36px, 5vw, 62px);
}

.case-chapter-heading-wide > p:last-child,
.case-story-heading > p:last-child {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.case-prose {
  display: grid;
  gap: 22px;
}

.case-prose p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 18px;
  line-height: 1.78;
}

.case-prose-large > p:first-child {
  color: var(--ink);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 760;
  line-height: 1.55;
}

.case-prose blockquote {
  margin: 16px 0 0;
  border-left: 5px solid var(--red);
  padding: 8px 0 8px 24px;
  color: var(--ink);
  font-family:
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(25px, 3.1vw, 42px);
  font-weight: 780;
  line-height: 1.4;
}

.case-chapter-tinted {
  background: #eef2ec;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line-dark);
  background: var(--line-dark);
}

.boundary-grid article {
  min-height: 330px;
  padding: clamp(26px, 3.5vw, 42px);
  background: #ffffff;
}

.boundary-grid .boundary-card-primary {
  background: var(--ink);
  color: #ffffff;
}

.boundary-grid .boundary-card-primary > span {
  color: var(--case-lime);
}

.boundary-grid h3,
.work-grid h3 {
  margin: 22px 0 0;
  font-size: clamp(23px, 2.4vw, 32px);
  line-height: 1.28;
}

.boundary-grid p,
.work-grid p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.boundary-card-primary p {
  color: rgba(255, 255, 255, 0.72);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
}

.work-grid article {
  min-height: 290px;
  padding: 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.work-grid article:nth-child(2n) {
  border-right: 0;
}

.work-grid article > span {
  color: var(--red);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
}

.case-visual-story {
  padding: clamp(82px, 11vw, 152px) 0;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.5), transparent 34%),
    #e7e8e4;
  color: var(--ink);
}

.case-visual-story .case-index {
  color: #6f7d16;
}

.case-visual-story .case-story-heading {
  max-width: 880px;
  margin-bottom: clamp(48px, 6vw, 72px);
}

.case-visual-story .case-story-heading > p:last-child {
  color: var(--muted);
}

.key-screen-grid {
  display: grid;
  gap: clamp(86px, 11vw, 144px);
  max-width: 1040px;
  margin: 0 auto;
}

.screen-card,
.screen-gallery > a {
  display: block;
}

.screen-card {
  --screen-accent: #81689a;
  color: var(--ink);
  scroll-margin-top: 110px;
}

.screen-card:nth-child(2) {
  --screen-accent: #748314;
}

.screen-card:nth-child(3) {
  --screen-accent: #c65b2c;
}

.screen-card figure {
  display: grid;
  grid-template-areas: "copy artwork";
  grid-template-columns: minmax(220px, 0.58fr) minmax(0, 580px);
  gap: clamp(40px, 7vw, 92px);
  align-items: start;
  margin: 0;
  padding-top: clamp(24px, 3vw, 38px);
  border-top: 1px solid rgba(23, 22, 21, 0.24);
}

.screen-card:nth-child(2) figure {
  grid-template-areas: "artwork copy";
  grid-template-columns: minmax(0, 580px) minmax(220px, 0.58fr);
}

.screen-gallery figure {
  margin: 0;
}

.screen-card figcaption {
  position: sticky;
  top: 112px;
  grid-area: copy;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 12px 0 0;
}

.screen-card figcaption::before {
  content: "";
  width: 84px;
  height: 9px;
  margin-bottom: 14px;
  border-top: 2px solid var(--screen-accent);
  border-bottom: 6px solid var(--screen-accent);
  transform: rotate(-7deg);
  transform-origin: left center;
}

.screen-card figcaption > span:first-child {
  color: var(--screen-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.screen-card figcaption strong {
  max-width: 320px;
  font-family:
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.26;
  letter-spacing: -0.025em;
}

.screen-open {
  width: fit-content;
  margin-top: 10px;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  color: var(--soft-ink);
  font-size: 13px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
}

.screen-artwork {
  grid-area: artwork;
  overflow: hidden;
  max-width: 580px;
  border: 1px solid rgba(23, 22, 21, 0.2);
  background: #f8f8f5;
  box-shadow: 14px 14px 0 rgba(23, 22, 21, 0.07);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.screen-artwork img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  background: #f8f8f5;
  box-shadow: none;
}

.screen-card:hover .screen-artwork {
  transform: translate(3px, -3px);
  box-shadow: 10px 18px 0 rgba(23, 22, 21, 0.1);
}

.screen-card:hover .screen-open {
  color: var(--screen-accent);
}

.screen-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 50px) clamp(16px, 2.6vw, 32px);
  align-items: start;
  margin-top: clamp(64px, 9vw, 108px);
  padding-top: clamp(52px, 7vw, 82px);
  border-top: 1px solid rgba(23, 22, 21, 0.18);
}

.screen-gallery img {
  display: block;
  width: 100%;
  height: clamp(480px, 48vw, 660px);
  border: 1px solid rgba(23, 22, 21, 0.18);
  background: #f8f8f5;
  object-fit: cover;
  object-position: top;
  box-shadow: none;
  transition: transform 180ms ease;
}

.screen-gallery a:hover img {
  transform: translateY(-4px);
}

.screen-details {
  margin-top: clamp(44px, 6vw, 68px);
  border-top: 1px solid rgba(23, 22, 21, 0.18);
}

.screen-details summary {
  width: fit-content;
  margin: 0 auto;
  padding: 22px 4px;
  color: #667311;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
}

.screen-details summary:hover {
  color: var(--ink);
}

.screen-details summary:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--case-lime);
  outline-offset: 5px;
}

.screen-details[open] summary {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.screen-details .summary-open,
.screen-details[open] .summary-closed {
  display: none;
}

.screen-details[open] .summary-open {
  display: inline;
}

.screen-details .screen-gallery {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.screen-gallery figcaption {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.screen-gallery figcaption strong {
  color: #667311;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.case-feedback {
  background: var(--case-lilac);
}

.feedback-copy {
  display: grid;
  gap: 20px;
}

.feedback-copy blockquote {
  margin: 0;
  font-family:
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(46px, 7vw, 98px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.feedback-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--soft-ink);
  font-size: 17px;
}

.case-value {
  background: #ffffff;
}

.case-story-heading-light > p:last-child {
  color: var(--muted);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line-dark);
  background: var(--line-dark);
}

.value-grid article {
  min-height: 230px;
  padding: clamp(26px, 3.5vw, 42px);
  background: var(--paper);
}

.value-grid p {
  margin: 24px 0 0;
  color: var(--ink);
  font-family:
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 760;
  line-height: 1.5;
}

.value-closing {
  max-width: 960px;
  margin: clamp(48px, 7vw, 82px) 0 0;
  font-family:
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(34px, 5vw, 70px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.case-cta {
  padding: clamp(72px, 10vw, 132px) 0;
  border-top: 1px solid var(--line-dark);
  background: var(--case-cream);
}

.case-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: clamp(38px, 7vw, 92px);
  align-items: end;
}

.case-cta h2 {
  max-width: 850px;
}

.case-cta p:not(.case-index) {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.case-cta .case-actions {
  display: grid;
  margin: 0;
}

.case-contact-boundary {
  max-width: 720px !important;
  padding-left: 16px;
  border-left: 3px solid var(--red);
  color: var(--soft-ink) !important;
  font-size: 15px !important;
}

.case-contact-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(24px, 3.4vw, 38px);
  border: 1px solid var(--line-dark);
  background: #ffffff;
  box-shadow: 12px 12px 0 var(--case-lilac);
}

.case-contact-card > span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.case-contact-card > strong {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(27px, 3.2vw, 40px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.case-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.case-contact-actions .button {
  width: auto;
  font-family: inherit;
  cursor: pointer;
}

.case-contact-card .copy-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--green);
  font-size: 13px;
}

@media (max-width: 960px) {
  .case-hero-grid,
  .case-chapter-grid,
  .feedback-grid,
  .trust-strip,
  .case-cta-grid {
    grid-template-columns: 1fr;
  }

  .case-hero-copy {
    max-width: 820px;
  }

  .case-hero-collage {
    width: min(760px, 100%);
    margin: 20px auto 0;
  }

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

  .case-facts-grid div:nth-child(2) {
    border-right: 1px solid rgba(23, 22, 21, 0.16);
  }

  .case-facts-grid div:nth-child(n + 3) {
    border-top: 1px solid rgba(23, 22, 21, 0.16);
  }

  .case-chapter-heading {
    position: static;
  }

  .boundary-grid,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .boundary-grid article,
  .value-grid article {
    min-height: auto;
  }

  .screen-card figure {
    grid-template-columns: minmax(180px, 0.48fr) minmax(0, 500px);
    gap: clamp(28px, 5vw, 46px);
  }

  .screen-card:nth-child(2) figure {
    grid-template-columns: minmax(0, 500px) minmax(180px, 0.48fr);
  }

  .screen-card figcaption strong {
    font-size: clamp(26px, 4vw, 36px);
  }
}

@media (max-width: 700px) {
  .case-nav a:first-child {
    display: inline;
  }

  .case-title {
    font-size: clamp(40px, 13vw, 58px);
  }

  .case-hero {
    padding-top: 58px;
  }

  .case-hero-collage {
    width: calc(100% + 54px);
    height: 460px;
    margin-left: -27px;
  }

  .case-facts-grid,
  .work-grid,
  .key-screen-grid,
  .screen-gallery {
    grid-template-columns: 1fr;
  }

  .case-facts-grid div {
    min-height: auto;
    border-right: 1px solid rgba(23, 22, 21, 0.16);
    border-bottom: 1px solid rgba(23, 22, 21, 0.16);
  }

  .case-facts-grid div:last-child {
    border-bottom: 0;
  }

  .work-grid article {
    min-height: auto;
    border-right: 0;
  }

  .screen-card,
  .screen-gallery > a {
    width: min(100%, 520px);
    margin-inline: auto;
  }

  .case-visual-story .case-story-heading {
    margin-bottom: 40px;
  }

  .key-screen-grid {
    gap: 72px;
  }

  .screen-card figure,
  .screen-card:nth-child(2) figure {
    grid-template-areas:
      "copy"
      "artwork";
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }

  .screen-card figcaption {
    position: static;
    padding-top: 0;
  }

  .screen-card figcaption::before {
    width: 66px;
    margin-bottom: 8px;
  }

  .screen-artwork {
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
    box-shadow: 8px 8px 0 rgba(23, 22, 21, 0.07);
  }

  .screen-gallery img {
    height: min(120vw, 560px);
  }

  .case-cta .case-actions {
    width: 100%;
  }

  .case-contact-actions {
    display: grid;
  }

  .case-contact-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-hero-collage {
    transform: none;
  }

  .screen-artwork,
  .screen-card img,
  .screen-gallery img {
    transition: none;
  }
}
