/* =============================================
   CASE STUDIES — listing (case-studies.php) + detail (case-study.php)
   Editorial, image-led layout. Builds on style.css tokens.
   ============================================= */

:root {
  --cs-ink: #07162e;          /* deep navy — banners, thumbnails */
  --cs-ink-2: #0c2a55;
  --cs-hl: #6cc2ff;           /* highlight on dark */
  --cs-line: #e6e8ee;
  --cs-soft: #f4f7fb;
  --cs-radius: 18px;
  --cs-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ─── Atoms ────────────────────────────────── */
.cs-play {
  display: inline-block; width: 0; height: 0; margin-right: 0.5rem; vertical-align: 0.05em;
  border-style: solid; border-width: 0.36em 0 0.36em 0.58em;
  border-color: transparent transparent transparent currentColor;
}

.cs-kicker {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-blue); margin-bottom: 1.1rem;
}
.cs-kicker--light { color: var(--cs-hl); }

.cs-stretched { color: inherit; text-decoration: none; }
.cs-stretched::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }

.cs-textlink, .cs-card-cta, .cs-band-link, .cs-voice-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; text-decoration: none;
}
.cs-textlink { color: var(--accent-blue); font-size: 0.95rem; }
.cs-textlink svg, .cs-card-cta svg, .cs-band-link svg, .cs-voice-link svg, .cs-next-label svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.3s var(--cs-ease);
}
.cs-textlink:hover svg { transform: translateX(4px); }

