/* ══════════════════════════════════════════════════════════════════════════════
   THE SHOWCASE — a depth gallery, ported from sites/grass.
   ══════════════════════════════════════════════════════════════════════════════
   Objects start behind the camera at the centre of the frame, scaled to nothing,
   and are interpolated outward and forward until they pass the reader. A cover
   image grows in behind them. The lede unwrites word by word and the caption
   writes on, both driven by one scroll scalar.

   THE RULES BELOW ARE THE REFERENCE'S, SUBSTITUTED RATHER THAN RETYPED. The port
   script pulled every selector containing "showcase" out of grass/style.css and
   applied four palette substitutions — --gutter to --pad, --forest to --ink,
   --moss to --orange, and the serif to FeatureDeck. Nothing else was touched,
   because the geometry here is load-bearing arithmetic rather than styling, and
   retyping it by hand is how a port acquires a defect that looks like a design
   decision.

   GRASS'S OWN COMMENTS ARE DELIBERATELY NOT CARRIED OVER. They are full of
   measurements — "656 -> 873px at 390x844", "req(390) is 726.2" — taken against
   grass's sections, its hold, its write-on. Every one of those numbers is false
   here. A comment asserting a measurement nobody can reproduce on this page is
   worse than no comment, and this estate has shipped that defect five times. What
   is true of THIS page is written below, and only what has been checked.

   WHAT THE MARKUP OWES, AND WHY IT MATTERS BEYOND THE LOOK. js/showcase.js reads
   the child count of .showcase-objects and derives the entire flight plan from it,
   so the structure is a contract rather than a suggestion:

     [data-showcase]                     the root, and the handle the editor uses
       .showcase-lede                    unwrites word by word
       .showcase-objects                 EVERY child counts, photo and filler alike
         figure.showcase-obj[data-obj=photo]   > img, optional .showcase-caption
         div.showcase-obj[data-obj=filler]     empty, aria-hidden, [data-form=...]
       figure.showcase-cover[data-showcase-cover][data-cover-mode=mirror]
         .showcase-cover__frame > img

   That is also exactly what John/WebBuilderFramework's Op\EditGallery addresses —
   it finds the root by [data-showcase] or [data-wb-gallery] and the box by
   .showcase-objects. Rename a class here and the client's editor stops finding the
   gallery, with no error anywhere.

   THE PIN STRUCTURE IS BUILT AT RUNTIME, not authored: .showcase-pin,
   .showcase-stage and .showcase-field are created by the script. The authored
   markup is the four elements above and nothing else, which is what keeps the
   package HTML editable by hand.

   FILLERS ARE display:none UNTIL THE SCRIPT GOES LIVE. Without script — and under
   prefers-reduced-motion — the section is an ordinary stacked figure list, which
   is the correct no-JS pose rather than a degraded one.
   ══════════════════════════════════════════════════════════════════════════════ */

.showcase{--sc-cap:clamp(104px,15vh,168px)}
/* ── THE CAPTION RESERVE, AND WHY IT IS svh AND SHORTER ON A PHONE ──────────
   --sc-cap reserves the strip below the field. It sets the bottom inset of BOTH
   .showcase-field and .showcase-cover__frame, so it is not decoration: it sets
   the height of the frame the objects fly in, and js/showcase.js reads that
   frame (fw/fh) to solve every exit radius. Moving this number moves the
   trajectory geometry, which is why the centring figures in showcase.js were
   re-measured against these values and not the ones above.

   THE UNIT WAS WRONG AGAINST ITS OWN CONTAINER. .showcase-stage is 100svh and
   .showcase-pin is calc(100svh + ...) — svh throughout, deliberately, so a
   collapsing address bar cannot resize the pin mid-scroll. The reserve was 15vh.
   On a phone vh is the LARGE viewport, so the strip was 15% of a height the
   stage never has: on a 390x844 device showing a ~104px toolbar the stage is
   740 and the reserve 126.6, i.e. 17.1% of its own container rather than 15%.
   Both units are stable — this is a mismatch, not a jitter — but it is why the
   gap under the last image reads as unintentional on a phone.

   MEASURED: the tallest authored caption renders 63px (three lines) at 360 and
   390 wide, 62px (two) at 1440. The strip was 127px at 390x844 for a 63px
   caption, and the caption is centred in it, so 32px of dead space sat above and
   below. 12svh with a 96px floor puts that at 101px / 16px, which is the "bit
   shorter" this was asked for without crowding the type.

   THE FLOOR IS THE CLIPPING LIMIT, not a taste value. The caption is centred on
   cap/2 above the stage bottom, so it fits exactly while capH <= cap, and
   .showcase-stage is overflow:hidden. A 96px floor still clears a four-line
   caption (84px); five lines (105px) would clip, as they would have at 104px.

   @supports rather than two flat declarations: a custom property accepts ANY
   token sequence at parse time, so a plain `--sc-cap:...svh...` override would
   be stored happily by a browser with no svh and then fail at use time, taking
   the property with it. @supports is resolved at parse time and skipped whole. */
