/* ============================================================
   SYZYGY Architects — work
   Every project: as a grid of photographs, or as a
   plain index; filtered by type.
   ============================================================ */

.wk { padding-top: clamp(128px, 18vh, 200px); padding-bottom: 0; }   /* the footer brings its own space */

.wk-head { display: flex; justify-content: space-between; align-items: baseline; }
.wk-views { display: flex; align-items: baseline; gap: 20px; }
.wk-filters { display: flex; align-items: baseline; gap: 32px; margin-top: 28px; margin-bottom: 44px; }
.wk-views button, .wk-filters button {
  position: relative; padding: 0; border: 0; background: none; cursor: pointer; color: rgb(48 38 32 / 0.3);   /* not chosen: stepped back */
  font-family: var(--font-body); font-size: 10px; font-weight: 500; line-height: 1.2; letter-spacing: 0.16em; text-transform: uppercase;
}
.wk-views button { transition: color var(--quick) var(--ease-out); }
.wk-filters button { display: inline-flex; align-items: baseline; gap: 5px; transition: color var(--fast) var(--ease-out); }
.wk-views button::before, .wk-filters button::before {      /* a comfortable area to press */
  content: ""; position: absolute; top: 50%; left: 50%; width: 100%; min-width: 44px; height: 44px; transform: translate(-50%, -50%);
}
.wk-views button[aria-pressed="true"], .wk-filters button[aria-pressed="true"] { color: var(--ink); }
.wk-filters[hidden] { display: none; }
.wk-filters small { font-size: 10px; font-weight: 400; letter-spacing: 0.04em; color: inherit; font-variant-numeric: tabular-nums; }
.wk-views button:focus-visible, .wk-filters button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .wk-views button:hover, .wk-filters button:hover { color: var(--ink); }
}

/* a view fades up into place when it is switched to */
.wk-view { animation: wk-view 0.6s var(--ease-out) both; }
@keyframes wk-view { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------
   Grid — rows of photographs all 440px tall; each takes a share
   of the row's width; a narrow cell shows the upright photograph
   ------------------------------------------------------------ */
.wk-grid { display: flex; flex-direction: column; gap: 60px; }
.wk-row { display: flex; align-items: flex-start; gap: 20px; }
.wk-item { position: relative; flex: var(--grow, 1) 1 0%; min-width: 240px; }
.wk-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; transition: opacity var(--quick) var(--ease-out); }
.wk-card:focus-visible { opacity: 0.7; outline: none; }
@media (hover: hover) and (pointer: fine) { .wk-card:hover { opacity: 0.7; } }
.wk-media { position: relative; height: 440px; overflow: hidden; }
.wk-info { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; }
.wk-title {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.wk-meta { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 6px; overflow: hidden; color: rgb(48 38 32 / 0.5); }
.wk-tag { white-space: nowrap; font-size: 10px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }
.wk-dot { font-size: 11px; user-select: none; }
.wk-empty { padding: 120px 0; text-align: center; font-size: 14px; }

/* ------------------------------------------------------------
   Index — one line per project; a photograph follows the pointer
   ------------------------------------------------------------ */
.wk-index { position: relative; margin-top: clamp(40px, 6vh, 64px); }
.wk-table { width: 100%; border-collapse: collapse; }
.wk-table thead, .wk-table tbody { display: contents; }
.wk-table tr {
  display: grid; grid-template-columns: 80px 1fr 1fr 140px 100px; gap: 24px;
  border-bottom: 0.5px solid var(--sand);
}
.wk-table thead tr { padding: 0 0 20px; }
.wk-table th, .wk-table td { padding: 0; text-align: left; }
.wk-table thead th { font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.wk-table tbody tr { padding: 26px 0; cursor: pointer; transition: opacity var(--quick) var(--ease-out); }
.wk-table tbody tr:focus-within { outline: 2px solid; outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .wk-table tbody tr:hover { opacity: 0.7; } }
.wk-table a:focus-visible { outline: none; }
.wk-c-year { font-size: 12px; font-weight: 300; letter-spacing: 0.04em; }
.wk-c-title { font-size: 13px; font-weight: 400; letter-spacing: 0.02em; }
.wk-c-place { font-size: 12px; font-weight: 300; letter-spacing: 0.02em; }
.wk-c-type { font-size: 11px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }
.wk-c-area { font-size: 12px; font-weight: 300; letter-spacing: 0.04em; }
.wk-table .wk-c-area { text-align: right; }
.wk-preview {
  position: absolute; top: 0; left: 0; z-index: 10; width: 280px; height: 180px; overflow: hidden;
  pointer-events: none; visibility: hidden;
}
.wk-preview img { width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; }
.wk-preview img.is-loaded { opacity: 1; transition: opacity 0.45s cubic-bezier(0.5, 1, 0.89, 1); }

@media (max-width: 1023px) {
  .wk-row { display: contents; }
  .wk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 20px; }
  .wk-item { min-width: 0; }
  .wk-media { height: 340px; }
  .wk-filters { flex-wrap: wrap; gap: 24px; }
  .wk-table tr { grid-template-columns: 60px 1fr 1fr 120px; gap: 16px; }
  .wk-c-area { display: none; }
}
@media (max-width: 767px) {
  .wk { padding-top: 120px; }
  .wk-grid { grid-template-columns: 1fr; row-gap: 40px; }
  .wk-item { width: 100%; }
  .wk-media { height: auto; aspect-ratio: 3 / 2; }
  .wk-filters { gap: 16px; margin-bottom: 40px; }
  .wk-info { gap: 6px; }
  .wk-table tr { grid-template-columns: 50px 1fr; gap: 12px; }
  .wk-c-place, .wk-c-type, .wk-c-area, .wk-preview { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wk-view { animation: none; }
  .wk-card, .wk-table tbody tr, .wk-preview img { transition: none; }
}
