/* ============ Work category pages (work-*.html): clients with small animated galleries ============ */
.cat-hero { position: relative; min-height: 70svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-bottom: 1px solid var(--line-dark); }
.cat-intro { position: relative; z-index: 2; max-width: 56ch; padding: 0 var(--pad) clamp(28px, 4vw, 48px); font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.55; color: rgba(255, 255, 255, .78); opacity: 0; transform: translateY(14px); animation: p-rise 1s var(--ease) .8s forwards; }

/* client list */
.cat-list { padding: 0 0 clamp(30px, 5vw, 60px); }
.cat-client { display: block; border-bottom: 1px solid var(--line-dark); padding: clamp(22px, 3vw, 36px) 0 clamp(26px, 3.4vw, 40px); opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1.1s var(--ease), background .5s var(--ease); }
.cat-client.in { opacity: 1; transform: none; }
.cat-client:hover { background: rgba(255, 255, 255, .025); }
.cc-top { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px 24px; padding: 0 var(--pad); }
.cc-num { font-family: var(--display); font-size: 1.3rem; color: var(--blue-soft); }
.cc-name { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 6vw, 6rem); line-height: .9; text-transform: uppercase; transition: color .4s var(--ease), transform .7s var(--ease); }
.cc-meta { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-dark); text-align: right; }
.cc-go { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 1.2rem; transition: background .4s var(--ease), border-color .4s, transform .5s var(--ease); }
.cat-client:hover .cc-name { color: var(--blue-soft); transform: translateX(12px); }
.cat-client:hover .cc-go { background: var(--blue); border-color: var(--blue); transform: rotate(-45deg); }
.cc-placeholder { display: inline-block; margin-left: 12px; vertical-align: middle; font-family: var(--body); font-size: .62rem; font-weight: 600; letter-spacing: .14em; color: var(--night); background: rgba(255, 255, 255, .7); padding: 4px 7px 3px; border-radius: 3px; transform: translateY(-.6em); }

/* the small animated gallery: a row of tiles that slides on its own and speeds up on hover */
.cc-gallery { margin-top: clamp(18px, 2.4vw, 28px); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.cc-track { display: flex; gap: 12px; width: max-content; animation: cc-slide var(--dur, 42s) linear infinite; animation-direction: var(--dir, normal); }
.cat-client:hover .cc-track { animation-duration: calc(var(--dur, 42s) / 2.4); }
@keyframes cc-slide { to { transform: translateX(-50%); } }
.cc-tile { position: relative; flex: none; height: clamp(150px, 17vw, 230px); aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: linear-gradient(140deg, hsl(var(--h, 232) 45% 24%), #141418 62%, hsl(calc(var(--h, 232) + 30) 52% 20%)); transition: transform .6s var(--ease), filter .4s; }
.cc-tile.wide { aspect-ratio: 16 / 10; }
.cc-tile.tall { aspect-ratio: 9 / 14; }
.cc-tile img, .cc-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cc-tile:empty::before, .cc-tile.v:not(:has(img, video))::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%); background-size: 250% 100%; animation: g-shine 3.4s ease-in-out infinite; }
.cc-tile:empty::after { content: attr(data-label); position: absolute; left: 10px; bottom: 8px; font-family: var(--display); font-size: 1rem; letter-spacing: .04em; color: rgba(255, 255, 255, .35); }
.cc-tile.v::after { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l8 5-8 5z' fill='white'/%3E%3C/svg%3E") center / 20px no-repeat; }
.cat-client:hover .cc-tile { filter: brightness(1.15); }
.cc-tile:nth-child(odd) { transform: translateY(6px); }

/* other categories */
.cat-others { padding: clamp(30px, 5vw, 60px) var(--pad) 0; }
.cat-others ul { margin-top: 16px; border-top: 1px solid var(--line-dark); }
.cat-others a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-dark); font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 3.4rem); line-height: 1; text-transform: uppercase; transition: color .35s, padding .5s var(--ease); }
.cat-others a span { color: var(--blue-soft); font-size: .6em; }
.cat-others a:hover { color: var(--blue-soft); padding-left: 10px; }

@media (max-width: 820px) {
  .cat-hero { min-height: 60svh; }
  .cc-top { grid-template-columns: auto 1fr auto; }
  .cc-meta { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .cc-go { width: 42px; height: 42px; }
  .cc-tile { height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-track { animation: none; }
  .cat-client { opacity: 1; transform: none; transition: none; }
  .cat-intro { animation: none; opacity: 1; transform: none; }
}
