/* ==========================================================================
   Work index — the overlay the Projects room's screens open into.
   Same world as the film: near-black with a red ember, Oswald for the
   letterspaced HUD lines, Bodoni Moda for titles (the project screens' serif).
   ========================================================================== */

html.is-work { overflow: hidden; }

.work {
  position: fixed;
  inset: 0;
  z-index: 200;
  color: var(--paper);
  background:
    radial-gradient(120% 70% at 50% 115%, rgba(222, 27, 28, 0.22), transparent 60%),
    radial-gradient(80% 50% at 85% -10%, rgba(255, 120, 60, 0.08), transparent 60%),
    #070404;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.work.is-open { opacity: 1; }
.work[hidden] { display: none; }

/* ---- top bar ------------------------------------------------------------- */
.work__bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--hdr-h);
  padding: 0 var(--edge);
  background: linear-gradient(#070404 55%, rgba(7, 4, 4, 0));
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.work__back {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(237, 237, 237, 0.22);
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  padding: 10px 16px 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
/* drawn, not a font glyph: a glyph's arrow sits wherever the font puts it,
   so it can't be truly centred against the label */
.work__back::before, .wk-backlink::before {
  content: '';
  flex: none;
  width: 20px;
  height: 12px;
  background: currentColor;
  -webkit-mask: var(--arrow-back) center / contain no-repeat;
  mask: var(--arrow-back) center / contain no-repeat;
}
.work {
  --arrow-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12' fill='none' stroke='%23000' stroke-width='1.3'%3E%3Cpath d='M20 6H1.2M6.4.8 1.2 6l5.2 5.2'/%3E%3C/svg%3E");
}
.work__back:hover, .work__back:focus-visible { border-color: var(--ink); color: #fff; }
.work__crumb { color: var(--dim); }
.work__crumb a { color: inherit; text-decoration: none; }
.work__crumb a:hover { color: var(--paper); }

.work__scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.work__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: calc(var(--hdr-h) + clamp(28px, 6vh, 72px)) var(--edge) 96px;
}

/* ---- headings -------------------------------------------------------------- */
.wk-head { max-width: 860px; margin-bottom: clamp(32px, 6vh, 64px); }
.wk-kicker {
  margin: 0 0 18px;
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #ffb488;
}
.wk-kicker span { color: var(--dim); margin: 0 10px; }
.wk-kicker a { color: inherit; text-decoration: none; }
.wk-kicker a:hover { color: #fff; }
.wk-title {
  margin: 0;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  outline: none;
}
.wk-title__sub {
  display: block;
  margin-top: 16px;
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.25;
  letter-spacing: 0;
  color: rgba(237, 237, 237, 0.72);
}
.wk-title::after {
  content: '';
  display: block;
  width: 46px;
  height: 2px;
  margin-top: 26px;
  background: var(--ink);
}
.wk-intro {
  margin: 24px 0 0;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
}
.wk-tag {
  margin: 22px 0 0;
  max-width: 640px;
  font-family: var(--ui);
  font-weight: 300;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: rgba(237, 237, 237, 0.72);
}

/* ---- project cards in a category --------------------------------------------- */
.wk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(20px, 2.4vw, 34px);
}
.wk-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  opacity: 0;
  transform: translateY(26px);
  animation: wkIn 0.9s var(--ease-out) forwards;
  animation-delay: calc(0.12s + var(--k, 0) * 0.08s);
}
@keyframes wkIn { to { opacity: 1; transform: none; } }

.wk-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 150, 80, 0.16);
  background: #120a08;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.wk-card__img, .wk-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.wk-card:hover .wk-card__media,
.wk-card:focus-visible .wk-card__media {
  border-color: rgba(255, 70, 40, 0.75);
  box-shadow: 0 0 46px -10px rgba(255, 50, 20, 0.55);
}
.wk-card:hover .wk-card__img { transform: scale(1.04); }

/* placeholder until a project's images exist */
.wk-card__ph, .wk-hero__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background:
    radial-gradient(70% 90% at 50% 120%, rgba(222, 27, 28, 0.35), transparent 70%),
    linear-gradient(160deg, #1d1210, #0b0706);
}
.wk-card__ph b, .wk-hero__ph b {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-weight: 400;
  font-size: clamp(56px, 6vw, 96px);
  line-height: 1;
  color: rgba(255, 220, 200, 0.85);
}
.wk-card__ph i, .wk-hero__ph i {
  font-style: normal;
  font-family: var(--ui);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dim);
}

