.case-page {
  background: var(--paper);
}

.case-page main {
  overflow: hidden;
}

.case-page .main-nav a[aria-current="page"] {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.case-page .main-nav a[aria-current="page"] span {
  background: var(--lime);
  transform: scale(1.5);
}

/* Case studies listing */
.case-list-hero {
  position: relative;
  height: 1164px;
}

.case-list-hero > h1 {
  position: absolute;
  z-index: 2;
  top: 191px;
  left: 38px;
  margin: 0;
  font-family: var(--condensed);
  font-size: clamp(270px, 18.75vw, 360px);
  font-weight: 600;
  font-variation-settings: "wght" 600, "CNTR" 0, "ital" 0;
  line-height: .92;
  letter-spacing: -3px;
  text-transform: uppercase;
  white-space: nowrap;
  perspective: 1000px;
}

.case-list-hero > h1 span {
  display: block;
  clip-path: inset(-.12em -.03em);
}

.case-list-rule {
  position: absolute;
  top: 522px;
  right: 44px;
  left: 44px;
  border-top: 1px solid rgba(17, 17, 17, .2);
}

.case-eyebrow {
  position: absolute;
  top: 605px;
  left: 44px;
  color: #4a4a4a;
  font-size: 20px;
  line-height: 1.3;
  text-transform: uppercase;
}

.case-list-hero > h2 {
  position: absolute;
  top: 572px;
  left: 27.865%;
  margin: 0;
  font-family: var(--display);
  font-size: 100px;
  font-weight: 400;
  line-height: .98;
  letter-spacing: -9.8px;
}

.case-list-hero > h2 span {
  display: block;
  white-space: nowrap;
}

.case-disciplines {
  position: absolute;
  top: 936px;
  left: 28.281%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-disciplines li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 20px;
  color: #4a4a4a;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -.5px;
}

.case-disciplines li::before {
  position: absolute;
  top: 9px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.case-intro {
  position: absolute;
  top: 936px;
  left: 28%;
  width: 900px;
  margin: 0;
  color: #4a4a4a;
  font-size: 24px;
  line-height: 1.29;
}

.case-gallery {
  display: grid;
  height: 2264px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 666px;
  column-gap: 38px;
  row-gap: 69px;
  padding: 0 44px;
}

.case-list-card {
  display: block;
  min-width: 0;
}

.case-list-image {
  display: block;
  width: 100%;
  height: 613px;
  overflow: hidden;
  border-radius: 20px;
}

.case-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .65, .25, 1);
}

.case-list-card:hover .case-list-image img,
.case-list-card:focus-visible .case-list-image img {
  transform: scale(1.035);
}

.case-list-card h3 {
  width: 94.65%;
  margin: 18px 0 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.17;
  letter-spacing: -2.4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shared contact band */
.case-contact {
  position: relative;
  height: 280px;
  margin: 0 160px;
  border-top: 1px solid rgba(17, 17, 17, .16);
  border-bottom: 1px solid rgba(17, 17, 17, .16);
}

.case-brand-lockup {
  position: absolute;
  top: 76px;
  left: 0;
  width: 524px;
  height: 128px;
  overflow: hidden;
}

.case-brand-word,
.case-brand-petal {
  position: absolute;
  max-width: none;
}

.case-brand-word {
  top: 9.28%;
  left: 0;
  width: 77.63%;
  height: 62.46%;
}

.case-brand-petal {
  width: 12.18%;
  height: 50%;
}

.case-brand-lockup .petal-one { right: 0; bottom: 0; }
.case-brand-lockup .petal-two { top: 0; right: 0; }
.case-brand-lockup .petal-three { top: 0; left: 75.66%; }
.case-brand-lockup .petal-four { bottom: 0; left: 75.66%; }

.case-contact-copy {
  position: absolute;
  top: 62px;
  left: 51.188%;
  width: 649px;
  font-size: 30px;
  line-height: 1.3;
}

.case-contact-copy p {
  margin: 0;
}

.case-contact-copy a {
  color: #999;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Shared compact footer: both Figma frames use the same 472px footer. */
.case-footer {
  position: relative;
  display: block;
  height: 472px;
  min-height: 472px;
  padding-top: 0;
  padding-bottom: 0;
}

.case-footer .footer-meta {
  position: absolute;
  bottom: 101px;
  left: var(--gutter);
}

.case-footer .footer-cta {
  position: absolute;
  top: 60px;
  left: 62.604%;
}

.case-footer .footer-cta .pill-button {
  position: absolute;
  top: 253px;
  left: 218px;
  margin-top: 0;
}

.case-detail-page .case-footer {
  height: 473px;
  min-height: 473px;
}

/* Case study detail */
.case-detail-main {
  position: relative;
}

.case-detail-heading {
  position: relative;
  height: 592px;
}

.case-detail-thumb {
  position: absolute;
  top: 161px;
  left: 44px;
  width: 317px;
  height: 217px;
  border-radius: 20px;
  object-fit: cover;
}

.case-detail-title-block {
  position: absolute;
  top: 174px;
  right: 44px;
  left: 20.885%;
}

.case-detail-title-block h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 80px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -4.8px;
}

.case-detail-title-block h1 span {
  display: block;
  white-space: nowrap;
}

.case-detail-title-block > p {
  margin: 8px 0 0 6px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -1px;
}

.case-meta {
  position: absolute;
  top: 448px;
  right: 44px;
  left: 44px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 60px;
}

.case-meta dl {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 17, 17, .2);
}

