/* Redlab — Work, the alternative (v13, "index"): Phenomenon's case index in Redlab's system. Loaded after base.css,
   blocks.css, service.css and hub.css. The title with the filter tabs on its row (real pages), then one project per
   row: the cover on the left (7 of 12 columns, the project's real screens playing as a reel, js/work-alt.js), on the
   right the services as tags, "Client – what we made" as the title, where and what field, the stack and dates in a
   two-cell table, what came of it, and the way to the case. Client reviews stand between rows, after their project.
   Scoped by [data-page='work'] where the preview keeps only the body's data-page. */

/* 1. Hero: crumbs, the title, the tabs on its baseline. */
.wy-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: clamp(32px, 6vw, 120px); row-gap: 20px; padding-block: clamp(24px, 4vh, 48px) clamp(40px, 6vh, 72px); }
.wy-hero .crumbs { grid-column: 1 / -1; }
.wy-title { font-size: var(--t-title); line-height: .92; letter-spacing: -.055em; }
.wy-filter { padding-bottom: 10px; }
.wf-chips { display: inline-flex; gap: 4px; padding: 5px; border-radius: var(--r-pill); background: var(--surface); }
.wf-chip { padding: 11px 22px; border-radius: var(--r-pill); font-size: var(--t-body); font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease); }
.wf-chip:hover { background: var(--white); }
.wf-chip[aria-current='page'] { background: var(--ink); color: #fff; }

/* 2. The rows. */
.wy-list { overflow-anchor: none; transition: opacity .16s var(--ease); }
.wy-list.is-swapping { opacity: 0; }
.wz-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(28px, 4vw, 72px); align-items: start; padding-block: clamp(32px, 3vw, 44px) clamp(64px, 7vw, 112px); border-top: 1px solid var(--hair); }
.wz-row[hidden], .wz-review[hidden] { display: none; }

/* The cover: the project's field, the picture on top; the cut between screens draws on a canvas over it. It stays
   in view while the text beside it is read. */
.wy-cover { grid-column: 1 / span 7; position: sticky; top: 96px; isolation: isolate; display: block; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--r-l); background: var(--tone, var(--surface)); }
.wy-pic { position: absolute; inset: 0; transition: transform .9s var(--ease); }
.wy-pic img, .wy-cut { position: absolute; inset: 0; width: 100%; height: 100%; }
.wy-pic img { object-fit: cover; }
.wy-cut { z-index: 1; pointer-events: none; }

