/* /work — dark page hero with a chart card, the case-study wall (filter + before/after wipe).
   The /work wall uses the large two-column cards (.cs); the category pages reuse .wc and .wp.
   Without work.js every card shows, .cs cards in their "after" state, .wc wipes at the middle. */

/* ---------- hero ---------- */
.wh .ph__dots { background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.5px); }
.wh .ph__lead { max-width: 50ch; }
.wh__card { position: relative; display: grid; gap: 16px; padding: 20px; border-radius: 28px; background: #1a1a1d; box-shadow: inset 0 0 0 1px var(--line2), 0 40px 90px -40px rgba(255, 61, 129, .35); }
.wh__top { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; color: var(--mut); }
.wh__top span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }
.wh__ch { position: relative; height: 210px; overflow: hidden; border-radius: 16px; background: #141416; }
.wh__ch svg { width: 100%; height: 100%; }
.wh__grid { stroke: rgba(255, 255, 255, .07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wh__ln { fill: none; stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
/* the chart draws in as a cover slides off it (transform only) */
.wh__wipe { position: absolute; inset: 0; background: #141416; transform-origin: 100% 50%; transform: scaleX(0); }
.motion .wh__wipe { animation: wh-draw 1.8s var(--ease-io) .5s both; }
@keyframes wh-draw { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.wh__leg { display: grid; gap: 8px; }
.wh__leg li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); }
.wh__leg i { width: 10px; height: 10px; border-radius: 50%; }
.wh__leg b { font-size: 13px; font-weight: 600; }
.wh__leg .mono { font-size: 12px; }
.wh__leg small { grid-column: 2 / -1; font-size: 10px; color: var(--mut); }
.wh__ft { font-size: 10px; color: var(--mut); }
.motion .wh__card { animation: hero-in 1s var(--ease) .35s both; }

/* ---------- wall ---------- */
.wl { padding-top: var(--sy-in); }
/* toolbar: label, channel filter, live count */
.wl__tb { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: clamp(36px, 4vw, 56px); padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.wl__lb { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.wl__tb .wl__bar { margin: 0; }
.wl__ct { display: flex; align-items: baseline; gap: 10px; margin-left: auto; }
.wl__ct b { font-size: clamp(1.8rem, 2.6vw, 2.4rem); font-weight: 600; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.wl__ct span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.wl__ft { display: grid; gap: 14px; margin-top: clamp(48px, 5vw, 72px); padding-top: 24px; border-top: 1px solid var(--line); }
.wl__ft .wl__note { margin: 0; }
.wl__svc { color: var(--mut); }
.wl__svc a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 3px; }
.wl__svc a:hover { color: var(--pink); }
.wl__bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
html:not(.js) .wl__bar, html:not(.js) .wl__lb { display: none; }
.wl__f { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; font-size: 12px; color: var(--fg); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); cursor: pointer; transition: background .25s, color .25s; }
.wl__f span { color: var(--mut); }
.wl__f:hover { background: rgba(255, 255, 255, .12); }
.wl__f[aria-pressed="true"] { color: #111; background: #fff; box-shadow: none; }
.wl__f[aria-pressed="true"] span { color: #66666f; }
.wl__f:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.wl__grp + .wl__grp { margin-top: clamp(56px, 6vw, 88px); }
.wl__grp[hidden] { display: none; }
.wl__gh { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 12px; font-weight: 400; color: var(--mut); }
h2.wl__gh { margin-bottom: 24px; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -.03em; color: var(--fg); }
.wl__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.wl__grid--plain { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wc[hidden] { display: none; }
.wl__note { margin-top: 32px; font-size: 10.5px; color: var(--mut); }

/* ---------- /work: large case cards, two staggered columns (as the reference /work page) ----------
   .cs--l / .cs--r = column, .cs--a / .cs--b = picture shape; work.js re-deals both after a filter. */
.cs-grid { --off: clamp(0px, 10vw, 150px); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; gap: clamp(48px, 5vw, 72px) clamp(20px, 2.4vw, 36px); padding-bottom: var(--off); }
.cs--r { translate: 0 var(--off); }
.cs[hidden] { display: none; }
.cs__in { position: relative; display: grid; gap: 22px; }
.cs__vis { --p: 1; position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 24px; background: #16181b; isolation: isolate; }
.cs--l.cs--a .cs__vis { aspect-ratio: 16 / 11; }
.cs--l.cs--b .cs__vis { aspect-ratio: 5 / 4; }
.cs--r.cs--a .cs__vis { aspect-ratio: 1 / 1; }
.cs--r.cs--b .cs__vis { aspect-ratio: 5 / 6; }
.cs__a, .cs__b { position: absolute; inset: 0; }
.cs__vis img:not(.cs__id img) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease); }
.cs__in:hover .cs__vis img:not(.cs__id img) { scale: 1.04; }
/* before: the same picture, grey and dark, cut away from the top as the card scrolls up */
.cs__b { clip-path: inset(calc(var(--p) * 100%) 0 0 0); }
.cs__b img:not(.cs__id img) { filter: grayscale(1) brightness(.5) contrast(1.08); }
.cs__b .cs__id, .cs__b .cs__ch { filter: grayscale(1) brightness(.6); }
.cs__vis--seo:not(.cs__vis--ph) > div { background: radial-gradient(110% 80% at 80% 0%, rgba(123, 77, 255, .5), transparent 62%), #16181b; }
.cs__vis--google-ads:not(.cs__vis--ph) > div { background: radial-gradient(110% 80% at 80% 0%, rgba(255, 122, 0, .45), transparent 62%), #16181b; }
.cs__vis--meta-ads:not(.cs__vis--ph) > div { background: radial-gradient(110% 80% at 80% 0%, rgba(58, 141, 255, .45), transparent 62%), #16181b; }
.cs__vis--ph .cs__a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28), transparent 30%); pointer-events: none; }
.cs__id { position: absolute; left: 50%; top: 40%; translate: -50% -50%; display: grid; place-items: center; width: clamp(96px, 22%, 150px); aspect-ratio: 8 / 5; padding: 12px 16px; border-radius: 18px; font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -.05em; color: #111; background: #fff; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.cs__id img { width: 100%; height: 100%; object-fit: contain; }
.cs__ch { position: absolute; left: 0; bottom: 0; width: 100%; height: 60%; overflow: visible; }
.cs__ln { fill: none; stroke: url(#wc-grad); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 10px rgba(255, 61, 129, .6)); }
.cs__ar { fill: rgba(255, 61, 129, .14); }
.cs__fl { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 1.5; stroke-dasharray: 5 6; vector-effect: non-scaling-stroke; }
/* scan line riding the edge of the wipe */
.cs__scan { position: absolute; z-index: 2; inset: 0; translate: 0 calc(var(--p) * 100%); opacity: min(calc(var(--p) * 30), calc((1 - var(--p)) * 30)); pointer-events: none; }
.cs__scan::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--grad); box-shadow: 0 0 18px 3px rgba(255, 61, 129, .55); }
.cs__who { position: absolute; z-index: 3; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 11.5px; color: #111; background: #fff; }
.cs__who i { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.cs__st { position: absolute; z-index: 3; right: 14px; top: 14px; display: grid; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.cs__st span { grid-area: 1 / 1; padding: 6px 12px; border-radius: 999px; text-align: center; transition: opacity .35s; }
.cs__st span:first-child { color: rgba(255, 255, 255, .86); background: rgba(8, 9, 10, .45); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); opacity: 0; }
.cs__st span:last-child { color: #111; background: var(--grad-warm); }
.cs__vis.is-b .cs__st span:first-child { opacity: 1; }
.cs__vis.is-b .cs__st span:last-child { opacity: 0; }
/* "View case" badge: follows the pointer over the picture (work.js), centred without it */
.cs__view { position: absolute; z-index: 4; left: var(--vx, 50%); top: var(--vy, 50%); translate: -50% -50%; pointer-events: none; }
.cs__view b { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: #111; background: var(--grad-warm); box-shadow: 0 16px 40px -12px rgba(255, 61, 129, .7); opacity: 0; scale: .6; transition: opacity .3s, scale .4s var(--ease); }
.cs__view .icon { width: 13px; height: 13px; }
.cs__vis.is-v .cs__view b, html:not(.js) .cs__in:hover .cs__view b { opacity: 1; scale: 1; }
.cs__body { display: grid; gap: 14px; }
.cs__kick { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.cs__t { max-width: 26ch; margin: 0; font-size: clamp(1.45rem, 2vw, 1.85rem); font-weight: 500; line-height: 1.15; letter-spacing: -.03em; color: rgba(245, 245, 245, .78); text-wrap: balance; }
.cs__cl { font-weight: 600; color: var(--fg); }
.cs__lnk::after { content: ""; position: absolute; inset: 0; z-index: 5; }
.cs__lnk:focus-visible { outline: none; }
.cs__lnk:focus-visible::after { border-radius: 24px; outline: 2px solid var(--pink); outline-offset: 4px; }
.cs__in:hover .cs__t { color: rgba(245, 245, 245, .92); }
.cs__m { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; padding-top: 16px; border-top: 1px solid var(--line2); }
.cs__m > .mono { display: grid; gap: 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.cs__m small { font-size: 10px; letter-spacing: .04em; color: rgba(163, 163, 173, .7); }
.cs__n { display: inline-flex; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs__n s { font-size: 1.25rem; font-weight: 500; text-decoration: none; color: rgba(255, 255, 255, .55); }
.cs__n i { font-style: normal; color: rgba(255, 255, 255, .45); }
.cs__n b { font-size: clamp(2.2rem, 3.2vw, 2.8rem); font-weight: 600; line-height: 1; letter-spacing: -.045em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cs__body .pills li { color: var(--fg); }
.wl__grp--plain { margin-top: clamp(72px, 8vw, 120px); }

/* numeric card (category pages) */
.wc__in { position: relative; display: flex; flex-direction: column; height: 100%; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: box-shadow .3s; }
.wc__in:hover, .wc__in:focus-within { box-shadow: inset 0 0 0 1px var(--line2), 0 30px 60px -30px rgba(255, 61, 129, .4); }
.wc__vis { --dv: .5; position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #0b0b0c; touch-action: pan-y; user-select: none; }
.js .wc__vis { --dv: .94; }
.js .wc.is-in .wc__vis { --dv: .5; }
.wc__a, .wc__b, .wc__bi { position: absolute; inset: 0; }
.wc__a img, .wc__bi img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wc__a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 17, 17, .35), transparent 35%, rgba(17, 17, 17, .75)); }
.wc__bi img { filter: grayscale(1) brightness(.45); }
/* before layer: slides in from the left; its inner copy slides the other way so the picture stays still */
.wc__b { overflow: hidden; transform: translateX(calc((var(--dv) - 1) * 100%)); transition: transform .9s var(--ease); }
.wc__bi { background: #18181b; transform: translateX(calc((1 - var(--dv)) * 100%)); transition: transform .9s var(--ease); }
.wc__b::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 18px 2px rgba(255, 61, 129, .6); }
.wc__vis.is-move .wc__b, .wc__vis.is-move .wc__bi { transition: none; }
/* no photo: brand-tinted backgrounds with the client's initial */
.wc__vis--seo .wc__a { background: radial-gradient(120% 90% at 85% 10%, rgba(123, 77, 255, .55), transparent 60%), #141416; }
.wc__vis--google-ads .wc__a { background: radial-gradient(120% 90% at 85% 10%, rgba(255, 122, 0, .5), transparent 60%), #141416; }
.wc__vis--meta-ads .wc__a { background: radial-gradient(120% 90% at 85% 10%, rgba(58, 141, 255, .5), transparent 60%), #141416; }
.wc__mono { position: absolute; right: 6%; top: 50%; translate: 0 -58%; font-size: clamp(6rem, 12vw, 9rem); font-weight: 600; line-height: 1; letter-spacing: -.06em; color: rgba(255, 255, 255, .06); }
.wc__ch { position: absolute; z-index: 1; left: 0; bottom: 0; width: 100%; height: 72%; overflow: visible; }
.wc__ln { fill: none; stroke: url(#wc-grad); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 8px rgba(255, 61, 129, .6)); }
.wc__ar { fill: rgba(255, 61, 129, .16); }
.wc__fl { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 1.5; stroke-dasharray: 5 6; vector-effect: non-scaling-stroke; }
.wc__v { position: absolute; z-index: 2; bottom: 16px; display: grid; gap: 8px; }
.wc__v b { font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 600; line-height: .9; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.wc__v--a { right: 16px; justify-items: end; }
.wc__v--a b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wc__v--b { left: 16px; top: 16px; bottom: auto; justify-items: start; }
.wc__v--b b { color: transparent; -webkit-text-stroke: 1.2px rgba(255, 255, 255, .75); }
.wc__v--b .chip { color: #fff; background: rgba(17, 17, 17, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.wc__logo { position: absolute; z-index: 3; right: 14px; top: 14px; display: grid; place-items: center; width: 64px; height: 40px; padding: 6px 8px; border-radius: 10px; background: #fff; }
.wc__logo img { width: 100%; height: 28px; object-fit: contain; }
.wc__tag { position: absolute; z-index: 3; left: 50%; bottom: 0; translate: -50% 0; padding: 4px 10px; border-radius: 8px 8px 0 0; font-size: 9.5px; color: #111; background: #fff; }
.wc__body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 20px 20px 22px; }
.wc__kick { font-size: 10.5px; color: var(--mut); }
.wc__t, .wp__t { margin: 0; }
.wc__t { font-size: 1.2rem; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
.wc__lnk::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; }
.wc__lnk:focus-visible { outline: none; }
.wc__lnk:focus-visible::after { outline: 2px solid var(--pink); outline-offset: -2px; }
.wc__m { display: grid; gap: 3px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); }
.wc__m .mono { font-size: 10px; color: var(--mut); }
.wc__m b { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wc__m small { font-size: 10px; color: var(--mut); }
.wc__s { font-size: .9rem; line-height: 1.55; color: var(--mut); }
.wc__ft { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.wc__ft .pills li { color: var(--fg); }
.wc__go { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg); }
.wc__go .icon { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.wc__in:hover .wc__go { color: var(--pink); }
.wc__in:hover .wc__go .icon { transform: translate(2px, -2px); }
.wc__soon { font-size: 10.5px; color: var(--mut); }

/* plain (portfolio) card */
.wp { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 18px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.wp__id { display: grid; place-items: center; width: 84px; height: 52px; margin-bottom: 6px; padding: 8px 10px; border-radius: 12px; background: #fff; }
.wp__id img { width: 100%; height: 36px; object-fit: contain; }
.wp__id span { font-size: 1.6rem; font-weight: 600; letter-spacing: -.04em; color: #111; }
.wp__kick { font-size: 10px; color: var(--mut); }
.wp__t { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; }
.wp__q { font-size: .9rem; font-weight: 500; line-height: 1.4; }
.wp__s { font-size: .85rem; line-height: 1.5; color: var(--mut); }
.wp .pills { margin-top: auto; padding-top: 4px; }
.wp .pills li { color: var(--fg); }

@media (max-width: 1180px) {
  .wl__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wl__grid--plain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1099px) {
  .wh__card { max-width: 560px; }
}
@media (max-width: 899px) {
  .cs-grid { --off: 0px; grid-template-columns: minmax(0, 1fr); }
  .cs-grid .cs__vis { aspect-ratio: 4 / 3; }
  .wl__ct { margin-left: 0; }
}
@media (max-width: 700px) {
  .wl__grid, .wl__grid--plain { grid-template-columns: minmax(0, 1fr); }
  .wl__grid--plain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wl__bar { flex-wrap: nowrap; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); overflow-x: auto; scrollbar-width: none; }
  .wl__f { flex: none; }
  .wl__tb .wl__bar { width: calc(100% + var(--pad) * 2); margin-inline: calc(var(--pad) * -1); }
  .cs__n b { font-size: 2rem; }
}
@media (max-width: 420px) {
  .wl__grid--plain { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .wc__b, .wc__bi { transition: none; }
  .cs__vis img:not(.cs__id img), .cs__view b { transition: none; }
}
