:root {
  --ink: var(--cup-ink, #443d32);
  --sans: 'Cup Helvetica Neue', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Cup PS Times', Georgia, serif;
  color: var(--ink);
  background: var(--cup-paper, #f8f5ed);
  color-scheme: light;
  font: 400 14px/1.4 var(--sans);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }

.case-refraction-active { filter: var(--case-pointer-filter); }

.case-header {
  position: fixed;
  z-index: 5;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 4px 0;
  text-decoration: none;
}

.case-link:hover { text-decoration: underline; text-underline-offset: .35em; }
.case-link:focus-visible { outline: 1px solid; outline-offset: 5px; }
.case-header .case-link,
.case-backstage {
  background: var(--cup-paper, #f8f5ed);
  padding-inline: 7px;
}

.case-backstage {
  position: fixed;
  z-index: 4;
  top: 50%;
  right: clamp(16px, 3vw, 60px);
  transform: translateY(-50%);
}

.case-backstage span { transition: transform .25s ease; }
.case-backstage:is(:hover, :focus-visible) span { transform: translate(3px, 3px); }

.case-intro {
  display: grid;
  place-items: center;
  min-height: 80svh;
  padding: 16svh 24px 5svh;
  text-align: center;
}

.case-intro h1 {
  max-width: 13em;
  margin: 0;
  font: 400 clamp(43px, 5.2vw, 100px)/.99 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.case-stage {
  display: grid;
  place-items: center;
  width: min(83%, 1680px);
  margin-inline: auto;
  background: #070c18;
}

.case-stage video {
  display: block;
  width: min(100%, 64svh, 780px);
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}

.case-stage-wide video {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.case-description {
  display: grid;
  grid-template-columns: minmax(0, 38rem) fit-content(32%);
  justify-content: space-between;
  align-items: start;
  gap: 48px;
  width: min(70%, 1100px);
  margin: clamp(72px, 12vw, 180px) auto;
}

.case-description > *,
.case-gallery > * {
  min-width: 0;
}

.case-description :is(h2, p, li),
.case-still figcaption {
  overflow-wrap: anywhere;
}

.case-description h2 {
  margin: 0 0 22px;
  font: 400 clamp(30px, 3.3vw, 58px)/1.05 var(--serif);
}

.case-description p {
  max-width: 33em;
  margin: 0;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.5;
}

.case-description ul { list-style: none; margin: 5px 0 0; padding: 0; line-height: 1.8; }

.case-still {
  width: min(64%, 880px);
  margin: 0 auto;
  scroll-margin-top: 100px;
}

.case-still img { display: block; width: 100%; height: auto; }
.case-still figcaption { margin-top: 14px; }

.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 48px);
  width: min(83%, 1200px);
  margin: 0 auto;
  scroll-margin-top: 100px;
}

.case-gallery .case-still { width: 100%; margin: 0; }
.case-gallery .case-still:first-child {
  grid-column: 1 / -1;
  width: min(100%, 580px);
  justify-self: center;
}

.case-footer {
  display: grid;
  justify-items: center;
  gap: 35px;
  padding: clamp(90px, 13vw, 190px) 24px 48px;
  text-align: center;
}

.case-next { font: 400 clamp(32px, 4vw, 64px)/1.1 var(--serif); }
.case-credit { color: var(--cup-muted, #695e53); }

@media (max-width: 700px) {
  .case-header { top: max(12px, env(safe-area-inset-top)); }
  .case-backstage {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    min-height: 44px;
    max-width: 28vw;
    overflow-wrap: anywhere;
    transform: none;
    font-size: 12px;
  }
  .case-intro { min-height: 67svh; padding: 96px 18px 24px; }
  .case-intro h1 { font-size: clamp(34px, 10.5vw, 62px); }
  .case-stage, .case-still, .case-gallery, .case-description {
    width: calc(100% - 2 * var(--cup-content-edge, 16px));
  }
  .case-description { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 480px) {
  .case-gallery { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .case-backstage span { transition: none; }
}

.case-description {
  grid-template-columns: minmax(0, 36%) minmax(0, 28%);
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  width: min(81.4%, 1560px);
  margin-block: clamp(72px, 11.111vw, 213px);
}
.case-description h2 {
  margin: 0;
  font: 400 clamp(23px, 1.944444vw, 37.24px)/1.2 var(--serif);
  letter-spacing: normal;
}
.case-description .case-description-copy,
.case-description .case-description-copy p,
.case-description .case-description-copy ul {
  font: 400 clamp(20px, 1.527778vw, 29.26px)/1.4 var(--serif);
  letter-spacing: normal;
}
.case-description-copy p + p { margin-top: .75em; }
.case-description .case-description-copy ul { margin: 2.25em 0 0; }
.case-description .case-description-copy li { line-height: 1.7; }
.case-description :is(strong, b) { font-weight: 400; }
@media (max-width: 760px) {
  .case-description { grid-template-columns: minmax(0, 1fr); width: calc(100% - 48px); }
}

@media (max-width: 1024px), (hover: none) {
  video[data-inline-film]:not([data-inline-film-started]),
  .concept-frame:not([data-playing]) > video[data-concept-src],
  .assistant-case video:not([data-inline-ready]) {
    opacity: 0 !important;
  }
  .inline-film-cover {
    position: absolute;
    z-index: 1;
    display: block;
    pointer-events: none;
    background-repeat: no-repeat;
  }
  .inline-film-cover[hidden],
  video[data-inline-film-started] + .inline-film-cover { display: none; }
}

@media (scripting: none) {
  video[data-inline-film]:not([data-inline-film-started]) { opacity: 1 !important; }
}