.wk-card__meta {
  margin-top: 18px;
  font-family: var(--ui);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #ffb488;
}
.wk-card__title {
  margin-top: 8px;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.15;
}
.wk-card__sub {
  display: block;
  margin-top: 6px;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.3;
  color: rgba(237, 237, 237, 0.72);
}
.wk-card__desc {
  margin-top: 10px;
  font-family: var(--ui);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(237, 237, 237, 0.66);
}
.wk-card__go {
  margin-top: 14px;
  font-family: var(--ui);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper);
}
.wk-card__go::after { content: ' \2192'; letter-spacing: 0; color: var(--ink); }

.wk-empty {
  padding: 48px 0;
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---- category switcher ------------------------------------------------------- */
.wk-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(56px, 10vh, 110px);
  padding-top: 28px;
  border-top: 1px solid rgba(237, 237, 237, 0.1);
}
.wk-cats a {
  padding: 9px 14px;
  border: 1px solid rgba(237, 237, 237, 0.14);
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(237, 237, 237, 0.7);
  text-decoration: none;
  transition: border-color 0.3s, color 0.3s;
}
.wk-cats a:hover { border-color: rgba(255, 70, 40, 0.7); color: #fff; }
.wk-cats a[aria-current] { border-color: var(--ink); color: #fff; }
.wk-cats sup { margin-left: 6px; font-size: 9px; color: var(--ink); letter-spacing: 0; }

/* ---- a single project ---------------------------------------------------------- */
.wk-hero {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 150, 80, 0.16);
  background: #120a08;
  animation: wkIn 1s var(--ease-out) 0.1s both;
}
.wk-body {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(36px, 6vh, 64px);
}
.wk-facts { margin: 0; display: grid; gap: 22px; align-content: start; }
.wk-facts dt {
  font-family: var(--ui);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #ffb488;
}
.wk-facts dd {
  margin: 6px 0 0;
  font-family: var(--ui);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(237, 237, 237, 0.82);
}
.wk-text p {
  margin: 0 0 1.2em;
  max-width: 680px;
  font-family: var(--ui);
  font-weight: 300;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.75;
  color: rgba(237, 237, 237, 0.8);
}
.wk-hi { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.wk-hi li {
  position: relative;
  padding-left: 26px;
  font-family: var(--ui);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}
.wk-hi li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 14px;
  height: 1px;
  background: var(--ink);
}
.wk-link {
  display: inline-block;
  margin-top: 32px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}
.wk-link::after { content: ' \2197'; letter-spacing: 0; }
.wk-link:hover { background: var(--ink); }
.wk-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 20px;
  margin-top: clamp(40px, 7vh, 80px);
}
.wk-gallery img {
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 150, 80, 0.12);
}

