/* ============================================================
   LBD Portfolio — Our Work filterable page
   Rendered by the [lbd_portfolio_filter] shortcode.
   ============================================================ */

.wk {
  --wk-ink:      #000000;
  --wk-surface:  #0a0a0b;
  --wk-surface2: #0a0a0b;
  --wk-line:     #262c3a;
  --wk-text:     #ede9e0;
  --wk-muted:    #96a0af;
  --wk-brass:    #F7A73D;
  --wk-brass-hi: #FFBE6B;

  --wk-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --wk-sans:  "Spline Sans", "Helvetica Neue", Arial, sans-serif;

  --wk-radius: 16px;
  --wk-ease: cubic-bezier(.22, .61, .21, 1);

  background: var(--wk-ink);
  color: var(--wk-text);
  font-family: var(--wk-sans);
  font-size: 16px;
  line-height: 1.6;
  padding: clamp(56px, 8vw, 104px) clamp(16px, 5vw, 64px);
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.wk *, .wk *::before, .wk *::after { box-sizing: border-box; }

.wk::before {
  content: "";
  position: absolute; top: -240px; left: 50%;
  width: 760px; height: 440px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(247,167,61,.10), transparent 70%);
  pointer-events: none;
}

.wk-wrap { max-width: 1240px; margin: 0 auto; position: relative; }

/* ---------- Header ---------- */
.wk-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 52px); }
.wk-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--wk-brass); margin: 0 0 20px;
}
.wk-eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--wk-brass); opacity: .8; }
.wk-title {
  font-family: var(--wk-serif); font-weight: 420;
  font-size: clamp(40px, 6vw, 72px); line-height: 1.02;
  letter-spacing: -.015em; margin: 0 0 20px; text-wrap: balance;
  color: var(--wk-text);
}
.wk-title em { font-style: italic; font-weight: 340; color: var(--wk-brass-hi); }
.wk-lead { color: var(--wk-muted); font-size: clamp(16px, 1.6vw, 18px); margin: 0; }

/* ---------- Two-column body: sidebar + results ---------- */
.wk-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

/* ---------- Filter sidebar ---------- */
.wk-side {
  position: sticky; top: 28px;
  display: flex; flex-direction: column;
  align-self: start;
}
.wk-side-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding-bottom: 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--wk-line);
}
.wk-side-head h2 {
  font: 600 12px/1 var(--wk-sans); letter-spacing: .16em;
  text-transform: uppercase; color: var(--wk-text); margin: 0;
}
.wk-clear {
  appearance: none; cursor: pointer; background: none; border: none; padding: 0;
  color: var(--wk-brass); font: 600 12px/1 var(--wk-sans); letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .25s var(--wk-ease);
}
.wk-clear.is-shown { opacity: 1; pointer-events: auto; }
.wk-clear:hover { color: var(--wk-brass-hi); }
.wk-clear:focus-visible { outline: 2px solid var(--wk-brass); outline-offset: 3px; border-radius: 4px; }
.wk-clear svg { width: 11px; height: 11px; }

.wk-group { padding: 18px 0; border-bottom: 1px solid var(--wk-line); }
.wk-flabel {
  display: block; margin: 0 0 12px;
  font: 600 11px/1 var(--wk-sans); letter-spacing: .14em;
  text-transform: uppercase; color: var(--wk-muted);
}
.wk-chips { display: flex; flex-direction: column; gap: 2px; padding: 0; margin: 0; list-style: none; }
.wk-chips li { margin: 0; list-style: none; }
.wk-chip {
  appearance: none; cursor: pointer; width: 100%; text-align: left;
  display: flex; align-items: center; gap: 10px;
  font: 500 14px/1.3 var(--wk-sans); letter-spacing: .005em;
  color: var(--wk-muted); background: transparent;
  border: none; border-radius: 9px;
  padding: 9px 12px;
  transition: color .18s var(--wk-ease), background .18s var(--wk-ease);
}
/* radio dot */
.wk-chip::before {
  content: ""; flex: 0 0 auto;
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--wk-line);
  transition: border-color .18s var(--wk-ease), box-shadow .18s var(--wk-ease), background .18s var(--wk-ease);
}
.wk-chip:hover { color: var(--wk-text); background: var(--wk-surface); }
.wk-chip:hover::before { border-color: var(--wk-muted); }
.wk-chip:focus-visible { outline: 2px solid var(--wk-brass); outline-offset: 2px; }
.wk-chip[aria-pressed="true"] { color: var(--wk-text); font-weight: 600; }
.wk-chip[aria-pressed="true"]::before {
  border-color: var(--wk-brass); background: var(--wk-brass);
  box-shadow: inset 0 0 0 3px var(--wk-surface);
}
.wk-chip .wk-txt { flex: 1; }

