/* ==================================================================== Work
   A client's website, shown working: the reel (reel.css) with the story
   beside it. Used on the home page ("Our recent work.", where asks.css and
   desk.css make it a sand sheet coming up over the locals) and on each
   case study page (the AQUAKids one is archived in refs/portfolio/AQUAKids).

   On a phone everything stacks: heading, client, the reel at the full width
   of the screen (so the desktop recording gets 90% of it), then the review
   and the story. On a wide screen the story is the left half and the reel
   holds on the right while it scrolls past (sticky). Motion is work.js. */

.work { position: relative; overflow-x: clip; }
.work__in {
  display: grid;
  grid-template-areas: "head" "media" "body";
  gap: 2.4rem;
}
.work__head { grid-area: head; }
.work__media { grid-area: media; }
.work__body { grid-area: body; }

.work__h {
  margin: 0 0 1.6rem;
  font-size: clamp(2.8rem, 13vw, 3.7rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.03em;
}
.work__client {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 7.4vw, 2.3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.015em;
  color: var(--ink);
}
.work__where {
  margin: .55rem 0 0;
  font-family: var(--mono);
  font-size: max(12px, .78rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* The reel runs the full width of a phone's screen. */
.work__media { margin-inline: calc(var(--gutter) * -1); }
.work .reel { --reel-ratio: 9 / 16.5; }
/* The switch's track is sand, which would vanish on a sand section. Linen
   keeps the inactive label at 5.7:1. */
.work .reel__tabs { background: var(--linen); box-shadow: inset 0 0 0 1px var(--hair); }

/* The showreel film (showreel.css) sits in its own rounded linen panel,
   lifted off the sheet's sand like the story's cards. Inside the gutters
   on a phone. */
.work .showreel { --showreel-ratio: 4 / 5; }
.work__media:has(.showreel) { margin-inline: 0; }

/* ---- The review */
.work__quote { margin: 0; }
.work__quote blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.3rem, 5.4vw, 1.6rem);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -.01em;
  color: var(--ink);
  text-wrap: pretty;
  hanging-punctuation: first;
}
.work__quote blockquote p { margin: 0; }
.work__by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .8rem;
  margin-top: 1.2rem;
  font-size: .9375rem;
  color: var(--ink-3);
}
.work__by b { font-weight: 500; color: var(--ink); }
.work__stars { display: inline-flex; gap: 2px; color: var(--ink); }
.work__stars svg { width: 14px; height: 14px; fill: currentColor; }

/* ---- Needed, built, result: one list, a hairline between each */
.work__story { margin: 2.6rem 0 0; padding: 0; }
.work__row {
  display: grid;
  gap: .55rem;
  padding: 1.35rem 0 1.4rem;
  border-top: 1px solid var(--hair-2);
}
.work__row:last-child { border-bottom: 1px solid var(--hair-2); }
.work__row dt {
  font-family: var(--mono);
  font-size: max(12px, .78rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.work__row dd {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}
.work__wins { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.work__wins li { display: grid; grid-template-columns: 1.15rem 1fr; gap: .7rem; align-items: start; color: var(--ink); }
.work__tick {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .22rem;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.work__more { margin: 2.4rem 0 0; }

/* ---------------------------------------------------------------- Wide */
@media (min-width: 820px) and (min-device-width: 600px) and (min-device-height: 600px) {
  .work__in {
    grid-template-areas: "head media" "body media";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(3rem, 6vw, 7rem);
    row-gap: 0;
  }
  .work__h { font-size: clamp(3.6rem, 6vw, 7rem); margin-bottom: 2.2rem; line-height: .95; letter-spacing: -.038em; }
  .work__client { font-size: clamp(2rem, 2.6vw, 2.8rem); }
  .work__body { padding-top: clamp(3rem, 7svh, 4.5rem); max-width: 36rem; }
  .work__media {
    position: sticky;
    top: max(calc(var(--nav-h, 64px) + 1rem), 7svh);
    align-self: start;
    margin-inline: 0;
  }
  .work .reel { --reel-ratio: 4 / 5; max-height: 86svh; }
  .work .showreel { max-height: 86svh; }
  .work__quote blockquote { font-size: clamp(1.45rem, 1.9vw, 1.95rem); }
  .work__row { grid-template-columns: 7rem minmax(0, 1fr); gap: 1.5rem; }
  .work__row dt { padding-top: .3rem; }
}

/* Lines of a heading rise in their own windows (work.js). */
.work .line { display: block; overflow: hidden; padding-bottom: .08em; }
.work .line > span { display: block; }

/* =============================================================== Case study
   aquakids-swim-school.html: the shared inner-page hero, then the site on a
   sand sheet, and the story in sections that each look different (an
   example inbox, a split with a still, three phone screens, a short list,
   the results on a sand panel). */

/* The site, on a sand sheet; the next section comes up over its foot. */
.work--case {
  padding: clamp(3.5rem, 9vw, 7rem) 0 calc(clamp(3.5rem, 9vw, 7rem) + var(--r-xl));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--sand);
}
.case-lead {
  max-width: 34rem;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}
.case-sheet {
  position: relative;
  z-index: 1;
  margin-top: calc(var(--r-xl) * -1);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--linen);
}

/* The school at a glance: figures set large, never counted. */
.case-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem 1.4rem;
  margin: 2.6rem 0 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--hair-2);
}
.case-facts dt {
  font-family: var(--display);
  font-size: clamp(2.2rem, 9vw, 2.9rem);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
}
.case-facts dd { margin: .45rem 0 0; font-size: .9375rem; line-height: 1.45; color: var(--ink-2); }

