/* ═══════════════════════════════════════════════════════════════════════════
   JOSH WROTE IT — Case-study system (redesign)
   Loaded AFTER styles.css. Inherits all tokens (--ink, --accent, --font-*, …).
   One module library, three art directions: [data-direction] = cinema|editorial|kinetic.
   ═══════════════════════════════════════════════════════════════════════════ */

.cs {
  --cs-max: 1280px;
  --cs-gut: clamp(20px, 5vw, 96px);
  --cs-rhythm: clamp(72px, 11vh, 168px);
  --cs-title: clamp(56px, 12vw, 200px);
  position: relative;
}
.cs *, .cs *::before, .cs *::after { box-sizing: border-box; }
.cs-wrap { max-width: var(--cs-max); margin: 0 auto; padding-inline: var(--cs-gut); }
.cs-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent); margin: 0;
  display: inline-flex; align-items: center; gap: 10px;
}
.cs-eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.cs h2.cs-h {
  font-family: var(--font-hero); font-weight: 400; letter-spacing: -.025em;
  font-size: clamp(34px, 5.2vw, 74px); line-height: .98; margin: 16px 0 0;
  text-wrap: balance;
}
.cs h2.cs-h em { font-style: italic; color: var(--accent); }
.cs .lead {
  font-family: var(--font-hero); font-weight: 400; font-style: normal;
  font-size: clamp(22px, 2.6vw, 34px); line-height: 1.32; letter-spacing: -.01em;
  color: var(--ink); margin: 0; text-wrap: pretty;
}
.cs p { color: var(--ink-soft); }

/* ─── Reveal primitive (JS adds .is-in) ──────────────────────────────────── */
/* FREEZE-PROOF: never blank case-study sections with opacity 0. */
.cs [data-reveal] {
  opacity: 1; transform: none;
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--rd, 0ms);
}
html.js-reveal .cs [data-reveal]:not(.is-in) {
  opacity: 1; transform: translateY(16px);
}
.cs [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .cs [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ─── Scroll progress rail (left edge) ───────────────────────────────────── */
.cs-rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: 3px; z-index: 60;
  background: color-mix(in oklab, var(--ink) 8%, transparent); pointer-events: none;
}
.cs-rail span {
  position: absolute; left: 0; top: 0; width: 100%; transform-origin: top;
  background: var(--accent); height: var(--cs-progress, 0%);
}
.cs-chapter {
  position: fixed; left: 14px; bottom: 18px; z-index: 60;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); pointer-events: none;
  display: flex; gap: 8px; align-items: baseline;
  mix-blend-mode: difference; color: #fff;
}
.cs-chapter b { color: #fff; font-weight: 500; }
@media (max-width: 760px) { .cs-chapter { display: none; } }

/* ════════════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════════════ */
.cs-hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  justify-content: flex-end; overflow: hidden;
  padding: 0 var(--cs-gut) clamp(32px, 5vh, 64px);
  isolation: isolate; background: #07080c;
}
/* the editable media engine lives in .hero-bg-media (from media.jsx) */
.cs-hero .hero-bg-media { z-index: 0; }
.cs-hero .hero-bg-media .hbg-scrim { display: none; } /* we drive legibility ourselves */

