/* ============================================
   PARASYN — CASE STUDIES STYLESHEET
   Metrics-forward, proof-of-delivery pages. Distinct from
   articles.css (long-form reading) and landing.css (sales pages):
   case studies lead with hard numbers and read like a dashboard
   readout, not prose. Each page sets its own --cs-accent custom
   property to give it a unique identity per customer/partner,
   while sharing the same structural system. Header/footer use
   the standard site.css.
   ============================================ */

.cs-hero {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #0b0f14 0%, #121a22 55%, #182530 100%);
  padding: 0;
}
.cs-hero-grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
}
.cs-hero-inner { position: relative; z-index: 2; padding: 48px 0 0; display: flex; flex-wrap: wrap; gap: 28px; align-items: stretch; justify-content: space-between; }
.cs-eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: #6b7785; margin-bottom: 16px;
}
.cs-category-badge {
  display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--cs-accent, #1f9d63);
  background: color-mix(in srgb, var(--cs-accent, #1f9d63) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cs-accent, #1f9d63) 40%, transparent);
  padding: 5px 12px; border-radius: 4px; margin-bottom: 18px;
}
.cs-h1 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 38px;
  line-height: 1.14; letter-spacing: -0.015em; color: #fff; margin: 0 0 16px; max-width: 720px;
}
.cs-subtitle { font-family: 'IBM Plex Sans', sans-serif; font-size: 16.5px; line-height: 1.6; color: #9aa9bb; max-width: 600px; margin: 0; padding-bottom: 40px; }
.cs-meta-panel {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  padding: 22px 26px; min-width: 220px; align-self: flex-start; margin-top: 4px;
}
.cs-meta-row { margin-bottom: 16px; }
.cs-meta-row:last-child { margin-bottom: 0; }
.cs-meta-label { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #6b7785; margin-bottom: 5px; }
.cs-meta-value { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 17px; color: #fff; }

/* Metrics band - sits half-in/half-out of the hero, like a readout panel */
.cs-metrics {
  position: relative; z-index: 2; margin: 0 0 -22px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  background: rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.45);
}
.cs-metric-tile { background: #1a2128; padding: 22px 20px 26px; }
.cs-metric-value { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 27px; color: var(--cs-accent, #1f9d63); line-height: 1.1; }
.cs-metric-label { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: 0.06em; color: #9aa9bb; margin-top: 6px; line-height: 1.4; }

.cs-body-wrap { max-width: 980px; margin: 0 auto; padding: 60px 24px 0; }

.cs-quote {
  font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-style: italic; font-size: 21px; line-height: 1.5;
  color: #16202d; border-left: 3px solid var(--cs-accent, #1f9d63); padding-left: 24px; margin: 0 0 12px;
}
.cs-cite { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; letter-spacing: 0.04em; color: #64748b; margin: 0 0 56px; padding-left: 27px; text-transform: uppercase; }

.cs-section { margin-bottom: 56px; scroll-margin-top: 90px; }
.cs-h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 25px; letter-spacing: -0.01em; color: #16202d; margin: 0 0 18px; }
.cs-h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; color: #16202d; margin: 0 0 8px; }
.cs-body p { font-size: 15.5px; line-height: 1.72; color: #3a4554; margin: 0 0 16px; }
.cs-body ul { margin: 0 0 16px; padding-left: 22px; }
.cs-body li { font-size: 15.5px; line-height: 1.65; color: #3a4554; margin-bottom: 8px; }

/* Flexible card grid - 2/3/4 col via modifier */
.cs-card-grid { display: grid; gap: 16px; margin-top: 16px; }
.cs-card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cs-card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cs-card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cs-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px 22px; }
.cs-card-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px; color: #16202d; margin-bottom: 8px; }
.cs-card-desc { font-size: 14px; line-height: 1.6; color: #5a6675; }

/* Numbered step list */
.cs-steps { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: cs-step; }
.cs-steps li { counter-increment: cs-step; position: relative; padding-left: 50px; margin-bottom: 22px; }
.cs-steps li:last-child { margin-bottom: 0; }
.cs-steps li::before {
  content: counter(cs-step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%; background: var(--cs-accent, #1f9d63); color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.cs-steps .cs-step-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15.5px; color: #16202d; margin-bottom: 4px; }
.cs-steps .cs-step-desc { font-size: 14.5px; line-height: 1.6; color: #5a6675; }

/* Outcomes / achievements highlight band - dark, glowing, "alive" cards, but contained
   within the normal reading column on purpose, no full-bleed breakout here. */
.cs-outcomes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;
  margin-top: 16px;
}
.cs-outcome-tile {
  position: relative; overflow: hidden; border-radius: 10px; padding: 28px 24px 26px;
  background: linear-gradient(150deg, #0b0f14 0%, #121a22 55%, #182530 100%);
}
.cs-outcome-tile::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--cs-tile-color, #1f9d63);
  box-shadow: 0 0 14px 1px var(--cs-tile-color, #1f9d63);
  animation: cs-outcome-pulse 2.6s ease-in-out infinite;
}
.cs-outcome-tile:nth-child(2)::before { animation-delay: 0.4s; }
.cs-outcome-tile:nth-child(3)::before { animation-delay: 0.8s; }
.cs-outcome-tile:nth-child(4)::before { animation-delay: 1.2s; }
@keyframes cs-outcome-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.cs-outcome-icon {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--cs-tile-color, #1f9d63); color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 16px;
  box-shadow: 0 0 18px -2px var(--cs-tile-color, #1f9d63);
}
.cs-outcome-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; color: #fff; margin-bottom: 8px; }
.cs-outcome-desc { font-size: 13.5px; line-height: 1.6; color: #9aa9bb; }

/* Stat callout - pulls one standout metric into the body narrative, bold and colourful */
.cs-stat-callout {
  display: flex; align-items: center; gap: 24px; margin: 32px 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--cs-accent, #1f9d63) 14%, #fff), color-mix(in srgb, var(--cs-accent, #1f9d63) 5%, #fff));
  border-left: 4px solid var(--cs-accent, #1f9d63); border-radius: 8px; padding: 22px 28px;
}
.cs-stat-callout-value {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 42px; line-height: 1;
  color: var(--cs-accent, #1f9d63); white-space: nowrap;
}
.cs-stat-callout-label { font-size: 15px; line-height: 1.45; color: #2c3a4a; font-weight: 500; }
@media (max-width: 600px) { .cs-stat-callout { flex-direction: column; align-items: flex-start; gap: 10px; } }

/* Compliance / achievement band - simple equal-width row (text-forward, e.g. standards lists) */
.cs-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px;
  background: #e2e8f0; border-radius: 8px; overflow: hidden; margin-top: 16px;
}
.cs-band-cell {
  background: #f8fafc; padding: 18px 18px 16px; font-size: 13.5px; line-height: 1.5; color: #3a4554;
  text-align: center; font-weight: 600; border-top: 3px solid var(--cs-accent, #1f9d63);
}

/* Lessons Learned table - Insight / Impact / Recommendation, 3-column */
.cs-lessons-table { width: 100%; border-collapse: collapse; margin-top: 16px; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.cs-lessons-table th {
  background: #16202d; color: #fff; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.07em;
  text-transform: uppercase; text-align: left; padding: 12px 16px; font-weight: 600;
}
.cs-lessons-table td { padding: 16px; font-size: 14px; line-height: 1.55; color: #3a4554; vertical-align: top; border-top: 1px solid #e2e8f0; }
.cs-lessons-table tr:nth-child(even) td { background: #f8fafc; }
.cs-lessons-table td.cs-lessons-insight { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--cs-accent, #1f9d63); }
@media (max-width: 700px) { .cs-lessons-table, .cs-lessons-table tr, .cs-lessons-table td, .cs-lessons-table th { font-size: 12.5px; } }

.cs-closing-figure { margin: 0 0 56px; }
.cs-closing-figure img { width: 100%; display: block; border-radius: 8px; }

/* Related Case Studies marquee */
.cs-related {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  background: #0f1419; padding: 56px 0 64px; overflow: hidden;
}
.cs-related-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #6b7785; text-align: center; margin-bottom: 30px;
}
.cs-related-viewport { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cs-related-track { display: flex; gap: 20px; width: max-content; padding: 0 24px; }
.cs-related-track.is-marquee { animation: cs-marquee 32s linear infinite; }
.cs-related-viewport:hover .cs-related-track.is-marquee { animation-play-state: paused; }
@keyframes cs-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cs-related-card {
  flex: 0 0 280px; background: #1a2128; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  padding: 22px 22px 20px; text-decoration: none; border-top: 3px solid var(--cs-card-accent, #1f9d63);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.cs-related-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.18); }
.cs-related-tag {
  display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cs-card-accent, #1f9d63); margin-bottom: 10px;
}
.cs-related-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px; color: #fff; line-height: 1.35; margin-bottom: 14px; }
.cs-related-metric { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; color: var(--cs-card-accent, #1f9d63); }
.cs-related-metric-label { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: #9aa9bb; margin-top: 4px; line-height: 1.4; }

/* Static fallback grid when there are too few case studies for a marquee to make sense */
.cs-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 980px; margin: 0 auto; padding: 0 24px; }

@media (max-width: 900px) {
  .cs-hero-inner { flex-direction: column; }
  .cs-card-grid.cols-2, .cs-card-grid.cols-3, .cs-card-grid.cols-4 { grid-template-columns: 1fr; }
  .cs-h1 { font-size: 30px; }
}