.case-head { max-width: 46rem; }
.case-head .gd-p { margin-top: 1rem; }

/* The example inbox, on linen (guides.css draws it for a dark section). */
.case-inbox .mk { background: var(--paper); box-shadow: 0 1px 0 var(--hair), 0 30px 60px -36px rgba(40, 24, 8, .45); }
.case-inbox .mk-notes .mk__n { color: var(--accent-ink); }
.case-inbox .mk-notes h3 { color: var(--ink); }
.case-inbox .mk-notes p { color: var(--ink-2); }

/* A desktop still keeps its own shape. */
.case-shot { aspect-ratio: 920 / 700; }
@media (min-width: 820px) { .case-shot { aspect-ratio: 920 / 700; } }
.case-shot img { object-position: 50% 0; }

/* Three phone screens: a swipe strip on a phone, a row on a wide screen. */
.case-phones {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(68vw, 17rem);
  gap: 1.25rem;
  margin: 2.4rem calc(var(--gutter) * -1) 0;
  padding: .5rem var(--gutter) 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  list-style: none;
  scrollbar-width: none;
}
.case-phones::-webkit-scrollbar { display: none; }
.case-phones li { scroll-snap-align: start; }
.case-phone {
  overflow: hidden;
  aspect-ratio: 568 / 1200;
  border-radius: 28px;
  background: var(--sand);
  box-shadow: 0 0 0 1px var(--hair), 0 26px 50px -30px rgba(40, 24, 8, .5);
}
.case-phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
.case-phones h3 {
  display: flex;
  gap: .7rem;
  align-items: baseline;
  margin: 1.4rem 0 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
}
.case-phones h3 .mk__n { color: var(--accent-ink); }
.case-phones p { margin: .4rem 0 0; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }

/* What the school has: name and a few words, a hairline between. */
.case-feats { margin: 2.4rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--hair-2); }
.case-feats li { padding: 1.15rem 0 1.2rem; border-bottom: 1px solid var(--hair-2); }
.case-feats h3 { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; font-size: 1.0625rem; font-weight: 500; color: var(--ink); }
.case-feats p { margin: .3rem 0 0; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }

