/* Case study page patterns. Shared across case studies,
   layered on top of showcasy.min.css. */

/* --- Masthead --- */
.cs-masthead {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.cs-masthead-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 880px;
}
.cs-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(3, 7, 18, 0.55);
  margin: 0;
}
.cs-h1 {
  font-size: 64px;
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  color: rgb(3, 7, 18);
}
.cs-lede {
  font-size: 22px;
  line-height: 1.5;
  color: rgba(3, 7, 18, 0.75);
  margin: 0;
  max-width: 64ch;
  font-weight: 400;
}
.cs-hero-image {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.04);
}
.cs-hero-image img { width: 100%; height: auto; display: block; }
@media (max-width: 991px) { .cs-h1 { font-size: 48px; } }
@media (max-width: 767px) {
  .cs-h1 { font-size: 36px; }
  .cs-lede { font-size: 18px; }
  .cs-masthead { gap: 32px; }
  .cs-hero-image { border-radius: 12px; }
}

/* --- Overview + meta grid --- */
.cs-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.cs-overview-body p {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(3, 7, 18, 0.8);
  margin: 0 0 16px 0;
}
.cs-overview-body p:last-child { margin-bottom: 0; }
.cs-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 28px;
  align-items: baseline;
  font-size: 14px;
  margin: 0;
  padding-top: 8px;
}
.cs-meta dt { color: rgba(3, 7, 18, 0.55); font-weight: 500; white-space: nowrap; }
.cs-meta dd { margin: 0; color: rgb(3, 7, 18); font-weight: 500; }
@media (max-width: 767px) { .cs-overview { grid-template-columns: 1fr; gap: 32px; } }

/* --- Section heading inside a case study --- */
.cs-section-heading {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cs-section-heading h2 {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: rgb(3, 7, 18);
}
.cs-section-heading p {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(3, 7, 18, 0.75);
  margin: 0;
}
@media (max-width: 767px) { .cs-section-heading h2 { font-size: 30px; } }

/* --- Chapter intro (tinted pace-change before a section series) --- */
.section--chapter-intro {
  background-color: rgb(250, 247, 240);
}

/* --- Chapter marker (numbered anchor for a section series) --- */
.cs-chapter-marker {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cs-chapter-num {
  font-size: 56px;
  font-weight: 500;
  color: rgb(3, 7, 18);
  letter-spacing: -0.02em;
}
.cs-chapter-total {
  font-size: 20px;
  font-weight: 400;
  color: rgba(3, 7, 18, 0.4);
}
@media (max-width: 767px) {
  .cs-chapter-num { font-size: 40px; }
  .cs-chapter-total { font-size: 16px; }
}

/* --- Body prose --- */
.cs-prose { max-width: 64ch; }
.cs-prose p {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(3, 7, 18, 0.8);
  margin: 0 0 16px 0;
}
.cs-prose p:last-child { margin-bottom: 0; }
.cs-prose ul {
  padding-left: 22px;
  margin: 0 0 16px 0;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(3, 7, 18, 0.8);
}
.cs-prose ul li { margin-bottom: 6px; }
.cs-prose h3 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 12px 0;
  font-weight: 600;
  color: rgb(3, 7, 18);
}

/* --- Stat block --- */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid rgba(3, 7, 18, 0.08);
  border-bottom: 1px solid rgba(3, 7, 18, 0.08);
}
.cs-stat { display: flex; flex-direction: column; gap: 10px; }
.cs-stat-value {
  font-size: 44px;
  line-height: 1;
  font-weight: 700;
  color: rgb(3, 7, 18);
  letter-spacing: -0.02em;
}
.cs-stat-label {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(3, 7, 18, 0.65);
}
@media (max-width: 767px) {
  .cs-stats { grid-template-columns: repeat(2, 1fr); gap: 28px; padding: 32px 0; }
  .cs-stat-value { font-size: 34px; }
}

/* --- Pull quote --- */
.cs-quote {
  margin: 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid rgb(3, 7, 18);
  max-width: 760px;
}
.cs-quote blockquote {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 500;
  color: rgb(3, 7, 18);
  margin: 0;
  padding: 0;
  border-left: 0;
  font-style: normal;
}
.cs-quote-cite {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  color: rgba(3, 7, 18, 0.6);
  display: block;
  font-style: italic;
}
.cs-quote-cite::before { content: "~ "; }

