.case-page {
  --gutter: clamp(24px, 4.45vw, 64px);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}
.case-wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.case-nav, .case-next, .case-invite { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.case-nav { padding-block: 24px; min-height: 84px; font-size: 14px; font-weight: 700; }
.case-page a:not(.button):hover { text-decoration: underline; text-underline-offset: 4px; }
.case-intro { padding-block: 48px 64px; }
.case-page :is(h1,h2,h3,.case-name,.case-next a) { font-family: 'Space Grotesk', sans-serif; letter-spacing: -.035em; line-height: 1.1; margin: 0; }
.case-page .case-name { font-size: clamp(30px, 2.8vw, 40px); color: #178c67; font-weight: 700; }
.case-page h1 { max-width: 16ch; margin-block: 28px; font-size: clamp(42px, 6.67vw, 96px); }
.case-page h2 { font-size: clamp(32px, 3.34vw, 48px); }
.case-page h3 { font-size: clamp(23px, 2vw, 28px); }
.case-facts, .case-direction, .case-enquiry { display: grid; gap: clamp(28px, 3.4vw, 48px); }
.case-facts { grid-template-columns: 1fr 1fr; }
.case-page .case-lead { font-size: clamp(18px, 1.67vw, 24px); }
.case-page p:not(.case-label,.case-name,.footer-credit) { color: #4f6370; }
.case-intro .visit { margin-top: 24px; min-width: 224px; justify-content: center; background: var(--ink); color: white; }
.case-facts dl { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0; }
.case-facts dt, .case-label { font: 12px/1.45 'IBM Plex Mono', monospace; text-transform: uppercase; }
.case-facts dd { margin: 8px 0 0; font-size: 18px; }
.case-label { color: #178c67; margin-bottom: 16px; }
.case-cover { display: block; width: calc(100% - var(--gutter)); max-width: 1376px; height: auto; margin: auto; }
.case-direction { grid-template-columns: minmax(0, 480fr) minmax(0, 736fr); gap: clamp(32px, 6.7vw, 96px); padding-block: 88px; }
.case-direction p + p { margin-top: 18px; font-size: 18px; }
.case-dark { background: var(--dark); color: white; }
.case-dark .case-label { color: var(--lime); }
.case-technology { max-width: 1344px; padding-block: 64px; }
.case-screen { display: block; width: 100%; height: auto; }
.case-technology .case-screen { margin-top: 40px; }
.case-comparison { padding-block: 80px; }
.case-comparison h2, .case-invite h2 { font-size: clamp(32px, 3.9vw, 56px); }
.case-comparison figure { margin: 40px 0 0; }
.case-comparison figcaption { margin-top: 16px; }
.case-comparison figcaption p, .case-invite p { margin-top: 16px; }
.case-comparison .case-enquiry { grid-template-columns: minmax(0, 864fr) minmax(0, 416fr); align-items: center; gap: 32px; margin-top: 64px; }
.case-enquiry figcaption { margin: 0; }
.case-enquiry h3 { font-size: clamp(26px, 2.5vw, 36px); }
.case-next { padding-block: 32px; border-bottom: 1px solid #ffffff30; }
.case-next .case-label { margin: 0; }
.case-next a { font-size: clamp(24px, 2.25vw, 32px); font-weight: 700; }
.case-invite { padding-block: 32px 72px; }
.case-page .case-invite p { color: var(--muted); }
.case-invite .button { justify-content: space-between; width: min(100%, 384px); }
@media (max-width: 767px) {
  .case-nav { min-height: 64px; padding-block: 12px; }
  .case-intro { padding-block: 32px; }
  .case-page h1 { font-size: clamp(34px, 9.75vw, 54px); margin-block: 20px; }
  .case-facts, .case-direction, .case-comparison .case-enquiry { grid-template-columns: 1fr; }
  .case-facts dd { font-size: 16px; }
  .case-cover { width: 100%; }
  .case-direction, .case-technology, .case-comparison { padding-block: 48px; }
  .case-direction p + p { font-size: 16px; }
  .case-technology .case-screen, .case-comparison figure { margin-top: 24px; }
  .case-comparison .case-enquiry { gap: 16px; margin-top: 40px; }
  .case-next, .case-invite { align-items: flex-start; flex-direction: column; gap: 20px; }
  .case-invite { padding-bottom: 48px; }
}
/* Motion and visual rhythm shared by all six project stories. */
.case-reading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 30; background: #178c67; transform: scaleX(0); transform-origin: left; pointer-events: none; }
.case-motion-pending { opacity: 0; }
.case-page .case-nav { border-bottom: 1px solid #cbd8d1; }
.case-page .case-nav > a:last-child { display: inline-flex; align-items: center; gap: 10px; padding-block: 10px; }
.case-nav > a:last-child span { transition: transform .3s ease; }
.case-nav > a:last-child:hover span { transform: translateX(-5px); }
.case-intro { position: relative; }
.case-facts { align-items: end; }
.case-facts dl { border-top: 1px solid #c0d4c8; padding-top: 24px; }
.case-cover { border: 1px solid #0b1f2e12; box-shadow: 0 20px 50px -30px #0b1f2e45; }
.case-direction { position: relative; }
.case-direction::after { content: ''; position: absolute; bottom: 32px; left: var(--gutter); width: 64px; height: 2px; background: #178c67; }
.case-dark { background: radial-gradient(ellipse at 95% 0%, #143831 0%, transparent 55%), var(--dark); }
.case-technology { padding-block: clamp(64px, 7vw, 100px); }
.case-technology .case-screen { margin-top: 48px; border: 1px solid #ffffff20; box-shadow: 0 24px 64px -32px #0009; }
.case-comparison figcaption { padding-top: 20px; }
.case-comparison figcaption p { line-height: 1.65; }
.case-comparison .case-enquiry { margin-top: clamp(64px, 8vw, 112px); }
.case-enquiry figcaption { border-top: 1px solid #b8cec1; padding-top: 28px; }
.case-page .button { transition: background .25s, box-shadow .3s, transform .3s; }
.case-page .button > span { display: inline-block; transition: transform .3s ease; }
.case-page .button:hover, .case-page .button:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 25px -14px #178c6760; }
.case-page .button:hover > span, .case-page .button:focus-visible > span { transform: translate(3px, -2px); }
.case-intro .visit:hover { background: #164536; }
.case-next { padding-block: 48px; gap: 40px; }
.case-next a { position: relative; display: inline-flex; justify-content: space-between; align-items: center; gap: clamp(24px, 4vw, 64px); padding-block: 16px; font-size: clamp(28px, 3.5vw, 48px); }
.case-page .case-next a:hover { text-decoration: none; }
.case-next a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .45s ease; }
.case-next a span { display: inline-block; color: var(--lime); transition: transform .45s ease; }
.case-next a:hover::after, .case-next a:focus-visible::after { transform: scaleX(1); }
.case-next a:hover span, .case-next a:focus-visible span { transform: translateX(8px); }
.case-invite { padding-block: 64px 88px; }
@media (max-width: 767px) {
  .case-direction::after { bottom: 22px; }
  .case-technology { padding-block: 48px; }
  .case-technology .case-screen { margin-top: 28px; }
  .case-next { gap: 12px; padding-block: 32px; }
  .case-next a { width: 100%; }
  .case-invite { padding-block: 40px 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .case-motion-pending { opacity: 1; }
  .case-page .button, .case-page .button > span, .case-nav span, .case-next a::after, .case-next a span { transition: none; }
  .case-page .button:hover, .case-page .button:focus-visible, .case-page .button:hover > span, .case-page .button:focus-visible > span, .case-nav > a:last-child:hover span, .case-next a:hover span, .case-next a:focus-visible span { transform: none; }
}

/* Case studies on phones: compact headings, full-width captures, clear actions. */
@media (max-width: 767px) {
  .case-page { --gutter: 24px; }
  .case-nav { gap: 12px; min-height: 72px; padding-block: 14px; }
  .case-page .case-nav > a:last-child { font-size: 12px; line-height: 1.4; min-height: 44px; gap: 6px; text-align: right; }
  .case-intro { padding-block: 36px; }
  .case-page .case-name { font-size: 25px; }
  .case-page h1 { max-width: none; font-size: clamp(32px, 9vw, 44px); line-height: 1.1; letter-spacing: -.04em; margin-block: 20px 24px; text-wrap: balance; }
  .case-page h2, .case-comparison h2, .case-invite h2 { font-size: clamp(28px, 8vw, 36px); line-height: 1.15; text-wrap: balance; }
  .case-page h2 br { display: none; }
  .case-facts { gap: 28px; }
  .case-page .case-lead { font-size: 17px; line-height: 1.65; }
  .case-intro .visit { width: 100%; min-height: 52px; justify-content: space-between; white-space: normal; font-size: 15px; }
  .case-facts dl { gap: 20px; padding-top: 20px; }
  .case-facts dt { font-size: 10px; }
  .case-facts dd { font-size: 15px; line-height: 1.5; }
  .case-direction { gap: 24px; padding-block: 48px 56px; }
  .case-direction p + p { line-height: 1.7; }
  .case-label { font-size: 10px; line-height: 1.6; letter-spacing: .03em; }
  .case-comparison { padding-block: 48px; }
  .case-comparison figcaption { padding-top: 16px; }
  .case-page h3 { font-size: 25px; line-height: 1.2; text-wrap: balance; }
  .case-comparison .case-enquiry { gap: 24px; margin-top: 48px; }
  .case-enquiry figcaption { padding-top: 20px; }
  .case-next { gap: 8px; }
  .case-next a { font-size: clamp(26px, 7.5vw, 34px); gap: 20px; line-height: 1.2; }
  .case-next a span { flex-shrink: 0; }
  .case-invite { gap: 24px; }
  .case-invite .button { width: 100%; min-height: 54px; white-space: normal; }
}
