.case-back {
  gap: .65rem;
  padding: .32rem 1rem .32rem .35rem;
  border: 1px solid #c8dced;
  border-radius: 2rem;
  background: var(--mist);
  font-size: .9375rem;
  text-decoration: none;
}
.case-back:is(:hover, :focus-visible) { border-color: #90b6d9; background: var(--ice); }
.case-back-icon {
  display: grid;
  flex: 0 0 1.9rem;
  place-items: center;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--blue-deep);
  color: var(--white);
}
.case-back-icon::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  translate: 1px 0;
}

@media (prefers-reduced-motion: no-preference) {
  .case-back { transition: border-color .18s ease-out, background-color .18s ease-out; }
  .case-back-icon { animation: case-back-enter .28s cubic-bezier(.16, 1, .3, 1); }
  .case-back-icon::before { transition: translate .18s ease-out; }
  .case-back:is(:hover, :focus-visible) .case-back-icon::before { translate: -2px 0; }

  @keyframes case-back-enter {
    from { translate: 4px 0; opacity: .65; }
  }
}

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(1.35rem, 3.5vw, 3.25rem);
  padding: clamp(1.3rem, 3.1vw, 2.85rem);
  border-radius: clamp(1.35rem, 2.3vw, 2rem);
  background: var(--ink);
  color: var(--white);
}
.case-hero h1 { max-width: 17ch; font-size: clamp(2rem, 3.95vw, 3.75rem); line-height: 1.06; letter-spacing: -.04em; }
.case-hero h1 span { color: #a8d6fb; }
.case-hero p { max-width: 48ch; margin-top: 1.2rem; color: #ddebfa; font-size: clamp(1rem, 1.24vw, 1.125rem); }
.case-hero figure, .case-photos img { border-radius: 1rem; }
.case-hero figure { overflow: hidden; }
.case-hero img, .case-photos img { width: 100%; height: auto; }

.case-facts {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.45fr);
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--mist);
}
.case-facts > div { padding: 1rem clamp(.75rem, 2.05vw, 1.85rem); }
.case-facts > div + div { border-inline-start: 1px solid var(--line); }
.case-facts dt { color: var(--blue-deep); font-size: .875rem; font-weight: 800; }
.case-facts dd { margin-top: .3rem; font-weight: 750; line-height: 1.42; }

.case-source a, .case-enquiry p a { color: var(--blue-deep); text-underline-offset: .22em; }
.case-photos h2 { margin-bottom: .75rem; font-size: 1.2rem; }

