/* Case study detail page: /work/<slug> (case-study.php)
   Content comes from data/case-studies.php and is rendered by case-study.php; js/pages/case-study.js adds behaviour.
   Breakpoints: 960px ("narrow", single column) and 640px ("mobile"). */

/* ---------- Page-only keyframes ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes csFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes csPulse { 0% { box-shadow: 0 0 0 0 rgba(241, 43, 43, .6); } 100% { box-shadow: 0 0 0 16px rgba(241, 43, 43, 0); } }
  @keyframes csDrift { to { background-position: 36px 36px; } }
  @keyframes csRipple { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
  @keyframes csMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  /* Slowly pans a tall screenshot from top to bottom and back */
  @keyframes csImgScroll {
    0%, 10% { object-position: 50% 0%; }
    50%, 60% { object-position: 50% 100%; }
    100% { object-position: 50% 0%; }
  }
}

/* ---------- Shared bits ---------- */
.cs-nowrap { white-space: nowrap; }
.cs-label--on-dark { color: #A9A8A2; }

.cs-section { scroll-margin-top: 128px; }

.cs-pad {
  padding-top: clamp(72px, 9vw, 136px);
  padding-bottom: clamp(72px, 9vw, 136px);
}

.cs-stack { display: flex; flex-direction: column; gap: 24px; }

.cs-h2 {
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 500;
  text-wrap: balance;
}

.cs-note { font-size: 16px; line-height: 1.6; color: #4A4945; max-width: 46ch; }
.cs-note--on-dark { color: #A9A8A2; max-width: 44ch; }

/* Screenshot box: background colour while loading, image fills it */
.cs-shot { background-color: #1A1A19; overflow: hidden; }
.cs-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
}

/* Two-column split used by Challenge and Build */
.cs-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.cs-sticky { position: sticky; top: 140px; }

/* Heading + note row used by Approach and Architecture */
.cs-intro-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.cs-intro-row--tight { margin-bottom: clamp(36px, 4vw, 64px); }

/* ---------- Hero ---------- */
.cs-hero { position: relative; isolation: isolate; overflow: hidden; }

.cs-hero__lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(11, 11, 11, 0.06) 0 1px, transparent 1px 120px);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  mask-image: linear-gradient(180deg, #000, transparent);
}

.cs-hero__dots {
  position: absolute;
  right: -8%;
  top: 4%;
  width: 60%;
  height: 70%;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(11, 11, 11, 0.2) 1px, transparent 1.2px);
  background-size: 18px 18px;
  animation: csDrift 5s linear infinite;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
}

.cs-hero__inner {
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 72px);
}

.cs-hero__count { margin-left: auto; white-space: nowrap; }

.cs-hero__grid {
  margin-top: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 28px 64px;
  align-items: end;
}

.cs-hero__main,
.cs-hero__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  animation: nvRise 1s var(--ease-out) both;
}
.cs-hero__side { animation-delay: .1s; }

.cs-hero__kicker { color: var(--red); }

