/* ===== Case study detail page (case_studies/show) =====
   Built from Figma 3546:1170 but laid out like the home page: (NN) label on the
   left, two-tone headline + text on the right, visuals on the full container
   width with the site's large radius. */

.cs-hero { padding: 24px 0 0; }
.cs-hero__split { margin-top: clamp(72px, 7.3vw, 140px); }

.cs-kicker { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-kicker > span {
  padding: 8px 14px;
  border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 99px;
  font-size: 14px; line-height: 1; color: var(--ink);
}
.cs-kicker > span:first-child { background: var(--ink); border-color: var(--ink); color: #fff; }

.cs-title {
  margin-top: 28px;
  max-width: 980px;
  font-weight: 400;
  font-size: clamp(42px, 4.17vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--ink-2);
  text-wrap: balance;
}
.cs-title .soft { color: rgba(22, 23, 22, 0.3); }

.cs-hero__intro { max-width: 760px; margin-top: 32px; }
.cs-hero__intro p + p { margin-top: 0.9em; }

.cs-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.cs-facts > div { padding: 20px 20px 0 0; }
.cs-facts > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.cs-facts dt { font-size: 14px; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
.cs-facts dd { margin-top: 8px; font-size: clamp(18px, 1.25vw, 24px); line-height: 1.3; letter-spacing: -0.02em; color: var(--ink); }

/* ---------- Visuals ---------- */
.cs-figure { margin: 0; }
.cs-figure__zoom {
  display: block; width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  cursor: zoom-in;
}
.cs-figure__zoom img { display: block; width: 100%; height: auto; transition: transform 0.9s var(--ease-out); }
.cs-figure__zoom:hover img { transform: scale(1.015); }
.cs-figure--hero { margin-top: clamp(56px, 5vw, 96px); }
.cs-figure--wide { margin-top: clamp(48px, 4.2vw, 80px); }
/* thin banners and carousel strips: smaller radius so the corners don't eat the artwork */
.cs-stack .cs-figure__zoom, .cs-strips .cs-figure__zoom { border-radius: 20px; }

.cs-gallery { display: grid; gap: 20px; margin-top: clamp(48px, 4.2vw, 80px); }
.cs-block { margin-top: clamp(56px, 5vw, 96px); }
.cs-caption {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
  font-size: 14px; line-height: 1; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted);
}
.cs-caption::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cs-stack, .cs-strips { display: grid; gap: 16px; }
.cs-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cs-trio .cs-figure__zoom { border-radius: 24px; }

/* ---------- Sections ---------- */
.cs-section { padding: clamp(96px, 8.3vw, 160px) 0 0; }
.cs-section--last { padding-bottom: clamp(96px, 8.3vw, 160px); }
.cs-metrics { padding-top: clamp(72px, 6.25vw, 120px); }

.cs-text { max-width: 760px; margin-top: 32px; }
.cs-text p + p { margin-top: 1em; }
.cs-text__strong { color: var(--ink); }

.cs-quote {
  max-width: 900px;
  margin: 40px 0 0;
  padding-left: 28px;
  border-left: 3px solid var(--accent);
  font-size: clamp(28px, 2.3vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

/* Stats rows: the home page "stats" look */
.cs-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-stats .stats__item:nth-child(4)::before { display: none; }
.cs-stats .stats__value { font-size: clamp(48px, 4.17vw, 80px); }
.cs-stats__unit { margin-left: 0.22em; }
.cs-stats--four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(48px, 4.2vw, 80px); }
.cs-stats--four .stats__item:nth-child(4)::before { display: block; }
.cs-stats--five { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: clamp(48px, 4.2vw, 80px); }
.cs-stats--five .stats__item:nth-child(4)::before { display: block; }
.cs-stats--five .stats__value { font-size: clamp(40px, 3.2vw, 64px); }

/* Career timeline */
.cs-timeline { margin-top: 48px; border-bottom: 1px solid var(--line); }
.cs-timeline__item {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.cs-timeline__year { font-family: var(--font-ui); font-size: 15px; font-variant-numeric: tabular-nums; color: var(--accent); }
.cs-timeline__company { font-size: clamp(20px, 1.46vw, 28px); line-height: 1.2; letter-spacing: -0.025em; color: var(--ink); }
.cs-timeline__role { font-size: 16px; line-height: 1.5; color: var(--muted); }

/* Before / after */
.cs-compare {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  margin-top: clamp(48px, 4.2vw, 80px);
}
.cs-compare__col { padding: clamp(28px, 2.5vw, 44px); border-radius: var(--radius-md); background: var(--card); }
.cs-compare__col--after { background: #0b0b0b; color: #fff; }
.cs-compare__head {
  display: inline-flex; padding: 8px 14px; border-radius: 99px;
  background: rgba(0, 0, 0, 0.07);
  font-size: 14px; line-height: 1; text-transform: uppercase; letter-spacing: 0.04em;
}
.cs-compare__col--after .cs-compare__head { background: var(--accent); }
.cs-compare ul { margin-top: 24px; }
.cs-compare li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: clamp(17px, 1.04vw, 20px); line-height: 1.45;
  color: var(--muted);
}
.cs-compare li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 0.6em; border-radius: 50%; background: #c4c4c4; }
.cs-compare__col--after li { border-top-color: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.9); }
.cs-compare__col--after li::before { background: var(--accent); }

/* Founder's philosophy */
.cs-principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.cs-principle { padding: 28px; border-radius: 24px; background: var(--card); }
.cs-principle__num {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff;
  font-family: var(--font-ui); font-weight: 500; font-size: 13px; color: var(--accent);
}
.cs-principle__title { margin-top: 28px; font-weight: 400; font-size: clamp(22px, 1.46vw, 28px); line-height: 1.2; letter-spacing: -0.03em; color: var(--ink); }
.cs-principle__text { margin-top: 8px; font-size: 17px; line-height: 1.55; color: var(--muted); }

/* More case studies */
.cs-more { border-top: 0; }
.cs-more__title { text-align: center; }
.cs-more .cases__viewport { margin-top: 56px; }
.cs-card__media { aspect-ratio: 1294 / 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cs-hero__split { margin-top: 64px; }
  .cs-hero__split.split { row-gap: 32px; }
  .cs-stats--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-stats--five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-stats .stats__item:nth-child(3)::before { display: block; }
  .cs-stats--four .stats__item:nth-child(3)::before { display: none; }
  .cs-trio { gap: 12px; }
}
@media (max-width: 768px) {
  .cs-stats, .cs-stats--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-stats .stats__item::before { display: none !important; }
  .cs-stats .stats__item:nth-child(even)::before { display: block !important; }
  .cs-trio { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .cs-compare { grid-template-columns: 1fr; }
  .cs-principles { grid-template-columns: 1fr; }
  .cs-timeline__item { grid-template-columns: 64px minmax(0, 1fr); row-gap: 4px; }
  .cs-timeline__role { grid-column: 2; }
  /* carousel strips: swipe sideways at a readable size */
  .cs-strips { overflow: hidden; }
  .cs-figure--strip { overflow-x: auto; scrollbar-width: none; border-radius: 16px; }
  .cs-figure--strip::-webkit-scrollbar { display: none; }
  .cs-figure--strip .cs-figure__zoom { width: 1100px; max-width: none; }
}
@media (max-width: 640px) {
  .cs-hero__split { margin-top: 48px; }
  .cs-facts { grid-template-columns: 1fr; }
  .cs-facts > div, .cs-facts > div + div { padding: 16px 0; border-left: 0; }
  .cs-facts > div + div { border-top: 1px solid var(--line); }
  .cs-figure__zoom { border-radius: 20px; }
  .cs-stack .cs-figure__zoom { border-radius: 12px; }
  .cs-quote { padding-left: 20px; }
  .cs-stats .stats__value, .cs-stats--five .stats__value { font-size: 40px; }
  .cs-stats__unit { font-size: 0.55em; align-self: flex-end; padding-bottom: 0.12em; }
  .cs-principle { padding: 24px; }
}

/* ===== All case studies (/case-studies) ===== */
.cs-index__lead { max-width: 760px; }
.cs-index__list { padding: clamp(72px, 6.25vw, 120px) 0 clamp(96px, 8.3vw, 160px); }

.cs-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 2.9vw, 56px); }
.cs-filter__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 99px;
  font-size: 15px; line-height: 1; color: var(--ink);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.cs-filter__btn span {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px;
  background: rgba(0, 0, 0, 0.07);
  font-family: var(--font-ui); font-size: 12px; font-variant-numeric: tabular-nums;
}
.cs-filter__btn:hover { border-color: var(--ink); }
.cs-filter__btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.cs-filter__btn.is-active span { background: rgba(255, 255, 255, 0.18); }

.cs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 3.3vw, 64px) 20px; }
.cs-tile[hidden] { display: none; }
.cs-tile__link { display: block; color: inherit; }
.cs-tile__media {
  position: relative;
  aspect-ratio: 1294 / 700;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
}
.cs-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
a.cs-tile__link:hover .cs-tile__media img { transform: scale(1.03); }
.cs-tile__go {
  position: absolute; right: 20px; bottom: 20px;
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(10, 10, 10, 0.86); color: #fff;
  transform: scale(0.85); opacity: 0;
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.cs-tile__go svg { width: 18px; height: 18px; }
a.cs-tile__link:hover .cs-tile__go, a.cs-tile__link:focus-visible .cs-tile__go { opacity: 1; transform: none; }
@media (hover: none) { .cs-tile__go { opacity: 1; transform: none; width: 44px; height: 44px; right: 14px; bottom: 14px; } }
.cs-tile__soon {
  position: absolute; left: 16px; bottom: 16px;
  padding: 8px 12px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px; line-height: 1; color: var(--ink);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.cs-tile__body { padding-top: 22px; }
.cs-tile__kind { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
.cs-tile__kind::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cs-tile__name { margin-top: 14px; font-weight: 400; font-size: clamp(24px, 1.67vw, 32px); line-height: 1.15; letter-spacing: -0.03em; color: var(--ink); }
.cs-tile__summary { margin-top: 8px; max-width: 560px; font-size: clamp(16px, 0.94vw, 18px); line-height: 1.5; color: var(--muted); }

@media (max-width: 768px) {
  .cs-grid { grid-template-columns: 1fr; }
  .cs-tile__media { border-radius: 20px; }
}

/* Two visuals side by side; a tall visual kept narrower; six principles in two columns */
.cs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cs-figure--narrow { width: min(100%, 960px); margin-inline: auto; }
.cs-principles--six { margin-top: 48px; }
@media (max-width: 768px) { .cs-pair { grid-template-columns: 1fr; } }
/* three Featured cards in a row (Adrian Collins) */
.cs-trio--cards .cs-figure__zoom { border-radius: 16px; }
@media (max-width: 768px) { .cs-trio--cards { max-width: none; } }

/* Colour palette swatches */
.cs-palette { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: clamp(48px, 4.2vw, 80px); }
.cs-swatch {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  aspect-ratio: 3 / 4; padding: 20px;
  border-radius: 24px; background: var(--swatch); color: #fff;
}
.cs-swatch--light { color: var(--ink); }
.cs-swatch__name { font-size: clamp(16px, 1.05vw, 20px); line-height: 1.2; letter-spacing: -0.02em; }
.cs-swatch__hex { font-family: var(--font-ui); font-size: 13px; opacity: 0.8; }
@media (max-width: 768px) {
  .cs-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-swatch { aspect-ratio: auto; min-height: 120px; padding: 16px; border-radius: 18px; }
  .cs-swatch:last-child { grid-column: 1 / -1; }
}