/* --- Quote pair (two quotes side by side) --- */
.cs-quote-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.cs-quote-pair .cs-quote { max-width: none; }
@media (max-width: 767px) {
  .cs-quote-pair { grid-template-columns: 1fr; gap: 32px; }
}

/* --- Discovery sub-blocks --- */
.cs-subsections { display: flex; flex-direction: column; gap: 72px; }
.cs-subsection { display: flex; flex-direction: column; gap: 20px; }
.cs-subsection-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.04);
  margin-top: 8px;
}
.cs-subsection-image img { width: 100%; height: auto; display: block; }
@media (max-width: 767px) { .cs-subsections { gap: 48px; } }

/* --- Split layout (text left, artifact right) --- */
.cs-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}
.cs-split-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.cs-split-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.04);
}
.cs-split-image img { width: 100%; height: auto; display: block; }
@media (max-width: 991px) {
  .cs-split { grid-template-columns: 1fr; gap: 28px; }
}

/* --- Card grid (insights, principles) --- */
.cs-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 48px;
}
.cs-card { display: flex; flex-direction: column; gap: 10px; }
.cs-card h3 {
  font-size: 20px;
  margin: 0;
  font-weight: 600;
  color: rgb(3, 7, 18);
}
.cs-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(3, 7, 18, 0.75);
}
.cs-card-grid-4col { grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 991px) { .cs-card-grid-4col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) {
  .cs-card-grid { grid-template-columns: 1fr; gap: 24px; }
  .cs-card-grid-4col { grid-template-columns: 1fr; }
}

/* --- HMW list --- */
.cs-hmw-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-hmw-list li {
  padding: 18px 22px;
  border-radius: 12px;
  background: rgba(3, 7, 18, 0.04);
  font-size: 17px;
  line-height: 1.45;
  color: rgb(3, 7, 18);
  font-weight: 500;
}

/* --- Image pair (HMW + sketches) --- */
.cs-image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.cs-image-pair figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.04);
}
.cs-image-pair img { width: 100%; height: auto; display: block; }
@media (max-width: 767px) { .cs-image-pair { grid-template-columns: 1fr; } }

/* --- Full-width media (prototype demo, features) --- */
.cs-media {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.04);
}
.cs-media img { width: 100%; height: auto; display: block; }

/* --- Findings --- */
.cs-findings { display: flex; flex-direction: column; gap: 40px; }
.cs-finding {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 48px;
  align-items: start;
  padding-top: 40px;
  border-top: 1px solid rgba(3, 7, 18, 0.08);
}
.cs-finding:first-child { padding-top: 0; border-top: 0; }
.cs-finding-title {
  font-size: 22px;
  line-height: 1.3;
  margin: 0;
  font-weight: 600;
  color: rgb(3, 7, 18);
}
.cs-finding-body { display: flex; flex-direction: column; gap: 18px; }
.cs-finding-quotes { display: flex; flex-direction: column; gap: 10px; }
.cs-finding-quote {
  font-size: 17px;
  line-height: 1.5;
  color: rgba(3, 7, 18, 0.78);
  font-style: italic;
  margin: 0;
  padding-left: 16px;
  border-left: 2px solid rgba(3, 7, 18, 0.15);
}
.cs-finding-solution {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(3, 7, 18, 0.85);
  margin: 0;
}
.cs-finding-solution strong { color: rgb(3, 7, 18); font-weight: 600; }
@media (max-width: 767px) {
  .cs-finding { grid-template-columns: 1fr; gap: 20px; padding-top: 32px; }
}

