/* "What we do" (home, between Selected clients and the contact block; Kevin's recording, 18 Nov
   2026): the dside agency film from dside.group full screen behind, the overtitle, and one big
   word at a time, rising into view as the page scrolls (the site's mask reveal; whatwedo.js).
   The words are the brand architecture's formats (brief, "EXPRESSION"), nothing else. */

c-whatwedo {
  --wd-pad: max(16px, 4.6vw);
  position: relative;
  display: block;
  height: calc(100svh + var(--wd-n, 8) * 42svh);
  /* the page colour around the film while it grows (whatwedo.js) */
  background: #f4f4f4; /* V04 (Kevin, 20 Nov 2026): light around the film while it grows (the stage is clipped, this shows) */
  color: #fff;
}
.wd-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: #f4f4f4; /* V04 (Kevin, 20 Nov 2026): light around the film, as the clients above */
  /* the film opens inset with margins and grows to the whole screen as the section comes in
     (Kevin, 18 Nov 2026, rejouice.com); whatwedo.js sets --wd-grow from 0 to 1 */
  --wd-in: calc(1 - var(--wd-grow, 1));
  clip-path: inset(calc(var(--wd-in) * 14svh) calc(var(--wd-in) * max(24px, 12vw)) round calc(var(--wd-in) * 10px));
}
/* the button bottom right */
.wd-cta {
  position: absolute;
  right: max(16px, 4.6vw);
  bottom: 28px;
  z-index: 2;
}
.wd-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* a veil so the white words stay readable on the bright moments of the film */
.wd-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.15) 70%),
    linear-gradient(rgb(0 0 0 / 0.25), rgb(0 0 0 / 0) 40%, rgb(0 0 0 / 0.35));
}
.wd-content {
  position: absolute;
  left: var(--wd-pad);
  right: var(--wd-pad);
  top: 50%;
  transform: translateY(-50%);
}
/* the site's overtitle (the home case panels' "Finance · Gather", .ws-eyebrow) */
.wd-label {
  margin: 0 0 clamp(16px, 2vw, 28px);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* The formats as the Team and Work hero titles (.hx-title): capitals, weight 400, tight leading,
   two words stacked with the first on the left and the second on the right, overlapping a little
   (Kevin, 18 Nov 2026). The hero's 15vw, capped by whatwedo.js (--wd-fs) so the longest word
   still fits the width. Each word wipes in sideways out of its own mask; the overtitle never moves. */
.wd-words {
  --wd-h: 0.85em;
  position: relative;
  height: var(--wd-h);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--wd-fs, clamp(72px, 15vw, 280px));
  line-height: 0.85;
  font-weight: 400;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}
/* room for a second line when a format has two words */
c-whatwedo[data-split] .wd-words { --wd-h: calc(1.7em + min(100px, 1em)); }
.wd-words li {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  white-space: nowrap;
}
.wd-w {
  display: block;
  justify-self: start;
  overflow: clip;
  /* room for the letters' overhang inside the mask */
  padding: 0.04em 0.04em 0.04em;
  margin: -0.04em -0.04em -0.04em;
}
/* the second word further down: 100px between the two, less on phones where the type is
   smaller (Kevin, 19 Nov 2026) */
/* V04 (Kevin, 20 Nov 2026: too much space between the two words): the second word sits closer */
.wd-split .wd-w:last-child { justify-self: end; margin-top: -0.06em; }
.wd-w > span {
  display: block;
  transform: translateX(-115%);
  /* leaving: out the way it came, quickly */
  transition: transform 0.35s cubic-bezier(0.7, 0, 0.84, 0);
}
.wd-split .wd-w:last-child > span { transform: translateX(115%); }
/* arriving: only once the previous word is out, so two formats never overlap */
.wd-words li.is-on .wd-w > span {
  transform: none;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
.wd-words li.is-on .wd-w:last-child > span { transition-delay: 0.38s; }
.wd-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width:-1px) {
  .wd-w > span { transition: none; }
}
