.case-page { --case-section-space: clamp(78px, 9vw, 132px); background: var(--white); }
.case-page h1, .case-page h2, .case-page h3, .case-page p, .case-page figure { margin-top: 0; }
.case-page h1, .case-page h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.025em; }
.case-section { padding-block: var(--case-section-space); }
.case-eyebrow, .before-label, .story-number { color: #ff735d; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.case-hero { color: var(--white); background: var(--ink); overflow: hidden; }
.case-hero-grid { min-height: calc(100svh - 82px); display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; gap: clamp(42px, 5vw, 82px); padding-block: clamp(62px, 7vw, 104px); }
.case-hero-copy h1 { max-width: 650px; margin: 17px 0 24px; font-size: clamp(50px, 5.2vw, 78px); line-height: .98; }
.case-lede { max-width: 630px; margin-bottom: 23px; color: #e2eaf3; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; }
.case-reassurance { margin-bottom: 30px; color: #bfcddd; font-size: 14px; }
.case-reassurance span { padding-inline: 7px; color: #ff735d; }
.case-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.case-text-link { min-height: 48px; display: inline-flex; align-items: center; gap: 12px; color: var(--white); border-bottom: 1px solid rgba(255,255,255,.65); font-size: 15px; font-weight: 700; text-decoration: none; }
.case-text-link:hover { color: #ffc0b4; border-color: #ffc0b4; }

.screenshot-figure { margin-bottom: 0; }
.screenshot-link { position: relative; display: block; overflow: hidden; background: var(--white); border: 1px solid rgba(7,26,53,.75); border-radius: 9px; box-shadow: 0 22px 50px rgba(0,0,0,.2); }
.screenshot-link img { width: 100%; height: auto; transition: transform .28s ease; }
.screenshot-link:hover img { transform: scale(1.012); }
.screenshot-expand { position: absolute; right: 14px; bottom: 14px; padding: 8px 11px; color: var(--white); background: rgba(7,26,53,.92); border-radius: 3px; font-size: 12px; font-weight: 700; opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
.screenshot-link:hover .screenshot-expand, .screenshot-link:focus-visible .screenshot-expand { opacity: 1; transform: translateY(0); }
.screenshot-figure figcaption { margin-top: 13px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.case-hero-media figcaption { color: #bfcddd; }

.case-problem { background: var(--white); }
.case-heading-narrow { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(50px, 8vw, 120px); align-items: start; }
.case-heading-narrow h2, .case-section-heading h2, .parallel-intro h2, .intake-copy h2, .pattern-heading h2, .case-final h2 { margin-bottom: 0; font-size: clamp(44px, 4.8vw, 70px); line-height: 1.02; }
.case-copy p { margin-bottom: 18px; color: var(--muted); font-size: 18px; }
.before-board { margin-top: clamp(54px, 7vw, 92px); padding-top: 24px; border-top: 1px solid var(--line); }
.before-label { margin-bottom: 18px; color: var(--accent-dark); }
.before-flow { display: grid; grid-template-columns: 1.15fr 48px 1fr 48px 1fr; align-items: stretch; gap: 16px; }
.source-list { display: grid; gap: 10px; }
.source-list div, .before-step { min-height: 58px; display: flex; align-items: center; padding: 14px 17px; background: var(--mist); border-left: 3px solid var(--ink); }
.before-step { justify-content: center; text-align: center; }
.before-step-final { background: var(--peach); border-color: var(--accent); }
.flow-arrow { width: 38px; align-self: center; color: #8a9aaf; }
.problem-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 52px; border-top: 1px solid var(--line); }
.problem-points article { display: grid; grid-template-columns: 38px 1fr; gap: 18px; padding: 26px 30px 0 0; }
.problem-points article + article { padding-left: 30px; border-left: 1px solid var(--line); }
.problem-points span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); background: #e9f1f8; border-radius: 50%; font-size: 13px; font-weight: 700; }
.problem-points h3 { margin-bottom: 7px; font-size: 18px; }
.problem-points p { margin-bottom: 0; color: var(--muted); font-size: 15px; }

.workflow-section { background: var(--mist); border-block: 1px solid var(--line); }
.case-section-heading { max-width: 820px; }
.case-section-heading > p { max-width: 670px; margin: 22px 0 0; color: var(--muted); font-size: 18px; }
.workflow-rail { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 0; margin: 62px 0 0; list-style: none; border-block: 1px solid var(--line); }
.workflow-rail li { position: relative; min-height: 240px; padding: 28px 28px 28px 0; }
.workflow-rail li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.workflow-rail li:not(:last-child)::after { content: ""; position: absolute; top: 44px; right: -8px; z-index: 1; width: 14px; height: 14px; border-top: 2px solid #8a9aaf; border-right: 2px solid #8a9aaf; transform: rotate(45deg); background: var(--mist); }
.workflow-rail span { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 30px; color: var(--white); background: var(--accent); border-radius: 50%; font-weight: 700; }
.workflow-rail h3 { margin-bottom: 10px; font-size: 19px; }
.workflow-rail p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.screenshot-story { padding-bottom: calc(var(--case-section-space) + 14px); }
.centred-case-heading { max-width: 900px; margin-inline: auto; text-align: center; }
.centred-case-heading > p { margin-inline: auto; }
.story-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); align-items: center; gap: clamp(46px, 7vw, 105px); margin-top: clamp(72px, 9vw, 132px); }
.story-row-reverse { grid-template-columns: minmax(300px, .65fr) minmax(0, 1.35fr); }
.story-row-reverse .story-media { order: 2; }
.story-row-reverse .story-copy { order: 1; }
.story-media .screenshot-link { box-shadow: 0 18px 42px rgba(7,26,53,.13); }
.story-copy { max-width: 470px; }
.story-number { display: block; margin-bottom: 14px; }
.story-copy h3 { margin-bottom: 20px; font-family: var(--serif); font-size: clamp(34px, 3.25vw, 50px); font-weight: 400; line-height: 1.05; }
.story-copy p { margin-bottom: 0; color: var(--muted); font-size: 18px; }

.change-section { background: var(--mist); border-block: 1px solid var(--line); }
.change-table { margin-top: 54px; border-top: 1px solid var(--line); }
.change-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.change-row > div { padding: 23px 34px 23px 0; }
.change-row > div + div { padding-left: 34px; border-left: 1px solid var(--line); }
.change-head { color: var(--accent-dark); font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.change-row strong { font-size: 17px; }
.change-row p { margin: 7px 0 0; color: var(--muted); font-size: 15px; }
.pilot-note { margin: 25px 0 0; color: var(--muted); font-size: 14px; }

.parallel-section { background: var(--white); }
.parallel-intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 9vw, 130px); align-items: start; }
.parallel-intro > div:last-child { padding-top: 12px; }
.parallel-intro p { margin-bottom: 18px; color: var(--muted); font-size: 18px; }
.parallel-intro .human-line { color: var(--ink); font-weight: 700; }
.parallel-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; margin: 62px 0 0; list-style: none; border-top: 1px solid var(--line); }
.parallel-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; min-height: 112px; padding: 24px 28px 0 0; }
.parallel-steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.parallel-steps span { width: 42px; height: 42px; display: grid; place-items: center; background: #e9f1f8; border: 1px solid var(--line); border-radius: 50%; font-weight: 700; }
.parallel-steps strong { font-size: 16px; line-height: 1.35; }

.intake-section { background: #eef4f9; border-block: 1px solid var(--line); }
.intake-grid { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: clamp(50px, 8vw, 118px); }
.intake-copy p { max-width: 500px; margin: 24px 0 0; color: var(--muted); font-size: 18px; }

.pattern-section { background: var(--white); }
.pattern-heading { display: grid; grid-template-columns: 1fr .6fr; gap: 8vw; align-items: end; }
.pattern-heading p { margin-bottom: 5px; color: var(--muted); font-size: 18px; }
.pattern-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px; border-block: 1px solid var(--line); }
.pattern-grid article { min-height: 180px; padding: 30px 28px 30px 0; }
.pattern-grid article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.pattern-grid h3 { margin-bottom: 13px; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.pattern-grid p { margin-bottom: 0; color: var(--muted); font-size: 15px; }
.pattern-grid span { color: var(--accent); }
.pattern-close { max-width: 850px; margin: 34px 0 0; color: var(--ink); font-size: 18px; font-weight: 700; }

.built-list h3 { font-size: 24px; }
.case-quote { padding-block: clamp(64px, 7vw, 100px); color: var(--white); background: var(--ink); }
.case-quote .case-quote-label { margin: 0; color: #f8a999; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.case-quote blockquote { max-width: 980px; margin: 22px 0 26px; }
.case-quote blockquote p { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2.8vw, 36px); line-height: 1.32; }
.case-quote-attribution { margin: 0; color: #d4deea; font-size: 14px; font-weight: 700; }
.case-final { padding-block: clamp(74px, 8vw, 116px); color: var(--white); background: var(--ink); }
.case-final-grid { display: grid; grid-template-columns: 1fr .72fr; align-items: center; gap: clamp(55px, 10vw, 145px); }
.case-final h2 { font-size: clamp(48px, 5.6vw, 78px); }
.case-final-grid > div:last-child { padding-left: clamp(30px, 5vw, 72px); border-left: 1px solid rgba(255,255,255,.35); }
.case-final-grid p { color: #d4deea; }
.case-final .button { margin-top: 18px; }
.final-reassurance { margin: 16px 0 0; font-size: 13px; }

.image-lightbox { width: min(96vw, 1500px); max-width: none; padding: 52px 18px 18px; color: var(--white); background: #06152a; border: 0; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.image-lightbox::backdrop { background: rgba(2,10,20,.88); backdrop-filter: blur(5px); }
.image-lightbox img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; }
.image-lightbox p { margin: 12px 0 0; color: #d4deea; font-size: 14px; }
.lightbox-close { position: absolute; top: 10px; right: 12px; padding: 6px 10px; color: var(--white); background: transparent; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; cursor: pointer; }

@media (max-width: 1100px) {
  .case-hero-grid { min-height: 0; grid-template-columns: .9fr 1.1fr; }
  .case-hero-copy h1 { font-size: clamp(46px, 6vw, 64px); }
  .before-flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .workflow-rail { grid-template-columns: 1fr; }
  .workflow-rail li { min-height: 0; display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 24px 0; }
  .workflow-rail li + li { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .workflow-rail li:not(:last-child)::after { display: none; }
  .workflow-rail span { margin-bottom: 0; }
  .story-row { grid-template-columns: 1fr; gap: 32px; }
  .story-row-reverse { grid-template-columns: 1fr; }
  .story-row .story-media, .story-row .story-copy { order: initial; }
  .story-copy { max-width: 700px; }
  .intake-grid { grid-template-columns: 1fr; }
  .intake-copy { max-width: 700px; }
}

@media (max-width: 760px) {
  .case-page { --case-section-space: 68px; }
  .case-hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 42px; padding-block: 56px 64px; }
  .case-hero-copy h1 { font-size: clamp(43px, 13vw, 58px); }
  .case-lede { font-size: 17px; }
  .case-reassurance { line-height: 1.8; }
  .case-actions { display: grid; gap: 14px; }
  .case-actions .button { width: 100%; }
  .case-text-link { justify-self: start; }
  .case-heading-narrow, .parallel-intro, .pattern-heading, .case-final-grid { grid-template-columns: 1fr; gap: 28px; }
  .case-heading-narrow h2, .case-section-heading h2, .parallel-intro h2, .intake-copy h2, .pattern-heading h2, .case-final h2 { font-size: 42px; }
  .problem-points { grid-template-columns: 1fr; }
  .problem-points article, .problem-points article + article { padding: 22px 0; border-left: 0; }
  .problem-points article + article { border-top: 1px solid var(--line); }
  .story-row { margin-top: 68px; }
  .story-copy h3 { font-size: 34px; }
  .story-copy p, .case-copy p, .parallel-intro p, .intake-copy p, .pattern-heading p { font-size: 16px; }
  .change-head { display: none; }
  .change-row { grid-template-columns: 1fr; padding-block: 18px; }
  .change-row > div, .change-row > div + div { padding: 12px 0; border-left: 0; }
  .change-row > div:first-child::before, .change-row > div:last-child::before { display: block; margin-bottom: 7px; color: var(--accent-dark); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .change-row > div:first-child::before { content: "Before"; }
  .change-row > div:last-child::before { content: "After"; }
  .parallel-steps { grid-template-columns: 1fr; }
  .parallel-steps li, .parallel-steps li + li { padding: 22px 0; border-left: 0; }
  .parallel-steps li + li { border-top: 1px solid var(--line); }
  .pattern-grid { grid-template-columns: 1fr 1fr; }
  .pattern-grid article, .pattern-grid article + article { min-height: 150px; padding: 24px 20px; border-left: 0; }
  .pattern-grid article:nth-child(even) { border-left: 1px solid var(--line); }
  .pattern-grid article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .case-final-grid > div:last-child { padding: 28px 0 0; border-top: 1px solid rgba(255,255,255,.35); border-left: 0; }
  .case-final .button { width: 100%; }
  .screenshot-expand { display: none; }
  .image-lightbox { width: 100vw; max-height: 100vh; margin: auto 0 0; border-radius: 10px 10px 0 0; }
}

@media (max-width: 430px) {
  .pattern-grid { grid-template-columns: 1fr; }
  .pattern-grid article + article, .pattern-grid article:nth-child(even) { border-top: 1px solid var(--line); border-left: 0; }
}

@media (prefers-reduced-motion: reduce) { .screenshot-link img { transition: none; } }