/* The results, on a sand panel. */
.case-results {
  padding: clamp(2.2rem, 7vw, 5rem) clamp(1.4rem, 5vw, 4.5rem);
  border-radius: var(--r-xl);
  background: var(--sand);
}
.case-wins { display: grid; gap: 0; margin: 2rem 0 0; padding: 0; list-style: none; }
.case-wins li { padding: 1.4rem 0 1.5rem; border-top: 1px solid var(--hair-2); }
.case-wins p { margin: .45rem 0 0; font-size: 1rem; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.case-wins .case-wins__big {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 6.4vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
}

@media (min-width: 820px) and (min-device-width: 600px) and (min-device-height: 600px) {
  .work--case .work__in { align-items: start; }
  .case-facts dt { font-size: clamp(2.4rem, 3.4vw, 3.4rem); }
  .case-phones {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-columns: auto;
    gap: clamp(1.5rem, 3vw, 3rem);
    margin-inline: 0;
    padding: .5rem 0 0;
    overflow: visible;
  }
  .case-phones li { max-width: 21rem; }
  .case-feats { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 5vw, 5rem); border-top: 0; }
  .case-feats li:nth-child(-n+2) { border-top: 1px solid var(--hair-2); }
  .case-wins { grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 5vw, 5rem); }
}


/* ============================================================== Home: clients
   index.html, "Our recent work.": one .work__case per client, the client's
   name, then the film and the story (.work__split). Each story is three
   cards (the challenge, the approach, the impact) that pin and stack as
   they're scrolled, as "What changes the price" does on the cost page:
   each card steps back a touch as the next comes up over it (work.js).
   When the third has landed and held for a beat, the link comes up under
   it and the client leaves, all of it together, up under the heading.

   What's pinned, top down (each band on the sheet's sand, so what slides
   under it is hidden):
     every width  "Our recent work.", then the client's name, full width
     phones       then the film; the review slides up under it and the
                  cards stack under the film
     wide         the film beside the review's mark, then who said it
                  (the review's words go up behind the mark first); the
                  cards stack under who said it
   --wh, --ch, --mh and --qh are the heights of the heading, the name, the
   film's band and the review (work.js). work.js also cuts every client
   off at the heading's foot, as the header above it is clear.

   The scroll between cards is margin ABOVE each one, never below: a
   sticky card's margin counts against its container's end, so margin
   below pushes the tallest card off the pile early. work.js (STACK) sets
   the margins below so everything lets go at the same moment, and the
   room for the last card's beat is the spacer after it, in the list. */
/* Flex columns throughout, never plain blocks: STACK (work.js) times
   everything with margins that are given back by the next piece's margin,
   and in a plain block two positive margins collapse into the larger one
   instead of adding up. That threw the last client's name off by 55px on
   phones, so it hung on after the film and cards had gone. */
.work--home .work__in { display: flex; flex-direction: column; }
.work--home .work__case,
.work--home .work__body,
.work__story { display: flex; flex-direction: column; }
.work--home .work__h {
  position: sticky;
  top: var(--nav-h, 56px);
  z-index: 4;
  margin: 0 calc(var(--gutter) * -1);
  padding: .4rem var(--gutter) .5rem;
  background: var(--sand);
  font-size: clamp(2.3rem, 10.5vw, 2.9rem);
}
.work--home .work__client {
  position: sticky;
  top: calc(var(--nav-h, 56px) + var(--wh, 4rem));
  z-index: 3;
  margin: 0 calc(var(--gutter) * -1);
  padding: .55rem var(--gutter) .6rem;
  border-top: 1px solid var(--hair-2);
  background: var(--sand);
  font-size: clamp(1.1rem, 4.9vw, 1.4rem);
}
/* Whatever slides up past the pinned heading goes behind a sand cover
   reaching from its top to the screen's, kept inside the sheet by the
   sheet's clip. Nothing is re-clipped as the page moves: a clip-path
   redone every frame tore the film and the tape on Android Chrome
   (phones, an opened Fold, tablets) when scrolling back up.
   ANDROID-RENDERING.md. */
.work.work--home { overflow-y: clip; }
.work--home .work__h::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 100vh;
  background: var(--sand);
  pointer-events: none;
}
/* The name, then where. Wide: one line, "Name · Suburb". */
.work__client-at::before { content: "\00b7"; margin-right: .3em; }
.work__case { --top0: calc(var(--nav-h, 56px) + var(--wh, 4rem) + var(--ch, 3rem)); }
/* A link straight to a client (index.html#aquakids, #4clever-kids) lands
   with its name just under the pinned heading. */
