/*
  Case-study components shared by every page in case-studies/.
  Load order on each page: theme.css -> this file -> the page's own <style>
  -> case-study-responsive.css, so shared tablet/phone rules still win.
*/

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

#root { display: flex; justify-content: center; }

.cs {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  width: 100%;
  max-width: 1280px;
  /* Width of the reading column inside each section's 80px side padding.
     100% = text, figures and labels all start on the same left edge as the title. */
  --content-max: 100%;
  /* One horizontal gap for every multi-column block (details, metrics, stats, takeaways,
     quotes, sticky notes, galleries) so their columns line up from section to section. */
  --col-gap: 48px;
  background: var(--bg);
  border-left: 1px solid var(--hair);
  border-right: 1px solid var(--hair);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.cs a { color: inherit; text-decoration: none; }

.cs em { font-style: italic; }

/* Emphasis inside headings and big numbers: upright, green (as on the homepage) */
.cs h1 em, .cs h2 em, .cs h3 em, .cs h4 em, .cs .stat em, .cs .ttl em { font-style: normal; color: var(--accent); }

.cs a:focus-visible, .cs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.cs .narrow { max-width: var(--content-max); margin: 0 auto; }

/* Top nav — same as the homepage masthead: name (links home) left, role right */
.cs .topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 24px 80px;
  border-bottom: 1px solid var(--ink);
}

.cs .topbar .name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cs .topbar .name:hover { color: var(--accent); }

.cs .topbar .role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Title block */
.cs .titleblock {
  padding: 96px 80px 40px;
  border-bottom: 1px solid var(--hair);
}

.cs .eyebrow {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  font-family: var(--font-mono);
}


.cs .cs-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 72px;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 22ch;
}

/* Project details — styled like the homepage credentials strip */
.cs .meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px var(--col-gap);
  margin: 64px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--ink);
}

.cs .meta > div { text-align: left; }

.cs .meta .label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.cs .meta .val {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 500;
}

/* Hero image */
.cs .hero-img {
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
  background: var(--bg);
}

.cs .hero-img img { display: block; width: 100%; height: auto; }

/* Outcome metrics strip (under the hero image) and research-stats strip.
   Left-aligned on the content edge, no vertical dividers — like the homepage credentials. */
.cs .metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: var(--col-gap);
  padding: 0 80px;
  border-bottom: 1px solid var(--hair);
  text-align: left;
}
.cs .metrics > div { padding: 48px 0; }
.cs .metrics .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.cs .metrics .stat {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}
.cs .metrics .stat em { font-style: normal; color: var(--accent); }
.cs .metrics .caption {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}

.cs .validation-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: var(--col-gap);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--hair);
  text-align: left;
}
.cs .validation-stats .item { padding: 32px 0; }
.cs .validation-stats .item .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: 10px;
}
.cs .validation-stats .item .desc {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Content blocks */
.cs section.block { padding: 96px 80px; border-bottom: 1px solid var(--hair); }

.cs .section-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  text-align: left;
  font-family: var(--font-mono);
}

.cs .section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 48px;
  max-width: 22ch;
  text-align: left;
}

.cs .lede {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0;
  letter-spacing: -0.005em;
}

.cs .sub { margin-top: 80px; }

.cs .sub:first-child { margin-top: 0; }

.cs .sub h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.cs .sub p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  margin: 0 0 24px;
  max-width: 64ch;
}

.cs .sub p strong { color: var(--ink); font-weight: 500; }

.cs .figure {
  margin-top: 32px;
  border: 1px solid var(--hair);
  overflow: hidden;
}

.cs .figure img { display: block; width: 100%; height: auto; }

.cs .figure-caption {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
  text-align: left;
  font-family: var(--font-mono);
}

/* Captions inside full-bleed (edge-to-edge) figure containers keep the page's side padding */
.cs section.block div[style*="-80px"] .figure-caption { padding: 0 80px; }

.cs .takeaway .num {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs .takeaway h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.cs .takeaway p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  margin: 0;
}

/* Prev/Next cards (bottom) */
.cs .contact {
  padding: 88px 80px;
  border-bottom: 1px solid var(--hair);
  text-align: left;
}

.cs .contact .label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  font-family: var(--font-mono);
}

.cs .contact h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 32px;
  max-width: 24ch;
  text-wrap: balance;
}

.cs .contact-links {
  display: flex;
  justify-content: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.cs .contact-links a { color: var(--accent); }

.cs .contact-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.cs .prevnext {
  padding: 80px 80px 96px;
  border-bottom: 1px solid var(--ink);
}

.cs .prevnext .label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
  text-align: left;
  font-family: var(--font-mono);
}

.cs .prevnext-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
}

.cs .pn-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 28px;
  cursor: pointer;
  padding: 24px 0;
}

.cs .pn-card.prev { text-align: left; }

.cs .pn-card.next { text-align: right; }

.cs .pn-card .dir {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
}

.cs .pn-card .num {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs .pn-card .ttl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 14px;
  display: inline-block;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: 4px;
}

.cs .pn-card.next .ttl { background-position: 100% 100%; }

.cs .pn-card:hover .ttl,
.cs .pn-card:focus-visible .ttl { background-size: 100% 2px; }

@media (prefers-reduced-motion: reduce) {
  .cs .pn-card .ttl { transition: none; }
}

.cs .pn-card .sub {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 42ch;
  margin-bottom: 20px;
}

.cs .pn-card.next .sub { margin-left: auto; }

.cs .pn-card .yr {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
}

.cs .pn-card .image {
  aspect-ratio: 4/3;
  border: 1px solid var(--hair);
  overflow: hidden;
}

.cs .pn-card .image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* Footer */
.cs .footer {
  padding: 24px 80px;
  text-align: left;
}

.cs .footer .colophon {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
}
