/* Homepage case study cards: light cards on the cream, a serif headline, a
   pill to read on, and the work itself (a phone playing the app, or a
   browser window) rising out of the bottom of the card. */

.hc-grid {
  --hc-c1: #fefdfb; --hc-c2: #efebe3;
  --hc-edge: rgba(17,17,17,.07); --hc-top: rgba(255,255,255,.95);
  --hc-muted: #6a655e;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: auto; gap: 18px;
  /* wider than the reading column, like the reference: the cards need room */
  width: min(1080px, calc(100vw - 2 * var(--pad)));
  margin: clamp(2rem, 4vw, 3rem) 0 0 calc(50% - min(1080px, calc(100vw - 2 * var(--pad))) / 2);
}

.hc {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0;
  grid-column: span 6; display: flex; flex-direction: column; min-height: 700px;
  border-radius: 30px; color: var(--fg); text-decoration: none;
  background: radial-gradient(120% 90% at 0% 0%, var(--hc-c1), var(--hc-c2));
  box-shadow: inset 0 0 0 1px var(--hc-edge), inset 0 1px 0 var(--hc-top);
}
.hc--full { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 460px; }

/* the project's colour warms the card from the corner on hover */
.hc::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  opacity: 0; transition: opacity .5s var(--ease);
  background: radial-gradient(130% 110% at 100% 100%,
    color-mix(in srgb, var(--tint, #888) 22%, transparent),
    color-mix(in srgb, var(--tint, #888) 6%, transparent) 70%);
}
.hc:hover::after { opacity: 1; }

/* a field of small rounded marks behind the work, fading out to the text */
.hc__dots {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle at 50% 50%, rgba(17,17,17,.075) 0 2.2px, transparent 2.6px);
  background-size: 15px 15px;
  -webkit-mask-image: radial-gradient(75% 60% at 78% 78%, #000 20%, transparent 75%);
  mask-image: radial-gradient(75% 60% at 78% 78%, #000 20%, transparent 75%);
}
.hc--full .hc__dots {
  -webkit-mask-image: radial-gradient(60% 80% at 70% 60%, #000 15%, transparent 72%);
  mask-image: radial-gradient(60% 80% at 70% 60%, #000 15%, transparent 72%);
}

/* ----- text ----- */
.hc__body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px;
  padding: 36px 36px 0; max-width: 520px; }
.hc--full .hc__body { padding-bottom: 36px; }
.hc__meta { margin: 0; font-family: "Geist", var(--font-sans); font-size: 12.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--hc-muted); line-height: 1.5; }
.hc__title { margin: 0; font-family: "Instrument Serif", var(--font-serif); font-weight: 400;
  font-size: clamp(28px, 2.6vw, 40px); line-height: 1.06; letter-spacing: -.01em; color: var(--fg);
  text-wrap: balance; }
.hc__desc { margin: 0; font-family: "Geist", var(--font-sans); color: var(--hc-muted);
  font-size: clamp(14.5px, 1.05vw, 16px); line-height: 1.65; font-weight: 300; max-width: 42ch; text-wrap: pretty; }
.hc__more, .hc__soon {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; margin-top: 10px;
  padding: 10px 18px; border-radius: 999px; font-family: "Geist", var(--font-sans); font-size: 14px; line-height: 1.4;
  color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--fg) 13%, transparent); transition: background .25s;
}
.hc__more svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.hc:hover .hc__more { background: color-mix(in srgb, var(--fg) 13%, transparent); }
.hc:hover .hc__more svg { transform: translateX(4px); }
.hc--full .hc__more { margin-top: auto; }
.hc__soon { background: transparent; color: var(--hc-muted); }

/* ----- the work ----- */
.hc__vis { position: relative; z-index: 1; margin-top: auto; display: flex; justify-content: center;
  align-items: flex-start; padding-top: 44px; height: 470px; overflow: hidden; pointer-events: none; }
.hc--full .hc__vis { height: auto; margin: 0; padding: 70px 0 0; align-items: flex-end; justify-content: flex-start; }
.hc__vis > * { transition: translate .7s var(--ease); }
.hc:hover .hc__vis > * { translate: 0 -8px; }

/* a real iPhone: the screen sits in the bezel's opening */
.hc-phone { position: relative; width: min(60%, 268px); aspect-ratio: 1350 / 2760; flex: none;
  filter: drop-shadow(0 30px 40px rgba(40,30,20,.22)); }
.hc-phone__screen { position: absolute; left: 5.3333%; top: 2.5%; width: 89.3333%; height: 95%;
  border-radius: 13.6% / 6.26%; overflow: hidden; background: #0b0b0d; }
.hc-phone__screen video, .hc-phone__screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hc-phone::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("../img/devices/iphone-18-pro-black.png") center / 100% 100% no-repeat; }

/* the top of a phone, as filmed: already has its own frame */
.hc-crop { width: min(90%, 470px); border-radius: 36px 36px 0 0; overflow: hidden;
  box-shadow: 0 30px 60px rgba(40,30,20,.22); }
.hc-crop video, .hc-crop img { display: block; width: 100%; height: auto; }

/* a browser window, its page scrolling slowly by itself */
.hc-win { width: min(96%, 600px); border-radius: 14px 14px 0 0; overflow: hidden; background: #f4f5f7;
  box-shadow: 0 30px 70px rgba(40,30,20,.22), 0 0 0 1px rgba(0,0,0,.06); }
.hc--full .hc-win { width: 100%; max-width: none; border-top-right-radius: 0; margin-left: 4px; }
.hc-win__top { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #e7e9ed; }
.hc-win__top i { width: 9px; height: 9px; border-radius: 50%; background: #c9ccd2; }
.hc-win__top i:nth-child(1) { background: #ff6058; }
.hc-win__top i:nth-child(2) { background: #ffbd2e; }
.hc-win__top i:nth-child(3) { background: #28c941; }
.hc-win__top span { margin-left: 10px; flex: 1; height: 18px; border-radius: 6px; background: #f7f8fa;
  font: 9.5px/18px ui-monospace, SFMono-Regular, Menlo, monospace; padding-left: 10px; color: #8a8f98;
  white-space: nowrap; overflow: hidden; }
.hc-win__view { --vh: 380px; height: var(--vh); overflow: hidden; background: #fff; }
.hc-win__view img, .hc-win__view video { display: block; width: 100%; height: auto; }
/* a still page shows its first view whole: the window takes the shot's height */
.hc-win__view:not(.is-scroll) { height: auto; }
.hc-win__view.is-scroll img { animation: hc-scroll 26s cubic-bezier(.45,0,.55,1) infinite alternate; }
@keyframes hc-scroll {
  0%, 8% { transform: translateY(0); }
  92%, 100% { transform: translateY(calc(-100% + var(--vh))); }
}

/* a still, as it is */
/* stills are mockups on a light backdrop: multiply lets the card show through it */
.hc-shot { width: min(100%, 560px); }
.hc-shot img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }

.hc:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
.hc.is-soon { cursor: default; }
.hc.is-soon:hover .hc__vis > * { translate: none; }

@media (prefers-reduced-motion: reduce) {
  .hc-win__view.is-scroll img { animation: none; }
  .hc__vis > * { transition: none; }
}

/* tablet: the full card stacks, halves keep pairing */
@media (max-width: 900px) {
  .hc { min-height: 620px; }
  .hc__vis { height: 400px; }
  .hc--full { display: flex; min-height: 0; }
  .hc--full .hc__body { padding-bottom: 0; }
  .hc--full .hc__more { margin-top: 10px; }
  .hc--full .hc__vis { padding: 44px 0 0; justify-content: center; height: 360px; align-items: flex-start; }
  .hc--full .hc-win { width: 92%; border-top-right-radius: 14px; margin: 0; }
}
/* phone: one column */
@media (max-width: 680px) {
  .hc-grid { gap: 14px; }
  .hc-crop { width: 88%; }
  .hc, .hc--full { grid-column: 1 / -1; min-height: 0; border-radius: 26px; }
  .hc__body { padding: 28px 24px 0; }
  .hc__vis { height: 380px; padding-top: 36px; }
  .hc-phone { width: min(62%, 240px); }
  .hc--full .hc__vis { height: 320px; padding-top: 36px; }
}

/* the client's logo, above the eyebrow */
.hc__logo { display: block; height: 30px; width: auto; max-width: 140px; object-fit: contain; object-position: left center; margin-bottom: 6px; }

/* two phones, marketing style: the front one leads, a smaller one tucks in
   behind it, and the card's bottom edge crops both */
.hc-duo { position: relative; flex: 1; align-self: stretch; }
.hc-duo .hc-phone { position: absolute; }
.hc-duo .hc-phone--front { z-index: 2; width: 268px; left: 50%; top: 56px; }
.hc-duo .hc-phone--back { z-index: 1; width: 232px; left: calc(50% - 172px); top: 104px;
  filter: drop-shadow(0 24px 32px rgba(40,30,20,.18)) brightness(.97); }
.hc--full .hc__vis:has(.hc-duo) { height: 470px; padding: 0; align-items: stretch; }
@media (max-width: 900px) {
  .hc--full .hc__vis:has(.hc-duo) { height: 380px; }
  .hc-duo .hc-phone--front { left: calc(50% - 40px); top: 40px; }
  .hc-duo .hc-phone--back { left: calc(50% - 210px); top: 84px; }
}
@media (max-width: 680px) {
  .hc--full .hc__vis:has(.hc-duo) { height: 340px; }
  .hc-duo .hc-phone--front { width: 216px; left: calc(50% - 50px); top: 36px; }
  .hc-duo .hc-phone--back { width: 186px; left: calc(50% - 170px); top: 72px; }
}
/* WBK Shop's lockup has "Shop" under the wordmark: taller, so the wordmark
   matches the plain WBK logo's size */
.hc__logo[src*="wbk-shop.svg"] { height: 55px; max-width: none; }
/* every logo sits in the same 55px slot, bottom-aligned, so the titles of two
   cards side by side start at the same height */
.hc__logo:not([src*="wbk-shop.svg"]) { margin-top: 25px; }
/* a phone pair in a half card on a tablet: smaller, so both stay inside the card */
@media (max-width: 900px) and (min-width: 681px) {
  .hc--half .hc-duo .hc-phone--front { width: 200px; left: calc(50% - 30px); top: 40px; }
  .hc--half .hc-duo .hc-phone--back { width: 172px; left: calc(50% - 150px); top: 80px; }
}

/* a diagram instead of a screen: outlined tiles with icons, like the case
   study's own diagrams, drawn straight on the card. Columns joined by
   arrows; a labelled column gets a small label on top; a highlight walks the
   flow from left to right. */
.hc-flow { --ln: #1f1f1f; display: flex; align-items: center; justify-content: center; width: 100%; padding: 0 28px; }
.hc-flow__col { display: grid; gap: 12px; justify-items: center; flex: none; }
/* a labelled column: no frame, just its label sitting above the tiles, left edges lined up */
.hc-flow__col.is-group { position: relative; justify-items: start; }
.hc-flow__col.is-group .hc-flow__k { position: static; margin-bottom: 2px; }
.hc-flow__k { position: absolute; top: 9px; left: 12px; white-space: nowrap; display: flex; align-items: center; gap: 5px; margin: 0;
  font: 500 9px/1 "Geist Mono", ui-monospace, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--hc-muted); }
.hc-flow__k svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.hc-flow__tile { margin: 0; display: grid; gap: 7px; justify-items: start; }
.hc-flow__box { position: relative; width: 72px; height: 54px; padding: 8px 9px; display: grid; align-content: space-between;
  background: #fff; border: 1px solid var(--ln); border-radius: 11px; box-shadow: 0 1px 0 rgba(17,17,17,.04);
  animation: hc-flow-lit 7s var(--ease) infinite; animation-delay: calc(var(--i, 0) * 1.1s); }
.hc-flow__box svg { width: 16px; height: 16px; fill: none; stroke: #161616; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hc-flow__box i { display: block; height: 4px; border-radius: 2px; background: #e8e3da; }
.hc-flow__box i:last-of-type { width: 62%; }
.hc-flow__badge { position: absolute; top: -8px; right: -10px; padding: 3px 6px; border-radius: 999px; background: #161616; color: #fff;
  font: 600 9px/1 "Geist Mono", ui-monospace, Menlo, monospace; }
.hc-flow figcaption { font: 500 9px/1.2 "Geist Mono", ui-monospace, Menlo, monospace; letter-spacing: .07em; text-transform: uppercase; color: var(--hc-muted); }
.hc-flow__tile.is-key .hc-flow__box { background: #161616; border-color: #161616; }
.hc-flow__tile.is-key svg { stroke: #fff; }
.hc-flow__tile.is-key i { background: rgba(255,255,255,.2); }
.hc-flow__link { position: relative; flex: 1 1 14px; min-width: 14px; max-width: 34px; height: 1px; background: var(--ln); margin-bottom: 16px; }
.hc-flow__link::after { content: ""; position: absolute; right: 0; top: -3px; width: 6px; height: 6px;
  border-top: 1px solid var(--ln); border-right: 1px solid var(--ln); transform: rotate(45deg); }
/* each column takes its turn lifting a little */
@keyframes hc-flow-lit {
  0%, 18%, 100% { transform: none; box-shadow: 0 1px 0 rgba(17,17,17,.04); }
  6%, 12% { transform: translateY(-4px); box-shadow: 0 12px 20px rgba(40,30,20,.16); }
}
@media (prefers-reduced-motion: reduce) { .hc-flow__box { animation: none; } }
/* phones: the flow stays horizontal at its natural size, and cms.js zooms it
   down to fit the card's width */
@media (max-width: 680px) {
  .hc-flow { width: max-content; padding: 0; }
  .hc-flow__link { flex: none; width: 28px; }
  .hc__vis:has(.hc-flow), .hc--full .hc__vis:has(.hc-flow), .hc--wide .hc__vis:has(.hc-flow) { height: auto; padding: 36px 12px 40px; align-items: center; justify-content: center; }
}

/* ---------- the bento ----------
   Short rows, so cards can differ in height: a big card is four rows, a
   small one two, a wide one three. cms.js picks each card's shape from the
   count; .hc--r puts the big card on the right for every other group. */
@media (min-width: 901px) {
  /* rows size to their cards: a small card sets its row, a big one spans two, a wide one takes what its text needs */
  .hc-grid { grid-auto-rows: auto; grid-auto-flow: dense; }
  .hc { min-height: 0; }
  .hc--big { grid-column: span 5; grid-row: span 2; height: 646px; }
  .hc--big.hc--r { grid-column: 8 / span 5; }
  .hc--small { grid-column: span 7; grid-row: span 1; height: 314px; }
  .hc--small.hc--r { grid-column: 1 / span 7; }
  .hc--wide { grid-column: 1 / -1; grid-row: span 1; min-height: 0; }
  .hc--pair { grid-column: span 6; grid-row: span 1; height: 646px; }

  /* big and pair: text on top, the work fills what's left and the card's foot crops it */
  .hc--big .hc__vis, .hc--pair .hc__vis { flex: 1 1 auto; height: auto; min-height: 0; padding-top: 36px; }

  /* small: text beside the work, one phone peeking up from the foot */
  .hc--small { display: grid; grid-template-columns: minmax(0, 1fr) 270px; }
  .hc--small .hc__body { padding: 28px 8px 28px 32px; gap: 10px; justify-content: center; }
  .hc--small .hc__logo, .hc--small .hc__logo:not([src*="wbk-shop.svg"]) { height: 24px; margin: 0 0 4px; }
  .hc--small .hc__logo[src*="wbk-shop.svg"] { height: 40px; }
  .hc--small .hc__meta { font-size: 11px; }
  .hc--small .hc__title { font-size: clamp(26px, 2.4vw, 32px); }
  .hc--small .hc__desc { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .hc--small .hc__more, .hc--small .hc__soon { margin-top: 6px; padding: 9px 16px; font-size: 13.5px; }
  .hc--small .hc__vis { margin: 0; height: 100%; padding: 28px 0 0; align-items: flex-start; }
  .hc--small .hc-phone { width: 168px; }
  /* two phones again: the front one leads, the second tucks in behind it */
  .hc--small .hc-duo { flex: 1; align-self: stretch; position: relative; }
  .hc--small .hc-duo .hc-phone--front { width: 160px; left: auto; right: 18px; top: 0; }
  .hc--small .hc-duo .hc-phone--back { display: block; width: 138px; left: auto; right: 132px; top: 34px; }
  .hc--small .hc__dots, .hc--wide .hc__dots { grid-area: 1 / 1 / -1 / -1; }
  .hc--small .hc__body { grid-area: 1 / 1; }
  .hc--small .hc__vis { grid-area: 1 / 2; }
  .hc--small .hc__dots { -webkit-mask-image: radial-gradient(55% 75% at 85% 70%, #000 20%, transparent 75%); mask-image: radial-gradient(55% 75% at 85% 70%, #000 20%, transparent 75%); }
  .hc--small .hc-dg { width: 92%; padding: 14px 12px 20px; }
  .hc--small .hc-win { width: 100%; }

  /* wide: text beside the work, as before, at three rows tall */
  .hc--wide .hc__vis { padding-top: 48px; }
  .hc--wide .hc__vis:has(.hc-duo) { height: 100%; }
  .hc--wide .hc__vis:has(.hc-flow) { padding: 0; align-items: center; justify-content: center; }
  .hc--wide .hc__body { justify-content: flex-start; padding: 34px 36px 34px; }
  .hc--wide .hc__logo:not([src*="wbk-shop.svg"]) { margin-top: 0; }
  .hc--wide .hc__vis:has(.hc-flow) { padding: 28px 0; }
  .hc--wide .hc__more { margin-top: 10px; }
  .hc--small .hc-flow { transform: scale(.62); transform-origin: center; }
}

/* tablet: big and wide take the row, small cards pair up with the work under the text */
@media (max-width: 900px) and (min-width: 681px) {
  .hc-grid { grid-auto-rows: auto; }
  .hc--big, .hc--wide { grid-column: 1 / -1; }
  .hc--small, .hc--pair { grid-column: span 6; min-height: 560px; }
  .hc--small .hc-duo .hc-phone--back { display: none; }
  .hc--small .hc-duo .hc-phone--front { left: 50%; transform: translateX(-50%); width: 200px; }
}

/* every logo the same size, the small cards' size: the wordmark 24px tall
   (the WBK Shop lockup is taller only by its "Shop" line) */
.hc .hc__logo, .hc .hc__logo:not([src*="wbk-shop.svg"]) { height: 24px; max-width: 140px; margin: 0 0 4px; }
.hc .hc__logo[src*="wbk-shop.svg"] { height: 44px; max-width: none; margin: 0 0 4px; }

/* a fork: the line from the left stops at a short bracket, and a small
   arrow runs from the bracket to each tile (box centres at 27px and 111px) */
@media all {
  .hc-flow__col.is-fork { position: relative; padding-left: 16px; }
  .hc-flow__col.is-fork::before { content: ""; position: absolute; left: 0; top: 27px; height: calc(100% - 72px + 0px); border-left: 1px solid var(--ln); }
  .hc-flow__col.is-fork .hc-flow__box::before { content: ""; position: absolute; left: -17px; top: 50%; width: 15px; height: 1px; background: var(--ln); }
  .hc-flow__col.is-fork .hc-flow__box::after { content: ""; position: absolute; left: -7px; top: calc(50% - 3px); width: 6px; height: 6px;
    border-top: 1px solid var(--ln); border-right: 1px solid var(--ln); transform: rotate(45deg); }
  .hc-flow__link.to-fork::after { display: none; }
  .hc-flow__link.to-fork { margin-right: 0; }
}

/* the "Case Studies" heading breaks out with the cards, so it starts where
   the first card starts instead of at the narrower reading column */
#work .work__head {
  width: min(1080px, calc(100vw - 2 * var(--pad)));
  margin-left: calc(50% - min(1080px, calc(100vw - 2 * var(--pad))) / 2);
}

/* a live screen in a frame: sized like a screenshot, the card's edge crops it */
.hc-frame { width: min(100%, 620px); aspect-ratio: 16 / 10; border-radius: 16px 16px 0 0; overflow: hidden; flex: none;
  box-shadow: 0 0 0 1px rgba(28,34,48,.07), 0 2px 6px rgba(28,34,48,.04), 0 10px 24px -12px rgba(28,34,48,.10); background: #f1f3f9; }
.hc-frame iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.hc--wide .hc__vis:has(.hc-frame) { padding: 34px 0 0 8px; align-items: flex-start; justify-content: flex-end; }
.hc--wide .hc-frame { border-top-right-radius: 0; width: 100%; max-width: 640px; }
/* a wide card with a live screen: as tall as its text (like the DS3 card), the screen filling the right half */
@media (min-width: 901px) {
  .hc--wide:has(.hc-frame) .hc__vis { position: relative; padding: 0; }
  .hc--wide:has(.hc-frame) .hc-frame { position: absolute; top: 30px; right: 0; bottom: 0; width: calc(100% - 12px); max-width: none; height: auto;
    aspect-ratio: auto; border-radius: 16px 0 0 0; }
}

/* ---------- phones: a two-column bento ----------
   Wide and big cards take the row with a shorter picture; small cards pair up
   side by side, title and button over one phone peeking up from the foot. */
@media (max-width: 680px) {
  .hc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hc, .hc--full, .hc--big, .hc--wide, .hc--pair { grid-column: 1 / -1; min-height: 0; height: auto; border-radius: 22px; }
  .hc__body { padding: 22px 20px 0; gap: 9px; }
  .hc__title { font-size: 26px; }
  .hc__desc { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .hc__more { margin-top: 4px; padding: 8px 14px; font-size: 13px; }
  .hc .hc__logo, .hc .hc__logo:not([src*="wbk-shop.svg"]) { height: 20px; }
  .hc .hc__logo[src*="wbk-shop.svg"] { height: 36px; }
  .hc__vis { height: 250px; padding-top: 24px; }
  .hc-phone { width: 180px; }
  .hc-duo .hc-phone--front { width: 176px; left: calc(50% - 40px); top: 24px; }
  .hc-duo .hc-phone--back { width: 150px; left: calc(50% - 150px); top: 56px; }

  /* small cards: half the row each */
  .hc--small { grid-column: span 1; display: flex; flex-direction: column; height: auto; }
  .hc--small .hc__body { padding: 16px 14px 0; gap: 6px; }
  .hc--small .hc__meta { font-size: 9.5px; letter-spacing: .05em; }
  .hc--small .hc__title { font-size: 19px; line-height: 1.12; }
  .hc--small .hc__desc { display: none; }
  .hc--small .hc__more { padding: 6px 11px; font-size: 12px; gap: 6px; white-space: nowrap; }
  .hc--small .hc__more svg { width: 13px; height: 13px; }
  .hc--small .hc .hc__logo, .hc--small .hc__logo { height: 16px; }
  .hc--small .hc__vis { height: 190px; padding-top: 16px; margin-top: auto; }
  .hc--small .hc-duo { position: relative; flex: 1; align-self: stretch; display: block; }
  .hc--small .hc-duo .hc-phone--back { display: none; }
  .hc--small .hc-duo .hc-phone--front, .hc--small .hc-phone { position: relative; left: auto; top: auto; width: 116px; margin: 0 auto; }

  /* the DS3 flow keeps running left to right, scaled to fit */
  .hc--wide .hc__vis:has(.hc-flow) { height: auto; padding: 22px 0 22px; }
  .hc--wide .hc-flow { flex-direction: row; padding: 0 12px; zoom: .6; }
  .hc--wide .hc-flow__col.is-group { grid-auto-flow: row; }
  .hc--wide .hc-flow__col.is-fork { grid-auto-flow: row; gap: 12px; }
  .hc--wide .hc-flow__link { flex: 1 1 14px; width: auto; height: 1px; min-width: 14px; margin: 0 0 16px; }
  .hc--wide .hc-flow__link::after { right: 0; top: -3px; bottom: auto; transform: rotate(45deg); }
  .hc--wide .hc-flow__box { width: 72px; height: 54px; }
  /* a live screen: full width, a little cropped at the foot */
  .hc--wide .hc__vis:has(.hc-frame) { height: 210px; padding: 20px 0 0 14px; align-items: flex-start; justify-content: flex-end; }
  .hc--wide .hc-frame { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 12px 0 0 0; }
}

/* =============================================================
   Compact bento: the cards sit in the reading column. Square cards two
   to a row (a small label, the title, the work peeking up from the foot);
   a wide card takes a short row with its text beside the work.
   ============================================================= */
#work .work__head { width: auto; margin-left: 0; }
.hc-grid { width: 100%; margin: 1.75rem 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; grid-auto-flow: row; }
.hc-grid .hc { border-radius: 20px; min-height: 0; height: auto; }
.hc-grid .hc__logo, .hc-grid .hc__logo:not([src*="wbk-shop.svg"]) { height: 18px; margin: 0 0 2px; max-width: 110px; }
.hc-grid .hc__logo[src*="wbk-shop.svg"] { height: 32px; margin: 0; }
.hc-grid .hc__meta { font-size: 10.5px; letter-spacing: .05em; }
.hc-grid .hc:hover .hc__vis > * { translate: 0 -5px; }

/* square */
.hc-grid .hc.hc--pair { grid-column: span 1; grid-row: auto; aspect-ratio: 1 / 1; display: flex; flex-direction: column; }
.hc-grid .hc--pair .hc__body { padding: 20px 22px 0; gap: 6px; max-width: none; }
.hc-grid .hc--pair .hc__title { font-size: 23px; line-height: 1.1; }
.hc-grid .hc--pair .hc__desc, .hc-grid .hc--pair .hc__more, .hc-grid .hc--pair .hc__soon { display: none; }
.hc-grid .hc--pair .hc__vis { flex: 1 1 auto; height: auto; min-height: 0; margin: 0; padding: 16px 0 0; align-items: flex-start; }
.hc-grid .hc--pair .hc-phone { width: 40%; }
.hc-grid .hc--pair .hc-duo { position: relative; flex: 1; align-self: stretch; display: block; }
.hc-grid .hc--pair .hc-duo .hc-phone--front { display: block; position: absolute; width: 40%; left: auto; right: 16%; top: 0; }
.hc-grid .hc--pair .hc-duo .hc-phone--back { display: block; position: absolute; width: 34%; left: 14%; right: auto; top: 26px; }
.hc-grid .hc--pair .hc__vis:has(.hc-frame) { position: relative; padding: 0; }
.hc-grid .hc--pair .hc-frame { position: absolute; top: 16px; right: 0; left: 22px; width: auto; max-width: none; height: auto; aspect-ratio: 16 / 10; border-radius: 12px 0 0 0; }
.hc-grid .hc--pair .hc__vis:has(.hc-flow) { align-items: center; padding: 0; }
.hc-grid .hc--pair .hc-flow { zoom: .5; transform: none; }
.hc-grid .hc--pair .hc__dots { -webkit-mask-image: radial-gradient(70% 60% at 60% 85%, #000 20%, transparent 75%); mask-image: radial-gradient(70% 60% at 60% 85%, #000 20%, transparent 75%); }

/* wide */
.hc-grid .hc.hc--wide { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); height: 270px; }
.hc-grid .hc--wide .hc__dots { grid-area: 1 / 1 / -1 / -1; }
.hc-grid .hc--wide .hc__body { padding: 22px 8px 22px 24px; gap: 7px; justify-content: flex-start; max-width: none; }
.hc-grid .hc--wide .hc__title { font-size: 25px; line-height: 1.08; }
.hc-grid .hc--wide .hc__desc { font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.hc-grid .hc--wide .hc__more { margin-top: auto; padding: 7px 13px; font-size: 12.5px; gap: 8px; }
.hc-grid .hc--wide .hc__more svg { width: 14px; height: 14px; }
.hc-grid .hc--wide .hc__vis { height: 100%; margin: 0; min-height: 0; padding: 18px 0 0; }
.hc-grid .hc--wide .hc__vis:has(.hc-flow) { padding: 0; align-items: center; justify-content: center; }
.hc-grid .hc--wide .hc-flow { zoom: .62; transform: none; flex-direction: row; }

/* phones: still two to a row, just smaller */
@media (max-width: 680px) {
  .hc-grid { gap: 10px; }
  .hc-grid .hc { border-radius: 18px; }
  .hc-grid .hc.hc--pair { aspect-ratio: 4 / 5; }
  .hc-grid .hc--pair .hc__body { padding: 14px 14px 0; gap: 4px; }
  .hc-grid .hc--pair .hc__meta { display: none; }
  .hc-grid .hc--pair .hc__title { font-size: 17px; line-height: 1.12; }
  .hc-grid .hc__logo, .hc-grid .hc__logo:not([src*="wbk-shop.svg"]) { height: 15px; }
  .hc-grid .hc__logo[src*="wbk-shop.svg"] { height: 26px; }
  .hc-grid .hc--pair .hc__vis { padding-top: 12px; }
  .hc-grid .hc--pair .hc-duo .hc-phone--back { display: none; }
  .hc-grid .hc--pair .hc-duo .hc-phone--front, .hc-grid .hc--pair .hc-phone { position: relative; left: auto; right: auto; top: 0; width: 58%; margin: 0 auto; }
  .hc-grid .hc--pair .hc-frame { left: 14px; top: 12px; }
  .hc-grid .hc.hc--wide { display: flex; flex-direction: column; height: auto; }
  .hc-grid .hc--wide .hc__body { padding: 18px 18px 0; }
  .hc-grid .hc--wide .hc__title { font-size: 21px; }
  .hc-grid .hc--wide .hc__more { margin-top: 6px; }
  .hc-grid .hc--wide .hc__vis { height: auto; padding: 18px 0 20px; }
  .hc-grid .hc--wide .hc__vis:has(.hc-flow) { padding: 10px 0 34px; overflow: visible; }
}

/* =============================================================
   Card header, tidied: every card opens the same way. The logo sits
   in a fixed 28px slot (each mark sized by eye so they weigh the
   same), a small round arrow mirrors it on the right, the title keeps
   room for two lines so the work below starts at one height across
   a row. The client line is dropped: the logo already says it.
   ============================================================= */
.hc-grid .hc { --hc-edge: rgba(17,17,17,.08); transition: box-shadow .35s var(--ease), translate .35s var(--ease); }
.hc-grid .hc:hover { box-shadow: inset 0 0 0 1px rgba(17,17,17,.12), inset 0 1px 0 var(--hc-top), 0 14px 30px -18px rgba(40,30,20,.28); }
.hc-grid .hc__meta { display: none; }
.hc-grid .hc .hc__body { gap: 0; }

.hc-grid .hc .hc__logo, .hc-grid .hc .hc__logo:not([src*="wbk-shop.svg"]) {
  height: 17px; max-width: 120px; margin: 5.5px 0 19.5px; object-position: left center; }
.hc-grid .hc .hc__logo[src*="novaline.svg"] { height: 22px; margin: 3px 0 17px; }
.hc-grid .hc .hc__logo[src*="figma-db.svg"] { height: 22px; margin: 3px 0 17px; }
.hc-grid .hc .hc__logo[src*="wbk-shop.svg"] { height: 28px; margin: 0 0 14px; }

/* the round arrow, top right */
.hc-grid .hc .hc__body::before {
  content: ""; position: absolute; top: 20px; right: 20px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11 11 5M6 5h5v5'/%3E%3C/svg%3E") center / 13px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(17,17,17,.1);
  transition: background-color .3s, transform .35s var(--ease);
}
.hc-grid .hc:hover .hc__body::before { background-color: #fff; transform: rotate(45deg); }
.hc-grid .hc.is-soon .hc__body::before { display: none; }

.hc-grid .hc--pair .hc__body { padding: 20px 22px 0; }
.hc-grid .hc--pair .hc__title { font-size: 22px; line-height: 1.14; min-height: 2.28em; padding-right: 8px; }
.hc-grid .hc--pair .hc__vis { padding-top: 14px; }

.hc-grid .hc--wide .hc__body { padding: 20px 10px 22px 22px; }
.hc-grid .hc--wide .hc__body::before { display: none; }
.hc-grid .hc--wide::before {
  content: ""; position: absolute; z-index: 3; top: 20px; right: 20px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11 11 5M6 5h5v5'/%3E%3C/svg%3E") center / 13px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(17,17,17,.1); transition: background-color .3s, transform .35s var(--ease);
}
.hc-grid .hc--wide:hover::before { background-color: #fff; transform: rotate(45deg); }
.hc-grid .hc--wide .hc__title { font-size: 24px; line-height: 1.1; margin-bottom: 10px; }
.hc-grid .hc--wide .hc__more { display: none; }

@media (max-width: 680px) {
  .hc-grid .hc--pair .hc__body { padding: 14px 14px 0; }
  .hc-grid .hc .hc__logo, .hc-grid .hc .hc__logo:not([src*="wbk-shop.svg"]) { height: 13px; margin: 4.5px 0 14.5px; }
  .hc-grid .hc .hc__logo[src*="novaline.svg"] { height: 17px; margin: 3px 0 12px; }
  .hc-grid .hc .hc__logo[src*="figma-db.svg"] { height: 16px; margin: 4px 0 12px; }
  .hc-grid .hc .hc__logo[src*="wbk-shop.svg"] { height: 22px; margin: 0 0 10px; }
  .hc-grid .hc .hc__body::before { top: 13px; right: 13px; width: 22px; height: 22px; background-size: 11px; }
  .hc-grid .hc--wide::before { top: 16px; right: 16px; width: 24px; height: 24px; background-size: 11px; }
  .hc-grid .hc--pair .hc__title { font-size: 16.5px; min-height: 0; padding-right: 0; }
  .hc-grid .hc--wide .hc__body { padding: 16px 18px 0; }
}

/* =============================================================
   Simple cards: the work sits in a soft rounded tile, and under it a
   plain label row (the name, a short year on the right) over a muted
   line. No logos, no client line, no card chrome. Overrides the
   compact bento above.
   ============================================================= */
.hc-grid { column-gap: 18px; row-gap: 34px; }
.hc-grid .hc, .hc-grid .hc.hc--pair, .hc-grid .hc.hc--wide {
  grid-column: span 1; display: flex; flex-direction: column; aspect-ratio: auto; height: auto;
  background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.hc-grid .hc:hover { box-shadow: none; }
.hc-grid .hc::after, .hc-grid .hc::before, .hc-grid .hc .hc__body::before, .hc-grid .hc__dots,
.hc-grid .hc__logo, .hc-grid .hc__meta, .hc-grid .hc__desc, .hc-grid .hc__more, .hc-grid .hc__soon { display: none !important; }

/* the tile */
.hc-grid .hc .hc__vis, .hc-grid .hc--pair .hc__vis, .hc-grid .hc--wide .hc__vis {
  order: -1; position: relative; flex: none; aspect-ratio: 16 / 10; height: auto; min-height: 0; margin: 0;
  padding: 18px 0 0; display: flex; justify-content: center; align-items: flex-start; overflow: hidden;
  border-radius: 14px; background: radial-gradient(120% 100% at 50% 0%, #fbfaf7, #eeeae2);
  box-shadow: inset 0 0 0 1px rgba(17,17,17,.07); transition: box-shadow .35s var(--ease); }
.hc-grid .hc:hover .hc__vis { box-shadow: inset 0 0 0 1px rgba(17,17,17,.14), 0 16px 30px -22px rgba(40,30,20,.35); }
.hc-grid .hc:hover .hc__vis > * { translate: 0 -6px; }
.hc-grid .hc--pair .hc-phone { width: 34%; }
.hc-grid .hc--pair .hc-duo .hc-phone--front { width: 34%; right: 20%; top: 0; }
.hc-grid .hc--pair .hc-duo .hc-phone--back { width: 29%; left: 19%; top: 22px; }
.hc-grid .hc--pair .hc__vis:has(.hc-frame) { padding: 0; }
.hc-grid .hc--pair .hc-frame { top: 22px; left: 26px; border-radius: 10px 0 0 0; box-shadow: 0 0 0 1px rgba(17,17,17,.08); }
.hc-grid .hc .hc__vis:has(.hc-flow) { padding: 0; align-items: center; justify-content: center; }
.hc-grid .hc .hc-flow { zoom: .5; }

/* the label */
.hc-grid .hc .hc__body, .hc-grid .hc--pair .hc__body, .hc-grid .hc--wide .hc__body {
  padding: 14px 2px 0; gap: 5px; max-width: none; justify-content: flex-start; }
.hc__row { display: none; }
.hc-grid .hc__row { display: flex; align-items: baseline; line-height: 1.35; justify-content: space-between; gap: 12px; margin: 0;
  font-family: "Geist", var(--font-sans); }
.hc-grid .hc__name { font-size: 15px; font-weight: 400; color: var(--fg); transition: color .25s; }
.hc-grid .hc__name::after { content: "\2192"; display: inline-block; margin-left: 6px; opacity: 0; translate: -4px 0;
  transition: opacity .25s, translate .3s var(--ease); }
.hc-grid .hc:hover .hc__name::after { opacity: 1; translate: 0 0; }
.hc-grid .hc__yr { font-size: 12.5px; color: var(--hc-muted); font-variant-numeric: tabular-nums; }
.hc-grid .hc .hc__title, .hc-grid .hc--pair .hc__title, .hc-grid .hc--wide .hc__title {
  font-family: "Geist", var(--font-sans); font-size: 14.5px; font-weight: 300; line-height: 1.5; letter-spacing: 0;
  color: var(--hc-muted); min-height: 0; margin: 0; padding: 0; text-wrap: pretty; }

/* phones: one card per row, same 16:10 tile as desktop */
@media (max-width: 680px) {
  .hc-grid { grid-template-columns: minmax(0, 1fr); row-gap: 30px; }
  .hc-grid .hc .hc__vis, .hc-grid .hc--pair .hc__vis, .hc-grid .hc--wide .hc__vis { border-radius: 12px; }
  .hc-grid .hc__name::after { display: none; }
}

/* the design-system workflow, drawn as SVG (cms.js): a wide layout in the
   16:10 tile, a vertical one in the tall tile on phones */
.hc-dias { position: absolute; inset: 0; display: block; }
.hc-dia { display: block; width: 100%; height: 100%; overflow: visible; }
.hc-dia--t { display: none; }
.hc-grid .hc .hc__vis:has(.hc-dias) { padding: 0; }
.hc-dia text { font-family: "Geist", var(--font-sans); }
.hc-dia .d-grp { fill: rgba(255,255,255,.42); stroke: #cbc4b8; stroke-width: 1.2; stroke-dasharray: 4 4; }
.hc-dia .d-k { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; fill: #8b8479; }
.hc-dia .d-box { fill: #fff; stroke: #ddd7cd; stroke-width: 1.2; }
.hc-dia--w .d-box { filter: url(#hcd-sh); }
.hc-dia--t .d-box { filter: url(#hcd2-sh); }
.hc-dia .d-tile { fill: #f3f0ea; }
.hc-dia .d-ic { fill: none; stroke: #3b3732; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.hc-dia .d-t { font-weight: 500; fill: #24221f; letter-spacing: -.005em; }
.hc-dia .is-key .d-box { fill: #1d1b18; stroke: #1d1b18; }
.hc-dia .is-key .d-tile { fill: rgba(255,255,255,.12); }
.hc-dia .is-key .d-ic { stroke: #fff; }
.hc-dia .is-key .d-t { fill: #fff; }
.hc-dia .d-bd { fill: #e4f3e9; }
.hc-dia .d-bdt { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 10px; font-weight: 600; fill: #1d7a45; }
.hc-dia .d-ln { fill: none; stroke: #ada69b; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hc-dia .d-ah { fill: none; stroke: #ada69b; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hc-dia .d-port { fill: #fbfaf7; stroke: #ada69b; stroke-width: 1.4; }


/* a small greyed-out client logo in the tile's top-right corner */
.hc-grid .hc { position: relative; }
.hc-grid .hc .hc__body, .hc-grid .hc--pair .hc__body, .hc-grid .hc--wide .hc__body { position: static; }
.hc-grid .hc .hc__logo, .hc-grid .hc .hc__logo:not([src*="wbk-shop.svg"]) {
  display: block !important; position: absolute; z-index: 3; top: 14px; right: 14px; margin: 0;
  height: 16px; width: auto; max-width: 72px; object-fit: contain; object-position: right center;
  filter: grayscale(1) brightness(.35); opacity: .38; pointer-events: none; transition: opacity .3s; }
.hc-grid .hc .hc__logo[src*="wbk-shop.svg"] { height: 26px; top: 10px; }
.hc-grid .hc:hover .hc__logo { opacity: .6; }

/* phones: keep the two overlapped screens */
@media (max-width: 680px) {
  .hc-grid .hc--pair .hc-duo .hc-phone--back { display: block; position: absolute; width: 29%; left: 19%; right: auto; top: 22px; margin: 0; }
  .hc-grid .hc--pair .hc-duo .hc-phone--front { position: absolute; width: 34%; left: auto; right: 20%; top: 0; margin: 0; }
  .hc-grid .hc--pair .hc-phone { width: 34%; }
  .hc-grid .hc .hc__logo, .hc-grid .hc .hc__logo:not([src*="wbk-shop.svg"]) { top: 12px; right: 12px; height: 14px; }
  .hc-grid .hc .hc__logo[src*="wbk-shop.svg"] { height: 22px; top: 8px; }
}

/* tiles never scroll their contents (focus or scrollIntoView could nudge them) */
.hc-grid .hc .hc__vis { overflow: clip; }

/* the live Novaline screen fills its whole tile */
.hc-grid .hc .hc-frame, .hc-grid .hc--pair .hc-frame { position: absolute; inset: 0; width: auto; height: auto; max-width: none; aspect-ratio: auto; border-radius: inherit; box-shadow: none; }
.hc-grid .hc:hover .hc__vis > .hc-frame { translate: none; }
/* keep the tile's light outline on top of a full-bleed screen */
.hc-grid .hc .hc__vis:has(.hc-frame)::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(17,17,17,.07); transition: box-shadow .35s var(--ease); }
.hc-grid .hc:hover .hc__vis:has(.hc-frame)::after { box-shadow: inset 0 0 0 1px rgba(17,17,17,.14); }

/* the screen runs a hair under the bezel so no light edge shows through at small sizes */
.hc-phone__screen { left: 4.7%; top: 2.2%; width: 90.6%; height: 95.6%; }
