/* ─── Case Study Layout ──────────────────────────────────────────────────────── */

/* Fixed reading column; min() lets it shrink to the viewport on small screens.
   Media runs wider than the text so screenshots stay legible. */
:root {
  --read-w: min(100%, 880px);
  --prose-w: min(100%, 860px);
  --media-w: min(100%, 1120px);
}

/* Hero */
.cs-hero {
  padding-top: var(--nav-h);
}

.cs-hero__inner {
  max-width: var(--read-w);
  margin: 0 auto;
  padding: 72px clamp(20px, 5vw, 60px) 56px;
}

.cs-hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.cs-back {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 400;
  transition: color 0.2s;
  margin-right: 8px;
}
.cs-back:hover { color: var(--shiba-orange); }

.cs-hero__title {
  font-family: var(--font-sans);
  font-size: clamp(34px, 4.6vw, 46px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.032em;
  color: var(--black);
  margin-bottom: 20px;
}

.cs-hero__subtitle {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2vw, 22px);
  color: var(--gray-500);
  font-weight: 400;
  line-height: 1.55;
  max-width: var(--prose-w);
  margin-bottom: 44px;
}

/* Project facts: one group, label above value */
.cs-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 32px;
  max-width: var(--prose-w);
  padding-top: 28px;
  padding-bottom: 4px;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
/* Team spans the full row — it's a longer list, same style as the rest */
.cs-stat--wide {
  grid-column: 1 / -1;
}
.cs-stat__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
}
.cs-stat__value {
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  line-height: 1.5;
}

/* Wider than the reading column so screenshots read clearly.
   Padding is added to the max-width so the image itself reaches --media-w. */
.cs-hero__cover {
  width: 100%;
  max-width: calc(var(--media-w) + 2 * clamp(20px, 5vw, 60px));
  margin: 0 auto;
  /* Bottom padding gives the drop shadow room to fall */
  padding: 0 clamp(20px, 5vw, 60px) 40px;
}

/* Layered shadow so the demo floats above the page, Apple-keynote style */
.cs-hero__cover-img {
  display: block;
  margin-inline: auto;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(17, 17, 16, 0.06);
  box-shadow:
    0 1px 2px rgba(17, 17, 16, 0.04),
    0 8px 16px -4px rgba(17, 17, 16, 0.06),
    0 24px 48px -12px rgba(17, 17, 16, 0.10),
    0 48px 96px -24px rgba(17, 17, 16, 0.12);
}

.cs-hero__cover-caption {
  text-align: center;
  max-width: var(--prose-w);
  margin: -16px auto 0;
  padding: 0 clamp(20px, 5vw, 60px);
  font-size: 14px;
  color: var(--gray-400);
}

/* ─── Reading progress ───────────────────────────────────────────────────────── */
/* Sits on the nav's bottom edge, filling left to right as the article scrolls */
.cs-progress {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 101;
  background: transparent;
  pointer-events: none;
}

.cs-progress__bar {
  height: 100%;
  width: 0;
  background: var(--shiba-orange);
  transform-origin: left center;
  transition: width 0.1s linear;
}

/* ─── Table of contents ──────────────────────────────────────────────────────── */
/* Notion-style rail pinned to the left gutter; hidden when there's no room */
.cs-toc {
  display: none;
}

@media (min-width: 1400px) {
  .cs-toc {
    display: block;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    /* Gutter left of the widest (media) column */
    left: max(24px, calc(50% - (1120px / 2) - 210px));
    width: 190px;
    z-index: 40;
  }
}

.cs-toc__heading {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-bottom: 14px;
  padding-left: 12px;
}

.cs-toc__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-left: 1px solid var(--gray-100);
}

.cs-toc__link {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--gray-400);
  padding: 7px 0 7px 12px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.cs-toc__link:hover {
  color: var(--gray-700);
}
.cs-toc__link.is-active {
  color: var(--black);
  border-left-color: var(--shiba-orange);
}

/* ─── Sections ───────────────────────────────────────────────────────────────── */
.cs-section {
  padding: clamp(48px, 6vw, 76px) 0;
}

/* No tinted sections — the page stays white so imagery can carry the color */
.cs-section--alt {
  background: transparent;
}