/* ---- case-study page ------------------------------------------------------- */
.wk-backlink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #ffb488;
  text-decoration: none;
  transition: color 0.3s;
}
.wk-backlink::before { background: var(--ink); }
.wk-backlink:hover { color: #fff; }
.wk-sec + .wk-backlink, .wk-actions + .wk-backlink { margin: clamp(48px, 8vh, 88px) 0 0; }
.wk-sec[id] { scroll-margin-top: 90px; outline: none; }

/* bottom actions: same pill as the live-site link */
.wk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(48px, 8vh, 88px);
}
.wk-actions .wk-link, .wk-notice .wk-link { margin-top: 0; }
button.wk-link { appearance: none; background: none; cursor: pointer; line-height: inherit; }
.wk-link--plain::after { content: none; }
.wk-link:disabled { opacity: 0.38; cursor: not-allowed; }
.wk-link:disabled:hover { background: none; }
.wk-link:focus-visible { outline: 2px solid #ffb488; outline-offset: 3px; }
.wk-notice {
  width: min(540px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(255, 150, 80, 0.22);
  border-radius: 12px;
  color: var(--paper);
  background: #0c0706;
}
.wk-notice::backdrop { background: rgba(4, 2, 2, 0.82); }
.wk-notice__body { position: relative; padding: 30px clamp(20px, 4vw, 36px) 32px; }
.wk-notice__x { position: absolute; top: 16px; right: 18px; margin: 0; }
.wk-notice__title {
  margin: 0 72px 0 0;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
}
.wk-notice__text {
  margin: 16px 0 0;
  font-family: var(--ui);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(237, 237, 237, 0.72);
}
.wk-notice__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.wk-sec { margin-top: clamp(56px, 10vh, 112px); }
/* case page: the title takes less height so the screenshots reach the first screen */
.wk-backlink + .wk-head { max-width: none; }
.wk-backlink + .wk-head .wk-tag { max-width: 760px; }
/* text on the left, tools in the otherwise empty right-hand space */
.wk-head__body {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(260px, 380px);
  justify-content: space-between;
  column-gap: clamp(40px, 6vw, 120px);
}
.wk-points.wk-points--stack { grid-template-columns: 1fr; gap: 22px; margin-top: 22px; }
/* case study: a compact details list, so it doesn't outgrow the intro beside it */
.wk-proj--story .wk-points--stack { gap: 16px; margin-top: 18px; }
.wk-proj--story .wk-points--stack h4 { margin-top: 8px; }
.wk-proj--story .wk-points--stack p { margin-top: 4px; }
@media (max-width: 900px) {
  .wk-head__body { grid-template-columns: minmax(0, 1fr); }
  .wk-side { margin-top: 12px; }
}
/* phones: title and intro, then the screenshots, then the rest of the text */
@media (max-width: 760px) {
  .wk-proj--case { display: flex; flex-direction: column; }
  .wk-proj--case .wk-head, .wk-proj--case .wk-head__body, .wk-proj--case .wk-head__text { display: contents; }
  .wk-proj--case > .wk-sec { order: 1; margin-bottom: 16px; }
  .wk-proj--case .wk-head__text > :not(.wk-lead), .wk-proj--case .wk-side,
  .wk-proj--case > .wk-actions, .wk-proj--case > .wk-backlink:last-child { order: 2; }
  .wk-proj--case > .wk-backlink { align-self: flex-start; }
  /* a full case study reads top to bottom instead */
  .wk-proj--case.wk-proj--story { display: block; }
}
/* journey summary: one line of steps joined by arrows, wrapping on narrow screens */
.wk-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 0;
  margin: clamp(28px, 4vh, 40px) 0 0;
  padding: 0;
  list-style: none;
}
.wk-flow li {
  padding: 10px 16px;
  border: 1px solid rgba(255, 150, 80, 0.22);
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.3;
  color: var(--paper);
}
.wk-flow li + li { position: relative; margin-left: 34px; }
.wk-flow li + li::before { content: '\2192' / ''; position: absolute; left: -24px; top: 50%; transform: translateY(-50%); color: var(--ink); }
/* labelled journeys and plain tags reuse the journey pills */
.wk-flowset { margin-top: clamp(28px, 4vh, 40px); }
.wk-flowset .wk-flow { margin-top: 14px; }
.wk-flow--tags { gap: 10px; }
.wk-flow--tags li + li { margin-left: 0; }
.wk-flow--tags li + li::before { content: none; }
.wk-cap {
  margin: 18px 0 0;
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(237, 237, 237, 0.5);
}
/* key decisions: reasoning on the left, the screens that show it on the right */
.wk-cases { margin: clamp(28px, 5vh, 48px) 0 0; padding: 0; list-style: none; }
.wk-case {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 80px);
  padding: clamp(28px, 4vh, 40px) 0;
  border-top: 1px solid rgba(237, 237, 237, 0.1);
}
.wk-case__n { font-family: 'Bodoni Moda', Georgia, serif; font-size: 32px; line-height: 1; color: #ff6a3c; }
.wk-case h4 { margin-top: 14px; }
/* one row per decision: up to 200px a screen, narrower when a decision has more screens */
.wk-shots.wk-shots--excerpt { margin: 0; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, var(--ex-w, 200px)); gap: 16px; }
.wk-shots--excerpt .wk-shot__frame { aspect-ratio: var(--ex-ratio, 642 / 1301); }
.wk-sec > .wk-shots--excerpt { margin-top: clamp(28px, 4vh, 40px); }
/* wide desktop excerpts wrap into rows instead of shrinking to fit one */
.wk-shots.wk-shots--wrap { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(220px, var(--ex-w))); }
@media (max-width: 900px) {
  .wk-case { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
}
/* a statement visitors should not miss, set apart from the body text */
.wk-note {
  margin: 22px 0 0;
  max-width: 760px;
  padding: 16px 20px;
  border-left: 2px solid var(--ink);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 120, 60, 0.06);
  font-family: var(--ui);
  font-weight: 400;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.6;
  color: var(--paper);
}
.wk-head + .wk-sec { margin-top: 0; }
.wk-sec__head {
  margin: 0;
  max-width: 820px;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.12;
}
.wk-sec__text {
  margin: 18px 0 0;
  max-width: 640px;
  font-family: var(--ui);
  font-weight: 300;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.65;
  color: rgba(237, 237, 237, 0.72);
}

