/* The work page (work/index.html), after web-designlondon.co.uk/portfolio, in Korsa's look; builds on case.css
   (the light page, --u, --gut, the title, the reveal and the contact). */

/* ---------- title + filters ---------- */
.wk-head h1 { max-width: 14em; }
.wk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: max(8px, calc(var(--u) * 12));
  margin-top: max(28px, calc(var(--u) * 64));
}
.wk-filter {
  height: max(34px, calc(var(--u) * 44));
  padding: 0 max(14px, calc(var(--u) * 22));
  border: 1px solid #131313;
  border-radius: 999px;
  background: transparent;
  color: #131313;
  font: inherit;
  font-size: max(13px, calc(var(--u) * 16));
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.wk-filter:hover { background: #131313; color: #fff; }
.wk-filter[aria-pressed="true"] { border-color: #2a2ce6; color: #2a2ce6; background: transparent; }
.wk-filter:focus-visible { outline: 2px solid #2a2ce6; outline-offset: 2px; }
.wk-head hr { margin-top: max(16px, calc(var(--u) * 28)); }

/* ---------- the projects, two by two ---------- */
.wk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: max(28px, calc(var(--u) * 60)) max(16px, calc(var(--u) * 32));
  margin: max(24px, calc(var(--u) * 48)) 0 max(80px, calc(var(--u) * 200));
  padding: 0;
  list-style: none;
}
.wk-item { transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wk-item.reveal.in.out, .wk-item.out { opacity: 0; transform: scale(0.97); }
.wk-item[hidden] { display: none; }
.wk-card { display: block; cursor: none; }
div.wk-card { cursor: default; }   /* (a project without a page of its own yet) */
.wk-card:focus-visible { outline: 2px solid #2a2ce6; outline-offset: 6px; border-radius: max(12px, calc(var(--u) * 20)); }
.wk-media {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: max(12px, calc(var(--u) * 20));
  overflow: hidden;
  background: #e8e8e8;
}
.wk-zoom { display: block; width: 100%; height: 100%; }
.wk-zoom > * { display: block; width: 100%; height: 100%; object-fit: cover; }

.wk-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: max(10px, calc(var(--u) * 18));
}
.wk-name { font-size: max(18px, calc(var(--u) * 28)); letter-spacing: -0.02em; line-height: 1.2; }
.wk-sub { font-size: max(13px, calc(var(--u) * 16)); color: var(--muted); text-align: right; }
/* the name rolls up to a copy of itself on hover */
.wk-roll { display: inline-grid; overflow: hidden; height: 1.2em; vertical-align: top; }
.wk-roll > span { grid-area: 1 / 1; transition: transform 0.45s cubic-bezier(0.15, 0.75, 0.5, 1); }
.wk-roll > span + span { transform: translateY(100%); }
.wk-card:hover .wk-roll > span:first-child, .wk-card:focus-visible .wk-roll > span:first-child { transform: translateY(-100%); }
.wk-card:hover .wk-roll > span + span, .wk-card:focus-visible .wk-roll > span + span { transform: none; }

/* the round "View" over a project, following the cursor (work.js places it) */
.wk-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 8;
  width: max(72px, calc(var(--u) * 110));
  height: max(72px, calc(var(--u) * 110));
  margin: calc(max(72px, calc(var(--u) * 110)) / -2) 0 0 calc(max(72px, calc(var(--u) * 110)) / -2);
  border-radius: 50%;
  background: #2a2ce6;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: max(13px, calc(var(--u) * 17));
  pointer-events: none;
  transform: translate(var(--x, -200px), var(--y, -200px)) scale(var(--s, 0));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
@media (hover: none) { .wk-cursor { display: none; } .wk-card { cursor: pointer; } }


@media (max-width: 720px) {
  .wk-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .wk-roll > span, .wk-item, .wk-cursor { transition: none; }
}