/* Padding sits inside the max-width, matching .cs-hero__inner so all edges align */
.cs-section__inner {
  max-width: var(--read-w);
  margin: 0 auto;
  display: block;
  padding: 0 clamp(20px, 5vw, 60px);
}

/* Wide sections use the media measure; nudged left so their label still lines up
   with the narrower prose sections above and below. */
.cs-section--wide .cs-section__inner {
  max-width: calc(var(--media-w) + 2 * clamp(20px, 5vw, 60px));
}
/* Indent the heading block so it lines up with the narrower prose sections.
   Offset = half the gap between this section's box and the prose column's,
   floored at 0 — once both containers clamp to 100vw on small screens the
   gap disappears and the indent must too, or the heading drifts right. */
.cs-section--wide .cs-label-col,
.cs-section--wide .cs-h2 {
  max-width: calc(var(--read-w) - 2 * clamp(20px, 5vw, 60px));
  margin-left: calc(max(0px, var(--media-w) - var(--read-w)) / 2 + clamp(20px, 5vw, 60px));
}

/* Big section marker — the fastest way to tell what this section is about */
/* Quiet eyebrow — orients the reader without competing with the heading below it */
.cs-label-col {
  margin-bottom: 14px;
}
.cs-label-col .section-label {
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--gray-400);
}

.cs-content-col {
  min-width: 0;
}

/* ─── Typography ─────────────────────────────────────────────────────────────── */
.cs-h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.45;
  letter-spacing: -0.005em;
  margin-bottom: 28px;
  color: var(--gray-500);
  max-width: var(--prose-w);
}

/* Sections without a .cs-track marker use the h2 as the real headline,
   so it gets the same weight and the same small rule above it that
   .cs-track__rule gives every other section — one consistent header style. */
.cs-content-col > .cs-h2:first-child {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--black);
  margin-bottom: 24px;
}
.cs-content-col > .cs-h2:first-child::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--shiba-orange);
  margin-bottom: 16px;
}

.cs-h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  color: var(--black);
  margin: 44px 0 12px;
  letter-spacing: -0.015em;
  line-height: 1.3;
  max-width: var(--prose-w);
}

.cs-body {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--gray-700);
  line-height: 1.7;
  letter-spacing: -0.003em;
  margin-bottom: 32px;
  max-width: var(--prose-w);
}

/* Medium-style lead paragraph: first para after an h2 sits a little larger */
.cs-content-col > .cs-h2 + .cs-body {
  font-size: 21px;
  color: var(--gray-700);
}

/* Case-study hero: quieter tag, no filled pill */
.cs-hero__meta .project-tag {
  background: transparent;
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
}

/* ─── Callout ─────────────────────────────────────────────────────────────────── */
.cs-callout {
  background: transparent;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  padding: 20px 0;
  font-size: 17px;
  color: var(--gray-700);
  line-height: 1.65;
  max-width: var(--prose-w);
  margin: 36px 0;
}
.cs-callout strong { color: var(--black); }

/* ─── Stat / Insight cards ───────────────────────────────────────────────────── */
.cs-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0 40px;
}

.cs-insight-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-insight__number {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  color: var(--shiba-orange);
  line-height: 1;
}
.cs-insight__label {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ─── Findings list ──────────────────────────────────────────────────────────── */
.cs-findings {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: var(--prose-w);
  margin-bottom: 32px;
}
.cs-findings li {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--gray-700);
  line-height: 1.6;
  padding-left: 26px;
  position: relative;
}
.cs-findings li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--shiba-orange);
  font-family: var(--font-sans);
  font-size: 14px;
  top: 6px;
}

/* ─── Process steps ──────────────────────────────────────────────────────────── */
.cs-process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--gray-200);
}

.cs-step {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 28px 0;
  border-bottom: 1px solid var(--gray-200);
}

.cs-step__num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--shiba-orange);
  opacity: 0.6;
  flex-shrink: 0;
  width: 36px;
  padding-top: 2px;
}

.cs-step__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.cs-step__desc {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ─── Pixel dot divider ──────────────────────────────────────────────────────── */
/* Replaces the old placeholder image blocks between sections */
.cs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: clamp(20px, 3vw, 36px) 20px;
}