@supports (height:1svh){ .showcase{--sc-cap:clamp(104px,15svh,168px)} }
@media (max-width:599px){ .showcase{--sc-cap:clamp(96px,12vh,132px)} }
@media (max-width:599px){ @supports (height:1svh){ .showcase{--sc-cap:clamp(96px,12svh,132px)} } }
.showcase-lede{font-family:FeatureDeck,Georgia,serif;font-weight:400;letter-spacing:-.055em;
  margin:0;font-size:clamp(2.4rem,5vw,5rem);line-height:.95;max-width:16ch}
.showcase-objects{display:grid;gap:clamp(18px,3vw,40px);margin:clamp(28px,4vw,56px) 0}
.showcase-obj{margin:0}
.showcase-obj img{height:min(56vw,620px);object-fit:cover;object-position:center}
.showcase-caption{font-size:.82rem;line-height:1.45;margin:12px 0 0;max-width:55ch}
.showcase-obj[data-obj="filler"]{display:none}
.showcase{--filler-mass:var(--ink);--filler-line:var(--orange)}
.showcase-form{position:absolute;inset:0;display:block;background:var(--filler-mass);
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-size:contain;mask-size:contain;
  -webkit-mask-position:center;mask-position:center}
.showcase-obj[data-form="ring"] .showcase-form,
.showcase-obj[data-form="arc"] .showcase-form,
.showcase-obj[data-form="rule"] .showcase-form,
.showcase-obj[data-form="cluster"] .showcase-form{background:var(--filler-line)}
.showcase-obj[data-form="disc"] .showcase-form{-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><circle cx='50' cy='50' r='43' fill='white'/></svg>");
  mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><circle cx='50' cy='50' r='43' fill='white'/></svg>")}
.showcase-obj[data-form="ring"] .showcase-form{-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><circle cx='50' cy='50' r='40' fill='none' stroke='white' stroke-width='13'/></svg>");
  mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><circle cx='50' cy='50' r='40' fill='none' stroke='white' stroke-width='13'/></svg>")}
.showcase-obj[data-form="slab"] .showcase-form{-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='100' viewBox='0 0 300 100'><rect x='3' y='22' width='294' height='56' rx='28' fill='white'/></svg>");
  mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='100' viewBox='0 0 300 100'><rect x='3' y='22' width='294' height='56' rx='28' fill='white'/></svg>")}
.showcase-obj[data-form="arc"] .showcase-form{-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M50 9 A41 41 0 1 1 9 50' fill='none' stroke='white' stroke-width='11' stroke-linecap='round'/></svg>");
  mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M50 9 A41 41 0 1 1 9 50' fill='none' stroke='white' stroke-width='11' stroke-linecap='round'/></svg>")}
.showcase-obj[data-form="blade"] .showcase-form{-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='155' height='100' viewBox='0 0 155 100'><path d='M6 72 C34 20 84 2 149 26 C118 68 62 92 6 72 Z' fill='white'/></svg>");
  mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='155' height='100' viewBox='0 0 155 100'><path d='M6 72 C34 20 84 2 149 26 C118 68 62 92 6 72 Z' fill='white'/></svg>")}
.showcase-obj[data-form="rule"] .showcase-form{-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='100' viewBox='0 0 220 100'><g fill='none' stroke='white' stroke-width='5' stroke-linecap='round'><path d='M6 18 H214'/><path d='M6 42 H160'/><path d='M6 66 H196'/><path d='M6 90 H108'/></g></svg>");
  mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='100' viewBox='0 0 220 100'><g fill='none' stroke='white' stroke-width='5' stroke-linecap='round'><path d='M6 18 H214'/><path d='M6 42 H160'/><path d='M6 66 H196'/><path d='M6 90 H108'/></g></svg>")}
.showcase-obj[data-form="cluster"] .showcase-form{-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='125' height='100' viewBox='0 0 125 100'><g fill='white'><circle cx='18' cy='24' r='9'/><circle cx='52' cy='12' r='5'/><circle cx='88' cy='30' r='12'/><circle cx='26' cy='62' r='6'/><circle cx='62' cy='52' r='8'/><circle cx='104' cy='68' r='6'/><circle cx='44' cy='88' r='10'/></g></svg>");
  mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='125' height='100' viewBox='0 0 125 100'><g fill='white'><circle cx='18' cy='24' r='9'/><circle cx='52' cy='12' r='5'/><circle cx='88' cy='30' r='12'/><circle cx='26' cy='62' r='6'/><circle cx='62' cy='52' r='8'/><circle cx='104' cy='68' r='6'/><circle cx='44' cy='88' r='10'/></g></svg>")}
.showcase.is-live{margin:0 calc(var(--pad) * -1)}
.showcase.is-live .showcase-objects{position:absolute;inset:0;display:block;margin:0;
  perspective:2000px}
.showcase.is-live .showcase-obj{position:absolute;left:50%;top:50%;backface-visibility:hidden}
.showcase.is-live .showcase-obj[data-obj="filler"]{display:block}
.showcase.is-live .showcase-obj img{height:100%;width:100%;object-fit:cover}
.showcase-pin{position:relative;height:calc(100svh + var(--sc-pin,0px))}
.showcase-stage{position:sticky;top:0;height:100svh;overflow:hidden}
.showcase-field{position:absolute;z-index:2;left:0;right:0;top:0;bottom:var(--sc-cap,150px);overflow:hidden}
.showcase-cover{position:absolute;inset:0;margin:0}
.showcase-cover__frame{position:absolute;left:0;right:0;top:0;bottom:var(--sc-cap,150px);overflow:hidden}
.showcase-cover img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;
  transform:scale(0)}
.showcase.is-live .showcase-lede{position:absolute;z-index:1;left:var(--pad);right:var(--pad);
  top:50%;transform:translateY(-50%);margin:0;pointer-events:none}
.showcase.is-live .showcase-caption{position:absolute;z-index:3;left:var(--pad);right:var(--pad);
  bottom:calc(var(--sc-cap,150px) / 2);transform:translateY(50%);margin:0;
  font-family:FeatureDeck,Georgia,serif;font-weight:400;letter-spacing:-.055em;
  font-size:clamp(1.15rem,1.9vw,1.7rem);line-height:1.14;max-width:46ch}
.showcase.is-live.is-flying .showcase-obj,
.showcase.is-live.is-flying .showcase-cover img{will-change:transform,opacity}
@media(prefers-reduced-motion:reduce){ .showcase.is-live .showcase-obj{position:static} }
@media(prefers-reduced-motion:reduce){ .showcase.is-live .showcase-obj[data-obj="filler"]{display:none} }
@media(prefers-reduced-motion:reduce){ .showcase.is-live .showcase-objects{position:static;display:grid;perspective:none} }
@media(prefers-reduced-motion:reduce){ .showcase-pin{height:auto} }
@media(prefers-reduced-motion:reduce){ .showcase-stage{position:relative;height:auto;overflow:visible} }
@media(prefers-reduced-motion:reduce){ .showcase.is-live .showcase-lede,.showcase.is-live .showcase-caption{position:static;transform:none;height:auto;display:block} }

/* ── THE SECTION AROUND IT ──────────────────────────────────────────────────
   grass wrapped its showcase in .project with its own copy and note blocks. Those
   classes carry grass's band/tint system, which this site does not have, so the
   wrapper is re-authored here in plumbing2's own idiom rather than dragging a
   colour system across for two elements.

   NO min-height AND NO overflow ON .work. The script builds .showcase-pin inside
   this section and sizes it from the object count; a height here would fight it,
   and an overflow would clip a sticky child out of existence. This is a plain
   flow section that happens to contain a pinned one. */
/* THE SECTION IS NOT max-width'd AND THAT IS WHY. The reference's
   `.showcase.is-live{margin:0 calc(var(--pad) * -1)}` cancels the section's own
   horizontal padding so the stage runs edge to edge; a max-width on the section
   would re-introduce the gutter the negative margin exists to remove, and the
   stage would sit in a cream frame. The copy blocks are constrained instead. */
/* ── ONE SECTION, ONE GROUND ────────────────────────────────────────────────
   The heading and the closing note used to sit on the page's cream while the stage
   between them went full-bleed #111, with the copy inset by the section padding and
   the stage not. Three surfaces and two gutters in one section — it read as three
   things stacked rather than one thing.

   The whole section is the stage's ground now. That is the right way round: the
   gallery is the section, and the copy is its caption. It also makes the no-script
   pose consistent, because the stacked fallback now sits on the same dark ground the
   live one does rather than changing colour when the script loads.

   THE CREAM-TO-INK EDGES ARE THE SAME HANDOFF THE HERO'S BANK MAKES, so the page
   already does this once and this is not a new surface. */
.work {
  max-width: none;
  background: var(--ink);
  color: var(--cream);
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(56px, 8vw, 104px);
}
/* THE CONTENT COLUMN IS THE BLOCK; THE MEASURE IS THE HEADING'S.
   Putting max-width:24ch and margin-inline:auto on the same element centres a
   24-character column in the middle of a 1440px viewport, which is what the first
   cut did — the heading came out as four short lines floating in the middle of a
   black field. The wrapper carries the page's content width and the centring; the
   heading carries the measure and stays left. */
.work-copy, .work-note { max-width: 1240px; margin-inline: auto; }
.work .micro { color: var(--cream); opacity: .62; }
.work-copy h2, .work-note p { color: var(--cream); }
/* The light button is cream-on-dark elsewhere on this page; on this ground it needs
   the inverse or it disappears into the section. */
.work-note .button.light { background: var(--cream); color: var(--ink); border-color: transparent; }
.work-note .button.light:hover { background: #fff; }
.work-copy { margin-bottom: clamp(20px, 3vw, 34px); }
.work-copy h2 { max-width: 18ch; }
.work-copy h2 { font-family: FeatureDeck, Georgia, serif; font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.06; margin: 0; }
.work-note { display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: center;
  justify-content: space-between; margin-top: clamp(22px, 3vw, 40px); }
.work-note p { max-width: 54ch; line-height: 1.6; margin: 0; }

/* The lede is display type set against the photographs once live. Before the
   script runs it is an ordinary standfirst, so it needs a size that works in both
   poses rather than only in the pinned one. */
.showcase-lede { color: var(--ink); }
.showcase.is-live .showcase-lede,
.showcase.is-live .showcase-caption { color: var(--cream); text-shadow: 0 1px 24px rgba(0,0,0,.45); }


/* ── THE STAGE NEEDS A GROUND ───────────────────────────────────────────────
   The reference ran this section inside its band system, on a dark tint. Ported
   without one, the objects flew across the page's cream and the cover — which
   grows in BEHIND them — had nothing to grow in against: measured at mid-flight,
   a photograph at scale 2 over #fff7e9 with a cover at 52% behind it that was
   invisible, because cream on cream is not a background, it is an absence.

   #111 is not a new colour. It is the footer's, so the page already resolves to it
   once, and the cream-to-#111 handoff is a transition this site has already made
   and tuned at the hero's bank. Using anything else would introduce a third
   surface for one section.

   ONLY WHILE LIVE. Without script the section is a stacked list of captioned
   photographs on the page's own cream, where dark type is correct — which is why
   the lede and caption only turn cream under .is-live. */
/* The stage inherits the section's ground now rather than painting its own. Two
   elements painting the same colour is two places to change it. */
.showcase.is-live .showcase-stage { background: transparent; }

/* The band below the field, where the caption sits, is part of the same ground. */
.showcase.is-live .showcase-field { background: transparent; }
