/* Our work (/work.html) and case study pages (/work/<slug>.html).
   Loaded after styles.css + pages.css. Behaviour lives in /js/work.js.
   Patterns borrowed from ramp.design (editorial paired grid, autoplaying muted media, "View" cursor label)
   and Square / Notion customer pages (featured story stage, service + industry filters). */

.nw { white-space: nowrap; } /* keeps hyphenated words (in-house, AI-powered) on one line */
.w-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Page transitions: tile media morphs into the case study hero (Chrome cross-document view transitions) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(cs-hero) { animation-duration: .55s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(cs-hero), ::view-transition-new(cs-hero) { height: 100%; object-fit: cover; overflow: clip; }
::view-transition-old(root) { animation: wvt-out .25s ease both; }
::view-transition-new(root) { animation: wvt-in .4s .1s ease both; }
@keyframes wvt-out { to { opacity: 0; } }
@keyframes wvt-in { from { opacity: 0; } }

/* ---------- Hero + featured stage ---------- */
.whero-head { text-align: center; max-width: 1000px; margin: 0 auto; }
.whero-head .eyebrow { display: inline-block; margin-bottom: 16px; }
.whero-head h1 { font-size: 60px; line-height: 64px; font-weight: 800; letter-spacing: -0.04em; }
.whero-head .lead { max-width: 640px; margin: 20px auto 0; }


/* Featured names: an editorial text row instead of boxed tabs (ramp.design nav weight shift + Square's hairline list).
   Active name is black, the rest sit back in grey; a hairline under each name fills while its slide plays. */
/* Holds while the pointer is over the stage or names, while a keyboard user is in it, or when paused */
/* Pause: a bare white icon in the stage corner, no box */
.wt-link:focus-visible, .cg-item:focus-visible, .cs-play:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

/* ---------- Gallery header + sticky filters ---------- */
.wgallery { padding: 112px 0 40px; }
/* Result count as a superscript on the heading, matching the filter counts */
/* Stuck: the bar and the frosted site header read as one surface. The ::before fills in behind the header
   (z-index 20 < header 50), so the header's own frost sits on the same white and no seam shows between them. */

/* Text filters: words, superscript counts, one black underline that slides to the active option */

/* Industry toggle: inline text with a chevron, folds open a second text row */

/* ---------- Editorial grid (ramp.design-style paired rows) ---------- */
.wgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px 24px; }
.wtile { grid-column: span 6; min-width: 0; }
.wtile.w5 { grid-column: span 5; } .wtile.w7 { grid-column: span 7; } .wtile.w12 { grid-column: span 12; } .wtile.w4 { grid-column: span 4; }
.wtile[hidden] { display: none; }
/* Filter change: the grid fades out, re-flows while hidden, then tiles rise back in one after another */
.wgrid { transition: opacity .2s ease, transform .2s ease; }
.wgrid.is-out { opacity: 0; transform: translateY(6px); }
.wtile.is-in { animation: wtileIn .7s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes wtileIn { from { opacity: 0; transform: translateY(20px) scale(.985); } }
.wt-link { display: block; border-radius: var(--r-card); }
.wt-media { position: relative; height: clamp(300px, 34vw, 500px); border-radius: var(--r-card); overflow: hidden; background: var(--tint, var(--black)); isolation: isolate; }
.w12 .wt-media { height: clamp(320px, 44vw, 600px); }
.w4 .wt-media { height: clamp(260px, 26vw, 340px); }
.wt-img, .wt-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.22, 1, .36, 1), opacity .5s ease; }
.wt-clip { opacity: 0; }
.wt-clip.is-playing { opacity: 1; }
.wt-media.is-portrait .wt-clip { object-fit: contain; background: rgba(0, 0, 0, .55); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
/* Even darkening across the tile so the centred white logo reads on any image */
.wt-media::after { content: ""; position: absolute; inset: 0; background: rgba(27, 27, 27, .28); pointer-events: none; z-index: 1; transition: background-color .4s ease; }
.wt-link:hover .wt-media::after { background: rgba(27, 27, 27, .12); }
.wt-logo { position: absolute; z-index: 2; left: 50%; top: 50%; translate: -50% -50%; width: auto; max-width: min(320px, 60%); filter: brightness(0) invert(1); transition: opacity .4s; }
.wt-go { position: absolute; z-index: 2; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--white); background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color .25s, color .25s, opacity .25s; }
.wt-go svg { width: 18px; height: 18px; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.wt-link:hover .wt-img, .wt-link:focus-visible .wt-img { transform: scale(1.04); }
.wt-link:hover .wt-go, .wt-link:focus-visible .wt-go { background: rgba(255, 255, 255, .92); color: var(--black); }
.wt-link:hover .wt-go svg { transform: translate(2px, -2px); }

/* Desktop pointer: the "View" label replaces the arrow chip and system cursor over media */
.has-wcursor [data-cursor], .has-wcursor [data-cursor] * { cursor: none; }
.has-wcursor .wt-go { opacity: 0; }
.wcursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; display: none; }
.has-wcursor .wcursor { display: block; }
.wcursor span { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px 0 18px; border-radius: 999px; background: var(--purple); color: var(--white); font-size: 14px; font-weight: 600; white-space: nowrap; transform: translate(-50%, -50%) scale(.4); opacity: 0; transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .2s; box-shadow: 0 10px 30px rgba(120, 82, 212, .35); }
.wcursor.on span { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.wcursor svg { width: 14px; height: 14px; transform: translate(-3px, 3px); opacity: 0; transition: transform .45s .05s cubic-bezier(.22, 1, .36, 1), opacity .3s .05s; }
.wcursor.on svg { transform: none; opacity: 1; }

/* ---------- Video story + quotes ---------- */

/* ---------- Case study pages ---------- */
.cs-hero { padding: 120px 0 0; }
.cs-crumb { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--label); margin-bottom: 40px; }
/* Breadcrumb: the earlier page is grey, the current page black; hover and press go black, never purple */
.cs-crumb a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--label); transition: color .2s; }
.cs-crumb a:hover, .cs-crumb a:active, .cs-crumb a:focus-visible { color: var(--black); }
.cs-crumb [aria-current="page"] { color: var(--black); }
.cs-crumb svg { width: 16px; height: 16px; }
.cs-head { display: block; }
.cs-logo { width: auto; max-width: 220px; margin-bottom: 28px; }
.cs-logo.to-black { filter: brightness(0); }
.cs-title h1 { font-size: 52px; line-height: 58px; font-weight: 800; letter-spacing: -0.04em; }
.cs-title .lead { margin-top: 20px; max-width: 640px; }
/* Facts: one quiet row of three under the headline, hairline on top, no card */
.cs-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.cs-facts div { padding: 0; }
.cs-facts dt { font-size: 13px; font-weight: 600; color: var(--label); margin-bottom: 4px; }
.cs-facts dd { font-size: 16px; line-height: 24px; font-weight: 600; }
/* Services are separate items: a comma list on desktop, pills on phones */
.cs-fact-svc dd span + span::before { content: ", "; }
.cs-stage { position: relative; margin-top: 56px; height: clamp(360px, 50vw, 640px); border-radius: var(--r-panel); overflow: hidden; background: var(--tint, var(--black)); view-transition-name: cs-hero; isolation: isolate; }
.cs-img, .cs-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-clip { opacity: 0; transition: opacity .8s ease; }
.cs-clip.is-playing { opacity: 1; }
.cs-stage.is-portrait .cs-clip { object-fit: contain; background: rgba(0, 0, 0, .5); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); }
.cs-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(27, 27, 27, .5), rgba(27, 27, 27, 0) 40%); pointer-events: none; }
.cs-play { position: absolute; z-index: 2; left: 32px; bottom: 32px; display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px 0 8px; border-radius: 999px; background: var(--white); color: var(--black); font-size: 15px; font-weight: 700; transition: background-color .2s; }
.cs-play:hover { background: var(--grey); }
.cs-play-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--purple); color: var(--white); }
.cs-play-ico svg { width: 16px; height: 16px; }
.cs-play-ico svg[data-lucide="play"], .cs-play-ico .lucide-play { fill: currentColor; }