/* overflow options hidden behind the "View more" toggle */
.wk-chips li.is-overflow { display: none; }
.wk-group.is-expanded .wk-chips li.is-overflow { display: list-item; }

.wk-viewmore {
  appearance: none; cursor: pointer; background: none; border: none;
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 8px; padding: 6px 12px;
  color: var(--wk-brass); font: 600 12.5px/1 var(--wk-sans); letter-spacing: .02em;
  border-radius: 9px;
  transition: color .18s var(--wk-ease), background .18s var(--wk-ease);
}
.wk-viewmore:hover { color: var(--wk-brass-hi); background: var(--wk-surface); }
.wk-viewmore:focus-visible { outline: 2px solid var(--wk-brass); outline-offset: 2px; }
.wk-viewmore .wk-vm-caret { width: 13px; height: 13px; transition: transform .25s var(--wk-ease); }
.wk-group.is-expanded .wk-viewmore .wk-vm-caret { transform: rotate(180deg); }
.wk-chip .wk-cnt {
  font-variant-numeric: tabular-nums; font-size: 12px;
  color: var(--wk-muted); opacity: .75;
}

/* ---------- Result meta ---------- */
.wk-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 0 0 22px;
}
.wk-count { color: var(--wk-muted); font-size: 14px; margin: 0; }
.wk-count strong { color: var(--wk-text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Grid ---------- */
.wk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 26px);
}
@media (min-width: 1180px) {
  .wk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.wk-card {
  opacity: 0; transform: translateY(22px);
  transition: opacity .55s var(--wk-ease), transform .55s var(--wk-ease);
  margin: 0;
}
.wk-card.is-in { opacity: 1; transform: none; }
.wk-card.is-hidden { display: none; }

.wk-card a {
  display: flex; flex-direction: column; height: 100%;
  color: inherit; text-decoration: none;
  background: var(--wk-surface); border: 1px solid var(--wk-line);
  border-radius: var(--wk-radius); overflow: hidden;
  transition: border-color .3s var(--wk-ease), transform .3s var(--wk-ease), box-shadow .3s var(--wk-ease);
}
.wk-card a:hover, .wk-card a:focus-visible {
  border-color: rgba(247,167,61,.5);
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
}
.wk-card a:focus-visible { outline: 2px solid var(--wk-brass); outline-offset: 3px; }

.wk-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--wk-surface2); }
.wk-art { position: absolute; inset: 0; transition: transform .7s var(--wk-ease); }
.wk-art svg, .wk-art img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.wk-card a:hover .wk-art, .wk-card a:focus-visible .wk-art { transform: scale(1.05); }

/* metric callout floating on the thumb */
.wk-metric {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(11,13,18,.66); backdrop-filter: blur(8px);
  border: 1px solid rgba(237,233,224,.14);
}
.wk-metric b {
  font-family: var(--wk-serif); font-weight: 480;
  font-size: 26px; line-height: 1; color: var(--wk-brass-hi);
  font-variant-numeric: tabular-nums;
}
.wk-metric span {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(237,233,224,.8);
}

.wk-body { display: flex; flex-direction: column; gap: 12px; padding: 20px; flex: 1; }
.wk-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-pill {
  font: 600 10.5px/1 var(--wk-sans); letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
}
.wk-pill--svc { color: var(--wk-brass-hi); background: rgba(247,167,61,.12); border: 1px solid rgba(247,167,61,.25); }
.wk-pill--ind { color: var(--wk-muted); border: 1px solid var(--wk-line); }

