/* =========================================================
   Case study template — shared across all /case-studies/*.html
   Reuses design tokens (colors, fonts, radius) from style.css.
   ========================================================= */

/* Breadcrumb / back link — uses the shared .nav-btn pill component.
   Lives inside the hero now, on the dark gradient, so it uses the light
   outline variant (white border/text) rather than the dark one. */
.cs-back { margin-top: 0; margin-bottom: 24px; }

/* Outline pill for light (white) page backgrounds. Mirrors
   .nav-btn--outline-light but for navy-on-white instead of cream-on-navy.
   Hover still picks up the shared rotating-color rule. Currently unused
   now that .cs-back lives on the dark hero, kept in case a future section
   needs a light-background outline pill. */
.nav-btn--outline-dark { background: transparent; border-color: var(--navy); color: var(--navy); }

/* =========================================================
   Hero
   Full-bleed colorful bar, matching the homepage hero: the
   section itself carries the gradient background, and an
   inner .wrap constrains the content width. It touches the
   header directly, so the header goes transparent over it
   (see .nav-overlay in style.css).
   ========================================================= */
.cs-hero {
  background:
    linear-gradient(rgba(15, 15, 15, 0.25), rgba(15, 15, 15, 0.25)),
    url("../media/homepage_media/background.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--cream);
  margin-top: calc(-1 * var(--header-h, 73px));
  padding-top: calc(var(--header-h, 73px) + 32px);
  padding-bottom: 56px;
}
.cs-hero-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cream-soft);
  margin-bottom: 16px;
}
.cs-hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  max-width: 18ch;
}
.cs-hero-dek {
  margin-top: 20px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--cream-soft);
  max-width: 62ch;
  line-height: 1.6;
}
.cs-hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cs-hero-actions .btn-pill { margin-top: 0; }
.cs-hero .btn-pill:not(:hover) { background: var(--cream); color: var(--navy); }

.cs-hero-image {
  margin-top: 40px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cs-hero-image img { width: 100%; height: auto; display: block; }

/* =========================================================
   Layout: sidebar + main content
   ========================================================= */
.cs-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: 8px 80px;
}

.cs-sidebar { width: 100%; }

.cs-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
  margin: 0;
  padding: 24px;
  color: var(--navy);
}
.cs-meta-row {
  padding-left: 14px;
  border-left: 3px solid var(--row-color, var(--vivid-purple));
}
.cs-meta-row:nth-of-type(1) { --row-color: var(--lime); }
.cs-meta-row:nth-of-type(2) { --row-color: var(--magenta); }
.cs-meta-row:nth-of-type(3) { --row-color: var(--sky-blue); }
.cs-meta-row:nth-of-type(4) { --row-color: var(--red-orange); }
.cs-meta-row:nth-of-type(5) { --row-color: var(--purple); }
.cs-meta-row dt {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-soft);
  margin-bottom: 6px;
}
.cs-meta-row dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
}

.cs-main { min-width: 0; max-width: 720px; }

@media (min-width: 900px) {
  .cs-layout { flex-direction: row; align-items: flex-start; gap: 64px; }
  .cs-sidebar { width: 240px; flex-shrink: 0; position: sticky; top: 96px; }
  .cs-meta { grid-template-columns: 1fr; }
}

/* =========================================================
   Content sections
   ========================================================= */
.cs-section { padding-block: 36px; border-top: 1px solid var(--cream-2); }
.cs-section:first-child { border-top: none; padding-top: 0; }

.cs-section h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  transition: color 0.2s ease;
}
.cs-section h2:hover { color: var(--rotate-color, var(--vivid-purple)); }

.cs-lead {
  margin-top: 16px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--navy);
}
.cs-body p {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--navy-soft);
}
.cs-body p:first-of-type { margin-top: 16px; }
.cs-body strong { color: var(--navy); }

.cs-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-list li {
  position: relative;
  padding-left: 22px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--navy-soft);
}
.cs-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--bullet-color, var(--vivid-purple));
}
.cs-list strong { color: var(--navy); }

/* Images within sections */
.cs-image {
  margin-top: 24px;
}
.cs-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}
.cs-image-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--navy-soft);
}

.cs-image-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 16px;
}
@media (min-width: 640px) {
  .cs-image-grid { grid-template-columns: repeat(var(--cols, 2), 1fr); }
}
.cs-image-grid .cs-image { margin-top: 0; }

/* Pull quote / testimonial */
.cs-quote {
  margin-top: 24px;
  padding: 32px;
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius-lg);
}
.cs-quote p {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.4;
}
.cs-quote cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-size: 14px;
  color: var(--cream-soft);
}

/* Obstacle / solution blocks */
.cs-obstacles {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.cs-obstacle-num {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--obstacle-color, var(--vivid-purple));
  margin-bottom: 8px;
}
.cs-obstacle:nth-child(3n+1) { --obstacle-color: var(--vivid-purple); }
.cs-obstacle:nth-child(3n+2) { --obstacle-color: var(--magenta); }
.cs-obstacle:nth-child(3n+3) { --obstacle-color: var(--purple); }
.cs-obstacle h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}
.cs-obstacle p {
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--navy-soft);
}

/* Team grid */
.cs-team-photo {
  margin-top: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cs-team-photo img { width: 100%; height: auto; display: block; }

/* Closing next-steps / CTA */
.cs-next-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
