/* ==========================================================================
   WORK - real client work.
   1. Websites: a deck of cards, one per site, each in that client's own colours
      with our device mockup of the real site. On wide screens the cards stack
      as you scroll (sticky), the one underneath settling back under a veil.
   2. Brand design: four brand worlds; on wide screens a pinned sideways run.
   3. Social media: Ubuntu Chemicals, two months of real figures and posts.
   4. The viewer: a dialog with the site's real screens in a browser and a
      phone, scrolling by themselves, and the live site in the phone when the
      page is served (not from disk).
   ========================================================================== */

.p-work .wk-head { max-width: 860px; }
.p-work .wk-head__lead { max-width: 640px; text-wrap: pretty; }

/* ---------- Hero ---------- */
.wk-jump { display: flex; flex-wrap: wrap; gap: 10px; }
.wk-jump a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-pill); background: var(--white); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9375rem; font-weight: 500; transition: background-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.wk-jump a:has(b) { padding-right: 8px; }
.wk-jump a:hover { box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--mist); }
.wk-jump b { min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--r-pill); background: var(--ink); color: var(--white); display: grid; place-items: center; font-size: 0.8125rem; font-weight: 600; }

/* ---------- 1. Websites ---------- */
.wk-stack { display: grid; gap: 20px; }
.wk-site { scroll-margin-top: calc(var(--header-h) + 16px); }
.wk-site__card {
  position: relative; isolation: isolate; overflow: hidden; display: grid;
  border-radius: var(--r-xl); background: var(--bg); color: var(--fg);
  padding: 28px 22px 0; gap: 20px;
  transform-origin: 50% 0;
}
.wk-site__text { position: relative; z-index: 2; display: grid; align-content: start; justify-items: start; }
.wk-site__num { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; color: var(--acc); }
.wk-site__num span { color: var(--muted); font-weight: 500; }
.wk-site__name { color: var(--fg); margin-top: 14px; font-size: var(--fs-h3); font-weight: 400; letter-spacing: var(--tracking-h3); line-height: 1.05; }
.wk-site__kind { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }
.wk-site__desc { margin-top: 18px; max-width: 46ch; font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
ul.wk-site__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.wk-site__tags li {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  font-size: 0.8125rem; font-weight: 500; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 22%, transparent);
}
.wk-site__tags li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
.wk-site__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 26px; }
.wk-site__open {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 0.9375rem; font-weight: 500; color: var(--fg);
}
.wk-site__open .i { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease-out); }
.wk-site__open::after { content: ""; position: absolute; left: 0; right: 22px; bottom: 10px; height: 1px; background: currentColor; opacity: 0.4; transform-origin: left; transition: opacity var(--dur-1) var(--ease-out); }
.wk-site__open:hover::after { opacity: 1; }
.wk-site__open:hover .i { transform: translate(2px, -2px); }
.wk-site__media { position: relative; z-index: 1; margin: 0 -10px -6px; }
.wk-site__media img { width: 100%; height: auto; }
.wk-site__veil { position: absolute; inset: 0; z-index: 3; background: #0B0B0B; opacity: 0; pointer-events: none; }

@media (min-width: 720px) {
  .wk-site__card { padding: 44px 40px 0; }
  .wk-site__media { margin: 0 -24px -10px 6%; }
}
@media (min-width: 960px) {
  /* the deck: every card sticks a little lower than the one before, so the edges of the earlier cards show */
  .wk-stack { gap: 28px; }
  .wk-site { position: sticky; top: calc(28px + var(--i) * 14px); }
  .wk-site__card {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); align-items: center; gap: 0;
    min-height: min(76vh, 660px); padding: 56px 0 56px 56px;
  }
  .wk-site__media { margin: 0 -2% 0 4%; align-self: center; }
}
@media (min-width: 1280px) {
  .wk-site__card { padding-left: 72px; }
  .wk-site__desc { font-size: 1.0625rem; }
}