/* legibility layer (sits above media, below text) */
.cs-hero .cs-legib { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
/* mode: scrim — gradient anchored to bottom-left where the text lives */
.cs-hero[data-legib="scrim"] .cs-legib {
  background:
    linear-gradient(to top, rgba(4,5,8,calc(.82 * var(--cs-scrim,1))) 0%, rgba(4,5,8,calc(.35*var(--cs-scrim,1))) 38%, rgba(4,5,8,0) 70%),
    radial-gradient(120% 90% at 8% 100%, rgba(4,5,8,calc(.55*var(--cs-scrim,1))), transparent 60%);
}
/* mode: duotone — push media toward ink/accent + soft darken */
.cs-hero[data-legib="duotone"] .hero-bg-media .hbg-layer { filter: grayscale(1) contrast(1.05) brightness(.72); }
.cs-hero[data-legib="duotone"] .hero-bg-media .hbg-layer::after {
  content: ""; position: absolute; inset: 0;
  background: color-mix(in oklab, var(--accent) 55%, #05060a);
  mix-blend-mode: color; opacity: .55;
}
.cs-hero[data-legib="duotone"] .cs-legib {
  background: linear-gradient(to top, rgba(4,5,8,.6), rgba(4,5,8,0) 60%);
}
/* mode: plate — solid panel behind the title block */
.cs-hero[data-legib="plate"] .cs-legib {
  background: linear-gradient(to top, rgba(4,5,8,.5), rgba(4,5,8,0) 55%);
}
.cs-hero[data-legib="plate"] .cs-hero-inner {
  background: color-mix(in oklab, #06080c 78%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: clamp(24px, 3vw, 44px); margin-left: calc(-1 * clamp(24px,3vw,44px));
  border-left: 2px solid var(--accent);
}

.cs-hero-inner { position: relative; z-index: 2; max-width: var(--cs-max); width: 100%;
  margin: 0 auto; }

/* per-project transparent logo upload box (top of hero) */
.cs-hero .hero-logo { width: clamp(64px, 7vw, 92px); margin: 0 0 22px; pointer-events: auto; }
.cs-hero .hero-logo .media-slot {
  aspect-ratio: 1 / 1; border: 1px dashed rgba(255,255,255,.4); border-radius: 14px;
  background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cs-hero[data-title="black"] .hero-logo .media-slot { border-color: rgba(6,8,12,.32); background: rgba(255,255,255,.7); }
.cs-hero .hero-logo .media-slot.is-filled { border-style: solid; padding: 8px; background: rgba(255,255,255,.92); }
.cs-hero-top {
  position: absolute; top: clamp(20px,4vh,40px); left: var(--cs-gut); right: var(--cs-gut);
  z-index: 2; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.cs-hero-top .back { color: rgba(255,255,255,.7); transition: color .2s; }
.cs-hero-top .back:hover { color: #fff; }
.cs-hero-top .idx { color: rgba(255,255,255,.5); }

.cs-hero .client-tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-hot); margin: 0 0 18px;
}
.cs-hero h1 {
  font-family: var(--font-hero); font-weight: 400; font-size: var(--cs-title);
  line-height: .9; letter-spacing: -.03em; margin: 0; text-wrap: balance; max-width: 16ch;
}
.cs-hero h1 em { font-style: italic; }
/* per-entry title color */
.cs-hero[data-title="white"] h1, .cs-hero[data-title="white"] .cs-hero-sub { color: #fff; }
.cs-hero[data-title="white"] h1 em { color: #fff; }
.cs-hero[data-title="black"] h1, .cs-hero[data-title="black"] .cs-hero-sub { color: #06080c; }
.cs-hero[data-title="black"] h1 em { color: #06080c; }
.cs-hero[data-title="black"] .client-tag { color: var(--accent-deep); }
.cs-hero[data-title="black"][data-legib="plate"] .cs-hero-inner { background: color-mix(in oklab,#fff 80%,transparent); border-color: var(--accent); }

.cs-hero-sub {
  display: flex; gap: clamp(24px,3vw,56px); margin-top: clamp(22px,3vh,38px); flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,.9);
}
.cs-hero-sub > div { display: flex; flex-direction: column; gap: 5px; }
.cs-hero-sub .k { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.cs-hero-sub .v { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.cs-hero-scroll {
  position: absolute; right: var(--cs-gut); bottom: clamp(32px,5vh,64px); z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.6); writing-mode: vertical-rl; display: flex; align-items: center; gap: 12px;
}
.cs-hero-scroll::after { content: ""; width: 1px; height: 46px; background: currentColor;
  animation: csScroll 1.8s ease-in-out infinite; }
[data-motion="minimal"] .cs-hero-scroll::after { animation: none; }
@keyframes csScroll { 0%,100%{transform:scaleY(.3);opacity:.4;transform-origin:top} 50%{transform:scaleY(1);opacity:1;transform-origin:top} }

/* ════════════════════════════════════════════════════════════════════════
   INTRO / BRIEF
   ════════════════════════════════════════════════════════════════════════ */
.cs-intro { padding: var(--cs-rhythm) 0; }
.cs-intro .cs-wrap { display: grid; grid-template-columns: 1fr; gap: clamp(28px,4vw,64px); }
.cs-intro-grid { display: grid; grid-template-columns: 0.85fr 1.6fr; gap: clamp(32px,5vw,96px); align-items: start; }
.cs-intro-meta { display: flex; flex-direction: column; gap: 0; position: sticky; top: 96px; }
.cs-intro-meta .row { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-top: 1px solid var(--rule); }
.cs-intro-meta .row:first-of-type { border-top: 0; padding-top: 0; }
.cs-intro-meta .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cs-intro-meta .v { font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--ink); }
.cs-intro-meta .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cs-intro-meta .tags li { list-style: none; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  padding: 5px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-soft); }
.cs-intro-body p { font-family: var(--font-body); font-size: 17px; line-height: 1.66; margin: 0 0 18px; }
.cs-intro-body p.lead { margin-bottom: 28px; }

/* Optional ACF project-type strategy/story modules (v3.16.0). */
.cs-framework { padding: 0 0 var(--cs-rhythm); }
.cs-framework .cs-section-head { margin-bottom: clamp(28px,4vh,52px); }
.cs-framework-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--rule); }
.cs-framework-item { padding: clamp(24px,3vw,38px) clamp(24px,3.5vw,48px) clamp(28px,3.5vw,44px) 0; border-bottom: 1px solid var(--rule); }
.cs-framework-item:nth-child(odd) { border-right: 1px solid var(--rule); padding-right: clamp(28px,4vw,58px); }
.cs-framework-item:nth-child(even) { padding-left: clamp(28px,4vw,58px); }
.cs-framework-item h3 { margin: 0 0 12px; font-family: var(--font-mono); font-size: 11px; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.cs-framework-copy { font-family: var(--font-body); font-size: 16px; line-height: 1.62; color: var(--ink-soft); }
.cs-framework-copy p { margin: 0 0 14px; }
.cs-framework-copy p:last-child { margin-bottom: 0; }

/* ════════════════════════════════════════════════════════════════════════
   STAT BAND  (hero stat pinned + supporting cards)
   ════════════════════════════════════════════════════════════════════════ */
.cs-stats { background: #06080c; color: #fff; padding: var(--cs-rhythm) 0; position: relative; overflow: hidden; }
.cs-stats::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(1000px 500px at 80% -10%, color-mix(in oklab,var(--accent) 28%, transparent), transparent 60%); opacity: .5; }
.cs-stats .cs-wrap { position: relative; }
.cs-stats .cs-eyebrow { color: var(--accent-hot); }
.cs-stat-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px,5vw,80px); margin-top: 40px; align-items: start; }
.cs-stat-hero { position: sticky; top: 18vh; }
.cs-stat-hero b { font-family: var(--font-hero); font-weight: 400; display: block;
  font-size: clamp(90px, 16vw, 260px); line-height: .82; letter-spacing: -.04em; color: #fff; }
.cs-stat-hero b em { font-style: normal; color: var(--accent-hot); }
.cs-stat-hero .cap { font-family: var(--font-body); font-size: clamp(15px,1.4vw,19px); color: rgba(255,255,255,.74);
  max-width: 32ch; margin: 18px 0 0; line-height: 1.5; }
.cs-stat-hero .cap b { font-family: var(--font-body); font-size: inherit; display: inline; color: #fff; font-weight: 600; }
.cs-stat-cards { display: flex; flex-direction: column; gap: 14px; }
.cs-stat-card { border: 1px solid rgba(255,255,255,.16); border-radius: 4px; padding: 26px 28px;
  background: rgba(255,255,255,.03); }
.cs-stat-card b { font-family: var(--font-hero); font-weight: 400; font-size: clamp(40px,5vw,64px);
  line-height: .95; letter-spacing: -.03em; color: #fff; display: block; }
.cs-stat-card b em { font-style: normal; color: var(--accent-hot); }
.cs-stat-card h4 { font-family: var(--font-body); font-size: 14px; font-weight: 600; margin: 10px 0 6px; color: #fff; }
.cs-stat-card p { font-family: var(--font-body); font-size: 13.5px; line-height: 1.5; margin: 0; color: rgba(255,255,255,.66); }

/* ════════════════════════════════════════════════════════════════════════
   WORK — feature callouts (alternating text + media)
   ════════════════════════════════════════════════════════════════════════ */
.cs-work { padding: var(--cs-rhythm) 0; }
.cs-work .cs-section-head { max-width: var(--cs-max); margin: 0 auto; padding-inline: var(--cs-gut); margin-bottom: clamp(36px,5vh,72px); }
.cs-feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,4vw,72px);
  align-items: center; max-width: var(--cs-max); margin: 0 auto clamp(48px,7vh,110px);
  padding-inline: var(--cs-gut); }
.cs-feature:last-child { margin-bottom: 0; }
.cs-feature.flip .cs-feature-media { order: -1; }
.cs-feature-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; color: var(--accent); margin-bottom: 16px; }
.cs-feature h3 { font-family: var(--font-hero); font-weight: 400; font-size: clamp(28px,3.4vw,46px);
  line-height: 1.04; letter-spacing: -.02em; margin: 0 0 18px; color: var(--ink); text-wrap: balance; }
.cs-feature p { font-family: var(--font-body); font-size: 16.5px; line-height: 1.62; margin: 0; }
.cs-feature .media-slot { border-radius: 4px; overflow: hidden; }
.cs-feature-media { aspect-ratio: 4/3; }
.cs-feature.no-media { grid-template-columns: minmax(0, 1fr); }
.cs-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 4px; }

/* ════════════════════════════════════════════════════════════════════════
   FULL-BLEED MEDIA MOMENT
   ════════════════════════════════════════════════════════════════════════ */
.cs-bleed { position: relative; margin: 0; }
.cs-bleed .media-slot { border-radius: 0; }
.cs-bleed-cap { max-width: var(--cs-max); margin: 14px auto 0; padding-inline: var(--cs-gut);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.cs-bleed-tall .media-slot { min-height: 60vh; }

/* ════════════════════════════════════════════════════════════════════════
   TIMELINE / MILESTONES
   ════════════════════════════════════════════════════════════════════════ */
.cs-timeline { padding: var(--cs-rhythm) 0; }
.cs-timeline .cs-section-head { margin-bottom: clamp(36px,5vh,64px); }
.cs-tl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.cs-tl .tl-item { padding: 32px clamp(24px,3vw,44px) 36px 0; border-bottom: 1px solid var(--rule);
  display: grid; grid-template-columns: 64px 1fr; gap: 24px; align-items: start; }
.cs-tl .tl-item:nth-child(odd) { border-right: 1px solid var(--rule); }
.cs-tl .tl-item:nth-child(odd) { padding-right: clamp(32px,4vw,64px); }
.cs-tl .tl-item:nth-child(even) { padding-left: clamp(32px,4vw,64px); }
.cs-tl .tl-no { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .1em;
  padding-top: 6px; }
.cs-tl .tl-phase { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.cs-tl h3 { font-family: var(--font-hero); font-weight: 400; font-size: clamp(22px,2.4vw,30px); line-height: 1.1;
  letter-spacing: -.02em; margin: 0 0 10px; color: var(--ink); }
.cs-tl p { font-family: var(--font-body); font-size: 15px; line-height: 1.55; margin: 0; }

/* ════════════════════════════════════════════════════════════════════════
   PULL QUOTE
   ════════════════════════════════════════════════════════════════════════ */
.cs-quote { padding: var(--cs-rhythm) 0; }
.cs-quote .cs-wrap { max-width: 1100px; }
.cs-quote blockquote { margin: 0; }
.cs-quote .mark { font-family: var(--font-hero); font-size: clamp(80px,12vw,180px); line-height: .6;
  color: var(--accent); display: block; height: .5em; }
.cs-quote q,
.cs-quote blockquote > p { quotes: none; font-family: var(--font-hero); font-weight: 400; font-style: italic;
  font-size: clamp(28px,4.4vw,62px); line-height: 1.12; letter-spacing: -.02em; color: var(--ink);
  display: block; margin: 0; text-wrap: balance; }
/* v3.14.5: never leave quote words near-invisible waiting on a .lit class
   that no JS currently applies. */
.cs-quote .word { display: inline-block; opacity: 1; transition: opacity .5s ease; }
.cs-quote .word.lit { opacity: 1; }
.cs-quote cite { display: flex; align-items: center; gap: 14px; margin-top: clamp(28px,4vh,48px);
  font-style: normal; }
.cs-quote cite .nm,
.cs-quote cite > b { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--ink); white-space: nowrap; }
.cs-quote cite .rl,
.cs-quote cite > span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.cs-quote cite::before { content: ""; width: 40px; height: 1px; background: var(--accent); }

/* ════════════════════════════════════════════════════════════════════════
   GALLERY (varied grid)
   ════════════════════════════════════════════════════════════════════════ */
.cs-gallery { padding: var(--cs-rhythm) 0; }
.cs-gallery .cs-section-head { margin-bottom: clamp(32px,4vh,56px); }
.cs-gal-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
  max-width: var(--cs-max); margin: 0 auto; padding-inline: var(--cs-gut); }
.cs-gal-grid figure { margin: 0; grid-column: span 2; }
.cs-gal-grid figure.wide { grid-column: span 4; }
.cs-gal-grid figure.full { grid-column: span 6; }
.cs-gal-grid figure.half { grid-column: span 3; }
.cs-gal-grid .media-slot { border-radius: 4px; overflow: hidden; }
.cs-gal-cap { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: var(--muted); margin-top: 8px; }

/* ════════════════════════════════════════════════════════════════════════
   FILM (embedded multimedia)
   ════════════════════════════════════════════════════════════════════════ */
.cs-film { padding: 0 0 var(--cs-rhythm); }
.cs-film .cs-wrap { max-width: var(--cs-max); }
.cs-film .cs-section-head { margin-bottom: 28px; }
.cs-film .media-slot { border-radius: 4px; overflow: hidden; }

/* ════════════════════════════════════════════════════════════════════════
   OUTCOMES
   ════════════════════════════════════════════════════════════════════════ */
.cs-outcomes { padding: var(--cs-rhythm) 0; background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cs-outcomes .cs-wrap { display: grid; grid-template-columns: 0.8fr 1.6fr; gap: clamp(32px,5vw,80px); align-items: start; }
.cs-out-list { display: grid; gap: 0; }
.cs-out-list .row { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: baseline;
  padding: 22px 0; border-top: 1px solid var(--rule); }
.cs-out-list .row:first-child { border-top: 0; padding-top: 0; }
.cs-out-list .row .mk { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.cs-out-list .row p { font-family: var(--font-hero); font-weight: 400; font-size: clamp(18px,2vw,24px);
  line-height: 1.32; margin: 0; color: var(--ink); }
.cs-out-list .row p b { color: var(--accent); font-weight: 400; }

/* ════════════════════════════════════════════════════════════════════════
   TESTIMONIAL
   ════════════════════════════════════════════════════════════════════════ */
.cs-testi { padding: var(--cs-rhythm) 0; }
.cs-testi .cs-wrap { max-width: 1100px; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px,4vw,56px); align-items: start; }
.cs-testi blockquote { margin: 0; }
.cs-testi q,
.cs-testi blockquote > p { quotes: none; font-family: var(--font-hero); font-weight: 400; font-style: italic;
  font-size: clamp(22px,3vw,38px); line-height: 1.28; letter-spacing: -.015em; color: var(--ink); display: block; margin: 0; text-wrap: pretty; }
.cs-testi q b,
.cs-testi blockquote > p b { font-style: normal; color: var(--accent); font-weight: 400; }
.cs-testi cite { display: block; margin-top: 26px; font-style: normal; }
.cs-testi cite .nm,
.cs-testi cite > b { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--ink); }
.cs-testi cite .rl,
.cs-testi cite > span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); display: block; margin-top: 4px; }

/* ════════════════════════════════════════════════════════════════════════
   CREDITS
   ════════════════════════════════════════════════════════════════════════ */
.cs-credits { padding: var(--cs-rhythm) 0; border-top: 1px solid var(--rule); }
.cs-cred-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); margin-top: 36px; }
.cs-cred-grid .cell { background: var(--bg); padding: 22px 22px; display: flex; flex-direction: column; }
/* v3.15.1: .k / .v are <span> elements; without an explicit display they stayed
   inline, so the label ran directly into the value on one line ("CLIENTDC
   Studios..."). display:block (via the flex column above + these two rules)
   stacks label above value on every credit cell. */
.cs-cred-grid .k { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; white-space: nowrap; }
.cs-cred-grid .v { display: block; font-family: var(--font-body); font-size: clamp(13px, 1.4vw, 15px); color: var(--ink); margin: 0; line-height: 1.45; word-break: normal; overflow-wrap: break-word; }

/* ════════════════════════════════════════════════════════════════════════
   NEXT PROJECT NAV
   ════════════════════════════════════════════════════════════════════════ */
.cs-next { position: relative; min-height: 56vh; display: flex; align-items: flex-end; overflow: hidden;
  padding: var(--cs-rhythm) var(--cs-gut); background: #06080c; isolation: isolate; }
.cs-next .hero-bg-media { z-index: 0; }
.cs-next .hero-bg-media .hbg-scrim { display: none; }
.cs-next .cs-next-scrim { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(4,5,8,.85), rgba(4,5,8,.4) 60%, rgba(4,5,8,.55)); pointer-events: none; }
.cs-next-inner { position: relative; z-index: 2; max-width: var(--cs-max); margin: 0 auto; width: 100%;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.cs-next .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.cs-next .nxt-title { font-family: var(--font-hero); font-weight: 400; font-size: clamp(40px,7vw,96px);
  line-height: .92; letter-spacing: -.03em; color: #fff; margin: 14px 0 0; }
.cs-next .nxt-title em { font-style: italic; }
.cs-next .all { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 12px 22px; transition: all .2s; align-self: center; }
.cs-next .all:hover { background: #fff; color: #06080c; }

/* ════════════════════════════════════════════════════════════════════════
   SECTION HEADS (shared)
   ════════════════════════════════════════════════════════════════════════ */
.cs-section-head { max-width: var(--cs-max); margin: 0 auto; padding-inline: var(--cs-gut); }
.cs-section-head .cnt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); }

/* ════════════════════════════════════════════════════════════════════════
   ── DIRECTION: CINEMA (dark, dramatic, pinned) ─────────────────────────────
   ════════════════════════════════════════════════════════════════════════ */
.cs[data-direction="cinema"] { background: #06080c; color: #F4F2EC;
  --ink: #F4F2EC; --ink-soft: #B7BFCE; --muted: rgba(244,242,236,.5); --rule: rgba(244,242,236,.12);
  --paper: #0c0f16; }
.cs[data-direction="cinema"] .cs-title { --cs-title: clamp(64px,14vw,230px); }
.cs[data-direction="cinema"] .cs-intro .lead { font-size: clamp(26px,3.4vw,44px); }
.cs[data-direction="cinema"] .cs-outcomes { background: #0c0f16; }
.cs[data-direction="cinema"] .cs-quote { background: #06080c; }
.cs[data-direction="cinema"] .cs-credits .cs-cred-grid .cell { background: #0c0f16; }
.cs[data-direction="cinema"] .cs-feature h3,
.cs[data-direction="cinema"] .cs-tl h3 { letter-spacing: -.03em; }
/* bigger cinematic full-bleeds */
.cs[data-direction="cinema"] .cs-bleed .media-slot { min-height: 78vh; }

/* ════════════════════════════════════════════════════════════════════════
   ── DIRECTION: EDITORIAL (warm paper, magazine, restrained) ────────────────
   ════════════════════════════════════════════════════════════════════════ */
.cs[data-direction="editorial"] { background: var(--bg); --cs-max: 1180px; --cs-rhythm: clamp(64px,9vh,128px); }
.cs[data-direction="editorial"] .cs-hero { min-height: 84svh; }
.cs[data-direction="editorial"] .cs-title { --cs-title: clamp(52px,10vw,148px); }
.cs[data-direction="editorial"] .cs-intro-body p.lead::first-letter {
  font-family: var(--font-hero); font-size: 3.4em; line-height: .78; float: left;
  padding: 8px 14px 0 0; color: var(--accent); font-style: italic; }
.cs[data-direction="editorial"] .cs-stats { background: #06080c; }
.cs[data-direction="editorial"] .cs-stat-card { background: rgba(255,255,255,.04); border-radius: 2px; }
/* magazine gallery rhythm */
.cs[data-direction="editorial"] .cs-gal-grid figure:nth-child(1) { grid-column: span 4; }
.cs[data-direction="editorial"] .cs-gal-grid figure:nth-child(2) { grid-column: span 2; }
.cs[data-direction="editorial"] .cs-gal-grid figure:nth-child(3) { grid-column: span 2; }
.cs[data-direction="editorial"] .cs-gal-grid figure:nth-child(4) { grid-column: span 4; }
.cs[data-direction="editorial"] .cs-quote q,
.cs[data-direction="editorial"] .cs-quote blockquote > p { font-size: clamp(26px,3.8vw,52px); }
.cs[data-direction="editorial"] .cs-feature h3 { font-size: clamp(26px,3vw,40px); }

/* ════════════════════════════════════════════════════════════════════════
   ── DIRECTION: KINETIC (media-forward, color blocks, h-scroll) ─────────────
   ════════════════════════════════════════════════════════════════════════ */
.cs[data-direction="kinetic"] { background: var(--bg); --cs-rhythm: clamp(80px,12vh,180px); }
.cs[data-direction="kinetic"] .cs-stats { background: var(--accent); color: var(--on-accent); }
.cs[data-direction="kinetic"] .cs-stats::before { background: radial-gradient(900px 480px at 85% -20%, rgba(255,255,255,.22), transparent 60%); opacity: 1; }
.cs[data-direction="kinetic"] .cs-stat-card { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); }
.cs[data-direction="kinetic"] .cs-stat-card b em,
.cs[data-direction="kinetic"] .cs-stat-hero b em,
.cs[data-direction="kinetic"] .cs-stat-hero b,
.cs[data-direction="kinetic"] .cs-stat-hero .cap b,
.cs[data-direction="kinetic"] .cs-stat-card b,
.cs[data-direction="kinetic"] .cs-stat-card h4 { color: var(--on-accent); }
.cs[data-direction="kinetic"] .cs-eyebrow,
.cs[data-direction="kinetic"] .cs-stats .cs-eyebrow,
.cs[data-direction="kinetic"] .cs-stat-hero .cap,
.cs[data-direction="kinetic"] .cs-stat-card p { color: color-mix(in srgb, var(--on-accent) 78%, transparent); }
/* horizontal-scroll gallery */
.cs[data-direction="kinetic"] .cs-gal-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 14px; gap: 18px; -webkit-overflow-scrolling: touch; }
.cs[data-direction="kinetic"] .cs-gal-grid figure { grid-column: auto; flex: 0 0 clamp(280px,42vw,560px); scroll-snap-align: start; }
.cs[data-direction="kinetic"] .cs-gal-grid figure .media-slot { aspect-ratio: 4/3; }
.cs[data-direction="kinetic"] .cs-gal-grid::-webkit-scrollbar { height: 6px; }
/* offset feature callouts */
.cs[data-direction="kinetic"] .cs-feature:nth-child(even) .cs-feature-text { padding-top: clamp(20px,4vw,64px); }
.cs[data-direction="kinetic"] .cs-quote { background: #06080c; color: #fff; }
.cs[data-direction="kinetic"] .cs-quote q,
.cs[data-direction="kinetic"] .cs-quote blockquote > p { color: #fff; }
.cs[data-direction="kinetic"] .cs-quote .word { opacity: 1; }
.cs[data-direction="kinetic"] .cs-quote cite .nm,
.cs[data-direction="kinetic"] .cs-quote cite > b { color: #fff; }

/* ════════════════════════════════════════════════════════════════════════
   CHROME COHESION — darken the global nav for the cinema direction.
   (The contact CTA + footer use var(--ink)/var(--bg) so they are already
   dark in the default light theme — only the translucent nav needs help.)
   ════════════════════════════════════════════════════════════════════════ */
html[data-cs="cinema"] { background: #06080c; }
html[data-cs="cinema"] .nav {
  background: color-mix(in oklab, #06080c 82%, transparent);
  border-bottom-color: rgba(244,242,236,.12);
}
html[data-cs="cinema"] .nav ul a { color: rgba(244,242,236,.66); }
html[data-cs="cinema"] .nav ul a:hover,
html[data-cs="cinema"] .nav ul a.active { color: #fff; }
html[data-cs="cinema"] .nav .brand-logo { filter: invert(1); }
html[data-cs="cinema"] .nav .cta { background: #F4F2EC; color: #06080c; }
html[data-cs="cinema"] .nav .cta:hover { background: var(--accent); color: var(--on-accent); }
html[data-cs="cinema"] .nav-burger { border-color: rgba(244,242,236,.22); }
html[data-cs="cinema"] .nav-burger span { background: #F4F2EC; }
@media (max-width: 880px) {
  html[data-cs="cinema"] .nav ul { background: color-mix(in oklab, #06080c 96%, transparent); }
  html[data-cs="cinema"] .nav ul a { color: #F4F2EC; }
  html[data-cs="cinema"] .nav ul li { border-bottom-color: rgba(244,242,236,.12); }
}

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 920px) {
  .cs-intro-grid, .cs-stat-grid, .cs-feature, .cs-outcomes .cs-wrap, .cs-testi .cs-wrap, .cs-framework-grid { grid-template-columns: 1fr; }
  .cs-framework-item:nth-child(odd) { border-right: 0; padding-right: 0; }
  .cs-framework-item:nth-child(even) { padding-left: 0; }
  .cs-intro-meta { position: static; }
  .cs-stat-hero { position: static; }
  .cs-feature.flip .cs-feature-media { order: 0; }
  .cs-tl { grid-template-columns: 1fr; }
  .cs-tl .tl-item:nth-child(odd) { border-right: 0; padding-right: 0; }
  .cs-tl .tl-item:nth-child(even) { padding-left: 0; }
  .cs-gal-grid figure, .cs[data-direction="editorial"] .cs-gal-grid figure { grid-column: span 3 !important; }
}
@media (max-width: 620px) {
  .cs-gal-grid figure, .cs[data-direction="editorial"] .cs-gal-grid figure { grid-column: span 6 !important; }
  .cs-hero-sub { gap: 18px; }
}
/* ═══════════════════════════════════════════════════════════════
   v3.0 — Hero logo controls, credits→next spacing, flexible media
   ═══════════════════════════════════════════════════════════════ */

/* Hero logo defaults: transparent, no plate, no border. PNG/SVG with their
   own backgrounds render cleanly. Filled image is centered both axes.
   The square plate is opt-in per entry via data-logo-bg="on". */
.cs-hero .hero-logo,
.cs-hero .hero-logo .media-slot {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.cs-hero .hero-logo {
  width: clamp(72px, 8vw, 116px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 26px;
}
.cs-hero .hero-logo .media-slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}
.cs-hero .hero-logo .media-slot img,
.cs-hero .hero-logo .media-slot svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
/* Empty-state hint (still visible when no logo uploaded) */
.cs-hero .hero-logo .media-slot:not(.is-filled) {
  border: 1px dashed rgba(255,255,255,.32) !important;
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.04) !important;
}
.cs[data-logo-bg="on"] .cs-hero .hero-logo .media-slot.is-filled {
  background: rgba(255,255,255,.94) !important;
  padding: 10px !important;
  border-radius: 14px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Spacing fix — credits and next-project were stacking rhythm padding,
   creating up to 360px of empty space between "Role & Recognition" and
   the next-project block. Halve credits' bottom and drop next-project's
   own top padding into a tighter overlap. */
.cs-credits { padding-bottom: clamp(40px, 6vh, 80px); border-bottom: 1px solid var(--rule); }
.cs-credits .cs-cred-grid { margin-bottom: 0; }
.cs-next { padding-top: clamp(56px, 8vh, 104px); padding-bottom: clamp(56px, 8vh, 104px); min-height: 0; }
.cs-next-inner { gap: 18px; }

/* ═══ FLEXIBLE MEDIA BLOCKS ═══ */
.cs-mb { padding: clamp(48px, 7vh, 96px) 0; }
.cs-mb .cs-wrap { position: relative; }
.cs-mb-cap {
  max-width: var(--cs-max); margin: 14px auto 0;
  padding-inline: var(--cs-gut);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* Full-bleed media (image OR video) */
.cs-mb-fullbleed { padding-inline: 0; margin-inline: 0; }
.cs-mb-fullbleed img,
.cs-mb-fullbleed video {
  width: 100%; height: auto; display: block;
  aspect-ratio: var(--mb-ratio, 21 / 9);
  object-fit: cover;
}
.cs-mb-fullbleed .cs-mb-embed {
  width: 100%; aspect-ratio: var(--mb-ratio, 16 / 9); position: relative;
}
.cs-mb-fullbleed .cs-mb-embed iframe {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0;
}

/* Embedded video frame */
.cs-mb-video-frame {
  width: 100%; aspect-ratio: 16 / 9; background: #000;
  border-radius: 6px; overflow: hidden; margin-top: 36px;
}
.cs-mb-video-media { margin: 0; }
.cs-mb-video-frame video,
.cs-mb-video-frame iframe { width: 100%; height: 100%; display: block; border: 0; }

/* Image pair */
.cs-pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 32px); }
.cs-pair-grid figure { margin: 0; }
.cs-pair-grid img { width: 100%; height: auto; display: block; aspect-ratio: 4/3; object-fit: cover; }
.cs-pair-grid figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 10px; }
@media (max-width: 760px) { .cs-pair-grid { grid-template-columns: 1fr; } }

/* Slider (horizontal scroll-snap; vanilla, no JS dependency) */
.cs-slider {
  position: relative; margin-top: 36px;
  padding-inline: var(--cs-gut);
}
.cs-slider-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: min(72vw, 920px);
  gap: clamp(16px, 2vw, 32px);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}
[data-motion="minimal"] .cs-slider-track { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) {
  .cs-slider-track { scroll-behavior: auto; }
}
.cs-slider-track::-webkit-scrollbar { height: 6px; }
.cs-slider-track::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }
.cs-slide { margin: 0; scroll-snap-align: start; }
.cs-slide img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; display: block; border-radius: 4px; }
.cs-slide figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 10px; padding-inline: 4px; }
.cs-slider-nav {
  position: absolute; top: 40%; z-index: 3;
  width: 48px; height: 48px; border-radius: 999px;
  background: var(--ink); color: var(--bg); border: 0;
  font-family: var(--font-mono); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, background .2s;
}
.cs-slider-nav.prev { left: calc(var(--cs-gut) - 24px); }
.cs-slider-nav.next { right: calc(var(--cs-gut) - 24px); }
.cs-slider-nav:hover { background: var(--accent); transform: translateY(-2px); }
@media (max-width: 760px) { .cs-slider-nav { display: none; } }

/* Suppress all gallery figcaptions unless the editor opted-in. The opt-in
   gates the markup, so the only captions that reach this CSS are intentional.
   This rule just guarantees alt-text is never used as an accidental caption. */
.cs-gal-grid figure > figcaption,
.cs-mb-gallery .cs-gal-grid figure > figcaption,
.cs-mb-pair figcaption,
.cs-mb-slider .cs-slide figcaption {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  color: var(--muted); margin-top: 10px;
}

/* ── v3.14.0 safety: stat cards that somehow render with no children
   (e.g. if the PHP continue guard is bypassed) collapse to nothing
   rather than showing an empty bordered box (the "white bar" bug). */
.cs-stat-card:not(:has(b)):not(:has(h4)):not(:has(p)) {
  display: none;
}

/* v3.14.5: REMOVED deferred paint / section-skipping rules on case-study
   sections. blank-qa runtime evidence: .cs-outcomes/.cs-testi/.cs-credits/
   .cs-next stayed textLen=0 (placeholder height only) even after full scroll. */

/* ── v3.14.0 mobile polish ──────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Stat grid stacks cleanly on narrow viewports */
  .cs-stat-grid { grid-template-columns: 1fr; gap: 28px; }
  .cs-stat-hero { position: static; }
  .cs-stat-hero b { font-size: clamp(72px, 20vw, 100px); }
  .cs-stat-cards { gap: 10px; }
  .cs-stat-card { padding: 18px 20px; }
  .cs-stat-card b { font-size: clamp(36px, 10vw, 52px); }

  /* Feature rows stack text above media */
  .cs-feature { grid-template-columns: 1fr; }
  .cs-feature.flip .cs-feature-media { order: 0; }

  /* Hero tighter on mobile */
  .cs-hero-inner h1 { font-size: clamp(36px, 11vw, 56px); }
  .cs-hero-sub { flex-wrap: wrap; gap: 10px; }
  .cs-hero-sub > div { flex: 0 0 auto; }

  /* Next project section */
  .cs-next-inner h2 { font-size: clamp(28px, 9vw, 44px); }

  /* Gallery: single column on mobile */
  .cs-gal-grid { grid-template-columns: 1fr; }
  .cs-gal-grid figure.wide,
  .cs-gal-grid figure.tall,
  .cs-gal-grid figure.half { grid-column: auto; grid-row: auto; }
}
