/* Case pages, site v4 (revision 2). A client page is one relationship told in the order it happened.
   The pictures carry it: as large as they can be, to the edge where they can, with their words on them or right beside them.
   Parts: cover, start, inside, followed (a stage that changes as the jobs pass), proud, said, now. */

.cs { --gap: clamp(20px, 2.6vw, 40px); --rel: clamp(48px, 6.5vw, 100px); --read: rgba(244, 240, 232, .86); }
.cs-part { position: relative; }

/* ---------- cover: their footage, their name ---------- */
.cs-cover { min-height: 100svh; }
.cs-cover .scene-in { gap: 14px; padding-bottom: clamp(36px, 6vw, 80px); }
.cs-name { font-size: clamp(3rem, 13vw, 4.6rem); line-height: .9; letter-spacing: -.035em; max-width: 9em; }
@media (min-width: 900px) { .cs-name { font-size: clamp(4.6rem, 8.6vw, 9.6rem); line-height: .86; letter-spacing: -.04em; max-width: 8.6em; } }
.cs-line { font-size: clamp(1.2rem, 1.9vw, 1.7rem); line-height: 1.3; max-width: 26em; color: var(--paper); text-wrap: pretty; }
.cs-kind { font-size: 15px; color: var(--read); display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; }
.cs-kind span::before { content: ""; display: inline-block; width: 18px; height: 1px; background: var(--rule2); vertical-align: middle; margin-right: 18px; }
/* a page with no footage: the first screen is ink, the name at the top, the piece right under it */
.cs-cover.no-footage { align-items: start; }
.cs-cover.no-footage::before { display: none; }
.cs-cover.no-footage .scene-in { padding-top: calc(var(--hd) + clamp(40px, 7vw, 96px)); }
.cs-cover.has-piece { min-height: 0; }
.cs-cover.has-piece:not(.no-footage) { min-height: 100svh; }
.cs-piece.at-cover { margin-top: clamp(16px, 2.4vw, 32px); width: 100%; }

/* ---------- shared: media frames and the words beside them ---------- */
.cs-media { position: relative; margin: 0; background: var(--ink2); overflow: hidden; }
.cs-media > img, .cs-media > video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.cs-media.is-contain > img, .cs-media.is-contain > video { object-fit: contain; object-position: 50% 50%; }
.cs-media figcaption { position: absolute; left: 14px; bottom: 12px; right: 14px; max-width: 30em; font-size: 15px; font-weight: 500; color: var(--paper); text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.cs-media.has-ratio { aspect-ratio: var(--r); }
.cs-h { font-size: clamp(2.2rem, 8.6vw, 2.9rem); line-height: 1; letter-spacing: -.025em; max-width: 12em; }
@media (min-width: 900px) { .cs-h { font-size: clamp(2.8rem, 4.8vw, 5rem); line-height: .95; } }
/* section titles are set in capitals by site.css (Brian, 18:00): a little smaller and wider so they sit on two lines; h3 items keep the old style */
h2.cs-h { font-size: clamp(1.9rem, 7.4vw, 2.45rem); letter-spacing: .01em; max-width: 14em; }
@media (min-width: 900px) { h2.cs-h { font-size: clamp(2.4rem, 4vw, 4.2rem); } }
.cs-text { display: grid; gap: 14px; align-content: start; }
.cs-p { font-size: clamp(1.0625rem, 4.4vw, 1.2rem); line-height: 1.45; color: var(--read); max-width: 30em; text-wrap: pretty; }
@media (min-width: 900px) { .cs-p { font-size: clamp(1.1875rem, 1.45vw, 1.4rem); line-height: 1.42; } }
.cs-text .cs-h + .cs-p { margin-top: 6px; }

/* before and after with the ring */
.cs-pair { position: relative; height: 100%; }
.cs-pic { width: 100%; height: 100%; }
.cs-media.is-pair { aspect-ratio: 16 / 10; }
@media (max-width: 899px) { .cs-media.is-pair { aspect-ratio: 9 / 15; max-height: 84svh; } }
.cs-flip { position: absolute; right: 12px; bottom: 12px; z-index: 4; appearance: none; border: 0; border-radius: 2px; background: rgba(12, 13, 16, .9); color: var(--paper); box-shadow: inset 0 0 0 1px var(--rule2); font-size: 15px; font-weight: 600; min-height: 44px; padding: 0 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.cs-flip::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--signal); transition: border-color .4s, background .4s; }
.cs-pair.is-now .cs-flip::before { border-color: var(--truel); background: var(--truel); }
.cs-flip:hover { box-shadow: inset 0 0 0 1px var(--paper); }
.cs-flip:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