.case-meta dt,
.case-meta dd {
  margin: 0;
  font-size: 18px;
  line-height: 1.28;
  letter-spacing: -.5px;
}

.case-meta dt {
  color: #999;
}

.case-meta dd {
  margin-top: 4px;
  color: #4a4a4a;
  font-weight: 600;
}

.case-detail-visuals {
  display: grid;
  height: 613px;
  grid-template-columns: 678px minmax(0, 1fr);
  gap: 38px;
  margin: 0 44px;
}

.case-detail-visuals figure {
  height: 613px;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
}

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

.case-detail-sections {
  margin: 70px 44px 104px;
}

.case-detail-row {
  display: grid;
  grid-template-columns: 679px 880px;
  column-gap: 37px;
  padding: 44px 0;
  border-bottom: 1px dashed rgba(17, 17, 17, .2);
}

.case-detail-row:first-child {
  padding-top: 0;
}

.case-detail-row h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.17;
  letter-spacing: -.6px;
  text-align: right;
  white-space: nowrap;
}

.case-detail-row ul {
  display: flex;
  width: 880px;
  flex-direction: column;
  gap: 20px;
  margin: -6px 0 0;
  padding: 6px 0;
  list-style: none;
}

.case-detail-row li {
  position: relative;
  min-height: 28px;
  padding-left: 20px;
  color: #4a4a4a;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -.5px;
}

.case-detail-row li::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 28px;
  background: url("../img/case-dot.svg") center / 8px 28px no-repeat;
  content: "";
}

.row-stack {
  padding-bottom: 0;
  border-bottom: 0;
}

.case-stack-content {
  width: 880px;
}

.case-stack-content > ul {
  width: 100%;
}

.case-tech-stack {
  display: flex;
  width: 880px;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 16px;
  margin-top: 36px;
}

.case-tech-stack span {
  display: grid;
  height: 41px;
  place-items: center;
  padding: 0 25px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 1450px) {
  .case-list-hero > h1 { font-size: 270px; }
  .case-list-hero > h2 { font-size: 76px; letter-spacing: -7px; }
  .case-intro { width: 520px; font-size: 20px; }
  .case-gallery { grid-auto-rows: 530px; row-gap: 55px; }
  .case-list-image { height: 475px; }
  .case-gallery { height: 1800px; }
  .case-list-card h3 { font-size: 24px; }

  .case-contact-copy { left: 55%; width: 42%; font-size: 24px; }
  .case-brand-lockup { width: 440px; height: 108px; }

  .case-detail-title-block h1 { font-size: 60px; }
  .case-detail-title-block h1 span { white-space: normal; }
  .case-detail-title-block > p { font-size: 24px; }
  .case-detail-visuals { grid-template-columns: 37% 1fr; }
  .case-detail-row { grid-template-columns: 36% 58%; column-gap: 4%; }
  .case-detail-row ul,
  .case-tech-stack,
  .case-stack-content { width: 100%; }
  .case-detail-row h2 { font-size: 25px; white-space: normal; }
  .case-detail-row li { font-size: 17px; }
}