.wk-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(16px, 1.8vw, 24px);
  margin: clamp(32px, 5vh, 52px) 0 0;
  padding: 0;
  list-style: none;
}
.wk-step {
  padding: clamp(22px, 2.2vw, 32px);
  border: 1px solid rgba(255, 150, 80, 0.16);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 120, 60, 0.06), rgba(255, 120, 60, 0.01));
}
.wk-step__n {
  display: block;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: clamp(44px, 4.4vw, 64px);
  line-height: 1;
  color: #ff6a3c;
}
.wk-step h4, .wk-points h4, .wk-flowset h4, .wk-case h4 {
  margin: 18px 0 0;
  font-family: var(--ui);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}
.wk-step p, .wk-points p, .wk-case p {
  margin: 12px 0 0;
  font-family: var(--ui);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(237, 237, 237, 0.74);
}

.wk-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
  margin: clamp(28px, 5vh, 48px) 0 0;
  padding: 0;
  list-style: none;
}
.wk-points li { padding-top: 4px; border-top: 2px solid var(--ink); }

.wk-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 22px clamp(40px, 6vw, 96px);
  margin-top: clamp(36px, 6vh, 60px);
  padding-top: 26px;
  border-top: 1px solid rgba(237, 237, 237, 0.1);
}

.wk-shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: clamp(24px, 2.4vw, 34px) clamp(18px, 2vw, 28px);
  margin: clamp(32px, 5vh, 52px) 0 0;
  padding: 0;
  list-style: none;
}
.wk-shot__frame {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 150, 80, 0.16);
  border-radius: 10px;
  background: #120a08;
  cursor: pointer;
  transition: border-color 0.4s, box-shadow 0.4s;
}
/* long pages: every preview shows the top of the page at the same size */
.wk-shot__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  transition: transform 0.9s var(--ease-out);
}
.wk-shot__frame:hover, .wk-shot__frame:focus-visible {
  border-color: rgba(255, 70, 40, 0.75);
  box-shadow: 0 0 46px -10px rgba(255, 50, 20, 0.55);
}
.wk-shot__frame:hover img { transform: scale(1.025); }
.wk-shot__brand {
  margin: 16px 0 0;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.2;
}
.wk-shot__title {
  margin: 4px 0 0;
  font-family: var(--ui);
  font-weight: 300;
  font-size: 14px;
  color: rgba(237, 237, 237, 0.7);
}
.wk-shot__cap {
  margin: 8px 0 0;
  font-family: var(--ui);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(237, 237, 237, 0.72);
}
/* captioned page sets get wider previews, so desktop screenshots stay legible */
.wk-shots--pages { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
/* two states shown side by side so they can be compared */
.wk-shots--pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk-shots--pairs .wk-shot__frame { aspect-ratio: 1 / 1; }
/* print pages: two large previews a row, each at the page's own proportions, nothing cropped */
.wk-shots--doc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk-shots--doc .wk-shot__frame { aspect-ratio: 1190 / 842; }
/* mixed-shape presentation images: square frames, each composition shown whole */
.wk-shots--square .wk-shot__frame { aspect-ratio: 1 / 1; }
.wk-shots--doc .wk-shot__frame img, .wk-shots--square .wk-shot__frame img { object-fit: contain; }
/* app screens: five phones a row at the screens' own proportions */
.wk-shots--phones { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
.wk-shots--phones .wk-shot__frame { aspect-ratio: 375 / 812; }
/* vertical films: the poster sits under the player, which stays transparent until it plays */
.wk-shots--videos { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.wk-video {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid rgba(255, 150, 80, 0.16);
  border-radius: 10px;
  background: #120a08;
}
.wk-video img, .wk-video video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* the box is already 9:16, so contain changes nothing here, but in full screen it
   keeps the whole portrait film instead of cropping it to the landscape screen */
.wk-video video { object-fit: contain; }
/* one tall presentation shown whole, at its own proportions */
.wk-shots--whole { grid-template-columns: minmax(0, 560px); }
.wk-shots--whole .wk-shot__frame { aspect-ratio: auto; }
.wk-shots--whole .wk-shot__frame img { height: auto; }
/* tall presentations side by side, each whole; the first (the chosen one) widest */
.wk-shots--strips { grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
.wk-shot--whole .wk-shot__brand { margin: 0 0 14px; }
/* business card sides in pairs, at the card's own proportions (with bleed) */
.wk-shots--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk-shots--cards .wk-shot__frame { aspect-ratio: 2000 / 1149; }
.wk-shots--cards .wk-shot__frame img { object-fit: contain; }
.wk-shot--whole .wk-shot__frame { aspect-ratio: auto; }
.wk-shot--whole .wk-shot__frame img { height: auto; }
/* one long page shown whole: label and caption beside it, preview at full proportions */
.wk-shots--full { grid-template-columns: minmax(0, 1fr); }
.wk-shot--full {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 340px);
  justify-content: space-between;
  align-items: start;
  column-gap: clamp(28px, 4vw, 64px);
}
.wk-shot--full .wk-shot__text { position: sticky; top: 100px; }
.wk-shot--full .wk-shot__brand { margin-top: 0; }
.wk-shot--full .wk-shot__frame { aspect-ratio: auto; }
.wk-shot--full .wk-shot__frame img { height: auto; }
@media (max-width: 760px) {
  .wk-shots.wk-shots--full { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .wk-shot--full { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .wk-shot--full .wk-shot__text { position: static; }
  .wk-shot--full .wk-shot__frame { width: min(100%, 300px); }
}
.wk-group {
  margin: clamp(40px, 6vh, 64px) 0 0;
  font-family: var(--ui);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #ffb488;
}
.wk-group + .wk-shots { margin-top: 20px; }
.wk-shot__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 10px;
}
.wk-shot__view, .wk-shot__full {
  appearance: none;
  padding: 2px 0;
  border: 0;
  background: none;
  font-family: var(--ui);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--paper);
  cursor: pointer;
  transition: color 0.3s;
}
.wk-shot__view::after { content: ' \2197'; letter-spacing: 0; color: var(--ink); }
.wk-shot__full { color: rgba(237, 237, 237, 0.66); }
.wk-shot__view:hover, .wk-shot__full:hover { color: #fff; }
.wk-shot__frame:focus-visible, .wk-shot__view:focus-visible, .wk-shot__full:focus-visible,
.wk-backlink:focus-visible, .wk-viewer__scroll:focus-visible {
  outline: 2px solid #ffb488;
  outline-offset: 3px;
}

/* grows to a wide screenshot's own width, never narrower than before */
.wk-viewer {
  width: fit-content;
  min-width: min(760px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: calc(100dvh - 32px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 150, 80, 0.22);
  border-radius: 12px;
  color: var(--paper);
  background: #0c0706;
}
.wk-viewer[open] { display: flex; flex-direction: column; }
.wk-viewer::backdrop { background: rgba(4, 2, 2, 0.82); }
.wk-viewer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(237, 237, 237, 0.1);
}
.wk-viewer__bar .wk-shot__brand { margin: 0 auto 0 0; }
.wk-viewer__bar form { margin: 0; }
.wk-zoom { display: flex; align-items: center; gap: 6px; }
.wk-zoom .wk-shot__full { min-width: 34px; font-size: 16px; line-height: 1; }
.wk-zoom__level { min-width: 44px; text-align: center; font-size: 12px; letter-spacing: 0.08em; opacity: 0.8; }
.wk-zoom [data-step] { font-size: 10.5px; }
.wk-zoom [data-step]:disabled { opacity: 0.35; cursor: default; }
/* a paged document opens whole: each page fits the viewer's height until zoomed */
.wk-viewer--fit .wk-viewer__scroll img { max-height: 100%; width: auto; }
.wk-viewer__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  outline-offset: -3px;
}
/* natural size at most, so a small screenshot is never blown up soft */
.wk-viewer__scroll img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* the room's screens read as links now */
.g-card { cursor: pointer; }

@media (max-width: 760px) {
  .work__crumb { display: none; }
  .wk-body { grid-template-columns: 1fr; }
  .wk-hero { aspect-ratio: 4 / 3; }
  .wk-points { grid-template-columns: 1fr; }
  /* a swipe row, so eight stacked screenshots don't bury the process below */
  .wk-shots {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(72vw, 280px);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 14px;
  }
  .wk-shots > li { scroll-snap-align: start; }
  .wk-shots.wk-shots--doc { grid-auto-columns: min(84vw, 440px); }
  .wk-shots.wk-shots--whole { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .wk-shots.wk-shots--strips { align-items: start; }
  .wk-shots.wk-shots--phones { grid-auto-columns: min(56vw, 220px); }
  .wk-shots.wk-shots--videos { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; gap: 22px 12px; }
  .wk-shots.wk-shots--excerpt { grid-template-columns: none; grid-auto-columns: min(60vw, var(--ex-w, 160px)); }
  .wk-shots.wk-shots--wrap { grid-auto-flow: column; }
  .wk-shots.wk-shots--cards { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .work, .wk-card, .wk-hero { transition: none; animation: none; opacity: 1; transform: none; }
}