/* ---------- how it started: the whole screen, the words on the footage ---------- */
.cs-start { padding-top: var(--rel); }
.cs-hold { position: relative; display: grid; gap: clamp(18px, 2.4vw, 28px); }
.cs-start .cs-wide { width: 100%; aspect-ratio: 16 / 9; max-height: 92svh; }
.cs-start .cs-wide.is-pair { aspect-ratio: 16 / 10; }
.cs-start .cs-text { padding: 0 var(--pad); }
.cs-start.is-over .cs-wide { aspect-ratio: auto; height: 92svh; min-height: 520px; max-height: none; }
.cs-start.is-over .cs-wide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 13, 16, 0) 40%, rgba(12, 13, 16, .5) 66%, rgba(12, 13, 16, .9) 100%); pointer-events: none; }
.cs-start.is-over .cs-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--pad) clamp(28px, 5vw, 64px); }
.cs-start.is-over .cs-p { color: var(--paper); }
@media (min-width: 900px) {
}
@media (max-width: 899px) { .cs-start .cs-wide { aspect-ratio: 4 / 5; } .cs-start .cs-wide.is-pair { aspect-ratio: 9 / 15; } .cs-start.is-over .cs-wide { height: 88svh; min-height: 560px; } }

/* ---------- once I was inside: words and a picture side by side, the picture to the edge ---------- */
.cs-inside { padding: var(--rel) 0 0; }
.cs-split { display: grid; gap: clamp(20px, 3vw, 40px); padding-left: var(--pad); }
.cs-inside .cs-text { padding-right: var(--pad); }
.cs-inside .cs-side { aspect-ratio: 4 / 5; margin-left: calc(-1 * var(--pad)); }
.cs-inside .cs-side.is-pair { aspect-ratio: 9 / 15; }
@media (min-width: 900px) {
  .cs-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: var(--gap); }
  .cs-inside .cs-text { padding-right: 0; }
  .cs-inside .cs-side { aspect-ratio: 16 / 11; margin-left: 0; max-height: 88svh; }
  .cs-inside .cs-side.is-pair { aspect-ratio: 16 / 10; }
}

/* ---------- what followed: a real sequence; each job about half a screen of scrolling ---------- */
.cs-followed { padding: var(--rel) 0 0; }
.cs-fh { padding: 0 var(--pad) clamp(20px, 3vw, 36px); }
.cs-steps { list-style: none; padding: 0 var(--pad); margin: 0; display: grid; gap: clamp(40px, 7vw, 64px); }
.cs-step { display: grid; gap: 12px; position: relative; }
.cs-h3 { font-size: clamp(1.6rem, 6.4vw, 2.1rem); line-height: 1.04; letter-spacing: -.02em; max-width: 15em; }
@media (min-width: 900px) { .cs-h3 { font-size: clamp(2rem, 2.8vw, 3.1rem); line-height: 1; letter-spacing: -.024em; max-width: 10em; } }
.cs-step-t { display: grid; gap: 12px; }
.cs-inline { aspect-ratio: 4 / 5; margin-top: 6px; }
.cs-inline.is-pair { aspect-ratio: 9 / 15; }
.cs-inline.is-contain { aspect-ratio: 16 / 10; }
.cs-stage { display: none; }
@media (min-width: 900px) {
  /* the stage is a screen: pictures keep their own shape (16 by 10), flush to the left edge */
  .cs-reel:not(.no-stage) { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: start; }
  .cs-stage { display: block; position: sticky; top: var(--hd); height: calc(100svh - var(--hd)); overflow: hidden; }
  .cs-stage-i { position: absolute; inset: 0; display: grid; align-items: center; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s .5s; }
  .cs-stage-i.on { opacity: 1; visibility: visible; z-index: 1; transition: opacity .5s ease; }
  .cs-stage-i .cs-media, .cs-stage-i .cs-media.is-pair { width: 100%; height: auto; aspect-ratio: 16 / 10; max-height: calc(100svh - var(--hd) - 16px); }
  .cs-reel:not(.no-stage) .cs-steps { padding: 26svh var(--pad) 30svh clamp(28px, 3vw, 48px); gap: 0; }
  .cs-reel:not(.no-stage) .cs-step { min-height: 48svh; align-content: center; opacity: .55; transition: opacity .4s ease; }
  .cs-reel:not(.no-stage) .cs-step.on { opacity: 1; }
  .cs-reel:not(.no-stage) .cs-inline { display: none; }
  .cs-reel.no-stage .cs-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .cs-step .cs-inline { margin-left: calc(-1 * var(--pad)); margin-right: calc(-1 * var(--pad)); }
}

