.case-overview {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 8vw, 7.5rem) 1rem;
  background: #fbfaf6;
  color: #111318;
  border-bottom: 1px solid rgba(17, 19, 24, 0.14);
}

.case-overview::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #ec1968 0 24%, #9b3d96 24% 48%, #f9a31a 48% 74%, #92c73e 74% 100%);
}

.case-overview-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.case-overview-kicker {
  margin: 0 0 1rem;
  color: #9b3d96;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-kerning: normal;
  text-wrap: balance;
}

.case-overview h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.5rem, 4.8vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-kerning: normal;
  text-wrap: balance;
}

.case-overview-lede {
  max-width: 690px;
  margin: 1.5rem 0 0;
  color: #4c5058;
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
}

.case-overview-meta {
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.75rem;
  border-top: 1px solid rgba(17, 19, 24, 0.18);
}

.case-overview-meta div {
  min-width: 0;
  padding: 1rem 0 0;
}

.case-overview-meta dt {
  margin-bottom: 0.35rem;
  color: #7a7e85;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-overview-meta dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.35;
}

.case-overview-visual {
  position: relative;
  min-width: 0;
}

.case-overview-visual::before,
.case-overview-visual::after {
  display: none;
}

.case-overview-frame {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  padding-top: 1.75rem;
  background: #15171b;
  border: 1px solid rgba(17, 19, 24, 0.18);
  border-radius: 0.45rem;
  box-shadow: 0 24px 60px rgba(9, 10, 13, 0.2);
}

.case-overview-frame::before {
  position: absolute;
  top: 0.68rem;
  left: 0.75rem;
  width: 0.42rem;
  height: 0.42rem;
  content: "";
  border-radius: 50%;
  background: #ec1968;
  box-shadow: 0.72rem 0 #f9a31a, 1.44rem 0 #92c73e;
}

.case-overview-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 720px;
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
}

.case-overview-frame figcaption {
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.65);
  background: #090a0d;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-overview-frame figcaption span:last-child { color: #92c73e; }

.case-tech-stack {
  width: min(100%, 1240px);
  margin: clamp(2.2rem, 4vw, 3.4rem) auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(17, 19, 24, 0.16);
}

.case-tech-stack h3 {
  margin: 0 0 1rem;
  color: #656970;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.case-delivery-ledger {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0 1.5rem;
  border-top: 1px solid rgba(17, 19, 24, 0.13);
  list-style: none;
}

.case-delivery-ledger li {
  min-height: 58px;
  padding: 0.95rem 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(17, 19, 24, 0.13);
  color: #17191d;
  font-size: 0.82rem;
  font-weight: 850;
}

.case-tech-label {
  display: block;
  line-height: 1.25;
}

.case-layout {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important;
  gap: clamp(2.5rem, 5vw, 5rem) !important;
}

.case-copy .work-item {
  grid-template-columns: 56px minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(1.25rem, 2vw, 2rem);
}

.case-visual-rail {
  position: sticky;
  top: 104px;
  align-self: start;
  min-width: 0;
}

.case-visual-rail .section-label {
  position: static;
  margin: 0 0 1.1rem;
}

.case-rail-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #111318;
  border: 1px solid rgba(17, 19, 24, 0.15);
  box-shadow: 0 18px 42px rgba(9, 10, 13, 0.14);
}

.case-rail-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: top center;
  background: #fff;
}

.case-rail-frame figcaption {
  padding: 0.75rem 0.85rem;
  display: grid;
  gap: 0.22rem;
  background: #111318;
  color: #fff;
}

.case-rail-frame figcaption strong {
  font-size: 0.76rem;
  line-height: 1.3;
}

.case-rail-frame figcaption span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dark-section .case-rail-frame {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.case-archive-visual {
  position: relative;
  min-height: 260px;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(236,25,104,.32), transparent 42%),
    linear-gradient(315deg, rgba(146,199,62,.24), transparent 45%),
    #111318;
}

.case-archive-visual::before,
.case-archive-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.2);
  transform: rotate(-8deg);
}