.cs-divider__dot {
  width: 4px;
  height: 4px;
  background: var(--gray-300);
  /* Hard edges — no border-radius — for a pixel-art feel */
  animation: cs-dot-blink 2.4s steps(1, end) infinite;
}
.cs-divider__dot:nth-child(1) { animation-delay: 0s; }
.cs-divider__dot:nth-child(2) { animation-delay: 0.3s; }
.cs-divider__dot:nth-child(3) { animation-delay: 0.6s; background: var(--shiba-orange); }
.cs-divider__dot:nth-child(4) { animation-delay: 0.9s; }
.cs-divider__dot:nth-child(5) { animation-delay: 1.2s; }

@keyframes cs-dot-blink {
  0%, 70%, 100% { opacity: 0.35; }
  35%           { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-divider__dot { animation: none; opacity: 0.5; }
}

/* ─── Image blocks ───────────────────────────────────────────────────────────── */
.cs-full-image {
  width: 100%;
}

.cs-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
}

.cs-image-grid__item {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Feature list ───────────────────────────────────────────────────────────── */
.cs-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--gray-100);
}

.cs-feature {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-100);
}

.cs-feature__icon {
  font-size: 14px;
  color: var(--shiba-orange);
  flex-shrink: 0;
  width: 20px;
  padding-top: 2px;
}

/* Real tool logos — sized to match the Impact icon footprint, own colors kept */
.cs-feature__icon--logo {
  width: 28px;
  height: 28px;
  padding-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-feature__icon--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cs-feature__icon--logo svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cs-feature__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.cs-feature__desc {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ─── Impact row (scannable highlights) ──────────────────────────────────────── */
/* auto-fit fills the full column width whatever the number of items */
.cs-impact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin: 36px 0 8px;
}

.cs-impact__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-impact__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--shiba-orange);
}
.cs-impact__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cs-impact__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.cs-impact__desc {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.55;
}

/* ─── Outcomes ───────────────────────────────────────────────────────────────── */
.cs-three-col--outcomes .cs-outcome {
  background: var(--black);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-outcome__value {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 400;
  color: var(--shiba-orange);
  line-height: 1;
}

.cs-outcome__label {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ─── Next project ───────────────────────────────────────────────────────────── */
.cs-next {
  padding: 80px clamp(20px, 5vw, 60px);
  border-top: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.cs-next__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-decoration: none;
  transition: color 0.2s;
}
.cs-next__link:hover .cs-next__label { color: var(--shiba-orange); }
.cs-next__link:hover .cs-next__arrow { transform: translateX(8px); }

.cs-next__label {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  color: var(--black);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.cs-next__arrow {
  font-size: 32px;
  color: var(--shiba-orange);
  transition: transform 0.25s cubic-bezier(0.34,1.4,0.64,1);
  flex-shrink: 0;
}

/* ─── Pull quote / takeaway ──────────────────────────────────────────────────── */
.cs-takeaway {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 27px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--black);
  max-width: var(--prose-w);
  margin: 48px 0 40px;
  padding-left: 26px;
  border-left: 3px solid var(--gray-200);
}

/* ─── Track marker ───────────────────────────────────────────────────────────── */
/* The topic name (e.g. "Product definition") is the real headline here — the
   "Track 0X" framing already lives in the eyebrow above, so this stays big and
   quiet rather than repeating it. */
.cs-track {
  display: block;
  margin-bottom: 10px;
}
.cs-track__rule {
  display: block;
  width: 32px;
  height: 2px;
  background: var(--shiba-orange);
  margin-bottom: 16px;
}
.cs-track__num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--black);
}

/* ─── Comparison table ───────────────────────────────────────────────────────── */
.cs-table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-top: 1px solid var(--gray-200);
}
.cs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  min-width: 480px;
}
.cs-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--gray-200);
}
.cs-table td {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  line-height: 1.55;
  vertical-align: top;
}
.cs-table tr[data-chosen] td {
  color: var(--black);
  font-weight: 500;
  border-bottom-color: var(--gray-300);
}
.cs-table tr[data-chosen] td:first-child {
  position: relative;
  padding-left: 16px;
}
.cs-table tr[data-chosen] td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 23px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--shiba-orange);
}