.case-related h2 { margin-bottom: 1rem; font-size: clamp(1.55rem, 2.5vw, 2.15rem); }
.case-related ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin: 0; padding: 0; list-style: none; }
.case-related a {
  display: grid;
  grid-template-columns: clamp(4.75rem, 12vw, 9rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  min-height: 100%;
  padding: .5rem .95rem .5rem .5rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  color: var(--blue-deep);
  font-size: clamp(.98rem, 1.4vw, 1.15rem);
  font-weight: 800;
  line-height: 1.4;
  text-underline-offset: .22em;
}
.case-related img { width: 100%; height: auto; border-radius: .55rem; }
.case-related a::after {
  content: "";
  width: .45rem;
  height: .45rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  rotate: 45deg;
}
.case-related a:is(:hover, :focus-visible) { border-color: #91b8d5; background: var(--mist); }
.case-enquiry { background: var(--ice); }

.case-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "story";
  align-items: start;
  column-gap: clamp(1.5rem, 4.4vw, 4rem);
  row-gap: clamp(1.25rem, 2.5vw, 2.25rem);
  margin-block: clamp(2.25rem, 5vw, 4.5rem);
  padding: clamp(1.2rem, 3vw, 2.8rem);
  border: 1px solid var(--line);
  border-radius: clamp(1.2rem, 2.2vw, 1.85rem);
  background: var(--mist);
}
.case-feature:has(> .case-photos) {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  grid-template-areas: "title title" "photos story";
}
.case-feature > h2 {
  grid-area: title;
  max-width: 24ch;
  font-size: clamp(1.9rem, 3.5vw, 3.25rem);
  letter-spacing: -.04em;
}
.case-feature > h2, .case-related > h2 { scroll-margin-block-start: 6.5rem; }
.case-feature > h2 span { color: var(--blue-deep); }
.case-feature .story-prose { grid-area: story; max-width: 57ch; }
.case-feature .story-prose h3 {
  max-width: 30ch;
  font-size: clamp(1.2rem, 1.75vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.case-feature .story-prose p { font-size: 1.0625rem; }
.case-feature .story-prose section + section { padding-top: 1.7rem; border-block-start: 1px solid var(--line); }
.case-feature .case-photos { grid-area: photos; }
.case-photo-grid { display: grid; gap: .8rem; }
.case-feature .case-source { margin-top: 1.4rem; }
.case-feature .case-source a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .45rem .8rem;
  border: 1px solid #c8dced;
  border-radius: .65rem;
  background: var(--white);
  font-size: .9375rem;
  font-weight: 800;
}
.case-feature .case-source a:is(:hover, :focus-visible) { border-color: #91b8d5; background: var(--ice); }

@media (prefers-reduced-motion: no-preference) {
  .case-story { --case-ease: cubic-bezier(.16, 1, .3, 1); }
  .case-hero > div { animation: case-content-enter .48s var(--case-ease); }
  .case-hero img { animation: case-photo-enter .7s var(--case-ease); }
  .case-story .shared-section-reveal:not(.case-facts) {
    animation: case-content-enter .48s var(--case-ease) var(--shared-section-delay, 0ms) backwards;
  }
  .case-story .shared-section-reveal:focus-within { animation: none; }
  .case-facts.shared-section-reveal :is(dt, dd) {
    animation: case-content-enter .42s var(--case-ease)
      calc(var(--shared-section-delay, 0ms) + var(--case-fact-delay, 0ms)) backwards;
  }
  .case-facts > div:nth-child(2) { --case-fact-delay: 45ms; }
  .case-facts > div:nth-child(3) { --case-fact-delay: 90ms; }
  .case-facts > div:nth-child(4) { --case-fact-delay: 135ms; }

  .case-related a { transition: border-color .18s ease-out, background-color .18s ease-out; }
  .case-related a::after { transition: translate .18s ease-out; }
  .case-related a:is(:hover, :focus-visible)::after { translate: 3px 0; }

  @keyframes case-content-enter {
    from { opacity: .86; translate: 0 .5rem; }
  }

  @keyframes case-photo-enter {
    from { transform: scale(1.035); }
  }
}

@media (max-width: 54rem) {
  .case-hero, .case-feature:has(> .case-photos) { grid-template-columns: minmax(0, 1fr); }
  .case-feature:has(> .case-photos) { grid-template-areas: "title" "story" "photos"; }
  .case-hero h1 { max-width: 22ch; font-size: clamp(2rem, 6vw, 3.4rem); }
  .case-hero p { max-width: 60ch; }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-facts > div + div { border-inline-start: 0; }
  .case-facts > div:nth-child(even) { border-inline-start: 1px solid var(--line); }
  .case-facts > div:nth-child(n+3) { border-block-start: 1px solid var(--line); }
}

@media (min-width: 54.01rem) {
  .case-feature:not(:has(> .case-photos)) .story-prose {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem clamp(1.5rem, 5vw, 4rem);
    max-width: none;
  }
  .case-feature:not(:has(> .case-photos)) .story-prose section + section { margin-top: 0; padding-top: 0; border: 0; }
  .case-feature:not(:has(> .case-photos)) .case-source { grid-column: 1 / -1; margin: 0; }
}

@media (min-width: 42.01rem) {
  .case-photo-grid:has(> figure:nth-child(3)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-photo-grid > figure:first-child { grid-column: 1 / -1; }
}

@media (max-width: 42rem) {
  .case-related ul { grid-template-columns: minmax(0, 1fr); }
}
