/* =========================================================
   Jory&Co — Work landing page
   Builds on main.css (tokens, nav, buttons, project cards, ticker, footer)
   Figma: Design AW (Updated) › Work_A (7183:10989)
   ========================================================= */

.page-work .main { background: var(--black); }

/* ---------- Page header ---------- */
.ph { position: relative; padding: 257px 20px 0; }
.ph .hero__bar { position: absolute; }
.ph__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ph__title {
  margin: 0; font-weight: 600;
  font-size: clamp(48px, 6.25vw, 90px); line-height: 1.1; letter-spacing: -0.03em;
}
[data-lines] { display: flow-root; }
[data-lines] .line { display: block; overflow: hidden; padding: .16em .08em .26em; margin: -.16em -.08em -.26em; }
[data-lines] .line + .line { margin-top: -.42em; } /* adjoining line margins collapse (-.26 vs -.16): restore the full overlap so a multi-line heading keeps its height */
[data-lines] .line__inner { display: block; will-change: transform, opacity; }
html.js .ph__title { visibility: hidden; }

/* ---------- Filters (topic / type) ---------- */
.work { margin-top: var(--section-gap); padding: 20px 20px 0; position: relative; }
.work::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 1px; background: var(--white-20); }
.wf { display: flex; flex-direction: column; gap: 14px; }
.wf__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.wf__group { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 10px; }
.wf__row:not(.wf__row--topic) .wf__group { column-gap: 10px; }
.wf__label, .wf__opt, .wf__clear {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.2; letter-spacing: 1.2px; text-transform: uppercase;
}
.wf__label { opacity: .5; }
.wf__label--type { width: 60px; }
.wf__opt, .wf__clear {
  appearance: none; background: none; border: 0; padding: 0; margin: 0;
  color: var(--white); opacity: .5; cursor: pointer;
  transition: opacity .3s ease, color .3s ease;
}
.wf__opt:hover, .wf__clear:hover, .wf__opt:focus-visible, .wf__clear:focus-visible { opacity: 1; }
.wf__opt.is-on { color: var(--new-green); opacity: 1; }
.wf__opt:focus-visible, .wf__clear:focus-visible { outline: 1px solid var(--new-green); outline-offset: 4px; }
.wf__clear { display: inline-flex; align-items: flex-end; gap: 10px; white-space: nowrap; }
.wf__clear svg { transform: rotate(180deg) scaleY(-1); }
.wf__clear[disabled] { opacity: .2; cursor: default; }
.wf__clear--inline { margin-left: 10px; }

/* ---------- Grid ---------- */
.work__count { display: none; }
.work-grid--page { margin-top: 60px; }
html.js .page-work .work-grid--page .project { display: none; }
html.js .page-work .work-grid--page .project.is-shown { display: flex; }
.work__empty { margin-top: 60px; font-size: 17px; line-height: 1.4; opacity: .7; }

/* ---------- Pagination (Figma: 7183:11158) ---------- */
.work__pages { display: flex; gap: 20px; margin-top: 50px; }
.work__pages:empty { display: none; }
.work__page {
  appearance: none; background: none; cursor: pointer;
  width: 70px; height: 70px; border-radius: 50%; border: 1px solid var(--white);
  color: var(--white); opacity: .5;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.2px; line-height: 1;
  display: grid; place-items: center;
  transition: opacity .3s ease, color .3s ease, border-color .3s ease, background-color .3s ease;
}
.work__page:hover { opacity: 1; }
.work__page.is-current { opacity: 1; }
.work__page:focus-visible { outline: none; border-color: var(--new-green); color: var(--new-green); opacity: 1; }

/* ---------- CTA ---------- */
.work__cta { padding: 0 20px; }

@media (max-width: 760px) {
  .wf__row { flex-direction: column; align-items: flex-start; }
  .work-grid--page { margin-top: 40px; }
}

/* ---------- Column toggle (2 / 3 / 4) ---------- */
.wf__cols { display: flex; align-items: center; gap: 12px; flex: none; }
.wf__col {
  appearance: none; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--white);
  display: flex; gap: 2px; height: 20px; align-items: stretch; opacity: .35;
  transition: opacity .3s ease, color .3s ease;
}
.wf__col i { display: block; width: 5px; border: 1px solid currentColor; border-radius: 1px; }
.wf__col[data-cols="2"] i { width: 8px; }
.wf__col[data-cols="3"] i { width: 5px; }
.wf__col[data-cols="4"] i { width: 3.5px; }
.wf__col:hover, .wf__col:focus-visible { opacity: 1; }
.wf__col.is-on { opacity: 1; color: var(--new-green); }
.wf__col.is-on i { background: currentColor; }
.wf__col:focus-visible { outline: 1px solid var(--new-green); outline-offset: 2px; }

.work-grid--page[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 80px; }
.work-grid--page[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 60px; }
.work-grid--page[data-cols="4"] .card-title { font-size: 16px; }
.work-grid--page[data-cols="4"] .project__meta { gap: 12px; }
@media (max-width: 1180px) {
  .work-grid--page[data-cols="4"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .wf__cols { display: none; }
  .work-grid--page[data-cols] { grid-template-columns: 1fr; row-gap: 60px; }
}

/* both rows' first option ("all") start on the same line */
.wf__group > .wf__label { flex: none; width: 60px; }
.wf__row:not(.wf__row--topic) .wf__group > .wf__label { margin-right: 4px; } /* this row's options sit 10px apart vs 14px above */