.work--home .work__case { scroll-margin-top: calc(var(--nav-h, 56px) + var(--wh, 4rem)); }
.work__case + .work__case { margin-top: clamp(4rem, 14vw, 6rem); }

/* Phones: the film pins under the name, nearly the screen's full width so
   the desktop site gets 90% of it (showreel.js sizes). */
.work--home .work__split { display: flex; flex-direction: column; }
.work--home .work__media {
  position: sticky;
  top: var(--top0);
  z-index: 2;
  margin: 0 calc(var(--gutter) * -1);
  padding: .2rem 8px .45rem;
  background: var(--sand);
}
.work--home .showreel { aspect-ratio: 1; }
/* The review waits below the screen's foot until the film has pinned,
   then comes up under it. */
.work--home .work__body { margin-top: max(1.4rem, calc(100svh - var(--top0) - var(--mh, 23rem))); }

.work__story { --card-top: calc(var(--top0) + var(--mh, 23rem) + 1rem + 20px); margin-top: 2.2rem; }
.work__story::after { content: ""; display: block; height: 10svh; }
/* Each card is a sheet in two parts: a linen head (the title, and where
   it sits in the three) over a white body, split by a hairline that draws
   across as the card arrives. A card that's been covered steps back and
   dims a touch (--shade, work.js). */
.work__card {
  position: sticky;
  top: calc(var(--card-top) + var(--i, 0) * .3rem);
  overflow: hidden;
  min-height: 10rem;
  border-radius: 1.5rem;
  background: var(--paper);
  box-shadow:
    0 0 0 1px rgba(20, 17, 13, .06),
    0 2px 3px rgba(40, 24, 8, .04),
    0 -12px 30px -20px rgba(40, 24, 8, .28),
    0 30px 50px -32px rgba(40, 24, 8, .5);
  transform-origin: 50% 0;
}
.work__card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(20, 17, 13, .08);
  opacity: var(--shade, 0);
  pointer-events: none;
}
.work__card + .work__card { margin-top: 16svh; }
.work__card:nth-child(2) { --i: 1; }
.work__card:nth-child(3) { --i: 2; }
.work__card-head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1.2rem .62rem;
  background: var(--linen);
}
.work__card-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--hair-2);
  transform: scaleX(var(--line, 1));
  transform-origin: 0 50%;
}
/* Terracotta ink on linen is 5.3:1. */
.work__card h4 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 6vw, 1.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--accent-ink);
}
.work__card-n {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ink);
}
.work__card-n span { color: var(--ink-3); }
.work__card-body { padding: .75rem 1.2rem .9rem; }
.work__card p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.work__card .work__wins { gap: .3rem; font-size: .9rem; line-height: 1.4; }

/* The two AI answers, as tiny phone screens after the line about them;
   each opens large in the middle of the screen (work.js, SHOTS). */
.work__shots { display: inline-flex; gap: .35rem; margin-left: .3rem; vertical-align: text-bottom; }
.work__shot {
  display: block;
  width: 1.5rem;
  height: 2.15rem;
  overflow: hidden;
  border-radius: .35rem;
  background: var(--sand);
  box-shadow: 0 0 0 1px var(--hair-2), 0 6px 12px -6px rgba(40, 24, 8, .45);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.work__shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.work__shot:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--hair-2), 0 10px 16px -8px rgba(40, 24, 8, .5); }
.work__shot:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 819px), (max-device-width: 599px), (max-device-height: 599px) {
  .work__shot { height: 1.85rem; }
}

.shotbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}
.shotbox[open] { display: block; }
.shotbox::backdrop { background: transparent; }
.shotbox__veil { position: absolute; inset: 0; background: rgba(14, 12, 9, .8); }
.shotbox img {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75);
  transform-origin: 0 0;
}
.shotbox__close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(246, 243, 238, .95);
  color: var(--ink);
  cursor: pointer;
}
.shotbox__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.shotbox__close:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* The review, as a pull quote: a large terracotta mark, the words, then a
   hairline and who said it (their initial, their name and role, and where
   it was left). The words fill in from faint as they're scrolled
   (work.js, WORDS). */