.cs-split { display: grid; grid-template-columns: 340px 1fr; gap: 64px; }
.cs-split .h2 { font-size: 40px; line-height: 46px; }
.cs-body > p { font-size: 20px; line-height: 32px; color: var(--black); font-weight: 500; letter-spacing: -0.01em; }
.cs-sub { font-size: 16px; font-weight: 700; margin: 40px 0 16px; }
.cs-list { list-style: none; display: grid; gap: 12px; }
.cs-list { gap: 0; }
.cs-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; line-height: 24px; color: var(--body); padding: 14px 0; border-top: 1px solid var(--border); }
.cs-list li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--purple); stroke-width: 2.5; }

.cs-made { padding: 0 0 16px; }
.cs-made-h { margin-bottom: 40px; }
/* Masonry via CSS columns: mixed 16:9, 9:16 and square media keep their shape */
.cg { columns: 3 300px; column-gap: 16px; }
.cg-item { position: relative; display: block; width: 100%; margin: 0 0 16px; break-inside: avoid; border-radius: 20px; overflow: hidden; background: var(--grey); }
.cg-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.22, 1, .36, 1); }
.cg-item::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(27, 27, 27, .06); pointer-events: none; }
.cg-item:hover img { transform: scale(1.04); }
.cg-ico { position: absolute; left: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--black); box-shadow: 0 2px 10px rgba(27, 27, 27, .16); transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.cg-ico svg { width: 16px; height: 16px; }
.cg-ico.play svg { fill: currentColor; margin-left: 2px; }
.cg-item:hover .cg-ico { transform: scale(1.08); }
.cg-alt { position: absolute; left: 70px; bottom: 26px; right: 16px; color: var(--white); font-size: 13px; font-weight: 600; text-align: left; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.cg-item:hover .cg-alt, .cg-item:focus-visible .cg-alt { opacity: 1; transform: none; }
.has-wcursor .cg-ico { opacity: .9; }

/* Results: big numbers on a hairline, no cards; impact as a plain divided list */
.cs-stats { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 32px; }
.cs-stat { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--black); }
.cs-num { font-size: 56px; line-height: 60px; font-weight: 800; letter-spacing: -0.05em; color: var(--black); }
.cs-lbl { font-size: 15px; font-weight: 600; color: var(--body); }
.cs-impact { list-style: none; display: grid; margin-top: 40px; }
.cs-impact li { font-size: 17px; line-height: 26px; font-weight: 500; color: var(--black); padding: 16px 0; border-top: 1px solid var(--border); }

