/* Shared case study styles — inherits design language from index.html */
:root {
  --bg: #ffffff;
  --bg-2: #f4f6fa;
  --ink: #0e1116;
  --ink-2: #3d434f;
  --ink-3: #8a8f9a;
  --rule: #e6e8ee;
  --accent: oklch(0.52 0.07 145);
  --accent-soft: oklch(0.94 0.03 145);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--bg); }
a { color: inherit; }

.shell { max-width: 1180px; margin: 0 auto; padding: 0 56px; }
@media (max-width: 720px) { .shell { padding: 0 24px; } }
.narrow { max-width: 760px; margin: 0 auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 88px;
}
.mark {
  font-family: var(--serif); font-weight: 500; font-size: 28px;
  letter-spacing: -0.02em; line-height: 1;
  color: var(--ink); text-decoration: none;
}
.mark .dot { color: var(--accent); }
.back {
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  letter-spacing: 0.02em;
}
.back:hover { color: var(--accent); }
.back::before { content: "← "; color: var(--accent); }

/* Hero */
.cs-hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--rule);
}
.cs-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.cs-eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cs-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 36px;
  text-wrap: balance;
}
.cs-title em { font-style: italic; color: var(--accent); }
.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
@media (max-width: 720px) { .cs-meta { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.cs-meta dt {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 6px;
}
.cs-meta dd {
  font-size: 15px; color: var(--ink);
}

/* Lead summary */
.cs-lead {
  padding: 88px 0 64px;
}
.cs-lead p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
  margin-bottom: 24px;
}
.cs-lead p:last-child { margin-bottom: 0; }
.cs-lead p strong { font-weight: 500; color: var(--accent); }

/* Section */
.cs-section {
  padding: 72px 0;
  border-top: 1px solid var(--rule);
}
.cs-section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  margin-bottom: 48px;
  align-items: baseline;
}
@media (max-width: 720px) {
  .cs-section-head { grid-template-columns: 1fr; gap: 16px; }
}
.cs-section-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.cs-section-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.cs-section-title em { font-style: italic; color: var(--accent); }
.cs-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
}
@media (max-width: 720px) { .cs-body { grid-template-columns: 1fr; gap: 16px; } }
.cs-body .label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.cs-body .content p {
  font-size: 16px;
  color: var(--ink-2);
  margin-bottom: 18px;
  max-width: 64ch;
}
.cs-body .content p:last-child { margin-bottom: 0; }
.cs-body .content p strong { color: var(--ink); font-weight: 500; }

/* Bullet list */
.cs-list {
  list-style: none;
  margin-top: 8px;
}
.cs-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
}
.cs-list li:last-child { border-bottom: 1px solid var(--rule); }
.cs-list li::before {
  content: counter(cs-counter, decimal-leading-zero);
  counter-increment: cs-counter;
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 13px;
  padding-top: 2px;
}
.cs-list { counter-reset: cs-counter; }

/* Deliverables card */
.cs-deliv {
  background: var(--bg-2);
  padding: 32px;
  border-radius: 4px;
  margin-top: 32px;
}
.cs-deliv .label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 16px;
}
.cs-deliv ul { list-style: none; }
.cs-deliv li {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink);
}
.cs-deliv li:first-child { border-top: none; }

/* Image / artifact placeholder */
.cs-figure {
  margin: 48px 0;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.cs-figure.tall { aspect-ratio: 4 / 3; }
.cs-figure.wide { aspect-ratio: 21 / 9; }
.cs-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(14,17,22,0.025) 18px 19px);
  pointer-events: none;
}
.cs-figure-meta {
  position: relative;
  text-align: center;
  padding: 24px;
}
.cs-figure-meta .tag {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px;
}
.cs-figure-meta .title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  color: var(--ink-2);
}
.cs-caption {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 12px;
  letter-spacing: 0.02em;
}

/* Pull quote */
.cs-quote {
  padding: 48px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin: 48px 0;
}
.cs-quote q {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  display: block;
  text-wrap: balance;
}
.cs-quote q::before, .cs-quote q::after { content: ""; }

/* Stats */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 48px 0;
}
@media (max-width: 720px) { .cs-stats { grid-template-columns: 1fr; } }
.cs-stat { border-top: 1px solid var(--ink); padding-top: 20px; }
.cs-stat .num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.cs-stat .label {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-2);
  max-width: 28ch;
}

/* Two col */
.cs-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) { .cs-two { grid-template-columns: 1fr; } }
.cs-card {
  border-top: 1px solid var(--ink);
  padding-top: 20px;
}
.cs-card h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.cs-card p { font-size: 15px; color: var(--ink-2); }

