/* ============================================================
   WORK / PORTFOLIO PAGE — builds on system.css + home.css
   ============================================================ */

/* ---------- WORK HERO ---------- */
.work-hero { background: var(--ink); color: var(--paper); border-top: 0; padding-top: clamp(96px, 13vw, 168px); padding-bottom: clamp(40px, 5vw, 64px); }
.work-hero-inner { max-width: none; }
.work-eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--coral); }
.work-title { font-family: var(--sans); font-weight: 600; font-stretch: 82%; font-size: clamp(40px, 6.2vw, 94px); line-height: 0.94; letter-spacing: -0.02em; margin-top: var(--s6); max-width: 13ch; text-wrap: balance; }
.work-lede { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.4; color: var(--graphite-d); max-width: 46ch; margin-top: var(--s6); }
.work-hero .wrap { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: var(--s7); align-items: end; }
.work-hero-stats { display: flex; flex-direction: column; gap: var(--s5); border-left: 1px solid var(--line-d); padding-left: var(--s6); }
.work-hero-stat .n { font-family: var(--sans); font-weight: 600; font-size: clamp(30px, 3.4vw, 48px); line-height: 0.95; letter-spacing: -0.02em; }
.work-hero-stat .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite-d); margin-top: 6px; }
@media (max-width: 820px){ .work-hero .wrap { grid-template-columns: 1fr; gap: var(--s6); } .work-hero-stats { flex-direction: row; flex-wrap: wrap; gap: var(--s6); border-left: 0; padding-left: 0; border-top: 1px solid var(--line-d); padding-top: var(--s5); } }

/* ---------- INDEX SECTION (dark, full-bleed editorial rows) ---------- */
.work-index { background: var(--ink); color: var(--paper); border-top: 0; padding-top: 0; padding-bottom: 0; }
.work-more { display: flex; justify-content: center; padding: var(--s8) var(--s6); border-top: 1px solid rgba(255,255,255,.18); }
.work-more .btn { background: var(--coral); border-color: var(--coral); color: var(--ink); }
.work-more .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.work-index > .wrap { max-width: none; padding: 0; }

/* filter bar — sticky toolbar: search + dropdowns + clear */
.work-filter { position: sticky; top: 90px; z-index: 30; display: flex; flex-wrap: wrap; align-items: stretch;
  background: var(--ink); border-top: 1px solid rgba(255,255,255,.18); border-bottom: 1px solid rgba(255,255,255,.18);
  transition: top .72s cubic-bezier(.22,1,.36,1); }
/* nav slides up while browsing the work index so the filter sits flush at top */
.nav { transition: transform .72s cubic-bezier(.22,1,.36,1); }
body.nav-hidden .nav { transform: translateY(-120%); }
body.nav-hidden .work-filter { top: 0; }
@media (max-width: 820px){ body.nav-hidden .work-filter { top: 0; } }
.wf-search { display: flex; align-items: center; gap: 10px; flex: 0 0 52%; padding: 0 var(--s6); border-right: 1px solid rgba(255,255,255,.18); color: var(--paper); }
.wf-search-ic { width: 16px; height: 16px; flex: none; opacity: .6; }
.wf-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 16px 0; font-family: var(--sans); font-size: 15px; color: var(--paper); }
.wf-search input::placeholder { color: rgba(255,255,255,.45); }
.wf-search input:focus { outline: none; }
.wf-drop { position: relative; border-right: 1px solid rgba(255,255,255,.18); }
.wf-drop-btn { display: inline-flex; align-items: center; gap: 9px; height: 100%; padding: 16px 18px; cursor: pointer;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper); background: transparent; border: 0; white-space: nowrap; transition: background .15s, color .15s; }
.wf-drop-btn:hover { background: rgba(255,255,255,.1); }
.wf-drop.is-open .wf-drop-btn { background: var(--paper); color: var(--ink); }
.wf-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transition: transform .2s; }
.wf-drop.is-open .wf-caret { transform: rotate(180deg); }
.wf-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; background: var(--coral); color: var(--ink); font-size: 10px; }
.wf-badge[hidden] { display: none; }
.wf-drop.is-open .wf-badge { background: var(--ink); color: var(--paper); }
.wf-drop-panel { position: absolute; top: 100%; left: -1px; min-width: 230px; background: var(--paper); border: 1px solid var(--paper);
  display: none; flex-direction: column; z-index: 5; max-height: 64vh; overflow: auto; }