.cs-hero__title {
  font-weight: 500;
  font-size: clamp(36px, 7vw, 116px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.cs-hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.15;
  color: var(--text);
  max-width: 26ch;
}

.cs-hero__intro { font-size: 16px; line-height: 1.65; color: #4A4945; max-width: 48ch; }

.cs-hero__actions { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }

.cs-hero__visit { flex: 0 0 auto; gap: 12px; padding: 16px 22px; }

/* Facts row */
.cs-facts {
  margin-top: clamp(36px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.cs-facts__item {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-facts__item dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--muted); }
.cs-facts__item dd { font-size: 16px; letter-spacing: -0.01em; }

/* Screen switcher */
.cs-screens {
  margin-top: clamp(32px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: nvRise 1.1s var(--ease-out) .2s both;
}
.cs-screens__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cs-screens__tabs { display: flex; border: 1px solid var(--ink); }
.cs-screens__tab {
  appearance: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 9px 14px;
  font: inherit;
  line-height: inherit;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all .25s;
}
.cs-screens__tab[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.cs-screens__caption { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }

.cs-browser {
  background: var(--charcoal);
  border: 1px solid var(--charcoal);
  box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.5);
  animation: csFade .5s ease both;
}
.cs-browser__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #262624;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
}
.cs-browser__dots { display: flex; gap: 5px; flex: none; }
.cs-browser__dots span { width: 8px; height: 8px; background: #3A3A37; }
.cs-browser__url {
  flex: 1;
  border: 1px solid #2C2C2A;
  padding: 5px 10px;
  background: #161615;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cs-browser__shot { aspect-ratio: 16 / 8; }
.cs-browser__shot img { animation: csImgScroll 16s ease-in-out infinite; }

/* Phone mock-ups (hero "MOBILE" tab and Outcome) */
.cs-phone-stage {
  display: flex;
  justify-content: center;
  padding: 16px 0;
  background: var(--paper-2);
  animation: csFade .5s ease both;
}
.cs-phone {
  position: relative;
  width: min(300px, 72vw);
  aspect-ratio: 9 / 19;
  padding: 10px;
  background: var(--ink);
  border-radius: 38px;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.55);
}
.cs-phone__notch {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 2;
  width: 84px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: var(--ink);
}
.cs-phone__screen { width: 100%; height: 100%; border-radius: 30px; }
.cs-phone__screen img { animation: csImgScroll 12s ease-in-out infinite; }

.cs-phone--sm {
  width: min(280px, 70vw);
  border-radius: 36px;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.5);
}
.cs-phone--sm .cs-phone__notch { width: 80px; height: 20px; }
.cs-phone--sm .cs-phone__screen { border-radius: 28px; }

/* ---------- Sticky section nav ---------- */
.cs-toc {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(11, 11, 11, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.cs-toc__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(8px, 4vw, 56px);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.cs-toc__inner::-webkit-scrollbar { display: none; }
.cs-toc__link {
  flex: none;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 15px 14px;
  font-size: 13px;
  white-space: nowrap;
  color: #8A8984;
  border-bottom: 2px solid transparent;
  transition: color .3s, border-color .3s;
}
.cs-toc__link:hover { color: var(--white); }
.cs-toc__link.is-active { color: var(--white); border-bottom-color: var(--red); }
.cs-toc__num { font-family: var(--mono); font-size: 10px; color: #5F5E5A; }
.cs-toc__link.is-active .cs-toc__num { color: var(--red); }

.cs-toc__track { height: 2px; background: #1F1F1D; }
.cs-toc__progress {
  height: 2px;
  width: calc(var(--progress, 0) * 100%);
  background: var(--red);
  transition: width .15s linear;
}

/* ---------- Highlights ---------- */
.cs-highlights {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}
.cs-highlights__marquee {
  position: absolute;
  left: 0;
  bottom: -0.3em;
  z-index: -1;
  pointer-events: none;
  white-space: nowrap;
  font-size: clamp(110px, 13vw, 210px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px #1F1F1D;
  animation: csMarquee 50s linear infinite;
}
.cs-highlights__inner {
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.cs-highlights__grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 0 clamp(20px, 3vw, 40px);
}
.cs-highlight {
  border-top: 1px solid var(--line-dark-2);
  padding: 24px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .5s, opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.cs-highlight.is-active { border-top-color: var(--red); }
.cs-highlight__n { font-family: var(--mono); font-size: 12px; color: var(--red); }
.cs-highlight__t {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--on-dark-2);
  transition: color .5s;
}
.cs-highlight.is-active .cs-highlight__t { color: var(--white); }

/* ---------- Challenge ---------- */
.cs-challenge { background: var(--paper); }
.cs-challenge__list { display: flex; flex-direction: column; }
.cs-challenge__item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: clamp(22px, 2.4vw, 32px) 0;
  border-top: 1px solid var(--rule);
}
.cs-challenge__n { font-family: var(--mono); font-size: 12px; color: var(--red); padding-top: 5px; }
.cs-challenge__t { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; letter-spacing: -0.015em; }

/* ---------- Approach ---------- */
.cs-approach {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper-2);
}
.cs-approach__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11, 11, 11, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 11, 11, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 80% 30%, #000, transparent);
  mask-image: radial-gradient(ellipse 60% 60% at 80% 30%, #000, transparent);
}
.cs-steps {
  position: relative;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 0;
}
.cs-steps__scan {
  position: absolute;
  top: -1px;
  z-index: 1;
  height: 2px;
  background: var(--red);
  animation: nvScan 6s ease-in-out infinite;
}
.cs-step {
  border-top: 2px solid var(--ink);
  padding: 26px clamp(0px, 2vw, 28px) 28px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .3s, opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.cs-step.is-active { border-top-color: var(--red); }
.cs-step__n { font-family: var(--mono); font-size: 13px; color: var(--muted); transition: color .3s; }
.cs-step.is-active .cs-step__n { color: var(--red); }
.cs-step__t { font-size: clamp(26px, 2.6vw, 40px); letter-spacing: -0.045em; line-height: 1; font-weight: 500; }
.cs-step__d { font-size: 15px; line-height: 1.6; color: #4A4945; max-width: 32ch; }

/* ---------- Solution ---------- */
.cs-solution { background: var(--paper); }
.cs-solution__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.cs-solution__copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.cs-solution__p { font-size: 17px; line-height: 1.65; color: var(--text); max-width: 56ch; }

.cs-figure {
  position: sticky;
  top: 140px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.cs-figure__frame {
  background: var(--charcoal);
  border: 1px solid var(--charcoal);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.45);
}
.cs-figure__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid #262624;
}
.cs-figure__bar span { width: 7px; height: 7px; background: #3A3A37; }
.cs-figure__shot { aspect-ratio: 4 / 3; }
.cs-figure__shot img { animation: csImgScroll 18s ease-in-out infinite; }
.cs-figure__caption { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }

/* ---------- Information architecture ---------- */
.cs-arch {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--charcoal);
  color: var(--white);
}
.cs-arch__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
}
.cs-journeys {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: clamp(18px, 2.4vw, 32px);
  background: var(--ink);
  border: 1px solid #2A2A28;
  font-family: var(--mono);
}
.cs-journey { display: flex; flex-direction: column; gap: 12px; }
.cs-journey__label { font-size: 10px; letter-spacing: 0.08em; color: var(--muted-dark); }
.cs-journey__path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cs-journey__step { display: flex; align-items: center; gap: 8px; }
.cs-node {
  padding: 11px 14px;
  border: 1px solid #2C2C2A;
  background: transparent;
  color: var(--muted-dark);
  font-family: var(--font);
  font-size: 14px;
  transition: all .45s;
}
.cs-node.is-visited { border-color: #5F5E5A; color: var(--white); }
.cs-node.is-current {
  border-color: var(--red);
  background: #1F1514;
  color: var(--white);
  animation: csPulse 1.6s ease-out infinite;
}
.cs-arrow { color: #3A3A37; transition: color .45s; }
.cs-arrow.is-lit { color: var(--red); }

/* ---------- Key features ---------- */
.cs-features { background: var(--paper); }
.cs-features__head { margin-bottom: clamp(36px, 4vw, 64px); }
.cs-features__title { max-width: 16ch; }
.cs-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--rule);
}
.cs-feature {
  padding: clamp(20px, 2.4vw, 30px);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  transition: background .5s, opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.cs-feature.is-active { background: var(--white); }
.cs-feature:hover { background: var(--paper-2); }
.cs-feature__n { font-family: var(--mono); font-size: 11px; color: #8A8984; transition: color .5s; }
.cs-feature.is-active .cs-feature__n { color: var(--red); }
.cs-feature__t { font-size: 19px; letter-spacing: -0.02em; font-weight: 500; line-height: 1.2; }
.cs-feature__d { font-size: 14px; line-height: 1.55; color: #4A4945; }

/* ---------- Technical implementation ---------- */
.cs-build { background: var(--ink); color: var(--white); }
.cs-build__note { max-width: 42ch; }
.cs-terminal {
  min-width: 0;
  background: var(--charcoal);
  border: 1px solid #2A2A28;
  font-family: var(--mono);
}
.cs-terminal__bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #262624;
  font-size: 11px;
  color: var(--muted-2);
}
.cs-terminal__status { display: flex; align-items: center; gap: 6px; }
.cs-terminal__led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: csPulse 1.6s ease-out infinite;
}
.cs-tech {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 6px 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #1F1F1D;
  opacity: .25;
  transition: opacity .5s;
}
.cs-tech.is-on { opacity: 1; }
.cs-tech__k { font-size: 11px; letter-spacing: 0.06em; color: var(--red); padding-top: 2px; }
.cs-tech__v { font-family: var(--font); font-size: 15px; line-height: 1.5; color: #EDEDEA; }

/* ---------- Outcome ---------- */
.cs-outcome { background: var(--paper-2); }
.cs-outcome__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.cs-outcome__media { display: flex; justify-content: center; min-width: 0; }
.cs-outcome__copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.cs-outcome__note { font-size: 15px; line-height: 1.6; color: #4A4945; max-width: 48ch; }

.cs-checks { display: flex; flex-direction: column; }
.cs-check {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--rule-strong);
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #8A8984;
  transition: color .5s;
}
.cs-check__mark {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--on-dark-2);
  transition: all .4s;
}
.cs-check.is-on { color: var(--ink); }
.cs-check.is-on .cs-check__mark { background: var(--ink); border-color: var(--ink); }
.cs-check.is-on .cs-check__mark::before { content: "✓"; }

.cs-scope { display: flex; flex-direction: column; gap: 10px; }
.cs-scope__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.cs-scope__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 9px;
  border: 1px solid var(--rule-strong);
  color: var(--text);
}
.cs-scope__link { align-self: flex-start; margin-top: 6px; }

/* ---------- Next project ---------- */
.cs-next { background: var(--paper); }
.cs-next__link {
  display: block;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 112px) var(--gutter);
  color: var(--ink);
}
.cs-next__link:hover { color: var(--red); }
.cs-next__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-next__grid {
  margin-top: clamp(24px, 3vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px 48px;
  align-items: center;
}
.cs-next__name {
  font-size: clamp(34px, 7vw, 120px);
  letter-spacing: -0.055em;
  line-height: 0.92;
  font-weight: 500;
  text-wrap: balance;
}
.cs-next__img { aspect-ratio: 16 / 10; border: 1px solid var(--ink); }
.cs-next__img img { animation: csImgScroll 14s ease-in-out infinite; }

/* ---------- Explore links ---------- */
.cs-explore { background: var(--paper); }
.cs-explore__grid {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(48px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(24px, 3.5vw, 56px);
}
.cs-explore__col { display: flex; flex-direction: column; }
.cs-explore__label { margin-bottom: 10px; }
.cs-explore__link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 500;
}

/* ---------- FAQ ---------- */
.cs-faq { background: var(--paper-2); }
.cs-faq__grid {
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(64px, 8vw, 120px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.cs-faq__intro { display: flex; flex-direction: column; gap: 20px; }
.cs-faq__title {
  font-size: clamp(30px, 3.8vw, 58px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 500;
  text-wrap: balance;
}
.cs-faq__lead { font-size: 17px; line-height: 1.7; color: var(--text); max-width: 52ch; }
.cs-faq__ask { align-self: flex-start; font-size: 15px; }
.cs-faq__list { display: flex; flex-direction: column; }
.cs-faq__label { margin-bottom: 12px; }
.cs-faq__item,
.cs-faq__end { border-top: 1px solid var(--rule-strong); }
.cs-faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.cs-faq__plus { flex: none; font-family: var(--mono); font-size: 16px; color: var(--red); }
.cs-faq__a { margin: 0 0 20px; font-size: 16px; line-height: 1.65; color: #4A4945; max-width: 60ch; }

/* ---------- Closing CTA ---------- */
.cs-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}
.cs-cta__ring,
.cs-cta__core {
  position: absolute;
  left: 84%;
  top: 50%;
  z-index: -1;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cs-cta__ring { border: 1px solid #1C1C1A; animation: csRipple 4.2s ease-in-out infinite; }
.cs-cta__ring--1 { width: 1000px; height: 1000px; animation-delay: 1.2s; }
.cs-cta__ring--2 { width: 700px; height: 700px; animation-delay: .8s; }
.cs-cta__ring--3 { width: 420px; height: 420px; border-color: #2A2A28; animation-delay: .4s; }
.cs-cta__ring--4 { width: 200px; height: 200px; border-color: #2A2A28; }
.cs-cta__core {
  width: 14px;
  height: 14px;
  background: var(--red);
  animation: csPulse 1.8s ease-out infinite;
}
.cs-cta__inner {
  padding-top: clamp(88px, 11vw, 168px);
  padding-bottom: clamp(88px, 11vw, 168px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.4vw, 48px);
}
.cs-cta__kicker { display: flex; align-items: center; gap: 10px; }
.cs-cta__title {
  font-size: clamp(34px, 6.6vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  font-weight: 500;
  max-width: 13ch;
  text-wrap: balance;
}
.cs-cta__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 28px 64px;
  align-items: end;
  border-top: 1px solid #262624;
  padding-top: clamp(24px, 3vw, 40px);
}
.cs-cta__lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--on-dark); max-width: 44ch; }
.cs-cta__actions { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.cs-cta__start { flex: 0 0 auto; gap: 14px; padding: 20px 30px; font-size: 16px; }
.cs-cta__all {
  font-size: 15px;
  color: var(--white);
  border-bottom: 1px solid #555550;
  padding-bottom: 3px;
}
.cs-cta__all:hover { color: var(--red); border-color: var(--red); }

/* ---------- "Case study not found" state ---------- */
.cs-missing { position: relative; }
.cs-missing__inner {
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(72px, 9vw, 136px);
}
.cs-missing__grid {
  margin-top: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(40px, 5vw, 80px);
  align-items: end;
}
.cs-missing__main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  animation: nvRise 1s var(--ease-out) both;
}
.cs-missing__title {
  font-weight: 500;
  font-size: clamp(36px, 6vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.cs-missing__text { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--text); max-width: 46ch; }

/* ---------- Narrow (< 960px): single column ---------- */
@media (max-width: 959.98px) {
  .cs-hero__grid,
  .cs-split,
  .cs-solution__grid,
  .cs-outcome__grid,
  .cs-next__grid { grid-template-columns: minmax(0, 1fr); }

  .cs-sticky,
  .cs-figure { position: static; }
}

/* ---------- Mobile (< 640px) ---------- */
@media (max-width: 639.98px) {
  .cs-section { scroll-margin-top: 116px; }

  .cs-hero__count,
  .cs-next__img,
  .cs-cta__ring,
  .cs-cta__core { display: none; }

  .cs-hero__visit,
  .cs-cta__start { flex: 1 1 100%; }

  .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-browser__shot { aspect-ratio: 4 / 3; }
  .cs-tech { grid-template-columns: minmax(0, 1fr); }
}
