:root {
  --paper: #fdfdfd;
  --surface: #fff;
  --ink: #202020;
  --body: #4a4a4a;
  --subtle: #767676;
  --line: #e8e8e8;
  --purple: #6318af;
  --content-width: 600px;
  --page-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Geist", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.case-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 16px max(24px, calc((100vw - var(--page-width)) / 2));
  background: var(--surface);
  border-bottom: 1px solid rgba(232,232,232,.85);
  transform: translateY(0);
  transition: transform 180ms cubic-bezier(.4, 0, 1, 1);
  will-change: transform;
}

.case-header--hidden { transform: translateY(-100%); }

.back-link { justify-self: start; min-height: 40px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 24px; font-weight: 500; text-transform: uppercase; }
.back-link svg { width: 18px; height: 18px; }
.case-logo { justify-self: center; width: 48px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: linear-gradient(#fff,#f2f2f2); }
.case-logo img { width: 34px; height: 24px; object-fit: contain; }
.enquiry-link { justify-self: end; min-height: 32px; padding: 8px 16px; display: grid; place-items: center; border: 1px solid #232323; border-radius: 2px; background: #040404; color: #fff; font-size: 12px; line-height: 1.4; letter-spacing: .06px; text-transform: uppercase; box-shadow: inset 0 0 0 2px #1e1e1e; }

.case-hero { width: min(calc(100% - 48px), var(--page-width)); margin: 0 auto; }
.case-hero > img { width: 100%; height: auto; object-fit: contain; }

.case-copy { width: min(calc(100% - 48px), var(--content-width)); margin: 40px auto 0; }
.case-copy > section { padding-block: 48px; border-bottom: 1px solid var(--line); }
.case-copy > section:first-child { padding-top: 0; }
.section-heading { display: grid; gap: 8px; }
h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -.12px; }
.section-heading > p { margin: 0; color: var(--subtle); font-size: 14px; line-height: 24px; letter-spacing: .5px; }

.project-meta, .results-list { margin: 16px 0 0; }
.project-meta > div, .results-list > div { min-height: 49px; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 24px; }
.project-meta > div:last-child, .results-list > div:last-child { border-bottom: 0; }
dt { font-weight: 500; }
dd { margin: 0; text-align: right; letter-spacing: .5px; }

.text-section { display: grid; gap: 16px; }
.text-section h2 { margin: 0; font-size: 18px; line-height: 26px; font-weight: 500; }
.text-section > p { margin: 0; color: var(--body); font-size: 14px; line-height: 24px; letter-spacing: .5px; }
.text-section > p + p { margin-top: -4px; }
.focus-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.focus-list li { display: grid; }
.focus-list strong { font-size: 16px; line-height: 26px; font-weight: 400; }
.focus-list span { color: var(--subtle); font-size: 14px; line-height: 24px; letter-spacing: .5px; }
.results-list { margin-top: -4px; }
.results-list dt { max-width: 74%; }
.results-list dd { flex: 0 0 auto; }

.screen-gallery {
  width: min(calc(100% - 48px), 1100px);
  margin: 40px auto 80px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 540px));
  justify-content: center;
  align-items: start;
  gap: 20px;
}

.screen-panel { width: 100%; min-width: 0; margin: 0; overflow: hidden; }
.screen-panel--full { grid-column: 1 / -1; }
.screen-panel > img { width: 100%; height: auto; object-fit: contain; }

:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }

@media (max-width: 1023px) {
  .case-header { padding-inline: 32px; }
  .case-hero { width: calc(100% - 64px); }
  .case-copy { width: min(calc(100% - 64px), var(--content-width)); }
  .screen-gallery { width: min(calc(100% - 64px), 760px); grid-template-columns: 1fr; }
  .screen-panel { max-width: 540px; justify-self: center; }
  .screen-panel--full { grid-column: auto; max-width: 760px; }
}

@media (max-width: 639px) {
  :root { --mobile-edge: 20px; }
  .case-header { position: sticky; top: 0; height: 64px; padding: 12px var(--mobile-edge); border-bottom: 1px solid rgba(232,232,232,.85); }
  .back-link { width: 44px; min-height: 40px; }
  .back-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .back-link svg { width: 22px; height: 22px; }
  .case-logo { width: 44px; height: 38px; }
  .enquiry-link { min-height: 36px; padding-inline: 10px; font-size: 10px; }
  .case-hero { width: 100%; }
  .case-copy { width: calc(100% - (var(--mobile-edge) * 2)); margin-top: 32px; }
  .case-copy > section { padding-block: 36px; }
  .case-copy > section:first-child { padding-top: 0; }
  h1 { font-size: 22px; line-height: 30px; letter-spacing: -.08px; }
  .section-heading > p, .text-section > p, .focus-list span { font-size: 14px; line-height: 23px; letter-spacing: .25px; }
  .text-section h2 { font-size: 18px; line-height: 26px; }
  .focus-list strong { font-size: 16px; line-height: 24px; }
  .project-meta > div, .results-list > div { align-items: flex-start; gap: 16px; font-size: 14px; line-height: 22px; }
  .project-meta dt, .results-list dt { max-width: 62%; }
  .project-meta dd, .results-list dd { max-width: 52%; }
  .screen-gallery { width: calc(100% - (var(--mobile-edge) * 2)); margin-top: 40px; margin-bottom: 48px; }
  .screen-panel, .screen-panel--full { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .case-header { transition: none; transform: none; }
}