.cs-quote-wrap { padding: 16px 0 96px; }
.cs-quote { position: relative; background: var(--grey); border-radius: var(--r-panel); padding: 56px; }
.cs-qmark { width: 56px; height: 36px; color: var(--purple); margin-bottom: 24px; }
.cs-quote blockquote { font-size: 28px; line-height: 38px; font-weight: 700; letter-spacing: -0.02em; }
.cs-quote figcaption { display: flex; align-items: center; gap: 14px; margin-top: 32px; }
.cs-quote figcaption img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.cs-quote figcaption span { display: flex; flex-direction: column; }
.cs-quote figcaption strong { font-size: 16px; }
.cs-quote figcaption small { font-size: 14px; color: var(--label); }

.cs-more { padding: 32px 0 0; }
.wgrid-more { gap: 24px; }
.work-cta { padding-top: 136px; }

/* ---------- Lightbox ---------- */
.lb { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; }
.lb::backdrop { background: rgba(20, 20, 22, .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lb[open] { display: grid; place-items: center; }
.lb[open] .lb-inner { animation: lbIn .45s cubic-bezier(.22, 1, .36, 1); }
.lb[open]::backdrop { animation: lbFade .35s ease; }
@keyframes lbIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes lbFade { from { opacity: 0; } }
/* The frame takes each film's own shape: the inner box hugs the media, so the caption bar and the close button line
   up with the video at any window size (16:9 never gets side bars on a short screen) */
.lb-inner { --lb-h: calc(100vh - 160px); --lb-w: min(1120px, 100vw - 32px); position: relative; width: fit-content; max-width: var(--lb-w); display: flex; flex-direction: column; align-items: center; }
.lb-media { width: 100%; display: grid; place-items: center; }
.lb-media iframe, .lb-media video, .lb-media img { display: block; border: 0; border-radius: 12px; background: #000; max-height: calc(100vh - 160px); max-width: 100%; }
.lb-media .ar-16-9 { width: min(var(--lb-w), var(--lb-h) * 16 / 9); aspect-ratio: 16 / 9; height: auto; }
.lb-media .ar-9-16 { height: min(var(--lb-h), var(--lb-w) * 16 / 9); aspect-ratio: 9 / 16; width: auto; }
.lb-media .ar-1-1 { height: min(var(--lb-h), var(--lb-w)); aspect-ratio: 1; width: auto; }
.lb-media .ar-3-4 { height: min(var(--lb-h), var(--lb-w) * 4 / 3); aspect-ratio: 3 / 4; width: auto; }
.lb-media img { width: auto; height: auto; max-width: 100%; }
/* width 0 + min-width 100%: the bar never widens the frame, it takes the video's width (captions wrap on 9:16) */
.lb-bar { width: 0; min-width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; color: var(--white); }
.lb-cap { min-width: 0; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.lb-nav { display: flex; align-items: center; gap: 12px; }
.lb-nav[hidden] { display: none; }
.lb-count { font-size: 14px; color: rgba(255, 255, 255, .7); min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.lb-btn, .lb-close { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: var(--white); transition: background-color .2s; }
.lb-btn:hover, .lb-close:hover { background: rgba(255, 255, 255, .24); }
.lb-btn svg, .lb-close svg { width: 18px; height: 18px; }
/* Pinned beside the video's top-right corner (absolute, so it moves with the opening animation instead of jumping) */
.lb-close { position: absolute; top: 0; right: -60px; }
.lb-btn:focus-visible, .lb-close:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cs-head { grid-template-columns: 1fr; gap: 32px; }
  .cs-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
  .cs-split { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 960px) {
  .whero-head h1 { font-size: min(40px, 8.2vw); line-height: 1.12; }
  /* Names scroll sideways, no scrollbar; each keeps its own fill line */
  .wgallery { padding-top: 72px; }
  /* One compact row: services scroll sideways (edge fade, no scrollbar), industry toggle stays on the right */
  /* Phones: two square tiles a row so the 14 customers fit in a few screens; logos scale down with the tile */
  .wgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wtile, .wtile.w5, .wtile.w7, .wtile.w12, .wtile.w4 { grid-column: auto; }
  .wt-media, .w12 .wt-media, .w4 .wt-media { height: auto; aspect-ratio: 1 / 1; border-radius: 18px; }
  .wt-logo { max-width: 78%; scale: .5; }
  /* Phones: hero centred like every other page, starting at the same height as other page eyebrows */
  .cs-hero { padding-top: 40px; }
  .cs-crumb { margin-bottom: 20px; justify-content: center; }
  .cs-title { text-align: center; }
  .cs-title .lead { margin-left: auto; margin-right: auto; }
  .cs-logo { margin-left: auto; margin-right: auto; }
  .cs-title h1 { font-size: 34px; line-height: 40px; }
  .cs-logo { margin-bottom: 20px; max-width: 180px; }
  /* Phones: a compact panel, label left and value right on one line; services as pills under their label */
  .cs-facts { grid-template-columns: 1fr; gap: 0; margin-top: 32px; padding: 4px 16px; border-top: 0; border-radius: 16px; background: var(--grey); text-align: left; }
  .cs-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); padding: 14px 0; }
  .cs-facts dt { flex: none; margin: 0; font-size: 14px; font-weight: 500; }
  .cs-facts dd { font-size: 15px; line-height: 21px; text-align: right; text-wrap: balance; }
  .cs-facts .cs-fact-svc { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cs-fact-svc dd { display: flex; flex-wrap: wrap; gap: 6px; text-align: left; }
  .cs-fact-svc dd span { padding: 5px 11px; border-radius: 999px; background: var(--white); font-size: 13px; line-height: 18px; font-weight: 600; }
  .cs-fact-svc dd span + span::before { content: none; }
  .cs-more { padding-top: 0; }
  .cs-facts div:last-child { border-bottom: 0; }
  .cs-stage { margin-top: 32px; height: auto; aspect-ratio: 4 / 5; border-radius: var(--r-card); }
  .cs-play { left: 16px; bottom: 16px; height: 52px; }
  .cs-split .h2 { font-size: 32px; line-height: 38px; }
  .cs-body > p { font-size: 17px; line-height: 28px; }
    .cg { columns: 2 140px; column-gap: 10px; }
  .cg-item { margin-bottom: 10px; border-radius: 14px; }
  .cg-ico { left: 10px; bottom: 10px; width: 36px; height: 36px; }
  .cg-alt { display: none; }
  .cs-num { font-size: 48px; line-height: 48px; }
  .cs-stat { min-height: 140px; padding: 24px; }
  .cs-quote { padding: 32px 24px; border-radius: var(--r-card); }
  .cs-quote blockquote { font-size: 21px; line-height: 30px; }
  .cs-quote-wrap { padding-bottom: 64px; }
  .work-cta { padding-top: 96px; padding-bottom: 96px; }
  .lb-inner { --lb-h: calc(100vh - 200px); }
  .lb-close { top: -56px; right: 0; }
  .lb-cap { font-size: 13px; }
}
@media (max-width: 600px) {
  .cs-stats { grid-template-columns: 1fr 1fr; }
  .cs-stat:last-child:nth-child(odd) { grid-column: 1 / -1; } /* a third stat runs full width instead of sitting alone */
}

@media (prefers-reduced-motion: reduce) {
  .wtile.is-in { animation: none; }
  .wgrid { transition: none; }
  .lb[open] .lb-inner, .lb[open]::backdrop { animation: none; }
}

/* Galleries where every item shares one shape use an even grid instead of masonry columns */
.cg.cg-uniform { columns: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cg.cg-uniform.cg-wide { grid-template-columns: repeat(2, 1fr); }
.cg.cg-uniform .cg-item { margin: 0; }
/* Two portrait films: a centred pair at the normal column width, not a half-empty row */
.cg.cg-few { grid-template-columns: repeat(2, 1fr); max-width: calc((100% - 32px) * 2 / 3 + 16px); margin-inline: auto; }
/* Odd number of 16:9 films: the first one leads full width */
.cg.cg-lead .cg-item:first-child { grid-column: 1 / -1; }
@media (max-width: 960px) {
  .cg.cg-uniform { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cg.cg-uniform.cg-wide { grid-template-columns: 1fr; }
  .cg.cg-few { max-width: none; }
}
.cg.cg-uniform .cg-item:only-child { grid-column: 1 / -1; }

/* Shared-shell fix (styles.css .mnav sets display:flex, which beats the [hidden] attribute, so the invisible
   mobile menu sat over the page and swallowed clicks). Remove once styles.css carries this rule. */
.mnav[hidden] { display: none; }
/* Phones and narrow windows: logos sized to a common box (not a scale), on a stronger, even scrim so busy photos never fight them */
@media (max-width: 960px) {
  .wt-logo { scale: none; max-width: 62%; max-height: 30px; object-fit: contain; }
  .wt-media::after { background: linear-gradient(180deg, rgba(27, 27, 27, .38), rgba(27, 27, 27, .52)); }
}
/* Phones: rhythm of one wide tile, then a pair (wide tiles every third, never leaving a lone tile at the end) */
@media (max-width: 960px) {
  .wgrid .wtile:nth-child(3n+1):not(:nth-last-child(2)) { grid-column: 1 / -1; }
  .wgrid .wtile:nth-child(3n+1):not(:nth-last-child(2)) .wt-media { aspect-ratio: 16 / 10; }
  .wgrid .wtile:nth-child(3n+1):not(:nth-last-child(2)) .wt-logo { max-height: 34px; max-width: 48%; }
  /* Arrow chip small and tucked in the corner so it never sits on the logo */
  .wt-go { top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 9px; }
  .wt-go svg { width: 14px; height: 14px; }
}

/* Social carousels (one post, several slides): swipe or use the arrows; a slide opens the set in the lightbox */
.cg-carousel { isolation: isolate; }
.cgc-track { display: flex; height: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.cgc-track::-webkit-scrollbar { display: none; }
.cgc-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.cg-carousel:hover img { transform: none; }
.cgc-nav { position: absolute; top: 50%; z-index: 1; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--black); box-shadow: 0 2px 10px rgba(27, 27, 27, .16); opacity: 0; transition: opacity .25s, transform .25s; }
.cgc-nav svg { width: 20px; height: 20px; }
.cgc-nav.prev { left: 16px; }
.cgc-nav.next { right: 16px; }
.cgc-nav:hover { transform: scale(1.06); }
.cg-carousel:hover .cgc-nav:not([disabled]), .cgc-nav:focus-visible { opacity: 1; }
.cgc-nav[disabled] { pointer-events: none; }
.cgc-wrap { margin: 0; }
.cgc-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; font-size: 15px; }
.cgc-cap b { font-weight: 600; color: var(--black); }
.cgc-count { color: var(--label); font-size: 14px; font-variant-numeric: tabular-nums; }
.cgc-dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 1; display: flex; justify-content: center; gap: 6px; }
.cgc-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(27, 27, 27, .25); box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); transition: background-color .2s, width .2s; }
.cgc-dot[aria-current="true"] { width: 20px; border-radius: 4px; background: var(--purple); }
@media (hover: none) { .cgc-nav { display: none; } }
@media (max-width: 960px) {
  .cgc-cap { font-size: 14px; margin-top: 8px; }
}

/* Hover preview on film tiles (js/work.js): muted video fades in over the poster */
.cg-prev { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity .35s ease, transform .9s cubic-bezier(.22, 1, .36, 1); }
.cg-item.is-previewing .cg-prev { opacity: 1; }
.cg-item:hover .cg-prev { transform: scale(1.04); }
/* Looping product animations fill their tile like the posters do */
.cg-loop { display: block; width: 100%; height: 100%; object-fit: cover; }