/* ─── Scope split (MVP / Later) ──────────────────────────────────────────────── */
.cs-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}
.cs-scope__col {
  padding: 24px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--gray-100);
}
.cs-scope__col--now {
  border-color: var(--gray-300);
}
.cs-scope__title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.cs-scope__col--now .cs-scope__title { color: var(--black); }
.cs-scope__list li {
  font-size: 16px;
  color: var(--gray-700);
  line-height: 1.5;
  padding: 8px 0 8px 18px;
  position: relative;
}
.cs-scope__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 17px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gray-300);
}
.cs-scope__col--now .cs-scope__list li::before { background: var(--shiba-orange); }

/* ─── Principle / foundation chips ───────────────────────────────────────────── */
.cs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}
.cs-chip {
  font-size: 14px;
  color: var(--gray-700);
  padding: 9px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  background: var(--white);
}

/* ─── Article link-preview card ──────────────────────────────────────────────── */
/* Used to embed a link to an external article (e.g. a Medium post) inline,
   with a real cover image, title, and description — not just a bare link. */
.cs-article-card {
  display: flex;
  gap: 20px;
  align-items: stretch;
  max-width: var(--prose-w);
  margin: 32px 0;
  padding: 16px;
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cs-article-card:hover {
  border-color: var(--gray-200);
  box-shadow: 0 8px 24px rgba(17, 17, 16, 0.06);
}
.cs-article-card__img {
  width: 120px;
  height: 90px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
  background: var(--gray-50);
}
.cs-article-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-width: 0;
}
.cs-article-card__title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--black);
  line-height: 1.35;
}
.cs-article-card__desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}
.cs-article-card__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  margin-top: 2px;
  transition: color 0.2s;
}
.cs-article-card:hover .cs-article-card__link {
  color: var(--shiba-orange);
}

@media (max-width: 560px) {
  .cs-article-card { flex-direction: column; }
  .cs-article-card__img { width: 100%; height: 160px; }
}

/* ─── Inline figure (images / GIFs) ──────────────────────────────────────────── */
/* Breaks out of the reading column up to --media-w, staying centered.
   Generous vertical margin so consecutive figures don't feel stacked on top
   of each other — each image gets room to breathe on both sides. */
.cs-figure {
  margin: 64px auto;
  width: var(--media-w);
  max-width: calc(100vw - 40px);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.cs-figure img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.cs-figure__placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  border: 1px dashed var(--gray-300);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.cs-figure__placeholder span {
  font-size: 14px;
  color: var(--gray-400);
  max-width: 360px;
  line-height: 1.5;
}
.cs-figure--sm .cs-figure__placeholder { aspect-ratio: 4 / 3; }
/* Small reaction GIFs stay within the text column, centered */
.cs-figure--sm {
  width: 400px;
  max-width: 100%;
  left: auto;
  transform: none;
  margin-inline: auto;
}
.cs-figure figcaption {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--gray-500);
  line-height: 1.6;
  letter-spacing: -0.003em;
  margin-top: 16px;
  max-width: var(--prose-w);
}

/* ─── Two-up figure (side-by-side images) ────────────────────────────────────── */
/* Reusable template: two images in a row at the media width, same generous
   spacing rhythm as a single .cs-figure. Usage:
   <div class="cs-figure-duo">
     <figure><img src="…" alt="…"><figcaption>…</figcaption></figure>
     <figure><img src="…" alt="…"><figcaption>…</figcaption></figure>
   </div> */
.cs-figure-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 64px auto;
  width: var(--media-w);
  max-width: calc(100vw - 40px);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.cs-figure-duo figure { margin: 0; }
.cs-figure-duo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ─── Stacked gallery (layered evolution) ────────────────────────────────────── */
/* Cards sit in a physical stack, fanned slightly. Click the front card (or
   press → / Space) and it drops to the back of the stack, revealing the next
   one — reads as flipping through an evolving series of screenshots.
   Usage:
   <div class="cs-gallery" data-gallery>
     <figure class="cs-gallery__card"><img src="…" alt="…"><figcaption>01 — …</figcaption></figure>
     <figure class="cs-gallery__card"><img src="…" alt="…"><figcaption>02 — …</figcaption></figure>
     …
   </div>
   main.js (initStackedGalleries) handles the click-to-cycle behaviour. */