/* --- Result callouts --- */
.cs-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cs-results--single { grid-template-columns: minmax(0, 360px); }
.cs-result {
  padding: 32px;
  border-radius: 16px;
  background: rgb(246, 247, 249);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-result-value {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  color: rgb(3, 7, 18);
  letter-spacing: -0.01em;
}
.cs-result-label {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(3, 7, 18, 0.7);
  margin: 0;
}
@media (max-width: 767px) {
  .cs-results { grid-template-columns: 1fr; gap: 12px; }
  .cs-result { padding: 24px; }
  .cs-result-value { font-size: 28px; }
}

/* --- Features gallery --- */
.cs-features { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 32px; }
.cs-feature { display: flex; flex-direction: column; gap: 16px; }
.cs-feature-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.04);
  aspect-ratio: 16 / 10;
}
.cs-feature-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-feature h3 { font-size: 20px; margin: 0; font-weight: 600; color: rgb(3, 7, 18); }
.cs-feature p {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(3, 7, 18, 0.75);
  margin: 0;
}
@media (max-width: 767px) { .cs-features { grid-template-columns: 1fr; gap: 32px; } }

/* --- Back link --- */
.cs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: rgb(3, 7, 18);
  text-decoration: none;
  padding: 8px 0;
}
.cs-back-link .svg-icon { transition: transform 250ms var(--ease-quiet); }
.cs-back-link:hover .svg-icon { transform: translateX(-3px); }

/* --- Data tables --- */
.cs-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(3, 7, 18, 0.08);
}
.cs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(3, 7, 18, 0.85);
  text-align: left;
  min-width: 640px;
}
.cs-table thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(3, 7, 18, 0.55);
  padding: 14px 20px;
  background: rgba(3, 7, 18, 0.03);
  border-bottom: 1px solid rgba(3, 7, 18, 0.08);
  white-space: nowrap;
}
.cs-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(3, 7, 18, 0.06);
  vertical-align: top;
}
.cs-table tbody tr:last-child td { border-bottom: 0; }
.cs-table tbody tr:hover { background: rgba(3, 7, 18, 0.02); }
.cs-table .cs-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.06);
  color: rgba(3, 7, 18, 0.8);
  letter-spacing: 0.02em;
}
.cs-table-caption {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(3, 7, 18, 0.55);
  margin: 12px 0 0 0;
}
@media (max-width: 767px) {
  .cs-table { font-size: 14px; }
  .cs-table thead th, .cs-table tbody td { padding: 12px 16px; }
}

/* --- Portrait feature image (for phone/watch screenshots) --- */
.cs-feature-image.is-portrait { aspect-ratio: 1 / 1; }
.cs-feature-image.is-portrait img {
  object-fit: contain;
  padding: 24px;
  box-sizing: border-box;
}

/* --- Non-italic observation inside a cs-finding (for author notes, not user quotes) --- */
.cs-finding-observation {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(3, 7, 18, 0.8);
  margin: 0;
}

/* --- Navbar inline nav links (shared across all pages) --- */
.navbar-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  margin-right: 28px;
}
.navbar-nav-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 250ms var(--ease-quiet, ease);
}
.navbar-nav-link:hover { opacity: 1; }
.navbar-nav-link[aria-current="page"] { opacity: 1; }
@media (max-width: 600px) {
  .navbar-nav-links { gap: 18px; margin-right: 18px; }
  .navbar-nav-link .text-r { font-size: 14px; }
}

/* --- Responsive nav: hamburger + dropdown panel (≤767px) --- */
.navbar { position: relative; }
.w-nav-button { display: none; }
.navbar-close-icon { display: none; }

@media (max-width: 767px) {
  .w-nav-button { display: inline-flex; }
  .navbar-nav-links { display: none; }
  .mobile-display-none { display: none; }

  .navbar:has(.w-nav-button[aria-expanded="true"]) .navbar-nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px 24px 20px;
    background: rgb(255, 255, 255);
    border-bottom: 1px solid rgba(3, 7, 18, 0.08);
    box-shadow: 0 12px 24px -16px rgba(3, 7, 18, 0.18);
    z-index: 50;
  }
  .navbar:has(.w-nav-button[aria-expanded="true"]) .navbar-nav-link {
    padding: 10px 0;
    opacity: 1;
  }
  .navbar:has(.w-nav-button[aria-expanded="true"]) .navbar-humburger-icon { display: none; }
  .navbar:has(.w-nav-button[aria-expanded="true"]) .navbar-close-icon { display: block; }
}