/* Outcome banner */
.cs-outcome {
  background: oklch(0.34 0.06 145);
  color: #ffffff;
  padding: 96px 0;
  margin-top: 96px;
}
.cs-outcome,
.cs-outcome *,
.cs-outcome .cs-body .label,
.cs-outcome .cs-body .content p,
.cs-outcome .cs-body .content p strong { color: #ffffff; }
.cs-outcome .cs-section-num::before { color: #ffffff; }
.cs-outcome p { font-size: 17px; max-width: 64ch; margin-bottom: 18px; }

/* Next */
.cs-next {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
}
.cs-next-eyebrow {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 16px;
}
.cs-next a {
  display: flex; align-items: baseline; justify-content: space-between;
  text-decoration: none;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: padding .3s cubic-bezier(.2,.7,.2,1);
}
.cs-next a:hover { padding-left: 16px; }
.cs-next .name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cs-next .arr { font-size: 24px; color: var(--accent); }

/* Footer */
.cs-footer {
  border-top: 1px solid var(--rule);
  padding: 48px 0;
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.cs-footer a { color: var(--ink-2); text-decoration: none; }
.cs-footer a:hover { color: var(--accent); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Scope / pull-aside note under a figure */
.cs-figure-note {
  margin: 24px 0 48px;
  padding: 20px 24px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: start;
}
.cs-figure-note-tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 4px;
}
.cs-figure-note p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 64ch;
}
.cs-figure-note p strong { color: var(--ink); font-weight: 500; }
@media (max-width: 720px) {
  .cs-figure-note { grid-template-columns: 1fr; gap: 8px; }
}

/* Zoom links + lightbox */
.cs-zoom {
  position: relative;
  display: block;
  cursor: zoom-in;
  overflow: hidden;
}
.cs-zoom img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.cs-zoom:hover img { transform: scale(1.01); }
.cs-zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: color-mix(in oklab, var(--ink) 88%, transparent);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.cs-zoom:hover .cs-zoom-hint { opacity: 1; transform: none; }

.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--ink) 92%, transparent);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity .25s ease;
}
.cs-lightbox.is-open { display: flex; opacity: 1; }
.cs-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-out;
  background: var(--bg);
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
}
.cs-lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Real-image figure (not placeholder) */
.cs-figure-img {
  margin: 48px 0;
  display: flex;
  flex-direction: column;
}
.cs-figure-img img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--rule);
}
.cs-figure-img.wide img {
  /* journey map is extremely wide — let it fit width naturally */
  object-fit: contain;
}
.cs-figure-img figcaption {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  margin-top: 14px;
  font-size: 13px;
}
.cs-figure-img figcaption .tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.cs-figure-img figcaption .title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* cs-body variant: label + content + aside figure */
.cs-body-with-aside {
  grid-template-columns: 200px 1fr 320px;
  gap: 48px;
  align-items: start;
}
.cs-figure-aside {
  display: flex;
  flex-direction: column;
}
.cs-figure-aside img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--bg);
  border: 1px solid var(--rule);
}
.cs-figure-aside-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  margin-top: 10px;
  border-top: 1px solid var(--rule);
}
.cs-figure-aside-meta .tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cs-figure-aside-meta .title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.35;
}
@media (max-width: 1100px) {
  .cs-body-with-aside { grid-template-columns: 200px 1fr; }
  .cs-figure-aside { grid-column: 2; max-width: 360px; margin-top: 16px; }
}
@media (max-width: 720px) {
  .cs-body-with-aside { grid-template-columns: 1fr; gap: 16px; }
  .cs-figure-aside { grid-column: 1; max-width: 100%; }
}

/* Carousel for case-study figures */
.cs-carousel {
  margin: 48px 0;
  display: flex;
  flex-direction: column;
}
.cs-carousel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
}
.cs-carousel-head .tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.cs-carousel-head .title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cs-carousel-counter {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-3);
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.cs-carousel-counter span[data-current] { color: var(--ink); }
.cs-carousel-counter em { font-style: normal; color: var(--rule); margin: 0 4px; }

.cs-carousel-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}
.cs-carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.cs-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity .55s ease, transform .8s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.cs-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.cs-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.cs-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  box-shadow: 0 1px 2px rgba(14,17,22,.04), 0 8px 24px rgba(14,17,22,.06);
}
.cs-carousel-arrow:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.cs-carousel-arrow.prev { left: -22px; }
.cs-carousel-arrow.next { right: -22px; }
.cs-carousel-arrow:disabled,
.cs-carousel-arrow[aria-disabled="true"] {
  opacity: .35;
  cursor: not-allowed;
}
@media (max-width: 720px) {
  .cs-carousel-arrow.prev { left: 8px; }
  .cs-carousel-arrow.next { right: 8px; }
}

.cs-carousel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
}
.cs-carousel-caption {
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.01em;
  line-height: 1.5;
  max-width: 60ch;
}
.cs-carousel-dots {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cs-carousel-dots button {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 4px;
  background: var(--rule);
  padding: 0;
  border-radius: 2px;
  transition: background .25s ease, width .35s cubic-bezier(.2,.7,.2,1);
}
.cs-carousel-dots button:hover { background: var(--ink-3); }
.cs-carousel-dots button.is-active {
  background: var(--ink);
  width: 44px;
}

@media (max-width: 720px) {
  .cs-carousel-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cs-carousel-foot { flex-direction: column; align-items: flex-start; }
}