/* ---------- 2. Brand design ---------- */
.wk-brands__track { display: grid; gap: 20px; padding-inline: var(--gutter); max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; }
.wk-brand {
  position: relative; overflow: hidden; display: grid; gap: 8px;
  border-radius: var(--r-xl); background: var(--bg); color: var(--fg);
  padding: 30px 22px 18px;
}
.wk-brand__text { position: relative; z-index: 2; display: grid; justify-items: start; align-content: start; }
.wk-brand__num { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; }
.wk-brand__num span { color: var(--muted); font-weight: 500; }
.wk-brand__name { color: var(--fg); margin-top: 14px; font-size: var(--fs-h3); font-weight: 400; letter-spacing: var(--tracking-h3); line-height: 1.05; }
.wk-brand__kind { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }
.wk-brand__desc { margin-top: 18px; max-width: 46ch; line-height: 1.55; text-wrap: pretty; }
ul.wk-brand__made { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 18px; font-size: 0.8125rem; font-weight: 500; }
.wk-brand__made li { display: inline-flex; align-items: center; gap: 7px; }
.wk-brand__made li::before { content: ""; width: 14px; height: 1px; background: currentColor; opacity: 0.5; }
ul.wk-swatches { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); width: 100%; }
.wk-swatches li { display: grid; grid-template-columns: auto; justify-items: start; gap: 2px; font-size: 0.8125rem; font-weight: 500; min-width: 64px; }
.wk-swatches i { width: 40px; height: 40px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--fg) 38%, transparent); margin-bottom: 8px; }
.wk-swatches small { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.wk-brand__type { display: flex; align-items: center; gap: 14px; margin-top: 20px; font-size: 0.875rem; color: var(--muted); }
.wk-brand__type b { font-size: 2.25rem; font-weight: 400; line-height: 1; color: var(--fg); letter-spacing: -0.02em; }
.wk-brand__media { position: relative; z-index: 1; margin: 0 -14px; }
.wk-brand__media img { width: 100%; height: auto; }

@media (min-width: 720px) {
  .wk-brand { padding: 44px 40px 24px; }
}
@media (min-width: 960px) {
  /* the sideways run: wk.js pins the section and slides the track; without it the panels simply wrap */
  .wk-brands__pin { overflow: hidden; }
  .wk-brands__track.is-run { display: flex; gap: 24px; width: max-content; max-width: none; margin: 0; }
  .wk-brands__track.is-run .wk-brand { width: min(84vw, 1180px); flex: none; }
  .wk-brand { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); align-items: center; gap: 24px; min-height: min(74vh, 640px); padding: 48px 32px 48px 56px; }
  .wk-brand__media { margin: 0; }
}