.wf-drop.is-open .wf-drop-panel { display: flex; }
.wf-opt { display: flex; align-items: center; gap: 11px; padding: 11px 15px; cursor: pointer; font-family: var(--sans); font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.wf-opt:last-child { border-bottom: 0; }
.wf-opt:hover { background: var(--mist); }
.wf-opt input { accent-color: var(--coral); width: 15px; height: 15px; flex: none; }
.wf-clear { margin-left: auto; padding: 16px 18px; cursor: pointer; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--paper); background: transparent; border: 0; transition: background .15s, color .15s; }
.wf-clear:hover { background: var(--paper); color: var(--ink); }
.wf-toggle { display: none; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 16px var(--s6); cursor: pointer;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper); background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.wf-toggle-ic { font-size: 17px; line-height: 1; }

/* results — full-bleed editorial rows */
.work-list { border-top: 0; }
.proj.is-hidden { display: none; }
.wkr-row { display: grid; grid-template-columns: 1fr 1.15fr 0.78fr; border-bottom: 1px solid rgba(255,255,255,.18); min-height: clamp(220px, 26vw, 300px); text-decoration: none; color: var(--paper); align-items: stretch; }
.wkr-main { display: flex; flex-direction: column; justify-content: flex-start; gap: 14px; padding: var(--s6); border-right: 1px solid rgba(255,255,255,.18); }
.wkr-learn { margin-top: auto; padding-top: var(--s5); }
.wkr-row:hover .wkr-learn { color: var(--coral); }
.wkr-client { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper); }
.wkr-title { font-family: var(--sans); font-weight: 600; font-size: clamp(26px, 3vw, 46px); letter-spacing: -0.02em; line-height: 1.02; max-width: 18ch; transition: opacity .2s ease; }
.wkr-meta { display: flex; flex-direction: column; justify-content: center; gap: var(--s5); padding: var(--s6); }
.wkr-field { display: flex; flex-direction: column; gap: 8px; }
.wkr-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--paper); }
.wkr-val { font-size: 15.5px; color: rgba(255,255,255,.78); }
.wkr-thumb { order: -1; overflow: hidden; display: flex; align-items: center; padding: var(--s5) var(--s5) var(--s5) var(--s6); border-right: 1px solid rgba(255,255,255,.18); }
.wkr-thumb img, .wkr-thumb image-slot { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; transition: transform .5s cubic-bezier(.16,.84,.3,1); }
.wkr-row:hover .wkr-title { opacity: .6; }
@media (max-width: 820px){
  .wkr-row { grid-template-columns: 1fr; min-height: 0; gap: var(--s5); padding: var(--s6); }
  .wkr-main { border-right: 0; padding: 0; gap: var(--s5); }
  .wkr-meta { padding: 0; flex-direction: row; flex-wrap: wrap; gap: var(--s6); justify-content: flex-start; }
  .wkr-thumb { padding: 0; order: -1; }
}
@media (max-width: 820px){
  .work-filter { top: 78px; flex-direction: column; align-items: stretch; }
  .wf-search { flex: none; width: 100%; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .wf-toggle { display: flex; }
  .wf-drop, .wf-clear { display: none; }
  .work-filter.is-expanded .wf-drop { display: block; }
  .work-filter.is-expanded .wf-clear { display: block; }
  .wf-drop { width: 100%; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .wf-drop-btn { width: 100%; justify-content: space-between; }
  .wf-drop-panel { position: static; border: 0; min-width: 0; max-height: none; background: var(--paper); }
  .wf-clear { width: 100%; margin-left: 0; text-align: left; border-left: 0; }
}

/* ---------- WORK CTA (reuses .cta-band from home.css) ---------- */
.work-cta .sub em { font-style: italic; }

/* ---------- WORK STATEMENT (full-bleed image + overlaid headline) ---------- */
.wk-statement { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); isolation: isolate; }
.wks-bg { position: absolute; inset: 0; z-index: 0; }
.wks-bg video, .wks-bg image-slot { display: block; width: 100%; height: 100%; object-fit: cover; }
.wks-scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(16,18,22,.5) 0%, rgba(16,18,22,.42) 45%, rgba(16,18,22,.8) 100%); }
.wks-vline { position: absolute; z-index: 2; top: 0; bottom: 0; left: 52%; width: 1px; background: rgba(255,255,255,.22); }
.wks-inner { position: relative; z-index: 3; min-height: min(92vh, 880px); display: flex; flex-direction: column; padding: clamp(90px,14vh,150px) 0 clamp(28px,4vh,48px); }
.wks-main { flex: 1; display: grid; grid-template-columns: 52% 48%; align-items: end; }
.wks-head { grid-column: 1; display: flex; flex-direction: column; gap: clamp(18px,3vh,30px); padding: 0 var(--s6); }
.wks-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper); }
.wks-title { font-family: var(--sans); font-weight: 600; font-stretch: 80%; font-size: clamp(38px, 6.4vw, 104px); line-height: 0.95; letter-spacing: -0.02em; max-width: 14ch; text-wrap: balance; }
.wks-band { display: grid; grid-template-columns: 52% 48%; align-items: center; border-top: 1px solid rgba(255,255,255,.22); margin-top: clamp(24px,4vh,40px); padding-top: clamp(22px,3vh,36px); }
.wks-copy { grid-column: 2; padding: 0 var(--s6); font-size: clamp(15px,1.2vw,18px); line-height: 1.45; color: rgba(255,255,255,.85); max-width: 44ch; }
.wks-lede { font-size: clamp(16px,1.4vw,20px); line-height: 1.4; color: rgba(255,255,255,.85); max-width: 42ch; margin-top: clamp(2px,1vh,8px); }
/* hero logo marquee — bottom-left quadrant, white logos, transparent, R→L */
.wks-logos { grid-column: 1; grid-row: 1; min-width: 0; padding: 0 var(--s6); align-self: center; }
.wks-marquee { border-block: 0; padding: 0; overflow: hidden;
  clip-path: inset(0 100% 0 0); animation: wks-logos-wipe 1.1s cubic-bezier(.16,.84,.3,1) .25s forwards;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 84%, transparent); }