/* Client logos */
.cs-logo {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid var(--cs-line); overflow: hidden;
}
.cs-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
span.cs-logo.cs-logo--img { width: auto; min-width: 44px; max-width: 130px; padding: 5px 9px; }
span.cs-logo.cs-logo--img img { width: auto; height: 100%; max-width: 100%; padding: 0; }
.cs-logo--mono { font-weight: 700; font-size: 0.9rem; color: #fff; border: 0; background: linear-gradient(135deg, #0066cc, var(--cs-ink-2)); }

/* App icons */
.cs-app {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.cs-app img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.cs-app svg { width: 100%; height: 100%; padding: 3px; }
.cs-app--text { font-size: 0.68rem; font-weight: 700; color: var(--cs-ink-2); background: #e8f1fc; }
.cs-app--more { font-size: 0.72rem; font-weight: 700; color: #fff; background: rgba(255, 255, 255, 0.18); box-shadow: none; }

/* Buttons on dark */
.cs-btn-light { background: #fff; color: var(--cs-ink-2); border-color: #fff; }
.cs-btn-light:hover { background: #e9f3ff; color: var(--accent-blue); }
.cs-btn-light svg, .cs-btn-ghost svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cs-btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.cs-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

/* ─── Thumbnail (branded banner) ───────────── */
/* Outer layer: shape, shadow and lift. Inner .cs-thumb-clip does the rounded clipping with
   clip-path, which (unlike overflow:hidden) never drops its corners while the photo animates. */
.cs-thumb {
  position: relative; display: flex; border-radius: var(--cs-radius);
  aspect-ratio: 16 / 9; color: #fff;
  box-shadow: 0 1px 2px rgba(7, 22, 46, 0.06);
  transform: translateZ(0); backface-visibility: hidden; will-change: transform;
  transition: box-shadow 0.5s var(--cs-ease), transform 0.5s var(--cs-ease);
}
.cs-thumb-clip {
  position: relative; flex: 1; min-width: 0; border-radius: inherit; overflow: hidden; isolation: isolate;
  background: var(--cs-ink);
  -webkit-clip-path: inset(0 round var(--cs-radius)); clip-path: inset(0 round var(--cs-radius));
}
.cs-thumb-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  z-index: -2; backface-visibility: hidden; transition: transform 1.1s var(--cs-ease);
}
.cs-thumb-clip::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(7, 22, 46, 0.97) 0%, rgba(7, 22, 46, 0.9) 42%, rgba(12, 42, 85, 0.55) 100%),
    radial-gradient(120% 80% at 100% 0%, rgba(0, 102, 204, 0.35), transparent 60%);
}
.cs-thumb-inner { position: relative; height: 100%; display: flex; flex-direction: column; padding: clamp(1.1rem, 2.2vw, 1.6rem); }
.cs-thumb-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: auto; }
.cs-thumb-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.85rem; letter-spacing: -0.01em; color: #fff; }
.cs-thumb-brand img { width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.cs-thumb-partner { height: 24px; width: auto; border-radius: 5px; background: #fff; }
.cs-thumb-label { margin: 0.9rem 0 0.45rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cs-hl); }
.cs-thumb-title {
  font-size: clamp(1.05rem, 1.7vw, 1.45rem); font-weight: 700; line-height: 1.28; letter-spacing: -0.015em;
  max-width: 88%; margin: 0 0 1rem; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-hl { color: var(--cs-hl); }
.cs-thumb-apps { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* =============================================
   LISTING
   ============================================= */

.cs-hero { padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.cs-hero-title {
  font-size: clamp(2.3rem, 5.2vw, 4.4rem); line-height: 1.06; letter-spacing: -0.04em;
  max-width: 17ch; margin-bottom: 1.4rem;
}
.cs-hero-title span { color: var(--accent-blue); }
.cs-hero-sub { font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.7; color: var(--text-secondary); max-width: 680px; margin-bottom: 0; }
/* Grid */
.cs-browse { padding: clamp(1rem, 2vw, 1.5rem) 0 clamp(3.5rem, 7vw, 6rem); }

.cs-grid { display: grid; gap: clamp(2.5rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.cs-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cs-card { position: relative; display: flex; flex-direction: column; border-radius: var(--cs-radius); }
.cs-card:hover .cs-thumb { box-shadow: 0 24px 60px rgba(7, 22, 46, 0.22); transform: translate3d(0, -4px, 0); }
.cs-card:hover .cs-thumb-bg { transform: scale3d(1.06, 1.06, 1); }
.cs-card:focus-within .cs-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent-blue); }

.cs-card-body { padding: 1.35rem 0.25rem 0; display: flex; flex-direction: column; flex: 1; }
.cs-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-bottom: 0.65rem; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cs-card-meta strong { color: var(--accent-blue); font-weight: 700; }
.cs-card-meta span::before { content: "·"; margin-right: 0.6rem; }
.cs-card-title { font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 600; line-height: 1.32; letter-spacing: -0.02em; margin-bottom: 0.6rem; transition: color 0.25s ease; }
.cs-card:hover .cs-card-title { color: var(--accent-blue); }
.cs-card-summary { font-size: 0.97rem; line-height: 1.65; color: var(--text-secondary); margin-bottom: 1.1rem; }
.cs-card-cta { margin-top: auto; font-size: 0.92rem; color: var(--accent-blue); }
.cs-card:hover .cs-card-cta svg { transform: translateX(5px); }

/* Client voices */
.cs-voices {
  padding: clamp(4rem, 8vw, 7rem) 0; color: #fff; overflow: hidden;
  background:
    radial-gradient(60% 80% at 0% 0%, rgba(0, 102, 204, 0.35), transparent 60%),
    radial-gradient(50% 70% at 100% 100%, rgba(108, 194, 255, 0.16), transparent 60%),
    var(--cs-ink);
}
.cs-voices-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.cs-voices-intro h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.12; color: #fff; margin-bottom: 2rem; }
.cs-voices-nav { display: flex; align-items: center; gap: 1rem; }
.cs-voices-count { font-size: 0.9rem; color: rgba(255, 255, 255, 0.6); min-width: 3.5rem; text-align: center; }
.cs-voices-count b { color: #fff; }
.cs-arrow {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.25s ease;
}
.cs-arrow:hover { background: #fff; color: var(--cs-ink); border-color: #fff; }
.cs-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.cs-voices-track { position: relative; }
.cs-voice {
  margin: 0; padding: clamp(1.75rem, 4vw, 3rem); border-radius: 24px; background: #fff; color: var(--text-primary);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
}
.cs-voice.is-active { animation: cs-slide 0.6s var(--cs-ease) both; }
.cs-voice.is-active.from-left { animation-name: cs-slide-l; }
@keyframes cs-slide { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes cs-slide-l { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
.cs-voice-tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.35rem 0.8rem; border-radius: 100px; background: #eef5ff; color: var(--accent-blue); margin-bottom: 1.4rem; }
.cs-voice blockquote { margin: 0 0 2rem; font-size: clamp(1.1rem, 1.8vw, 1.4rem); line-height: 1.6; font-weight: 500; letter-spacing: -0.01em; }
.cs-voice figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: 0.9rem; padding-top: 1.4rem; border-top: 1px solid var(--cs-line); }
.cs-voice figcaption > span { display: flex; flex-direction: column; font-size: 0.88rem; color: var(--text-muted); }
.cs-voice figcaption strong { color: var(--text-primary); font-size: 0.98rem; }
.cs-voice-link { margin-left: auto; font-size: 0.9rem; color: var(--accent-blue); }
.cs-voice-link:hover svg { transform: translateX(4px); }
.cs-voice-dots { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.cs-voice-dots button { width: 28px; height: 4px; border-radius: 4px; border: 0; padding: 0; background: rgba(255, 255, 255, 0.25); cursor: pointer; transition: all 0.3s ease; }
.cs-voice-dots button[aria-selected="true"] { width: 48px; background: var(--cs-hl); }

/* CTA band */
.cs-band {
  position: relative; overflow: hidden; color: #fff; padding: clamp(4rem, 8vw, 6.5rem) 0;
  background: linear-gradient(120deg, #0052a3 0%, #0066cc 45%, #1f8bff 100%);
}
.cs-band::before, .cs-band::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); pointer-events: none;
}
.cs-band::before { width: 620px; height: 620px; right: -160px; top: -260px; }
.cs-band::after { width: 380px; height: 380px; right: 60px; bottom: -260px; border-color: rgba(255, 255, 255, 0.12); }
.cs-band-inner { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem 4rem; flex-wrap: wrap; }
.cs-band h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.08; letter-spacing: -0.035em; color: #fff; max-width: 16ch; margin: 0; }
.cs-band h2 span { color: #bfe2ff; }
.cs-band-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cs-band-link { color: #fff; font-size: 0.95rem; }
.cs-band-link:hover svg { transform: translateX(4px); }

/* =============================================
   DETAIL
   ============================================= */

.cs-progress { position: fixed; top: var(--navbar-h); left: 0; right: 0; height: 3px; z-index: 900; pointer-events: none; }
.cs-progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent-blue), var(--cs-hl)); }

.cs-topstrip { padding: 1.25rem 0; }
.cs-topstrip-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cs-crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
.cs-crumbs a { color: var(--text-muted); text-decoration: none; }
.cs-crumbs a:hover { color: var(--accent-blue); }
.cs-crumbs [aria-current] { color: var(--text-primary); font-weight: 500; }
.cs-pills { display: flex; gap: 0.5rem; }
.cs-pills span { font-size: 0.78rem; font-weight: 500; padding: 0.35rem 0.85rem; border-radius: 100px; background: var(--bg-tertiary); color: var(--text-secondary); }

/* Banner */
.cs-banner { position: relative; overflow: hidden; color: #fff; background: var(--cs-ink); isolation: isolate; }
.cs-banner-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; z-index: -2; }
.cs-banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(95deg, rgba(7, 22, 46, 0.97) 0%, rgba(7, 22, 46, 0.9) 45%, rgba(12, 42, 85, 0.62) 100%),
    radial-gradient(70% 90% at 100% 0%, rgba(0, 102, 204, 0.35), transparent 60%);
}
.cs-banner-inner {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding-top: clamp(2.5rem, 5vw, 4.5rem); padding-bottom: clamp(2rem, 4vw, 3rem);
}
.cs-banner-brand { display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.cs-banner-brand .cs-thumb-brand { font-size: 1rem; }
.cs-banner-brand .cs-thumb-brand img { width: 32px; height: 32px; }
.cs-banner-brand .cs-thumb-partner { height: 30px; }
.cs-banner-label { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cs-hl); margin-bottom: 1rem; }
.cs-banner-title { font-size: clamp(2rem, 4.3vw, 3.6rem); line-height: 1.1; letter-spacing: -0.035em; color: #fff; margin-bottom: 1.25rem; max-width: 22ch; }
.cs-banner-sub { font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.65; color: rgba(255, 255, 255, 0.78); max-width: 58ch; margin-bottom: 2rem; }
.cs-banner-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.cs-banner-cover {
  position: relative; justify-self: end; width: min(320px, 100%); padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 16px; overflow: hidden; transform: rotate(2.5deg); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
  backface-visibility: hidden; transition: transform 0.6s var(--cs-ease);
}
.cs-banner-cover:hover, .cs-banner-cover:focus-visible { transform: rotate(0) translateY(-6px); }
.cs-banner-cover img { display: block; width: 100%; height: auto; border-radius: inherit; }
.cs-banner-cover span {
  position: absolute; right: 0.75rem; bottom: 0.75rem; display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 600; color: #fff; background: rgba(7, 22, 46, 0.78); padding: 0.4rem 0.75rem; border-radius: 100px;
}
.cs-banner-cover span svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.cs-banner-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem;
  padding: 1.75rem 0 2.25rem; margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.cs-banner-facts dt { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: #fff; }
.cs-banner-facts dd { margin: 0.35rem 0 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.62); }

/* Article layout */
.cs-article-wrap { padding: clamp(3rem, 6vw, 5rem) 0; }
.cs-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start; }
.cs-article { max-width: 780px; min-width: 0; }

.cs-sec { margin-bottom: clamp(2.75rem, 5vw, 3.75rem); scroll-margin-top: calc(var(--navbar-h) + 1.5rem); }
.cs-sec-h {
  display: flex; align-items: center; gap: 0.85rem;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.3; margin-bottom: 1.25rem; color: var(--text-primary);
}
.cs-sec-h::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--accent-blue); flex: 0 0 auto; }
.cs-sec > p, .cs-quoteblock p { font-size: 1.04rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 1.1rem; }

.cs-callout { margin-top: 1.75rem; padding: 1.5rem 1.6rem; border-radius: 16px; background: var(--cs-soft); border: 1px solid var(--cs-line); }
.cs-callout p { margin-bottom: 1rem; line-height: 1.6; }
.cs-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.cs-ticks li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--text-secondary); line-height: 1.6; }
.cs-ticks svg, .cs-res-icon svg { flex: 0 0 auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cs-ticks svg { width: 20px; height: 20px; margin-top: 2px; padding: 4px; border-radius: 50%; background: var(--accent-blue); stroke: #fff; stroke-width: 3.5; }

.cs-figure { margin: 2rem 0 0; border-radius: 16px; overflow: hidden; }
.cs-figure img { display: block; width: 100%; height: auto; }

.cs-numlist { list-style: none; counter-reset: cs; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.cs-numlist li {
  counter-increment: cs; position: relative; padding-left: 3rem; font-size: 1.02rem; line-height: 1.75; color: var(--text-secondary);
}
.cs-numlist li::before {
  content: counter(cs, decimal-leading-zero); position: absolute; left: 0; top: 0.1rem;
  width: 2.1rem; height: 2.1rem; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: var(--accent-blue); background: #eef5ff;
}
.cs-numlist strong, .cs-bullets strong { color: var(--text-primary); }

.cs-quoteblock { border-left: 3px solid var(--accent-blue); padding: 0.25rem 0 0.25rem 1.5rem; }
.cs-quoteblock p:last-child { margin-bottom: 0; }

.cs-sol { padding: 1.5rem 0; border-top: 1px solid var(--cs-line); }
.cs-sol:last-child { padding-bottom: 0; }
.cs-sol h3 { display: flex; align-items: center; gap: 0.85rem; font-size: 1.12rem; line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 0.9rem; }
.cs-sol-icon {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 1px solid var(--cs-line);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.cs-sol-icon img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.cs-sol-icon svg { width: 100%; height: 100%; padding: 5px; }
.cs-sol-icon--text { font-size: 0.72rem; font-weight: 700; color: var(--cs-ink-2); background: #eef5ff; border-color: transparent; }
.cs-sol-icon--gen svg { fill: none; stroke: var(--accent-blue); stroke-width: 1.8; stroke-linecap: round; padding: 8px; }
.cs-bullets { list-style: none; padding: 0 0 0 calc(38px + 0.85rem); margin: 0; display: grid; gap: 0.6rem; }
.cs-bullets li { position: relative; padding-left: 1.1rem; line-height: 1.7; color: var(--text-secondary); }
.cs-bullets li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-blue); }

.cs-steps { list-style: none; padding: 0; margin: 1.25rem 0 0; position: relative; }
.cs-steps::before { content: ""; position: absolute; left: 6px; top: 0.6rem; bottom: 0.6rem; width: 2px; background: linear-gradient(var(--accent-blue), #cfe3fb); }
.cs-steps li { position: relative; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.25rem 1rem; padding: 0 0 1.15rem 2rem; }
.cs-steps li::before { content: ""; position: absolute; left: 0; top: 0.35rem; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent-blue); box-sizing: border-box; }
.cs-steps li:last-child::before { background: var(--accent-blue); }
.cs-step-n { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-blue); padding-top: 0.15rem; }
.cs-step-t { line-height: 1.65; color: var(--text-secondary); }

.cs-results { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; }
.cs-results li { display: flex; gap: 0.9rem; align-items: flex-start; }
.cs-res-icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: #e8f6ee; display: inline-flex; align-items: center; justify-content: center; }
.cs-res-icon svg { width: 18px; height: 18px; stroke: #0a7a3f; stroke-width: 3; }
.cs-results strong { display: block; font-size: 1rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.cs-results p { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--text-secondary); }
.cs-highlight { margin: 2rem 0 0; padding: 1.5rem 1.75rem; border-radius: 16px; background: var(--cs-ink); color: rgba(255, 255, 255, 0.88); line-height: 1.7; }
.cs-highlight span { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cs-hl); margin-bottom: 0.5rem; }

.cs-table-wrap { border: 1px solid var(--cs-line); border-radius: 16px; overflow: hidden; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.cs-table th, .cs-table td { text-align: left; vertical-align: top; padding: 1.1rem 1.25rem; line-height: 1.6; }
.cs-table thead th { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); background: var(--cs-soft); border-bottom: 1px solid var(--cs-line); }
.cs-table thead th:nth-child(3) { color: var(--accent-blue); }
.cs-table tbody tr + tr { border-top: 1px solid var(--cs-line); }
.cs-table tbody th { font-weight: 600; color: var(--text-primary); width: 26%; }
.cs-table td { color: var(--text-secondary); width: 37%; }
.cs-table td:last-child { color: var(--text-primary); background: #f6faff; }

.cs-pullquote { margin: 0 0 2.5rem; padding: 2rem 0 0; border-top: 1px solid var(--cs-line); }
.cs-pullquote blockquote { margin: 0 0 1.5rem; font-size: clamp(1.25rem, 2.2vw, 1.65rem); line-height: 1.5; font-weight: 500; letter-spacing: -0.015em; color: var(--text-primary); }
.cs-pullquote figcaption { display: flex; align-items: center; gap: 0.85rem; }
.cs-pullquote figcaption > span { display: flex; flex-direction: column; font-size: 0.88rem; color: var(--text-muted); }
.cs-pullquote figcaption strong { color: var(--text-primary); }
.cs-closing { font-size: 1.05rem; line-height: 1.8; color: var(--text-secondary); padding: 1.5rem 1.75rem; border-radius: 16px; background: var(--cs-soft); margin: 0; }

/* At a glance */
.cs-glance { position: sticky; top: calc(var(--navbar-h) + 1.5rem); display: grid; gap: 1rem; }
.cs-glance-card, .cs-glance-toc { border: 1px solid var(--cs-line); border-radius: var(--cs-radius); padding: 1.5rem; background: #fff; }
.cs-glance-card { box-shadow: 0 20px 50px rgba(7, 22, 46, 0.06); }
.cs-glance-h { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; }
.cs-glance-client { display: flex; align-items: center; gap: 0.8rem; padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--cs-line); }
.cs-glance-client strong { font-size: 1rem; line-height: 1.3; }
.cs-glance-card dl { display: grid; gap: 0.85rem; margin: 0 0 1.25rem; }
.cs-glance-card dt { font-size: 0.75rem; color: var(--text-muted); }
.cs-glance-card dd { margin: 0.1rem 0 0; font-size: 0.93rem; font-weight: 500; color: var(--text-primary); }
.cs-glance-sub { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.cs-glance-apps { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.5rem; }
.cs-glance-apps li { display: flex; align-items: center; gap: 0.65rem; font-size: 0.9rem; font-weight: 500; }
.cs-glance-apps .cs-app { width: 26px; height: 26px; border-radius: 7px; box-shadow: none; border: 1px solid var(--cs-line); }
.cs-glance-cta { width: 100%; justify-content: center; }
.cs-glance-pdf { display: block; text-align: center; margin-top: 0.85rem; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.cs-glance-pdf:hover { color: var(--accent-blue); }

.cs-glance-toc ol { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; }
.cs-glance-toc a { display: block; font-size: 0.9rem; color: var(--text-muted); text-decoration: none; padding: 0.4rem 0 0.4rem 0.9rem; border-left: 2px solid var(--cs-line); transition: all 0.2s ease; }
.cs-glance-toc a:hover { color: var(--text-primary); }
.cs-glance-toc a.is-active { color: var(--accent-blue); font-weight: 600; border-left-color: var(--accent-blue); }

.cs-share { display: flex; align-items: center; gap: 0.45rem; padding-top: 1.1rem; border-top: 1px solid var(--cs-line); }
.cs-share > span { font-size: 0.75rem; color: var(--text-muted); margin-right: auto; }
.cs-share a, .cs-share button {
  position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--cs-line); background: #fff;
  color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease;
}
.cs-share a:hover, .cs-share button:hover { color: #fff; background: var(--accent-blue); border-color: var(--accent-blue); }
.cs-share svg { width: 15px; height: 15px; fill: currentColor; }
.cs-copy svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cs-copy-msg {
  position: absolute; bottom: calc(100% + 8px); right: 0; white-space: nowrap; font-size: 0.72rem; font-weight: 600;
  background: var(--text-primary); color: #fff; padding: 0.3rem 0.6rem; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.cs-copy-msg:not(:empty) { opacity: 1; }

/* Next case study */
.cs-next { padding: 0 0 clamp(3rem, 6vw, 5rem); }
.cs-next-card {
  position: relative; display: block; overflow: hidden; border-radius: 24px; text-decoration: none; color: #fff;
  min-height: 260px; background: var(--cs-ink); isolation: isolate;
  -webkit-clip-path: inset(0 round 24px); clip-path: inset(0 round 24px);
}
.cs-next-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--cs-ease); }
.cs-next-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(95deg, rgba(7, 22, 46, 0.96) 0%, rgba(7, 22, 46, 0.85) 50%, rgba(12, 42, 85, 0.5) 100%); }
.cs-next-card:hover > img { transform: scale(1.05); }
.cs-next-inner { display: flex; flex-direction: column; gap: 0.85rem; padding: clamp(2rem, 5vw, 3.5rem); max-width: 820px; }
.cs-next-label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cs-hl); }
.cs-next-card:hover .cs-next-label svg { transform: translateX(6px); }
.cs-next-title { font-size: clamp(1.4rem, 2.8vw, 2.3rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.025em; }
.cs-next-client { font-size: 0.9rem; color: rgba(255, 255, 255, 0.65); }

.cs-related { padding: 0 0 clamp(3.5rem, 7vw, 6rem); }
.cs-related-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.cs-related-head h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0; }

/* Lightbox */
.cs-lightbox {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 2rem;
  background: rgba(7, 22, 46, 0.9); backdrop-filter: blur(6px); cursor: zoom-out; animation: cs-fade 0.25s ease both;
}
.cs-lightbox[hidden] { display: none; }
.cs-lightbox img { max-width: min(900px, 100%); max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.cs-lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 1.1rem; cursor: pointer; }
.cs-lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
@keyframes cs-fade { from { opacity: 0; } to { opacity: 1; } }
body.cs-noscroll { overflow: hidden; }

/* ─── Responsive ───────────────────────────── */
@media (max-width: 1180px) {
  .cs-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .cs-article-layout { grid-template-columns: 1fr; }
  .cs-glance { position: static; order: -1; }
  .cs-glance-toc { display: none; }
  .cs-glance-card dl { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .cs-glance-apps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .cs-voices-grid { grid-template-columns: 1fr; }
  .cs-voices-intro h2 { margin-bottom: 1.25rem; }
}

@media (max-width: 860px) {
  .cs-banner-inner { grid-template-columns: 1fr; }
  .cs-banner-cover { display: none; }
  .cs-results { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .cs-grid--2, .cs-grid--3 { grid-template-columns: 1fr; }
  .cs-band-inner { align-items: flex-start; }

  /* Before/after table → stacked cards */
  .cs-table thead { display: none; }
  .cs-table, .cs-table tbody, .cs-table tr, .cs-table th, .cs-table td { display: block; width: 100%; }
  .cs-table tbody th { background: var(--cs-soft); width: 100%; }
  .cs-table td { width: 100%; }
  .cs-table td::before { content: attr(data-label); display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem; }
  .cs-table td:last-child::before { color: var(--accent-blue); }
}

@media (max-width: 560px) {
  .cs-thumb { aspect-ratio: auto; min-height: 230px; }
  .cs-thumb-title { font-size: 1.08rem; max-width: 100%; display: block; -webkit-line-clamp: unset; }
  .cs-thumb-label { margin-top: 1.5rem; }
  .cs-card-meta span::before { content: none; }
  .cs-card-meta span { width: 100%; }
  .cs-thumb-partner { height: 20px; }
  .cs-thumb-apps .cs-app { width: 26px; height: 26px; }
  .cs-pills { display: none; }
  .cs-banner-brand .cs-thumb-partner { height: 24px; }
  .cs-steps li { grid-template-columns: 1fr; }
  .cs-bullets { padding-left: 0; }
  .cs-voice-link { margin-left: 0; width: 100%; }
  .cs-banner-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .cs-thumb, .cs-thumb-bg, .cs-banner-cover, .cs-next-card > img { transition: none !important; }
  .cs-card:hover .cs-thumb { transform: none; }
  .cs-card:hover .cs-thumb-bg, .cs-next-card:hover > img { transform: none; }
  .cs-voice.is-active, .cs-lightbox { animation: none; }
}