/* The cover's caption: which screen is on, and how many there are. */
.wz-cap { position: absolute; z-index: 3; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 12px; padding: 7px 14px 7px 12px; border-radius: var(--r-pill); background: rgb(14 15 17 / .42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 13px; line-height: 1; color: #fff; }
.wy-ticks { display: flex; gap: 5px; }
.wy-ticks i { position: relative; width: 18px; height: 2px; overflow: hidden; border-radius: 1px; background: rgb(255 255 255 / .35); }
.wy-ticks i::after { content: ''; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.wy-ticks i.is-past::after { transform: none; }
.is-playing .wy-ticks i.is-now::after { animation: wy-fill var(--hold, 2800ms) linear forwards; }
@keyframes wy-fill { to { transform: none; } }
.wz-cap.is-dark { background: rgb(255 255 255 / .62); color: var(--ink); }
.wz-cap.is-dark .wy-ticks i { background: rgb(23 25 25 / .18); }
.wz-cap.is-dark .wy-ticks i::after { background: var(--ink); }

/* The text: services, the title, where, the table, what came of it, the way on. */
.wz-text { grid-column: 8 / -1; min-width: 0; padding-top: 4px; }
.wz-tags { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--t-label); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.wz-tags a { color: var(--muted); text-decoration: none; transition: color .2s var(--ease); }
.wz-tags a::before, .wz-tags span::before { content: '#'; }
.wz-tags span { color: var(--muted); }
.wz-tags a:hover { color: var(--ink); }
.wz-title { margin-top: 16px; font-size: clamp(26px, .9vw + 18px, 36px); font-weight: 500; line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.wz-title a { color: var(--ink-2); text-decoration: none; transition: color .2s var(--ease); }
.wz-title b { font-weight: 500; color: var(--ink); }
.wz-row:hover .wz-title a, .wz-title a:focus-visible { color: var(--ink); }
.wz-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.wz-facts li { padding: 7px 14px; border-radius: var(--r-pill); background: var(--surface); font-size: var(--t-small); color: var(--ink-2); }
.wz-spec { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 24px; margin-top: 32px; }
.wz-spec div { padding-top: 12px; border-top: 1px solid var(--hair); }
.wz-spec div:only-child { grid-column: 1 / -1; }
.wz-spec dt, .wz-label { font-size: var(--t-label); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wz-spec dd { margin-top: 8px; font-size: var(--t-body); line-height: 1.45; color: var(--ink); }
.wz-done { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--hair); }
.wz-done ul { display: grid; gap: 6px; margin-top: 10px; }
.wz-done li { font-size: var(--t-body); line-height: 1.45; color: var(--ink); }
.wz-cta { margin-top: 32px; }
.wz-live::after { content: '↗'; }
.wz-cta:not(.wz-live)::after { content: '→'; }
.wz-cta::after { margin-left: 10px; transition: transform .25s var(--ease); }
.wz-cta:hover::after { transform: translateX(3px); }
.wz-more { display: inline-flex; align-items: center; gap: 12px; margin-top: 32px; font-size: var(--t-small); font-weight: 500; color: var(--ink); text-decoration: none; }
.wz-more::after { content: '→'; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--hair); border-radius: 50%; background: var(--white); transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease); }
@media (hover: hover) {
  .wz-row:hover .wy-pic { transform: scale(1.02); }
  .wz-row:hover .wz-more::after, .wz-more:focus-visible::after { border-color: var(--ink); background: var(--ink); color: #fff; transform: rotate(-45deg); }
}
.wz-title a:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 4px; }

/* 3. A client's word, after its project: a surface card like the homepage reviews. Who said it at the top, the
   quote mark large and quiet in the corner, the words under them at a size between the row titles and the H1. */
.wz-review { padding-bottom: clamp(64px, 7vw, 112px); }
.wz-review figure { position: relative; display: grid; gap: clamp(24px, 2.6vw, 38px); padding: clamp(28px, 4vw, 56px); border: 1px solid var(--hair); border-radius: var(--r-l); background: var(--surface); }
.wz-row:has(+ .wz-review:not([hidden])) { padding-bottom: 40px; }
.wz-review figure::after { content: ''; position: absolute; top: clamp(28px, 4vw, 56px); right: clamp(28px, 4vw, 56px); width: 64px; height: 52px; background: color-mix(in srgb, var(--ink) 9%, var(--surface)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 52'%3E%3Cpath d='M0 26C0 10 9 1 26 0v10c-8 1.5-12 6-12.5 13H26v29H0zM38 26C38 10 47 1 64 0v10c-8 1.5-12 6-12.5 13H64v29H38z'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 52'%3E%3Cpath d='M0 26C0 10 9 1 26 0v10c-8 1.5-12 6-12.5 13H26v29H0zM38 26C38 10 47 1 64 0v10c-8 1.5-12 6-12.5 13H64v29H38z'/%3E%3C/svg%3E") no-repeat center / contain; pointer-events: none; }
.wz-review figcaption { display: flex; align-items: center; gap: 16px; padding-right: 120px; }
.wz-ava { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--tone, var(--ink)); font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: #fff; }
.wz-ava.is-light { color: var(--ink); }
.wz-review figcaption b { display: block; font-size: var(--t-h3); font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.wz-review figcaption span span { display: block; margin-top: 6px; font-size: var(--t-body); color: var(--muted); }
.wz-review blockquote p { max-width: 24em; text-wrap: pretty; font-size: clamp(26px, 1.4vw + 16px, 40px); font-weight: 400; line-height: 1.3; letter-spacing: -.025em; color: var(--ink); }

/* The assistant's bar would ride over the covers: it waits until the list has left the middle of the screen. */
[data-page='work'] .agent { opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
[data-page='work'].wx-agent-on .agent { opacity: 1; transform: none; pointer-events: auto; }
/* The closing brief: no Clutch line here, so the person who answers sits right under the promises. */
[data-page='work'] .brief .person { margin-top: 0; }

/* Narrower screens: the cover across the row, the text under it. */
@media (max-width: 1000px) {
  .wy-cover { grid-column: 1 / -1; position: relative; top: auto; }
  .wz-text { grid-column: 1 / -1; max-width: 720px; padding-top: 28px; }
}
@media (max-width: 760px) {
  .wy-hero { grid-template-columns: 1fr; }
  .wy-filter { padding-bottom: 0; }
  .wf-chips { display: flex; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .wf-chips::-webkit-scrollbar { display: none; }
  .wf-chip { flex: none; padding: 9px 18px; font-size: var(--t-small); }
  .wz-row { padding-block: 16px 56px; }
  .wy-cover { aspect-ratio: 4 / 3; border-radius: var(--r-m); }
  .wz-cap { left: 12px; bottom: 12px; padding: 6px 12px 6px 10px; font-size: 12px; }
  .wz-text { padding-top: 22px; }
  .wz-spec { column-gap: 16px; margin-top: 24px; }
  .wz-cap-t { display: none; }
  .wz-cap { padding: 8px 10px; }
  .wz-review { padding-bottom: 56px; }
  .wz-review figure { gap: 24px; padding: 24px; border-radius: var(--r-m); }
  .wz-row:has(+ .wz-review:not([hidden])) { padding-bottom: 24px; }
  .wz-review figure::after { top: 24px; right: 24px; width: 40px; height: 33px; }
  .wz-review figcaption { gap: 12px; padding-right: 40px; }
  .wz-review figcaption span span { font-size: var(--t-small); }
  .wz-ava { width: 48px; height: 48px; font-size: 16px; }
  .wz-review blockquote p { font-size: 22px; line-height: 1.32; }
  [data-page='work'] .agent { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wy-list, .wy-pic, .wz-more::after, .wz-cta::after, [data-page='work'] .agent { transition: none; }
}
