/* Work list (/work/) and project pages (/work/<name>). Layout follows the Qubesys project page Shakir chose; content is Framenox's own.
   Motion only when the head script set html.wk-anim (reduced motion and no-JS see the finished page). */
html.subpage-html body.subpage-body { overflow-y: visible !important; overflow-x: clip !important; }

.wk-hero { padding-bottom: clamp(32px, 5vh, 64px); }
.wk-back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 clamp(20px, 3vw, 36px); font-size: .9rem; font-weight: 500; color: #111; text-decoration: none; border: 1px solid #e3e3e3; border-radius: 9999px; padding: 6px 14px; background: #fff; transition: border-color .25s ease, transform .25s ease; }
.wk-back:hover { border-color: #111; transform: translateX(-2px); }
.wk-pill { display: inline-block; font-size: .85rem; font-weight: 500; background: #fff; border: 1px solid #e3e3e3; color: #111; padding: 6px 14px; border-radius: 9999px; margin-bottom: 28px; }
.wk-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 48px; flex-wrap: wrap; }
.wk-title { margin: 0; font-family: 'Outfit', 'Inter', sans-serif; font-weight: 800; letter-spacing: -.055em; line-height: .96; color: #000; font-size: clamp(3rem, 9.6vw, 9rem); text-wrap: balance; }
.wk-title.list { font-size: clamp(2.8rem, 7.4vw, 7rem); }
.wk-lede { margin: 0; max-width: 30em; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.55; color: #666; }
.wk-ln { display: block; overflow: hidden; padding-bottom: .08em; }
.wk-ln > span { display: block; }

.wk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: clamp(22px, 3vw, 40px) 0 0; font-size: .95rem; color: #777; }
.wk-meta b { color: #000; font-weight: 500; }
.wk-meta .sl { color: #bbb; }
.wk-live { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; background: #f1f1f1; color: #000; text-decoration: none; font-weight: 500; padding: 7px 16px; border-radius: 9999px; transition: background .25s ease; }
.wk-live:hover { background: #e4e4e4; }

/* the big picture area: a website screenshot fills it, posters and reels stand on a tinted stage */
.wk-stage { position: relative; display: flex; justify-content: center; align-items: stretch; gap: clamp(10px, 1.6vw, 22px); aspect-ratio: 16 / 8; border-radius: clamp(18px, 2.2vw, 32px); overflow: hidden; background: var(--stage, #ececec); padding: 0; }
.wk-stage.slide { aspect-ratio: 16 / 9; }
.wk-stage.posters { padding: clamp(14px, 2.4vw, 36px); }
.wk-stage img { display: block; min-width: 0; }
.wk-stage.shot img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, top); }
.wk-stage.posters img { height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: clamp(8px, 1vw, 14px); }

.wk-sec { display: grid; grid-template-columns: minmax(0, 1fr) 6rem; gap: 12px; margin-top: clamp(56px, 8vw, 120px); align-items: start; }
.wk-sec .lb { font-size: .95rem; font-weight: 500; color: #000; }
.wk-sec .nn { text-align: right; font-size: .9rem; color: #999; }
.wk-sec h2 { margin: 14px 0 0; max-width: 20ch; font-family: 'Outfit', 'Inter', sans-serif; font-weight: 500; font-size: clamp(1.8rem, 4.2vw, 3.6rem); line-height: 1.08; letter-spacing: -.04em; color: #000; text-wrap: balance; }
.wk-sec p { margin: 16px 0 0; max-width: 46ch; font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.55; color: #666; }
.wk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.wk-tags li { font-size: .82rem; font-weight: 500; color: #444; padding: 5px 13px; border: 1px solid #dcdcdc; border-radius: 9999px; background: #fff; }

.wk-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); margin-top: clamp(22px, 3vw, 40px); }
.wk-pair .im { position: relative; aspect-ratio: 4 / 3; border-radius: clamp(16px, 2vw, 28px); overflow: hidden; background: var(--stage, #ececec); }
.wk-pair img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }

.wk-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); margin-top: clamp(22px, 3vw, 40px); }
.wk-trio .im { position: relative; aspect-ratio: 4 / 5; border-radius: clamp(16px, 2vw, 28px); overflow: hidden; background: var(--stage, #ececec); }
.wk-trio img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.wk-wide { margin-top: clamp(22px, 3vw, 40px); border-radius: clamp(16px, 2vw, 28px); overflow: hidden; background: #0e1830; }
.wk-wide img { display: block; width: 100%; height: auto; }

.wk-slides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); margin-top: clamp(22px, 3vw, 40px); }
.wk-slides img { display: block; width: 100%; height: auto; border-radius: clamp(16px, 2vw, 28px); background: #e9f1ec; }
.wk-slides img:first-child { grid-column: 1 / -1; }

.wk-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(10px, 1.4vw, 20px); margin-top: clamp(22px, 3vw, 40px); }
.wk-num { background: #f1f1f1; border-radius: clamp(16px, 2vw, 28px); padding: clamp(20px, 2.4vw, 34px); }
.wk-num b { display: flex; align-items: baseline; gap: 8px; font-family: 'Outfit', 'Inter', sans-serif; font-weight: 800; letter-spacing: -.05em; line-height: 1; font-size: clamp(2.8rem, 6vw, 5rem); color: #000; font-variant-numeric: tabular-nums; }
.wk-num b small { font-size: clamp(1rem, 1.6vw, 1.4rem); font-weight: 500; letter-spacing: 0; color: #777; }
.wk-num .cap { display: block; margin-top: 12px; font-size: .95rem; color: #666; }
.wk-num i { display: block; height: 8px; margin-top: 16px; border-radius: 9999px; background: #dedede; overflow: hidden; }
.wk-num i::after { content: ""; display: block; height: 100%; width: var(--end, 100%); background: #000; border-radius: 9999px; transform-origin: left; }

/* list: filter chips + cards */
.wk-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(28px, 4vw, 52px) 0 clamp(18px, 2.4vw, 30px); }
.wk-chip { font: inherit; font-size: .92rem; font-weight: 500; color: #222; background: #fff; border: 1px solid #dcdcdc; border-radius: 9999px; padding: 8px 18px; cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease; }
.wk-chip:hover { border-color: #000; }
.wk-chip[aria-pressed="true"] { background: #000; color: #fff; border-color: #000; }
.wk-chip:focus-visible, .wk-card:focus-visible { outline: 2px solid #2b6cff; outline-offset: 3px; }
.wk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); }
.wk-card { position: relative; display: block; color: inherit; text-decoration: none; background: #f1f1f1; border-radius: clamp(18px, 2.2vw, 32px); padding: clamp(6px, .8vw, 12px) clamp(6px, .8vw, 12px) clamp(16px, 1.8vw, 26px); }
.wk-card .im { position: relative; aspect-ratio: 4 / 3; border-radius: clamp(12px, 1.6vw, 22px); overflow: hidden; background: var(--stage, #ddd); }
.wk-card .im img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: top; transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
.wk-card .im img.po { object-fit: contain; object-position: center; }
.wk-card .row { display: flex; justify-content: space-between; gap: 16px; padding: clamp(12px, 1.4vw, 20px) clamp(8px, 1vw, 14px) 0; font-size: clamp(1.05rem, 1.5vw, 1.3rem); font-weight: 500; color: #000; letter-spacing: -.02em; }
.wk-card .row small { font-size: .88rem; font-weight: 400; color: #777; letter-spacing: 0; padding-top: .3em; white-space: nowrap; }
.wk-card .ty { padding: 4px clamp(8px, 1vw, 14px) 0; font-size: .95rem; color: #777; }
.wk-card[hidden] { display: none; }
.wk-empty { grid-column: 1 / -1; color: #777; padding: 20px 0; }
.wk-view { position: fixed; left: 0; top: 0; z-index: 60; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; display: grid; place-items: center; color: #fff; pointer-events: none; opacity: 0; transform: scale(.4); transition: opacity .25s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
  background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); border: 1px solid rgba(255, 255, 255, .5); box-shadow: 0 8px 28px rgba(0, 0, 0, .18); }
.wk-view svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .45)); }
.wk-view.on { opacity: 1; transform: scale(1); }

.wk-more { margin-top: clamp(64px, 9vw, 130px); }
.wk-more h2 { margin: 0 0 clamp(18px, 2.4vw, 32px); font-family: 'Outfit', 'Inter', sans-serif; font-weight: 800; letter-spacing: -.05em; line-height: 1; font-size: clamp(2.2rem, 5vw, 4.4rem); color: #000; }

.wk-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding: clamp(28px, 3.6vw, 56px); margin: clamp(56px, 8vw, 110px) 0 clamp(72px, 10vw, 140px); background: #1b1b1b; color: #fff; border-radius: clamp(22px, 2.4vw, 36px); }
.wk-cta h2 { margin: 0 0 14px; font-family: 'Outfit', 'Inter', sans-serif; font-weight: 800; letter-spacing: -.045em; line-height: 1; font-size: clamp(2.2rem, 4.6vw, 4.4rem); }
.wk-cta p { margin: 0; max-width: 44ch; color: #b8b8b8; font-size: 1.02rem; line-height: 1.55; }
.wk-cta a { display: inline-flex; align-items: center; gap: 10px; padding: 15px 30px; border-radius: 9999px; background: #fff; color: #000; font-weight: 600; font-size: 1rem; text-decoration: none; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.wk-cta a:hover { transform: translateY(-2px); }

@media (hover: hover) and (pointer: fine) {
  .wk-card:hover .im img { transform: scale(1.06); }
}

/* motion */
@keyframes wk-rise { from { transform: translateY(108%); } to { transform: none; } }
@keyframes wk-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes wk-wipe { from { clip-path: inset(100% 0 0 0 round var(--r, 24px)); } to { clip-path: inset(0 0 0 0 round var(--r, 24px)); } }
@keyframes wk-settle { from { transform: scale(1.18); } to { transform: none; } }
@keyframes wk-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wk-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
html.wk-anim .wk-ln > span { animation: wk-rise 1s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 110ms + 100ms); }
html.wk-anim .wk-lede, html.wk-anim .wk-meta { animation: wk-fade .8s ease both; animation-delay: .65s; }
html.wk-anim .wk-stage:not(.in) { clip-path: inset(100% 0 0 0 round var(--r, 24px)); }
html.wk-anim .wk-stage.in { --r: clamp(18px, 2.2vw, 32px); animation: wk-wipe 1.2s cubic-bezier(.65, 0, .35, 1) both; }
html.wk-anim .wk-stage.in img { animation: wk-settle 1.6s cubic-bezier(.16, 1, .3, 1) both; }
html.wk-anim .wk-num:not(.in) i::after { transform: scaleX(0); }
html.wk-anim .wk-num.in i::after { animation: wk-grow 1.6s cubic-bezier(.65, 0, .35, 1) both; }
html.wk-anim .wk-card.pop { animation: wk-pop .5s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }

@media (max-width: 760px) {
  .wk-grid, .wk-pair, .wk-trio, .wk-slides { grid-template-columns: minmax(0, 1fr); }
  .wk-stage { aspect-ratio: 4 / 3.4; }
  .wk-stage.slide { aspect-ratio: 16 / 9; }
  .wk-sec { grid-template-columns: minmax(0, 1fr); }
  .wk-sec .nn { display: none; }
  .wk-live { margin-left: 0; }
  .wk-cta a { width: 100%; justify-content: center; }
  .wk-title { font-size: clamp(2.8rem, 15vw, 5rem); }
  .wk-title.list { font-size: clamp(2.6rem, 14vw, 4.4rem); }
}
@media (prefers-reduced-motion: reduce) {
  .wk-card .im img { transition: none; }
}