.work--home .work__quote { position: relative; padding-top: 2.4rem; }
.work--home .work__quote::before {
  content: "\201C";
  position: absolute;
  top: -.15rem;
  left: -.04em;
  font-family: var(--display);
  font-size: 4.6rem;
  line-height: 1;
  color: var(--accent);
}
.work__quote .work__w { display: inline; }
.work--home .work__by {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  margin-top: 1.3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hair-2);
  font-size: inherit;
}
.work__mono {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--hair-2);
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink);
}
.work__who { display: grid; gap: .1rem; line-height: 1.3; }
.work__who b { font-size: .9375rem; font-weight: 500; color: var(--ink); }
.work__who span { font-size: .8125rem; color: var(--ink-3); }
.work__src {
  display: grid;
  justify-items: end;
  gap: .3rem;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.work__story + .work__more { margin-top: 1.25rem; }
.work__more--link a {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .22em;
}
.work__more--link a:hover { text-decoration-thickness: 2.5px; }

/* Phones. The client's name is the Dymo tape stuck across the film's
   top-left corner, half on it, so the heading's own words are only there
   for screen readers, and its band is the room the tape pokes up into;
   where the client is sits on the film's foot, beside its buttons.
   As the first review comes up under its film, the header goes and
   "Our recent work." and every client slide up into its room (--lf, 0
   to 1, from the scroll: work.js, LIFT) by --lx; the heading stays.
   The dock stays away while it does (html.work-up). The
   review plays under the film and goes behind it, then the cards stack
   under the film. On a short screen the film is set a little smaller,
   once, for that screen (--film), so the review and the pile always fit.
   Where the screen is still too short for the whole pile, the cards
   rise under the film as they come (--sq, 0 to 1, by --rise: work.js),
   just enough to show it all. ink-3 on sand 4.9:1. */
.work__tape { display: none; }
/* Wide only (the wide block below): the review's mark on its own, and the
   box the review opens in. On a phone the mark is .work__quote::before. */
.work__mark, .work__pop { display: none; }
.work__hold { display: contents; }
@media (max-width: 819px), (max-device-width: 599px), (max-device-height: 599px) {
  .work--home .work__h,
  .work--home .work__case { translate: 0 calc(var(--lf, 0) * var(--lx, 0px) * -1); }
  /* The header comes and goes as everywhere else; when a scroll up
     brings it back, the heading and clients drop back out from under it
     (the lift undone), with it. */
  .work--home .work__h,
  .work--home .work__case { transition: translate .55s var(--glide); }
  html.work-up:has(.nav:not(.is-away)) .work--home .work__h,
  html.work-up:has(.nav:not(.is-away)) .work--home .work__case { translate: 0 0; }
  /* The bar at the foot stays away, which would cover the pile's last 30px
     of air (work.js, FOOT). */
  html.work-up .dock { transform: translateY(calc(100% + 1.5rem + env(safe-area-inset-bottom))); }
  /* The band is only the room the tape's top half pokes up into. Where
     the client is goes on the film, beside its buttons (showreel.js,
     data-where); the heading keeps both in words for screen readers. */
  .work--home .work__client {
    display: block;
    min-height: 2.2rem;
    padding: 0;
    border-top: 0;
  }
  .work__client-n,
  .work__client-at {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .work--home .showreel__where { display: block; margin-right: auto; }
  /* Where sits bottom left, the buttons bottom right. */
  .work--home .showreel__ctl { left: clamp(10px, 2.4%, 18px); }
  /* Pause/play as a symbol only, the same round bead as back 3s. */
  .work--home .showreel__toggle { display: grid; place-items: center; width: 2.6em; height: 2.6em; padding: 0; }
  .work--home .showreel__toggle[hidden] { display: none; }
  .work--home .showreel__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .work--home .showreel__ico { display: block; width: 100%; height: 100%; padding: .7em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .work--home .showreel__ico-play,
  .work--home .is-paused .showreel__ico-pause { display: none; }
  .work--home .is-paused .showreel__ico-play { display: inline; }

  /* The film, over the name's band so its tape can lie across the join. */
  .work--home .work__media { z-index: 3; }
  /* One strip, as large as fits across the screen: 80% of the old size on
     most phones, never under 70%. The tape runs 17.6 times its type size,
     and leaves 24px clear at the right. */
  .work__tape {
    display: flex;
    position: absolute;
    z-index: 2;
    top: calc(.2rem - 1.05em);
    left: 14px;
    margin: 0;
    font-size: clamp(1.12rem, calc((100vw - 38px) / 17.6), 1.28rem);
    white-space: nowrap;
    pointer-events: none;
    transform: rotate(-1.5deg);
    transform-origin: left center;
  }
  .work__tape .tape__strip {
    font-size: 1em;
    /* Lifted off the film a touch more than the header's tape, as a
       strip stuck across an edge stands proud of it. */
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .15),
      inset 0 -1px 0 rgba(0, 0, 0, .55),
      0 16px 26px -8px rgba(20, 17, 13, .5),
      0 3px 6px rgba(20, 17, 13, .35);
  }

  /* The review, large, pinned 20px under the film from the moment the
     film pins, and held there for a long stretch of scroll (the story's
     margin, work.js RUN). work.js plays it through that stretch at half
     the scroll's speed: it rises from the screen's foot line by line
     (--qy 1 to 0, by --qin), then the hairline, who said it and the stars
     come in from the right, then it slides back up behind the film (--qy
     0 to -1, by --qout) and is cut at the film's top. Only then do the
     cards come, at the scroll's own speed, under the film. */
  .work--home .work__body { margin-top: calc(20px - .45rem); translate: 0 calc(var(--sq, 0) * var(--rise, 0px) * -1); }
  .work--home .work__quote {
    position: sticky;
    top: calc(var(--top0) + var(--mh, 23rem) - .45rem + 20px);
    padding-top: 2.3rem;
    translate: 0 calc(max(var(--qy, 0), 0) * var(--qin, 0px) + min(var(--qy, 0), 0) * var(--qout, 0px));
  }
  .work--home .work__quote::before { font-size: 4.4rem; opacity: var(--mk, 1); }
  .work--home .work__quote blockquote { font-size: clamp(1.4rem, 6.4vw, 1.65rem); line-height: 1.26; letter-spacing: -.015em; }
  .work__quote .work__ln { display: block; transform-origin: 0 100%; }
  /* Who said it, hairline and all, comes in as one piece (--bx). */
  .work--home .work__by { margin-top: 1.15rem; padding-top: .9rem; translate: calc(var(--bx, 0) * 100vw) 0; }
  /* The cards pin 30px under the film, each a heading's height (--hh,
     work.js) below the one before, so every heading on the pile can be
     read. A tap on one takes the page back to where that card had just
     landed (work.js, DECK). */
  .work--home .work__story { --card-top: calc(var(--top0) + var(--mh, 23rem) - .45rem + 30px); position: relative; z-index: 1; }
  .work--home .work__card {
    top: calc(var(--card-top) + var(--i, 0) * var(--hh, 2.7rem));
    /* Resting on the pile, a close shadow; held above it (--air, work.js
       DECK), a deeper, softer one. */
    box-shadow:
      0 0 0 1px rgba(20, 17, 13, .06),
      0 1px 2px rgba(40, 24, 8, .06),
      0 -10px 24px -18px rgba(40, 24, 8, .26),
      0 calc(10px + var(--air, 0) * 22px) calc(18px + var(--air, 0) * 34px) calc(-14px - var(--air, 0) * 12px) rgba(40, 24, 8, calc(.34 + var(--air, 0) * .16));
  }
  .work--home .work__card-head { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  /* The two AI answers, a breath under the line about them. */
  .work__shots { margin-top: .4rem; }
  /* The room between clients is set by work.js (GAP), the same at every
     screen size. */
  .work__case + .work__case { margin-top: 0; }
  /* As large as the screen allows with the whole pile under it (--film,
     work.js); full size on most phones. */
  .work--home .showreel { width: calc(var(--film, 1) * 100%); margin-inline: auto; }
}

/* Wide: story (review, then the cards) and film side by side under the
   bands, the film on the left for a --flip client. Nothing but the name,
   the review and the film comes up at first; the first card is below the
   screen (HOLD, work.js). The film is as wide as it is tall (--filmw) and
   the whole client, heading included, is only as wide as the review, the
   gap and the film together, centred, so a window of any shape never
   leaves it hanging on one side. */
@media (min-width: 820px) and (min-device-width: 600px) and (min-device-height: 600px) {
  .work--home {
    --filmw: calc(100svh - var(--nav-h, 56px) - var(--wh, 6rem) - var(--ch, 4rem) - 4.25rem);
    --wgap: clamp(3rem, 5vw, 6rem);
  }
  .work.work--home .work__in {
    max-width: calc(34rem + var(--wgap) + var(--filmw) + var(--edge, var(--gutter)) * 2);
    margin-inline: auto;
  }
  .work--home .work__h {
    margin: 0 calc(var(--edge, var(--gutter)) * -1);
    padding: .5rem var(--edge, var(--gutter)) 1.7rem;
    font-size: clamp(3.2rem, 5vw, 6rem);
  }
  .work--home .work__client {
    margin: 0 calc(var(--edge, var(--gutter)) * -1);
    padding: .35rem var(--edge, var(--gutter)) .8rem;
    border-top: 0;
    font-size: clamp(2rem, 2.6vw, 2.8rem);
  }
  .work--home .work__case + .work__case { margin-top: clamp(7rem, 16svh, 11rem); }
  .work--home .work__split {
    display: grid;
    grid-template-columns: minmax(0, 34rem) minmax(0, var(--filmw));
    grid-template-areas: "body media";
    justify-content: center;
    column-gap: var(--wgap);
    margin-top: .75rem;
  }
  .work--home .work__case--flip .work__split { grid-template-columns: minmax(0, var(--filmw)) minmax(0, 34rem); grid-template-areas: "media body"; }
  .work--home .work__media {
    grid-area: media;
    top: calc(var(--top0) + .75rem);
    z-index: auto;
    align-self: start;
    margin: 0;
    padding: 0;
    background: none;
  }
  /* 3.5rem clear under the film, to the screen's foot, and never taller
     than its column is wide: in a narrow column (a half-screen window)
     the phone is sized from the box's height and its companions reach
     past the box's sides (showreel.js, sizes()), over the review. */
  .work--home .showreel { aspect-ratio: 1; height: auto; max-height: calc(100svh - var(--top0) - 4.25rem); }
  .work--home .work__body { grid-area: body; margin-top: 0; padding-top: 0; max-width: none; }
  /* The review, in three stops, all of them sticky so nothing lags the
     scroll. The mark pins under the name and stays, on a band of sand.
     The words and who said it (.work__hold) pin under the mark while the
     first card comes up. .work__quote is taller than they are by exactly
     that scroll (height, work.js HOLD), so they let go the moment the
     card arrives under them, and all three go up together, the words
     behind the mark, until .work__quote pins too (--pt) with who said it
     just under the mark and the card just under that. */
  .work__mark {
    display: block;
    position: sticky;
    top: calc(var(--top0) + .75rem);
    z-index: 2;
    flex: none;
    height: 2.7rem;
    background: var(--sand);
  }
  .work__mark::before {
    content: "\201C";
    position: absolute;
    top: -.35rem;
    left: -.04em;
    font-family: var(--display);
    font-size: 5.4rem;
    line-height: 1;
    color: var(--accent);
  }
  /* The band reaches up to the name's, leaving no chink for the words. */
  .work__mark::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 1rem;
    background: var(--sand);
  }
  .work--home .work__quote {
    position: sticky;
    top: var(--pt, calc(var(--top0) + .75rem + var(--mkh, 2.7rem)));
    z-index: 1;
    flex: none;
    padding-top: 0;
    pointer-events: none;      /* mostly empty room, over the cards */
  }
  .work--home .work__quote::before { content: none; }
  .work__hold {
    display: block;
    position: sticky;
    top: calc(var(--top0) + .75rem + var(--mkh, 2.7rem));
    pointer-events: auto;
  }
  .work--home .work__quote blockquote { font-size: clamp(1.3rem, 1.55vw, 1.7rem); }
  .work--home .work__by { position: relative; margin-top: 1.05rem; padding-top: .95rem; }
  /* With the words gone, who said it brings them back: over it, the
     review opens under it in a box of its own, cut like the cards, the
     mark inside (work.js, POP). */
  .work__pop {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + .75rem);
    padding: 1.3rem 1.9rem 1.7rem;
    border-radius: 1.75rem;
    background: var(--paper);
    box-shadow:
      0 0 0 1px rgba(20, 17, 13, .06),
      0 2px 3px rgba(40, 24, 8, .04),
      0 30px 50px -28px rgba(40, 24, 8, .55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(.985);
    transform-origin: 50% 0;
    transition: opacity .18s ease, transform .28s var(--ease), visibility 0s linear .18s;
    pointer-events: none;
  }
  .work__by.is-open .work__pop {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .18s ease, transform .28s var(--ease), visibility 0s;
  }
  .work__pop::before {
    content: "\201C";
    display: block;
    height: 2.5rem;
    margin-left: -.04em;
    font-family: var(--display);
    font-size: 4.6rem;
    line-height: 1;
    color: var(--accent);
  }
  .work__pop p {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.2rem, 1.4vw, 1.5rem);
    line-height: 1.32;
    letter-spacing: -.01em;
    color: var(--ink);
    text-wrap: pretty;
  }
  .work__story { --card-top: calc(var(--top0) + .75rem + var(--qh, 12rem) + 1.6rem); margin-top: 1.6rem; }
  .work__card { top: calc(var(--card-top) + var(--i, 0) * .45rem); min-height: 12rem; border-radius: 1.75rem; }
  /* Every card fits between where it pins and the screen's foot, 1.5rem
     clear. Where its words don't fit (a short screen, an opened Fold),
     they fade out at the card's foot and the scroll runs them up through
     it, held on the pile, until they're all read; only then does the next
     card come (work.js, FIT: --over, the room it adds, and --fade). */
  .work--home .work__card {
    display: flex;
    flex-direction: column;
    min-height: min(12rem, 100svh - var(--card-top) - var(--i, 0) * .45rem - 1.5rem);
    max-height: calc(100svh - var(--card-top) - var(--i, 0) * .45rem - 1.5rem);
  }
  .work--home .work__card-head { flex: none; }
  .work--home .work__card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(transparent, #000 calc(var(--fade-top, 0) * 1.25rem), #000 calc(100% - var(--fade, 0) * 4rem), transparent);
    mask-image: linear-gradient(transparent, #000 calc(var(--fade-top, 0) * 1.25rem), #000 calc(100% - var(--fade, 0) * 4rem), transparent);
  }
  .work__card + .work__card { margin-top: 20svh; }
  .work__card-head { padding: 1.05rem 1.9rem .9rem; }
  .work__card-body { padding: 1.05rem 1.9rem 1.3rem; }
  .work__card h4 { font-size: clamp(1.7rem, 2vw, 2.1rem); }
  .work__card p, .work__card .work__wins { font-size: 1rem; line-height: 1.6; }
}

/* An opened foldable or a tablet: the two columns grow evenly from nothing,
   so tight on width they share it half and half on their own. */
@media (min-width: 820px) and (max-width: 1179px) and (min-device-width: 600px) and (min-device-height: 600px) {
  /* Half desk.css's room above "Our recent work." */
  .work.work--home { padding-top: clamp(3.5rem, 7.5svh, 5rem); }
}

/* While a screenshot is open (work.js, SHOTS), the page stays put. */
html.is-shot { overflow: hidden; }

/* Desktop: 40px between the review and the first card. */
@media (min-width: 1180px) and (min-device-width: 600px) and (min-device-height: 600px) {
  .work__story { --card-top: calc(var(--top0) + .75rem + var(--qh, 12rem) + 40px); margin-top: 40px; }
}