.cs-gallery {
  position: relative;
  margin: 72px auto;
  width: var(--media-w);
  max-width: calc(100vw - 40px);
  left: 50%;
  transform: translateX(-50%);
  /* Extra bottom room for the fanned-out cards behind the front one */
  padding-bottom: 28px;
}

.cs-gallery__stack {
  position: relative;
  width: 100%;
  /* Absolutely positioned cards have no intrinsic height, so the stack needs
     its own — matched to the source images' aspect ratio. */
  aspect-ratio: 16 / 10;
}

.cs-gallery__card {
  margin: 0;
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  cursor: pointer;
}
.cs-gallery__card img {
  display: block;
  width: 100%;
  height: 100%;
  /* Source images vary in aspect ratio — cover keeps every card the same
     frame size instead of letting the stack resize per-card. */
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
  box-shadow: 0 8px 24px rgba(17, 17, 16, 0.08);
}
.cs-gallery__card figcaption {
  position: absolute;
  left: 16px;
  bottom: -26px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  letter-spacing: 0.02em;
}

/* Stack depth — each position back is smaller, lower, and rotated a touch */
.cs-gallery__card[data-depth="0"] { transform: translateY(0) rotate(0deg); z-index: 4; }
.cs-gallery__card[data-depth="1"] { transform: translateY(14px) rotate(-2.5deg) scale(0.97); z-index: 3; }
.cs-gallery__card[data-depth="2"] { transform: translateY(26px) rotate(2.5deg) scale(0.94); z-index: 2; }
.cs-gallery__card[data-depth="3"] { transform: translateY(36px) rotate(-4deg) scale(0.91); z-index: 1; }
.cs-gallery__card:not([data-depth="0"]) { cursor: default; pointer-events: none; }
.cs-gallery__card[data-depth="0"]:hover { transform: translateY(-4px) rotate(0deg); }
.cs-gallery__card[data-depth="0"]:hover img { box-shadow: 0 16px 36px rgba(17, 17, 16, 0.14); }

.cs-gallery__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--gray-400);
}
.cs-gallery__hint svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}
.cs-gallery__dots {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.cs-gallery__dot {
  width: 5px;
  height: 5px;
  background: var(--gray-200);
  transition: background 0.3s;
}
.cs-gallery__dot.is-active { background: var(--shiba-orange); }

@media (prefers-reduced-motion: reduce) {
  .cs-gallery__card { transition: none; }
}
.cs-figure-duo figcaption {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.6;
  margin-top: 12px;
}


/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .cs-hero__stats {
    gap: 20px 28px;
  }
  .cs-three-col {
    grid-template-columns: 1fr 1fr;
  }
  .cs-image-grid {
    grid-template-columns: 1fr;
  }
  .cs-image-grid__item { min-height: 240px; }
  .cs-scope {
    grid-template-columns: 1fr;
  }
  .cs-impact {
    grid-template-columns: repeat(2, 1fr);
  }
  .cs-takeaway {
    margin-top: 40px;
    padding-left: 18px;
  }
}

@media (max-width: 560px) {
  .cs-hero__stats {
    gap: 18px 20px;
  }
  .cs-three-col {
    grid-template-columns: 1fr;
  }
  /* Ease the reading scale down on small screens */
  .cs-body,
  .cs-content-col > .cs-h2 + .cs-body {
    font-size: 18px;
    line-height: 1.65;
    margin-bottom: 26px;
  }
  .cs-findings li { font-size: 17px; }
  .cs-h3 { font-size: 20px; margin-top: 40px; }
  .cs-takeaway { font-size: 20px; }
  /* One per row — two columns is too narrow to read at this width */
  .cs-impact {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ─── Back to top ─────────────────────────────────────────────────────────── */
.cs-back-to-top {
  position: fixed;
  right: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-100);
  box-shadow: 0 4px 12px rgba(17, 17, 16, 0.06), 0 12px 28px rgba(17, 17, 16, 0.1);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cs-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.cs-back-to-top:hover {
  border-color: var(--shiba-orange);
  box-shadow: 0 4px 12px rgba(232, 133, 74, 0.12), 0 12px 28px rgba(232, 133, 74, 0.16);
}
.cs-back-to-top svg {
  width: 18px;
  height: 18px;
  stroke: var(--black);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