@keyframes wks-logos-wipe { to { clip-path: inset(0 0 0 0); } }
[data-motion="off"] .wks-marquee, .no-anim .wks-marquee { clip-path: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce){ .wks-marquee { clip-path: none; animation: none; } }
.wks-marquee .track { gap: clamp(34px,3.5vw,56px); align-items: center; }
[data-motion="on"] .wks-marquee .track { animation-duration: 30s; }
.wks-marquee .logo img { height: 42px; filter: brightness(0) invert(1); opacity: .82; }
.wks-stats { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; gap: clamp(22px,3vw,52px); padding: 0 var(--s6); }
.wks-stat { display: flex; flex-direction: column; gap: 6px; }
.wks-stat .n { font-family: var(--sans); font-weight: 600; font-size: clamp(28px,3vw,44px); line-height: 0.95; letter-spacing: -0.02em; }
.wks-stat .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.7); }
@media (max-width: 760px){
  .wks-vline { display: none; }
  .wks-inner { min-height: 76vh; }
  .wks-main { grid-template-columns: 1fr; }
  .wks-band { grid-template-columns: 1fr; }
  .wks-copy { grid-column: 1; }
  .wks-stats { grid-column: 1; grid-row: auto; }
  .wks-logos { grid-column: 1; grid-row: auto; margin-top: clamp(24px,6vw,40px); padding-top: clamp(24px,6vw,40px); border-top: 1px solid rgba(255,255,255,.22); }
}
