/* =========================================================
   Case studies — editorial layout
   ========================================================= */

/* ---------- Cover ---------- */
.cs-cover { position: relative; isolation: isolate; overflow: hidden; padding: 130px 0 56px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 44px; font-size: 13px; color: var(--fg-muted); }
.crumbs a:hover { color: var(--fg); }
.crumbs [aria-current] { color: var(--fg); }
.cs-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 0 0 22px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-muted); }
.cs-kicker span { padding: 6px 12px; border-radius: 999px; color: #fff; background: var(--gradient-btn); letter-spacing: .14em; }
.cs-title { font-size: clamp(38px, 5.6vw, 80px); line-height: 1.02; letter-spacing: -.045em; margin: 0 0 26px; max-width: 1080px; }
.cs-title--index { font-size: clamp(56px, 10vw, 150px); line-height: .95; }
.cs-deck { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6; color: var(--fg-muted); max-width: 780px; margin: 0 0 44px; }

.cs-facts { display: flex; margin: 0; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.cs-facts > div { flex: 1 1 0; min-width: 0; padding: 18px 22px 18px 0; }
.cs-facts > div:nth-child(4) { flex-grow: 2.2; }
.cs-facts > div:last-child dd { white-space: nowrap; flex-wrap: nowrap; }
.cs-facts .status-dot { flex-shrink: 0; }
.cs-facts > div + div { padding-left: 22px; border-left: 1px solid var(--border); }
.cs-facts dt { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 6px; }
.cs-facts dd { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.cs-channels { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 22px; }
.cs-channels__who { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--fg-muted); }
.cs-channels__who strong { display: block; font-size: 16px; color: var(--fg); }
.cs-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 14px; font-weight: 800; letter-spacing: -.02em; color: #fff; background: var(--gradient-btn); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent); }
.cs-channels__links { display: flex; gap: 10px; }
.cs-channels__links .pi { width: 44px; height: 44px; transition: transform .3s var(--ease); }
.cs-channels__links .pi:hover { transform: translateY(-3px); }

/* ---------- Headline numbers band (dark slate in both themes) ---------- */
.cs-band { background: radial-gradient(ellipse at 85% 0%, rgba(210, 122, 77, .22), transparent 55%), #1A2324; color: #F3EEE8; }
.cs-band__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.cs-band__item { padding: clamp(30px, 4vw, 52px) 24px; }
.cs-band__item + .cs-band__item { border-left: 1px solid rgba(255, 255, 255, .12); }
.cs-band__item:first-child { padding-left: 0; }
.cs-band__item strong { display: block; font-size: clamp(40px, 5.4vw, 78px); font-weight: 800; letter-spacing: -.05em; line-height: 1; margin-bottom: 12px; background-image: linear-gradient(120deg, #F2C9A6, #E09A6E 45%, #D27A4D); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cs-band__item span { font-size: 14px; color: rgba(243, 238, 232, .78); }

/* ---------- Story layout: sticky contents + reading column ---------- */
.cs-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(30px, 6vw, 90px); padding-top: clamp(50px, 7vw, 90px); }
.cs-toc { position: sticky; top: 110px; align-self: start; }
.cs-toc p { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-muted); margin: 0 0 14px; }
.cs-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border-strong); }
.cs-toc a { display: block; padding: 8px 0 8px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; color: var(--fg-muted); transition: color .25s, border-color .25s; }
.cs-toc a:hover { color: var(--fg); }
.cs-toc a.is-active { color: var(--fg); border-left-color: var(--accent); font-weight: 600; }
.cs-content { max-width: 820px; }
.cs-section { padding-bottom: clamp(56px, 7vw, 90px); scroll-margin-top: 110px; }
.cs-section + .cs-section { padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--border); }
.cs-label { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.cs-label span { font-variant-numeric: tabular-nums; color: var(--fg-muted); }
.cs-label span::after { content: ""; display: inline-block; width: 28px; height: 1px; margin-left: 12px; vertical-align: middle; background: var(--border-strong); }
.cs-lead { font-size: clamp(21px, 2.1vw, 27px); line-height: 1.45; letter-spacing: -.015em; font-weight: 600; color: var(--fg); margin: 0 0 22px; }
.cs-section > p:not(.cs-label):not(.cs-lead) { font-size: 17px; line-height: 1.75; color: var(--fg-muted); margin: 0 0 18px; }
.cs-h2 { font-size: clamp(30px, 3.8vw, 50px); line-height: 1.06; margin: 0 0 18px; }

/* Numbered strategy steps */
.cs-steps { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid var(--border); }
.cs-steps li { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.cs-steps__n { font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--accent); }
.cs-steps h3 { margin: 2px 0 6px; font-size: 19px; letter-spacing: -.01em; }
.cs-steps p { margin: 0; color: var(--fg-muted); font-size: 16px; line-height: 1.6; }

/* Results: bars, panels, ring */
.cs-chart { margin: 30px 0 16px; padding: 28px; border-radius: 22px; background: var(--card); border: 1px solid var(--border); }
.cs-chart__title { margin: 0 0 20px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-muted); }
.cs-bar { display: grid; grid-template-columns: 170px 1fr 190px; align-items: center; gap: 18px; padding: 10px 0; }
.cs-bar__name { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.cs-bar__name .pi { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
.cs-bar__track { height: 12px; border-radius: 999px; background: rgba(var(--tint), .07); overflow: hidden; }
.cs-bar__fill { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #5F2E1B, #B4592F 55%, #E09A6E); transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease) .2s; }
.is-in .cs-bar__fill { transform: scaleX(1); }
.cs-bar__value { font-size: 14px; color: var(--fg-muted); }
.cs-bar__value strong { font-size: 20px; color: var(--fg); letter-spacing: -.02em; margin-right: 4px; }

.cs-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cs-panel { padding: 28px; border-radius: 22px; background: var(--card); border: 1px solid var(--border); }
.cs-panel__num { display: block; font-size: clamp(56px, 7vw, 88px); font-weight: 800; letter-spacing: -.05em; line-height: 1; margin-bottom: 12px; background-image: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cs-panel__text { margin: 0 0 18px; color: var(--fg-muted); font-size: 15px; line-height: 1.6; }
.cs-split { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 3px; margin-bottom: 14px; }
.cs-split span { width: var(--w); background: #B4592F; }
.cs-split span + span { background: var(--cool); }
.cs-legend { display: grid; gap: 8px; font-size: 14px; color: var(--fg-muted); }
.cs-legend li { display: flex; align-items: center; gap: 10px; }
.cs-legend strong { color: var(--fg); }
.cs-legend i { width: 10px; height: 10px; border-radius: 3px; background: #B4592F; flex-shrink: 0; }
.cs-legend li + li i { background: var(--cool); }
.cs-ring { position: relative; width: 170px; height: 170px; margin: 0 auto 20px; }
.cs-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cs-ring circle { fill: none; stroke-width: 12; }
.cs-ring__track { stroke: rgba(var(--tint), .08); }
.cs-ring__fill { stroke: #D27A4D; stroke-linecap: round; stroke-dashoffset: 70; transition: stroke-dashoffset 1.6s var(--ease) .2s; }
.cs-ring--full .cs-ring__fill { stroke-dashoffset: 100; }
.is-in .cs-ring__fill { stroke-dashoffset: 0; }
.cs-ring > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 13px; color: var(--fg-muted); }
.cs-ring strong { display: block; font-size: 38px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--fg); }
.cs-today { display: grid; gap: 14px; }
.cs-today li { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.cs-today .pi { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
.cs-today strong { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.cs-today span:last-child { font-size: 13px; color: var(--fg-muted); }
.cs-checks { display: grid; gap: 12px; }
.cs-checks li { display: flex; gap: 12px; font-size: 15px; color: var(--fg-muted); line-height: 1.5; }
.cs-checks .ic { color: var(--green); margin-top: 3px; }

/* Proof gallery */
.cs-proofs { display: grid; gap: 28px; margin-top: 28px; }
.cs-proof { margin: 0; }
.cs-proof__frame { position: relative; display: block; border-radius: 18px; overflow: hidden; border: 1px solid var(--border-strong); background: #fff; box-shadow: 0 30px 60px -34px var(--shadow); transition: transform .4s var(--ease), border-color .3s; }
.cs-proof__frame:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), .6); }
.cs-proof__frame img { display: block; width: 100%; height: auto; }
.cs-proof__zoom { position: absolute; right: 14px; bottom: 14px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(2, 4, 3, .78); opacity: 0; transform: scale(.85); transition: opacity .3s, transform .3s var(--ease); }
.cs-proof__frame:hover .cs-proof__zoom, .cs-proof__frame:focus-visible .cs-proof__zoom { opacity: 1; transform: none; }
.cs-proof figcaption { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; font-size: 14px; color: var(--fg-muted); line-height: 1.55; }
.cs-proof figcaption strong { display: block; color: var(--fg); font-size: 15px; }
.cs-proof figcaption .pi { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }

.lightbox { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(2, 4, 3, .9); }
.lightbox img { display: block; max-width: 100%; max-height: 88vh; border-radius: 14px; }
.lightbox__close { position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; font-size: 18px; color: #fff; background: var(--gradient-btn); }

/* Takeaway */
.cs-quote { margin: 0 0 24px; padding-left: clamp(18px, 3vw, 32px); border-left: 3px solid var(--accent); }
.cs-quote p { margin: 0; font-size: clamp(26px, 3.2vw, 42px); font-weight: 700; line-height: 1.22; letter-spacing: -.03em; }
.cs-role { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); }
.cs-role p { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-muted); }

/* Next case */
.cs-next-wrap { padding-bottom: clamp(60px, 8vw, 110px); }
.cs-next { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 60px); align-items: center; padding: clamp(26px, 4vw, 48px); border-radius: 30px; background: var(--bg-2); border: 1px solid var(--border); transition: border-color .4s, transform .4s var(--ease); }
.cs-next:hover { border-color: rgba(var(--accent-rgb), .5); transform: translateY(-4px); }
.cs-next__copy { display: flex; flex-direction: column; gap: 12px; }
.cs-next__label { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.cs-next__copy strong { font-size: clamp(30px, 4vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; }
.cs-next__copy > span:last-child { color: var(--fg-muted); font-size: 16px; }
.cs-next:hover .cs-frame img { transform: scale(1.04); }

/* ---------- Index: project rows ---------- */
.cs-cover--index { padding-bottom: 30px; }
.cs-list { display: grid; padding-bottom: clamp(60px, 8vw, 110px); }
.cs-row { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 70px); align-items: center; padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--border-strong); }
.cs-row:last-child { border-bottom: 1px solid var(--border-strong); }
.cs-row:nth-child(even) .cs-frame { order: -1; }
.cs-row__meta { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-muted); }
.cs-row__num { font-size: 15px; color: var(--accent); letter-spacing: .04em; }
.cs-row__title { margin: 0 0 14px; font-size: clamp(34px, 4.6vw, 64px); font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.cs-row__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cs-row__summary { margin: 0 0 26px; color: var(--fg-muted); font-size: 17px; max-width: 520px; }
.cs-row__stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 28px; margin: 0 0 28px; }
.cs-row__stats div { display: flex; flex-direction: column-reverse; }
.cs-row__stats dd { margin: 0; font-size: clamp(26px, 2.8vw, 36px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; background-image: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cs-row__stats dt { font-size: 13px; color: var(--fg-muted); }
.cs-row__cta { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--accent); }
.cs-row__cta .ic { transition: transform .35s var(--ease); }
.cs-row:hover .cs-row__cta .ic { transform: translateX(5px); }
.cs-row:hover .cs-frame img { transform: scale(1.04); }
.cs-row:focus-within { outline: none; }

/* ---------- CTA ---------- */
.case-cta { padding-top: 0; }
.case-cta .section-sub { margin: 22px auto 40px; }
.case-cta__title { font-size: clamp(38px, 6.4vw, 90px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  /* Two-column fact sheet: Client | Industry, Duration | Status, then Services full width */
  .cs-facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .cs-facts > div, .cs-facts > div + div { padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--border); }
  .cs-facts > div:nth-child(4) { grid-column: 1 / -1; order: 9; border-bottom: 0; }
}
@media (max-width: 960px) {
  .cs-body { grid-template-columns: 1fr; }
  .cs-toc { display: none; }
  .cs-band__grid { grid-template-columns: 1fr 1fr; }
  .cs-band__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .cs-band__item:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, .12); }
  .cs-row, .cs-next { grid-template-columns: 1fr; }
  .cs-row:nth-child(even) .cs-frame { order: 0; }
  .cs-bar { grid-template-columns: 1fr auto; row-gap: 8px; }
  .cs-bar__track { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
  .cs-facts { grid-template-columns: 1fr; }
  .cs-duo { grid-template-columns: 1fr; }
  .cs-band__item { padding: 26px 14px; }
  .cs-band__item:first-child { padding-left: 0; }
  .cs-steps li { grid-template-columns: 52px 1fr; }
  .cs-steps__n { font-size: 26px; }
  .cs-row__stats { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .cs-chart, .cs-panel { padding: 22px; }
}