.wk-name {
  font-family: var(--wk-serif); font-weight: 480;
  font-size: 22px; line-height: 1.15; margin: 0; letter-spacing: -.005em;
  color: var(--wk-text);
}
.wk-desc { color: var(--wk-muted); font-size: 14px; margin: 0; }
.wk-more {
  margin-top: auto; padding-top: 4px;
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12.5px/1 var(--wk-sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--wk-brass);
}
.wk-more svg { width: 13px; height: 13px; transition: transform .3s var(--wk-ease); }
.wk-card a:hover .wk-more svg, .wk-card a:focus-visible .wk-more svg { transform: translate(3px,-3px); }

/* ---------- Empty state ---------- */
.wk-empty {
  display: none; text-align: center; padding: 72px 20px;
  border: 1px dashed var(--wk-line); border-radius: var(--wk-radius);
  color: var(--wk-muted);
}
.wk-empty.is-shown { display: block; }
.wk-empty h3 { font-family: var(--wk-serif); font-weight: 420; font-size: 24px; color: var(--wk-text); margin: 0 0 8px; }
.wk-empty button {
  margin-top: 18px; cursor: pointer;
  font: 600 13px/1 var(--wk-sans); color: var(--wk-ink); background: var(--wk-brass);
  border: none; border-radius: 999px; padding: 12px 22px;
}
.wk-empty button:focus-visible { outline: 2px solid var(--wk-brass-hi); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .wk * { transition-duration: .01ms !important; }
  .wk-card { opacity: 1; transform: none; }
}

/* mobile filter toggle — hidden on desktop */
.wk-toggle { display: none; }
.wk-toggle-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  font: 700 11px/1 var(--wk-sans); font-variant-numeric: tabular-nums;
  color: var(--wk-ink); background: var(--wk-brass); border-radius: 999px;
}

@media (max-width: 860px) {
  /* stack: filters collapse into a disclosure above the results */
  .wk-layout { grid-template-columns: 1fr; gap: 18px; }

  /* sticky filter bar stays reachable while scrolling the results */
  .wk-side {
    position: sticky; top: 0; z-index: 20;
    margin: 0 calc(-1 * clamp(16px, 5vw, 64px));   /* full-bleed bar */
    padding: 10px clamp(16px, 5vw, 64px);
    background: rgba(11,13,18,.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--wk-line);
  }
  .wk-toggle {
    display: flex; align-items: center; gap: 12px;
    width: 100%; cursor: pointer; min-height: 50px;
    font: 600 14px/1 var(--wk-sans); letter-spacing: .03em; color: var(--wk-text);
    background: var(--wk-surface); border: 1px solid var(--wk-line);
    border-radius: 12px; padding: 14px 18px;
  }
  .wk-toggle .wk-toggle-label { flex: 1; text-align: left; }
  .wk-toggle:focus-visible { outline: 2px solid var(--wk-brass); outline-offset: 3px; }
  .wk-toggle .wk-caret { width: 16px; height: 16px; transition: transform .3s var(--wk-ease); }
  .wk-side[data-open="true"] .wk-caret { transform: rotate(180deg); }
  .wk-toggle-badge { display: none; }
  .wk-side.is-filtered .wk-toggle-badge { display: inline-flex; }

  /* the expandable panel */
  .wk-panel {
    max-height: 0; overflow: hidden;
    transition: max-height .35s var(--wk-ease);
  }
  .wk-side[data-open="true"] .wk-panel { max-height: 640px; overflow-y: auto; }
  .wk-side-head { margin-top: 14px; }
  .wk-group:last-child { border-bottom: none; padding-bottom: 6px; }

  /* bigger tap targets on touch */
  .wk-chip { padding: 12px 12px; font-size: 15px; min-height: 46px; }

  .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .wk { padding: clamp(40px, 9vw, 64px) clamp(16px, 5vw, 28px); }
  .wk-title { font-size: clamp(32px, 10vw, 46px); }
  .wk-meta { margin-bottom: 18px; }
  .wk-grid { grid-template-columns: 1fr; gap: 16px; }
  .wk-thumb { aspect-ratio: 16 / 9; }
  .wk-metric { left: 12px; bottom: 12px; padding: 10px 13px; }
  .wk-metric b { font-size: 22px; }
}
@media (max-width: 380px) {
  .wk-metric b { font-size: 20px; }
  .wk-name { font-size: 20px; }
}