@media (max-width: 1050px) {
  .case-list-hero,
  .case-gallery {
    height: auto;
  }

  .case-list-hero { min-height: 930px; padding: 420px 20px 80px; }
  .case-list-hero > h1 { top: 150px; left: 20px; font-size: clamp(142px, 25.7vw, 270px); }
  .case-list-rule { top: 390px; right: 20px; left: 20px; }
  .case-eyebrow,
  .case-list-hero > h2,
  .case-disciplines,
  .case-intro { position: relative; inset: auto; }
  .case-list-hero > h2 { margin: 30px 0 0 24%; font-size: clamp(58px, 8vw, 76px); }
  .case-disciplines { margin: 60px 0 0 24%; }
  .case-intro { width: 62%; margin: -140px 0 0 auto; }

  .case-gallery { grid-auto-rows: auto; padding: 0 20px 100px; }
  .case-list-image { height: auto; aspect-ratio: 897 / 613; }
  .case-list-card h3 { width: 100%; white-space: normal; }

  .case-contact {
    display: grid;
    height: auto;
    min-height: 300px;
    grid-template-columns: 48% 52%;
    align-items: center;
    margin: 0 40px;
    padding: 70px 0;
  }
  .case-brand-lockup,
  .case-contact-copy { position: relative; inset: auto; }
  .case-brand-lockup { width: min(440px, 90%); height: auto; aspect-ratio: 524 / 128; }
  .case-contact-copy { width: auto; font-size: 24px; }

  .case-footer {
    display: grid;
    height: auto;
    min-height: 500px;
    grid-template-columns: 55% 45%;
    padding-top: 100px;
    padding-bottom: 70px;
  }
  .case-footer .footer-meta,
  .case-footer .footer-cta,
  .case-footer .footer-cta .pill-button { position: static; }
  .case-footer .footer-cta .pill-button { margin-top: 25px; }
  .case-detail-page .case-footer { height: auto; min-height: 500px; }

  .case-detail-main { padding: 140px 20px 100px; }
  .case-detail-heading,
  .case-detail-visuals { height: auto; }
  .case-detail-heading { display: grid; grid-template-columns: 30% 1fr; gap: 40px; }
  .case-detail-thumb,
  .case-detail-title-block,
  .case-meta { position: relative; inset: auto; width: auto; }
  .case-detail-thumb { width: 100%; height: auto; aspect-ratio: 317 / 217; }
  .case-detail-title-block { align-self: center; }
  .case-detail-title-block h1 { font-size: clamp(45px, 6.5vw, 64px); }
  .case-detail-title-block > p { margin-left: 0; }
  .case-meta { grid-column: 1 / -1; column-gap: 24px; margin-top: 25px; }
  .case-detail-visuals { grid-template-columns: 37% 1fr; gap: 20px; margin: 70px 0 0; }
  .case-detail-visuals figure { height: auto; aspect-ratio: 1 / 1; }
  .case-detail-sections { margin: 70px 0 0; }
  .case-detail-row {
    height: auto;
    min-height: 180px;
    grid-template-columns: 34% 1fr;
    column-gap: 5%;
    padding: 45px 0;
  }
}

@media (max-width: 760px) {
  .case-list-hero { min-height: 820px; padding: 310px 16px 70px; }
  .case-list-hero > h1 { top: 130px; left: 16px; font-size: clamp(76px, 20.6vw, 138px); letter-spacing: -1px; }
  .case-list-rule { top: 290px; right: 16px; left: 16px; }
  .case-list-hero > h2 { margin-left: 0; font-size: clamp(50px, 14vw, 68px); letter-spacing: -4px; }
  .case-list-hero > h2 span { white-space: normal; }
  .case-disciplines { margin: 48px 0 0; }
  .case-intro { width: 100%; margin: 45px 0 0; }

  .case-gallery { grid-template-columns: 1fr; gap: 55px; padding: 0 16px 85px; }
  .case-list-card h3 { font-size: 22px; letter-spacing: -1px; }

  .case-contact { display: block; margin: 0 16px; padding: 65px 0; }
  .case-brand-lockup { width: 100%; }
  .case-contact-copy { margin-top: 55px; font-size: 22px; }

  .case-footer {
    display: flex;
    min-height: 650px;
    flex-direction: column-reverse;
    justify-content: space-between;
    padding: 80px 16px 55px;
  }
  .case-detail-page .case-footer { min-height: 650px; }

  .case-detail-main { padding: 120px 16px 80px; }
  .case-detail-heading { display: block; }
  .case-detail-thumb { width: 58%; }
  .case-detail-title-block { margin-top: 35px; }
  .case-detail-title-block h1 { font-size: clamp(42px, 12vw, 60px); line-height: 1.02; letter-spacing: -3px; }
  .case-detail-title-block > p { margin-top: 14px; font-size: 20px; }
  .case-meta { grid-template-columns: repeat(2, 1fr); gap: 28px 18px; margin-top: 45px; }
  .case-detail-visuals { grid-template-columns: 1fr; }
  .case-detail-visuals figure { aspect-ratio: 1.2 / 1; }
  .case-detail-row { display: block; min-height: 0; padding: 48px 0; }
  .case-detail-row h2 { text-align: left; }
  .case-detail-row ul,
  .case-tech-stack { margin-top: 30px; }
  .case-detail-row li { font-size: 18px; }
  .case-tech-stack { gap: 10px; }
  .case-tech-stack span { height: 38px; padding-inline: 18px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .case-page *,
  .case-page *::before,
  .case-page *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