.case-archive-visual::before { width: 72%; height: 42%; right: -8%; top: 20%; }
.case-archive-visual::after { width: 58%; height: 34%; left: -10%; bottom: 13%; transform: rotate(9deg); }
.case-archive-visual span { position: relative; z-index: 1; color: #f9a31a; font-size: 0.64rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.case-archive-visual strong { position: relative; z-index: 1; max-width: 220px; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1; letter-spacing: -.04em; }

.case-related {
  padding: clamp(4.5rem, 8vw, 7rem) 1rem;
  color: #fff;
  background: #090a0d;
}

.case-related-inner { width: min(100%, 1240px); margin: 0 auto; }
.case-related-heading { margin-bottom: 2rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.case-related-heading p { margin: 0 0 .6rem; color: #f9a31a; font-size: .7rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.case-related-heading h2 { max-width: 700px; margin: 0; font-size: clamp(2.4rem, 5vw, 4.7rem); line-height: .98; letter-spacing: -.05em; }
.case-related-heading > a { color: #92c73e; font-size: .82rem; font-weight: 850; text-decoration: none; }
.case-related-heading h2 { letter-spacing: -.035em; font-kerning: normal; text-wrap: balance; }
.case-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.case-related-story { min-width: 0; display: flex; flex-direction: column; color: #fff; background: #111318; border: 1px solid rgba(255,255,255,.16); text-decoration: none; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.case-related-media { min-height: 0; margin: 0; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: #f2f0e9; border-bottom: 1px solid rgba(255,255,255,.16); }
.case-related-media img { display: block; width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.case-related-media--empty { background: linear-gradient(135deg, #191c23, #282c34); }
.case-related-copy { min-height: 175px; padding: 1.25rem; display: flex; flex-direction: column; align-items: flex-start; }
.case-related-topic { color: #a9abb0; font-size: .65rem; font-weight: 900; letter-spacing: .12em; line-height: 1.45; text-transform: uppercase; }
.case-related-copy strong { display: block; margin-top: .8rem; font-size: clamp(1.45rem, 2.3vw, 2rem); line-height: 1.03; letter-spacing: -.025em; font-kerning: normal; text-wrap: balance; }
.case-related-copy b { margin-top: auto; padding-top: 1.5rem; color: #92c73e; font-size: .76rem; letter-spacing: .06em; }
.case-related-copy b i { font-style: normal; transition: transform 180ms ease; }
.case-related-story:nth-child(2) b { color: #f9a31a; }
.case-related-story:nth-child(3) b { color: #ec1968; }
.case-related-story:hover,
.case-related-story:focus-visible { background: #171a20; border-color: rgba(255,255,255,.34); transform: translateY(-3px); }
.case-related-story:hover b i,
.case-related-story:focus-visible b i { display: inline-block; transform: translateX(.25rem); }

.case-copy h2,
.story-copy h2 {
  letter-spacing: -.035em !important;
  font-kerning: normal;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 1080px) {
  .case-overview-inner { grid-template-columns: 1fr; }
  .case-overview-visual { max-width: 760px; }
  .case-layout { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr) !important; gap: 2.5rem !important; }
}

@media (max-width: 900px) {
  .case-layout { grid-template-columns: 1fr !important; }
  .case-visual-rail { position: static; }
  .case-rail-frame { max-width: 620px; }
  .case-copy .work-item { grid-template-columns: 48px minmax(0, 1fr); gap: 1rem; }
  .case-copy .work-item p { grid-column: 2; }
  .case-related-grid { grid-template-columns: 1fr; }
  .case-related-story { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); }
  .case-related-media { aspect-ratio: 4 / 3; border-right: 1px solid rgba(255,255,255,.16); border-bottom: 0; }
}

@media (max-width: 560px) {
  .case-overview { padding-right: .8rem; padding-left: .8rem; }
  .case-overview-meta { grid-template-columns: 1fr; }
  .case-delivery-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-delivery-ledger li { min-height: 58px; padding: .75rem 0; font-size: .72rem; }
  .case-related-heading { align-items: flex-start; flex-direction: column; }
  .case-copy .work-item { grid-template-columns: 34px minmax(0, 1fr); }
  .case-related-story { display: flex; }
  .case-related-media { aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.16); }
}

@media (prefers-reduced-motion: reduce) {
  .case-related-story,
  .case-related-copy b i { transition: none; }
}