/* ---------- 3. Social media: Ubuntu Chemicals ---------- */
.wk-case { display: grid; gap: 40px; }
.wk-case__media {
  position: relative; border-radius: var(--r-xl); background: #ECE8F4; padding: 28px 18px 56px;
  display: grid; place-items: center;
}
.wk-case__phones { width: min(100%, 560px); height: auto; }
.wk-case__report { position: absolute; right: 2%; bottom: -26px; width: min(34%, 210px); height: auto; filter: drop-shadow(0 22px 26px rgba(20, 20, 20, 0.18)); }
.wk-case__body { display: grid; align-content: start; gap: 22px; }
ul.wk-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wk-stats li { display: grid; align-content: start; gap: 8px; padding: 20px 20px 22px; border-radius: var(--r-lg); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.wk-stats b { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.875rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1; color: var(--ink); }
.wk-stats li:first-child b { color: var(--ember-ink); }
.wk-stats span { font-size: 0.875rem; line-height: 1.4; color: var(--slate); text-wrap: pretty; }
.wk-bars { padding: 20px 22px 22px; border-radius: var(--r-lg); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 16px; }
.wk-bars__cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; font-size: 0.875rem; }
.wk-bars__cap b { font-weight: 600; }
.wk-bars__key { display: inline-flex; align-items: center; gap: 6px; color: var(--slate); font-size: 0.8125rem; }
.wk-bars__key i { width: 10px; height: 10px; border-radius: 3px; background: var(--fog); }
.wk-bars__key i.is-oct { margin-left: 10px; background: var(--ember); }
.wk-bars__row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; }
.wk-bars__name { font-size: 0.875rem; color: var(--slate); }
.wk-bars__pair { display: grid; gap: 6px; }
.wk-bar { position: relative; height: 26px; width: calc(var(--v) * 100%); min-width: 64px; border-radius: 7px; background: var(--fog); display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; transform-origin: left; }
.wk-bar.is-oct { background: var(--ember); }
.wk-bar em { font-style: normal; font-size: 0.8125rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.wk-bar.is-oct em { color: var(--white); }
.wk-note { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r-lg); background: var(--ember-soft); }
.wk-note__ic { flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--white); display: grid; place-items: center; color: var(--ember-ink); }
.wk-note__ic .i { width: 18px; height: 18px; }
.wk-note__t { font-weight: 600; }
.wk-note__s { margin-top: 4px; font-size: 0.9375rem; line-height: 1.5; color: #3A3A37; text-wrap: pretty; }
.wk-case__source { font-size: 0.8125rem; line-height: 1.5; color: var(--slate); }
@media (min-width: 960px) {
  .wk-case { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: start; gap: 48px; }
  .wk-case__media { position: sticky; top: calc(var(--header-h) + 24px); padding: 40px 28px 72px; }
}

.wk-posts { margin-top: clamp(64px, 8vw, 104px); overflow: hidden; }
.wk-posts__track { display: flex; gap: 16px; width: max-content; padding-inline: 8px; }
.wk-posts__track img { height: clamp(220px, 22vw, 320px); width: auto; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- CTA ---------- */
.wk-cta__aside { display: grid; gap: 24px; }
.wk-cta__lead { color: rgba(255, 255, 255, 0.78); line-height: 1.55; }
.wk-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 4. The viewer ---------- */
.wk-viewer {
  width: min(1280px, calc(100vw - 24px)); height: min(900px, calc(100dvh - 24px)); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 0; border-radius: var(--r-xl); overflow: hidden;
  background: var(--paper); color: var(--ink);
  display: none; grid-template-rows: auto minmax(0, 1fr) auto;
}
.wk-viewer[open] { display: grid; }
.wk-viewer::backdrop { background: rgba(15, 15, 15, 0.62); }
.wk-viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 16px 12px 22px; }
.wk-viewer__title { min-width: 0; }
.wk-viewer__kind { font-size: 0.8125rem; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-viewer__name { color: var(--ink); font-size: var(--fs-h4); font-weight: 400; letter-spacing: -0.012em; line-height: 1.15; }
.wk-viewer__acts { display: flex; align-items: center; gap: 10px; flex: none; }
.wk-mode { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill); background: var(--mist); box-shadow: inset 0 0 0 1px var(--line); }
.wk-mode button { height: 36px; padding: 0 14px; border-radius: var(--r-pill); font-size: 0.875rem; font-weight: 500; color: var(--slate); position: relative; }
.wk-mode button::after { content: ""; position: absolute; inset: -4px 0; }
.wk-mode button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-1); }
.wk-viewer__stage { min-height: 0; display: flex; align-items: stretch; justify-content: center; gap: 28px; padding: 6px 22px 0; }
.wk-viewer__browser { display: none; flex: 1; min-width: 0; flex-direction: column; box-shadow: var(--shadow-2); }
.wk-viewer__browser .browser__url { max-width: 360px; }
.wk-viewer__browser .browser__url .i { width: 11px; height: 11px; }
.wk-viewer__browser .wk-viewer__scroll { flex: 1; min-height: 0; }
.wk-viewer__scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; background: var(--white); }
.wk-viewer__scroll:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
.wk-viewer__scroll img { display: block; width: 100%; height: auto; }
.wk-viewer__phone { --phone-w: min(300px, calc((100dvh - 210px) * 9 / 19.2), calc(100vw - 80px)); align-self: center; }
.wk-viewer__phone .phone__screen { display: grid; }
.wk-viewer__phone .wk-viewer__scroll { grid-area: 1 / 1; height: 100%; padding-top: calc(var(--phone-w) * 0.13); scrollbar-width: none; }
.wk-viewer__phone .wk-viewer__scroll::-webkit-scrollbar { display: none; }
.wk-viewer__live { grid-area: 1 / 1; display: none; position: relative; overflow: hidden; background: var(--white); padding-top: calc(var(--phone-w) * 0.13); }
.wk-viewer__live iframe { display: block; border: 0; width: 390px; transform-origin: 0 0; background: var(--white); }
.wk-viewer.is-live .wk-viewer__live { display: block; }
.wk-viewer.is-live [data-v-scroll="phone"] { visibility: hidden; }
.wk-viewer__note { padding: 14px 22px 18px; font-size: 0.8125rem; color: var(--slate); text-align: center; }
@media (max-width: 599.98px) {
  .wk-viewer__bar { flex-wrap: wrap; padding: 14px 14px 10px 18px; }
  .wk-viewer__acts { width: 100%; justify-content: space-between; }
  .wk-viewer__close { order: -1; }
  .wk-viewer__acts .btn { margin-left: auto; }
}
@media (min-width: 960px) {
  .wk-viewer__browser { display: flex; }
  .wk-viewer__stage { padding: 6px 28px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wk-site__open .i, .wk-site__open::after { transition: none; }
}

/* ---------- Hero reel: real phone screens from the sites below, drifting past ---------- */
.wk-reel { margin-top: clamp(40px, 5vw, 64px); margin-inline: calc(var(--gutter) * -1); overflow: hidden; padding: 6px 0 40px; }
.wk-reel__track { display: flex; gap: clamp(14px, 1.6vw, 24px); width: max-content; padding-inline: var(--gutter); }
.wk-reel__phone { --phone-w: clamp(150px, 15vw, 214px); }
.wk-reel__phone .phone__screen { display: flex; flex-direction: column; background: var(--top, var(--white)); }
.wk-reel__phone .phone__status { flex: none; color: var(--ink); }
.wk-reel__phone--light .phone__status { color: var(--white); }
.wk-reel__phone .phone__screen img { flex: 1; min-height: 0; width: 100%; object-fit: cover; object-position: 50% 0; }
@media (min-width: 1440px) { .wk-reel { margin-inline: calc((100vw - var(--container)) / -2); } }

/* ---------- Recent work cards (websites, design and social pages link into this page) ---------- */
ul.wk-minis { display: grid; gap: 16px; }
.wk-mini {
  position: relative; display: grid; grid-template-rows: auto auto; overflow: hidden; height: 100%;
  border-radius: var(--r-xl); background: var(--bg); color: var(--fg);
  transition: transform var(--dur-2) var(--ease-out);
}
.wk-mini__img { padding: 28px 18px 0; }
.wk-mini__img img { width: 100%; height: auto; transition: transform 0.9s var(--ease-out); }
.wk-mini__t { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px 24px; }
.wk-mini__t b { display: block; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.015em; }
.wk-mini__t small { display: block; margin-top: 2px; font-size: 0.875rem; color: var(--muted, currentColor); opacity: 0.85; }
.wk-mini__go { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: var(--bg); }
.wk-mini__go .i { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease-out); }
.wk-mini:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .wk-mini:hover .wk-mini__img img { transform: scale(1.035); }
  .wk-mini:hover .wk-mini__go .i { transform: translateX(3px); }
}
@media (min-width: 720px) { ul.wk-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
.wk-recent__aside { display: grid; gap: 20px; justify-items: start; }
.wk-case__more { justify-self: start; }
