/* ==========================================================================
   OKAT Media, work page
   The montage hero, the filterable project grid, the websites row and the
   numbers. Device frames, card previews, the viewer and the closing band live
   in style.css, because the homepage and the services page use them too.
   ========================================================================== */

/* ---------- hero ---------- */
.wk-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--black);
}
.wk-hero-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wk-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 12, 11, 0.94) 0%, rgba(11, 12, 11, 0.6) 38%, rgba(11, 12, 11, 0.3) 68%, rgba(11, 12, 11, 0.6) 100%);
}
.wk-hero-copy { position: relative; z-index: 1; width: 100%; padding: 140px var(--gutter) clamp(44px, 8vh, 84px); }
.wk-hero .h-hero { margin-top: 16px; }
.wk-hero-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-top: clamp(26px, 4vh, 44px); }
.wk-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.wk-hero-intro { max-width: 36ch; color: var(--muted); font-size: 0.98rem; }

/* ---------- projects ---------- */
.wk-list { padding: clamp(84px, 13vh, 150px) 0 clamp(60px, 10vh, 120px); }
.wk-list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 26px; }
.wk-list-head .h-sec { margin-top: 14px; }
.wf {
  position: sticky;
  top: 76px;
  z-index: 30;
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  padding: 12px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(var(--bg) 72%, transparent);
}
.wf[hidden] { display: none; }
.wf-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 600 0.85rem/1 var(--body);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.wf-btn:hover { color: var(--text); border-color: rgba(243, 243, 243, 0.35); }
.wf-btn[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.wf-n { font-size: 0.72rem; font-variant-numeric: tabular-nums; opacity: 0.7; }

/* Two columns. Without scripts a plain grid; with them each card goes under
   the shorter column (work.js), keeping reading order in the markup. */
.pgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(34px, 4vw, 56px) clamp(16px, 2vw, 28px);
  padding: 0 var(--gutter);
}
.pgrid.is-masonry { position: relative; display: block; }
.pgrid.is-masonry > .pcard { position: absolute; }
.pgrid > .pcard[hidden] { display: none; }
html.motion-on .pgrid .pcard {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out), top 0.6s var(--ease-out), left 0.6s var(--ease-out);
}
html.motion-on .pgrid .pcard.is-in { opacity: 1; transform: none; }

.pcard { display: block; color: var(--text); }
.pcard-media { position: relative; display: block; aspect-ratio: var(--r); overflow: hidden; border-radius: 4px; background: var(--panel); }
.pcard-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.pcard:hover .pcard-img { transform: scale(1.035); }
.pcard-clip {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(11, 12, 11, 0.72);
  color: var(--text);
  font: 600 0.64rem/1 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pcard-clip::before { content: ''; border-left: 7px solid var(--lime); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.pcard-go {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--lime);
  color: var(--ink);
  font: 500 1.3rem/1 var(--body);
  opacity: 0;
  transform: translate(8px, 8px);
  transition: opacity 0.35s, transform 0.55s var(--ease-out);
}
.pcard:hover .pcard-go,
.pcard:focus-visible .pcard-go { opacity: 1; transform: none; }
.pcard-info { display: block; padding-top: 16px; }
.pcard-tags { display: block; color: var(--lime); font: 600 0.68rem/1.3 var(--body); letter-spacing: 0.18em; text-transform: uppercase; }
.pcard-title { display: block; margin-top: 8px; font: 800 clamp(1.2rem, 1.9vw, 2rem)/1.05 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; transition: color 0.3s; }
.pcard:hover .pcard-title { color: var(--lime); }
.pcard-meta { display: block; margin-top: 8px; color: var(--muted); font-size: 0.88rem; }

/* ---------- websites ---------- */
.wweb { padding: clamp(84px, 13vh, 150px) 0; border-top: 1px solid var(--line); }
.wweb-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 36px; }
.wweb-head .h-sec { margin-top: 14px; }
.wweb-row {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  padding: 0 var(--gutter) 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gutter);
}
.wsite { flex: 0 0 min(78vw, 860px); scroll-snap-align: start; }
.wsite-stage { position: relative; display: block; aspect-ratio: 1.45; overflow: hidden; border-radius: 6px; }
.wsite-info { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 16px; }
.wsite-client { display: block; color: var(--muted); font: 600 0.68rem/1.3 var(--body); letter-spacing: 0.18em; text-transform: uppercase; }
.wsite-title { margin-top: 8px; font: 800 clamp(1.2rem, 1.8vw, 1.7rem)/1.1 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.wsite-visit { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding-bottom: 4px; border-bottom: 1px solid currentColor; font: 600 0.9rem/1 var(--body); }
.wsite-visit:hover { color: var(--lime); }

/* ---------- numbers ---------- */
.wk-stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wk-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wk-stat { padding: clamp(36px, 6vh, 64px) clamp(16px, 2.2vw, 32px); border-left: 1px solid var(--line); }
.wk-stat:first-child { padding-left: 0; border-left: 0; }
.wk-stat-n { display: block; color: var(--lime); font: 800 clamp(2.4rem, 4.6vw, 5.2rem)/0.9 var(--display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.wk-stat p { max-width: 26ch; margin-top: 14px; color: var(--muted); font: 500 0.9rem/1.45 var(--body); }

@media (max-width: 760px) {
  .wk-hero-copy { padding-top: 120px; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .pcard-title { font-size: 1.3rem; }
  .wf { top: 70px; }
  .wsite { flex-basis: 88vw; }
  .wsite-info { flex-direction: column; align-items: flex-start; }
  .wk-stats-grid { grid-template-columns: 1fr 1fr; }
  .wk-stat,
  .wk-stat:first-child { padding: 24px 12px 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .wk-stat-n { font-size: 2.05rem; }
}