/* ---------- what I'm proudest of: the picture large and to the edge, the words beside it ---------- */
.cs-proud { padding: var(--rel) 0 0; display: grid; gap: clamp(44px, 6vw, 88px); }
.cs-ph { padding: 0 var(--pad); margin-bottom: calc(-1 * clamp(20px, 3vw, 48px)); }
.cs-pr { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.cs-pr .cs-big { width: 100%; aspect-ratio: 16 / 10; max-height: 92svh; }
.cs-pr .cs-text { padding: 0 var(--pad); }
@media (min-width: 900px) {
  .cs-pr:not(.no-media) { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: center; gap: var(--gap); }
  .cs-pr:not(.no-media) .cs-text { padding: 0 var(--pad) 0 0; }
  .cs-pr.is-flip:not(.no-media) { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .cs-pr.is-flip:not(.no-media) .cs-big { order: 2; }
  .cs-pr.is-flip:not(.no-media) .cs-text { padding: 0 0 0 var(--pad); }
}
@media (max-width: 899px) { .cs-pr .cs-big { aspect-ratio: 4 / 5; } .cs-pr .cs-big.is-pair { aspect-ratio: 9 / 15; } }

/* ---------- a piece: the page's padding by default; pieceWide: true takes the full width ---------- */
.cs-piece { position: relative; padding: 0 var(--pad); }
.cs-piece.is-wide, .cs-piece.at-cover { padding: 0; }
.cs-part > .cs-piece { margin-top: clamp(20px, 3vw, 40px); }
.cs-proud > .cs-piece { margin-top: calc(-1 * clamp(20px, 3vw, 44px)); }

/* ---------- what they said ---------- */
.cs-said { padding: var(--rel) var(--pad) 0; }
.cs-said blockquote { font-family: var(--disp); font-weight: 800; font-size: clamp(2.2rem, 6.4vw, 5.6rem); line-height: .98; letter-spacing: -.03em; max-width: 14em; }
.cs-said blockquote p { max-width: none; }
.cs-said footer { font-family: var(--text); font-weight: 500; font-size: 17px; letter-spacing: 0; color: var(--read); margin-top: 18px; }

/* ---------- now: the site running, one line, the way on ---------- */
.cs-now { padding: var(--rel) 0 clamp(56px, 7vw, 110px); display: grid; gap: clamp(24px, 3vw, 44px); }
.cs-tour .tour-media { height: min(86svh, 62.5vw); min-height: 360px; }
@media (max-width: 899px) { .cs-tour .tour-media { height: min(78svh, 180vw); } }
.cs-end { padding: 0 var(--pad); display: grid; gap: 14px; }
@media (min-width: 900px) {
}
.cs-act { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; margin-top: 10px; }
.cs-next { font-size: 18px; }

/* headline left, words right, both sitting on one line at the bottom (start on its footage, a proud item without a picture, the close) */
.cs-ps { display: grid; gap: 14px; align-content: end; }
@media (min-width: 900px) {
  .cs-start.is-over .cs-text, .cs-start.is-under .cs-text, .cs-pr.no-media .cs-text, .cs-end { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: var(--gap); align-items: end; }
  .cs-start.is-over .cs-ps .cs-p, .cs-start.is-under .cs-ps .cs-p, .cs-pr.no-media .cs-ps .cs-p, .cs-end .cs-ps .cs-p { margin: 0; }
}

/* a part that could not be drawn is simply left out */
.is-broken .cs-flip, .cs-piece.is-broken { display: none; }

@media (prefers-reduced-motion: reduce) {
  .cs-stage-i, .cs-reel .cs-step, .cs-flip::before { transition: none !important; }
}

/* a media item's own `ratio` wins over the part's default shape at every width (it was losing to the phone defaults,
   so a 16 by 10 clip shown whole sat in a 4 by 5 box with empty ink above and below it) */
.cs .cs-media.has-ratio { aspect-ratio: var(--r); }

/* a part opened by its address stops just below the header */
.cs [id] { scroll-margin-top: calc(var(--hd, 64px) + 16px); }
/* a heading focused by the jump to its address is not a control: no focus box on it (screen readers still start there) */
.cs h1[tabindex="-1"]:focus, .cs h2[tabindex="-1"]:focus, .cs h3[tabindex="-1"]:focus { outline: none; }

/* ---- 2026-11-12: what arrives after a picture (media.then), links under a part, the cover's scroll cue ---- */
.cs-media.has-then { display: grid; gap: clamp(12px, 1.6vw, 20px); aspect-ratio: auto !important; height: auto !important; max-height: none !important; overflow: visible; background: none; }
.cs-then-0 { margin: 0 auto; width: 58%; aspect-ratio: 16 / 10; overflow: hidden; }
.cs-then-0 img, .cs-then-0 video, .cs-then-m img, .cs-then-m video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.cs-then { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); }
.cs-then-i { display: grid; gap: 8px; opacity: 0; transform: translateY(28px) scale(.97); transition: opacity .7s ease calc(.35s + var(--k) * .28s), transform .9s cubic-bezier(.2, .7, .2, 1) calc(.35s + var(--k) * .28s); }
.has-then.is-then .cs-then-i { opacity: 1; transform: none; }
.cs-then-n { margin: 0; font: 600 13px/1.2 var(--text); color: var(--soft); }
.cs-then-m { aspect-ratio: 16 / 10; overflow: hidden; }
.cs-inline.has-then { margin-left: 0; margin-right: 0; }
.cs-inline .cs-then-0 { width: 100%; }
.cs-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0 0; }
.cs-cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; display: grid; justify-items: center; gap: 8px; font: 600 12px/1 var(--text); color: var(--paper); opacity: .85; transition: opacity .4s ease; pointer-events: none; z-index: 2; }
.cs-cue i { width: 1px; height: 26px; background: currentColor; transform-origin: 50% 0; animation: cs-cue 1.8s ease-in-out infinite; }
@keyframes cs-cue { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.has-moved .cs-cue { opacity: 0; }
.cs-cover.no-footage .cs-cue { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .cs-then-i { opacity: 1; transform: none; transition: none; } .cs-cue i { animation: none; } }
.cs-stage .cs-then-n { padding-left: clamp(12px, 1.4vw, 20px); }
.cs-inline .cs-then-0 { aspect-ratio: auto; }
.cs-inline .cs-then-0 img { height: auto; }
.cs-stage .cs-media.is-whole > img, .cs-stage .cs-media.is-whole > video { object-fit: contain; object-position: 50% 50%; }

/* ---- project details, press and the live sites (D107) ---- */
.cs-facts { padding: clamp(56px, 8vw, 120px) var(--pad) 0; display: grid; gap: clamp(20px, 3vw, 36px); }
.cs-facts-in { display: grid; gap: clamp(28px, 4vw, 64px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; max-width: 1100px; }
.cs-facts-dl { margin: 0; border-top: 1px solid var(--rule); }
.cs-facts-dl > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.cs-facts-dl dt { color: var(--soft); }
.cs-facts-dl dd { margin: 0; }
.cs-facts-press ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.cs-facts-press li { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.cs-facts-press li span { color: var(--soft); font-size: .92em; }
.cs-facts-live { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
