/* =========================
   CASE STUDY ONLY STYLES
   ========================= */

/* Page wrapper */
.case-study-page{
  background: var(--background-color);
  color: var(--text-color);
}

/* =========================
   HERO
   ========================= */

.cs-hero{
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 6vw 5vw;
  background: var(--background-color);
}

/* Background image + dark overlay (image is set per-page via --cs-hero-image) */
.cs-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.90) 0%, rgba(0,0,0,.65) 55%, rgba(0,0,0,.35) 100%),
    var(--cs-hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

/* Bottom fade to blend into next section */
.cs-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, transparent 60%, var(--background-color) 100%);
}

.cs-hero-inner{
  position: relative;
  z-index: 1;
  max-width: 70rem;
  width: 100%;
  padding-left: 5rem;
  padding-top: 5rem;
}

@media (max-width: 1200px){
  .cs-hero-inner{
  padding-left: 0rem;
}
}

.cs-badge{
  display:inline-block;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(98,157,97,.35);
  background: rgba(98,157,97,.10);
  font-family: "IBMLight";
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: var(--text-size-Small);
  color: rgba(147,220,146,1);
  margin-bottom: 1.25rem;
}

.cs-hero h1{
  font-family: "Lora";
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 0 0 1rem 0;
  color: #fff;
}

.cs-hero-lede{
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255,255,255,.85);
  max-width: 52rem;
  margin: 0 0 1.5rem 0;
}

.cs-tags{
  display:flex;
  flex-wrap:wrap;
  gap: .6rem;
}

.cs-tag{
  padding: .55rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: var(--text-size-Medium);
  color: #fff;
}

/* =========================
   PROJECT OVERVIEW
   ========================= */

.cs-overview{
  padding: 6vw 5vw;
  background: var(--background-color);
}

.cs-overview-inner{
  max-width: 90rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 4rem;
  align-items: start;
}

.cs-overview h2{
  font-family: "IBM";
  font-size: var(--text-size-MHeadline);
  font-weight: 400;
  margin: 0 0 1.25rem 0;
}

.cs-overview .cs-overview-lede{
  color: var(--text-muted-color);
  max-width: 46rem;
}

.cs-challenge-list{
  margin-top: 2rem;
  display:flex;
  flex-direction:column;
  gap: 1.25rem;
}

.cs-challenge{
  display:flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-color);
}

.cs-challenge:last-child{
  border-bottom: 0;
  padding-bottom: 0;
}

.cs-challenge-icon{
  width: 3rem;
  height: 3rem;
  border-radius: .75rem;
  display: grid;
  place-items: center;
  background: rgba(98,157,97,.18);
  border: 1px solid rgba(98,157,97,.35);
  color: var(--accentPrimary);
  flex-shrink: 0;
}

.cs-challenge-icon svg{
  width: 20px;
  height: 20px;
  display: block;
}

.cs-challenge-title{
  font-family: "IBM";
  font-weight: 700;
  margin: 0 0 .25rem 0;
  color: var(--text-color);
}

.cs-challenge-desc{
  margin: 0;
  color: var(--text-muted-color);
}

/* =========================
   Project Overview media: subtle border + hover zoom + caption outside
   ========================= */

.cs-overview-media {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  justify-content: end;
}

/* The “box” around the image only */
.cs-overview-media-frame {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--secondary-bg-color);

  /* 0.5px border look (more reliable than actual 0.5px across screens) */
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

/* Image zoom happens inside the frame */
.cs-overview-media-frame img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1);
  transition: transform 260ms ease;
  will-change: transform;
}

.cs-overview-media-frame:hover img {
  transform: scale(1.03);
}

.cs-solution-media-frame {
  border-radius: 1rem;
  overflow: hidden;
}

.cs-solution-media-frame img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1);
    transition: transform 260ms ease;
    will-change: transform;
    padding-bottom: 8rem;
}

.cs-solution-media-frame:hover img {
  transform: scale(1.03);
}

/* Caption is NOT inside the image box */
.cs-overview-caption {
  margin: 0;
  font-family: "IBMLight";
  font-size: var(--text-size-Small);
  line-height: 150%;
  color: var(--text-muted-color);
}

/* =========================
   BODY (reuse your existing article styles)
   ========================= */

.cs-article-wrap{
  padding: 4vw 6vw 6vw;
}

/* Responsive */
@media (max-width: 980px){
  .cs-overview-inner{ grid-template-columns: 1fr; }
  .cs-hero{ min-height: 70vh; }
}

/* =========================
   Timeline + Scroll Animations
   ========================= */

/* Animation helpers (subtle + quick) */
.cs-anim {
  opacity: 0;
  transform: translate(var(--cs-anim-x, 0), var(--cs-anim-y, 0));
  transition: transform 420ms ease, opacity 420ms ease;
  will-change: transform, opacity;
}

.cs-anim.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

.cs-anim-left { --cs-anim-x: -26px; }
.cs-anim-right { --cs-anim-x: 26px; }
.cs-anim-up { --cs-anim-y: 16px; }

/* Dot "pop" animation */
.cs-anim-pop {
  opacity: 0;
  --cs-pop-scale: 0.7;
  transition: opacity 380ms ease, transform 380ms ease;
  will-change: transform, opacity;
}

.cs-anim-pop.is-visible {
  opacity: 1;
  --cs-pop-scale: 1;
}

/* Timeline section styles */
.cs-timeline {
  position: relative;
  overflow: hidden;
  padding: 6rem 1.5rem;
  background: linear-gradient(to bottom, #1E1E1E, #2A2A2A);
}

.cs-timeline-accent-left {
  position: absolute;
  top: 20%;
  left: -12rem;
  width: 16rem;
  height: 16rem;
  background: rgba(98, 157, 97, 0.08);
  border-radius: 999px;
  filter: blur(60px);
}

.cs-timeline-accent-right {
  position: absolute;
  bottom: 25%;
  right: -12rem;
  width: 30rem;
  height: 30rem;
  background: rgba(147, 220, 146, 0.08);
  border-radius: 999px;
  filter: blur(70px);
}

.cs-timeline-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.cs-timeline-header {
  margin-bottom: 5rem;
  text-align: center;
}

.cs-timeline-title {
  margin: 0 0 0.5rem 0;
  font-family: "Lora";
  font-weight: 400;
  font-size: 2rem;
  color: var(--text-color);
}

.cs-timeline-subtitle {
  margin: 0 auto;
  max-width: 42rem;
  font-family: "IBMLight";
  color: var(--text-muted-color);
  line-height: 1.6;
}

.cs-timeline-wrap {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 0 1rem;
}

/* Vertical line */
.cs-timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--accentPrimary);
  transform: translateX(-50%);
}

.cs-timeline-items {
  display: flex;
  flex-direction: column;
  gap: 10rem; /* matches your large spacing */
}

.cs-timeline-item {
  position: relative;
}

/* Dot on the line */
.cs-timeline-dot {
  position: absolute;
  left: 50%;
  top: 1.9rem;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accentPrimary);
  border: 2px solid var(--background-color);
  z-index: 2;
  transform: translate(-50%, -50%) scale(var(--cs-pop-scale, 1));
}


.cs-timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.cs-timeline-col-left {
  text-align: right;
  padding-right: 3rem;
}

.cs-timeline-col-right {
  text-align: left;
  padding-left: 3rem;
}

.cs-timeline-phase-title {
  margin: 0;
  font-family: "IBM";
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--accent-color);
}

.cs-timeline-duration {
  margin: 0.25rem 0 0 0;
  font-family: "IBM";
  font-size: 1rem;
  color: #808080;
}

.cs-timeline-desc {
  margin: 0;
  font-family: "IBMLight";
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted-color);
  max-width: 34rem;
}

/* Mobile: line moves left, content becomes 1 column */
@media (max-width: 900px) {
  .cs-timeline-line {
    left: 1.25rem;
    transform: translateX(-50%);
  }

  .cs-timeline-dot {
    left: 1.25rem;
    transform: translate(-50%, -50%);
  }

  .cs-timeline-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-left: 3.25rem; /* makes room for the line + dot */
  }

  .cs-timeline-col-left,
  .cs-timeline-col-right {
    text-align: left;
    padding: 0;
  }

  .cs-timeline-items {
    gap: 4rem;
  }
}

/* =========================
   Solution (3 cards)
   ========================= */

/* If you already added Timeline animations, you can keep those.
   This ensures Solution animations work even if you didn’t. */
.cs-anim {
  opacity: 0;
  transform: translate(var(--cs-anim-x, 0), var(--cs-anim-y, 16px));
  transition: transform 420ms ease, opacity 420ms ease;
  will-change: transform, opacity;
}
.cs-anim.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}
.cs-anim-left { --cs-anim-x: -26px; --cs-anim-y: 0; }
.cs-anim-right { --cs-anim-x: 26px; --cs-anim-y: 0; }
.cs-anim-up { --cs-anim-y: 16px; }

.cs-solution {
  padding: 6rem 1.5rem;
  background: var(--background-color);
}

.cs-solution-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.cs-solution-header {
  text-align: center;
  margin-bottom: 5rem;
}

.cs-solution-title {
  margin: 0 0 0.75rem 0;
  font-family: "Lora";
  font-weight: 400;
  font-size: 2rem; /* matches ~32px */
  color: var(--text-color);
}

.cs-solution-subtitle {
  margin: 0 auto;
  max-width: 48rem;
  font-family: "IBMLight";
  color: var(--text-muted-color);
  line-height: 1.6;
}

.cs-solution-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .cs-solution-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cs-solution-grid-4 {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .cs-solution-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Card base */
.cs-solution-card {
  position: relative;
  border-radius: 1.25rem; /* 2xl */
  padding: 2rem;
  overflow: hidden;
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 300ms ease;
}

.cs-solution-card:hover {
  transform: scale(1.02);
}

/* Soft pattern overlay */
.cs-solution-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background: radial-gradient(circle at 50% 120%, rgba(255,255,255,0.10), transparent 60%);
  pointer-events: none;
}

.cs-solution-card > * {
  position: relative;
  z-index: 1;
}

/* Backgrounds (from your TSX gradients) */
.cs-solution-card--1 {
  background:
    radial-gradient(circle at 30% 15%, rgba(98, 157, 97, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 20% 25%, rgba(28, 157, 97, 0.1) 0%, transparent 55%),
    #3a4a3a
}

.cs-solution-card--2 {
  background:
    radial-gradient(circle at 5% 90%, rgba(19, 191, 159, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 95% 15%, rgba(19, 191, 159, 0.3) 0%, transparent 25%),
    #2a3935
}

.cs-solution-card--3 {
  background:
    radial-gradient(circle at 40% 10%, rgba(127, 210, 216, 0.5) 0%, transparent 50%),    
    radial-gradient(circle at 60% 20%, rgba(127, 210, 296, 0.5) 0%, transparent 55%),    
    #252A30
}

.cs-solution-card--4 {
  background:
    radial-gradient(circle at 80% 30%, rgba(27, 210, 216, 0.5) 0%, transparent 50%),    
    radial-gradient(circle at 0% 70%, rgba(117, 195, 296, 0.2) 0%, transparent 55%),    
    #202A35
}

/* Tag pill */
.cs-solution-tag {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.80);
  font-family: "IBM";
  font-size: var(--text-size-Small);
  margin-bottom: 2.5rem;
}

/* Metric */
.cs-solution-metric {
  margin-bottom: 2rem;
}

.cs-solution-metric-value {
  font-family: "IBM";
  color: #ffffff;
  font-size: 56px;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.cs-solution-metric-label {
  font-family: "IBM";
  color: rgba(255,255,255,0.60);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Description */
.cs-solution-desc {
  margin: 0;
  color: rgba(255,255,255,0.80);
  font-family: "IBMLight";
  font-size: 14px;
  line-height: 1.6;
}

.cs-solution-desc strong {
  color: var(--text-color);
  font-weight: 600;
}

@media (max-width: 900px) {
  .cs-solution {
    overflow: visible;
  }

  .cs-solution-grid,
  .cs-solution-grid-4 {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 1rem 1rem 0;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: auto;
    overscroll-behavior-inline: contain;
    overflow-anchor: none;
  }
  .cs-solution-grid::-webkit-scrollbar,
  .cs-solution-grid-4::-webkit-scrollbar {
    display: none;
  }

  .cs-solution-grid .cs-solution-card,
  .cs-solution-grid-4 .cs-solution-card {
    flex: 0 0 78%;
    min-width: 0;
    scroll-snap-align: start;
    padding: 1.5rem;
  }

  .cs-solution-grid-4 .cs-solution-card {
    flex-basis: 70%;
  }
}

@media (max-width: 480px) {
  .cs-solution-grid .cs-solution-card,
  .cs-solution-grid-4 .cs-solution-card {
    flex-basis: 85%;
  }
}


.cs-solution-nav {
  display: none;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
@media (max-width: 900px) {
  .cs-solution-nav {
    display: flex;
  }
}
.cs-solution-nav-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid var(--line-inverse-color);
  background: transparent;
  color: var(--text-muted-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.cs-solution-nav-btn:hover {
  border-color: var(--accentPrimary);
  color: var(--accentPrimary);
}
.cs-solution-nav-icon {
  font-size: 1.1rem;
  line-height: 1;
}


/* =========================
   Technical Specs (Accordion + Sticky Image)
   ========================= */

.cs-specs {
  padding: 6rem 1.5rem;
  background: #2a2a2a;
}

.cs-specs-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.cs-specs-header {
  text-align: center;
  margin-bottom: 5rem;
}

.cs-specs-title {
  margin: 0;
  font-family: "Lora";
  font-weight: 400;
  font-size: 2rem; /* ~32px */
  color: #ffffff;
}

/* Two-column layout */
.cs-specs-grid {
  display: grid;
  gap: 4rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .cs-specs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Left column: accordion */
.cs-acc {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cs-acc-item {
  border-bottom: 1px solid #4a4a4a;
  transition: border-color 200ms ease;
}

.cs-acc-item:hover {
  border-bottom-color: rgba(98, 157, 97, 0.5);
}

.cs-acc-item.is-open {
  border-bottom-color: #629d61;
}

.cs-acc-btn {
  width: 100%;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.cs-acc-title {
  margin: 0;
  font-family: "IBM";
  font-size: 1.125rem; /* 18px */
  font-weight: 500;
  color: #ffffff;
}

.cs-acc-chevron {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform 220ms ease;
  color: #93dc92;
}

.cs-acc-item.is-open .cs-acc-chevron {
  transform: rotate(180deg);
}

/* Expandable area */
.cs-acc-panel {
  overflow: hidden;
  max-height: 0;          /* JS will set this when open */
  opacity: 0;
  transition: max-height 260ms ease, opacity 220ms ease;
}

.cs-acc-item.is-open .cs-acc-panel {
  opacity: 1;
}

.cs-acc-panel-inner {
  padding: 0 0 1.5rem 0;
}

.cs-acc-specs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
}

.cs-acc-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
}

.cs-acc-row:last-child {
  padding-bottom: 0;
}

.cs-acc-label {
  font-family: "IBM";
  font-size: var(--text-size-Small);
  color: #808080;
}

.cs-acc-value {
  font-family: "IBM";
  font-size: var(--text-size-Small);
  color: var(--accentPrimary);
  text-align: right;
}

/* Right column: sticky image */
.cs-specs-media {
  position: relative;
}

@media (min-width: 1024px) {
  .cs-specs-media {
    position: sticky;
    top: 2rem;
  }
}

.cs-specs-image {
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  height: 400px;
  border: 1px solid rgba(255,255,255,0.06);
}

.cs-specs-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 260ms ease;
  will-change: transform;
}

.cs-specs-image:hover img {
  transform: scale(1.03);
}

/* =========================
   Case study theme overrides (use site variables)
   ========================= */

.cs-timeline {
  background: linear-gradient(
    to bottom,
    var(--background-color),
  );
  color: var(--text-color);
}

.cs-timeline-title,
.cs-timeline-subtitle {
  color: var(--text-color);
}

.cs-timeline-subtitle {
  color: var(--text-muted-color);
}

.cs-timeline-line {
  background: var(--accentPrimary);
}

.cs-timeline-dot {
  background: var(--accentPrimary);
  border-color: var(--background-color);
}

.cs-timeline-duration {
  color: var(--text-muted-color);
}

.cs-solution {
  background: var(--background-color);
  color: var(--text-color);
}

.cs-specs {
  background: var(--background-color);
  color: var(--text-color);
}

.cs-acc-item {
  border-bottom-color: var(--line-inverse-color);
}

.cs-acc-item.is-open {
  border-bottom-color: var(--accentPrimary);
}

.cs-acc-label {
  color: var(--text-muted-color);
}

.cs-acc-value {
  color: var(--accentPrimary);
}

/* =========================
   Metrics (Outcome + Achievements + Testimonial)
   ========================= */

.cs-metrics {
  padding: 6rem 1.5rem;
  background: var(--background-color);
}

.cs-metrics-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.cs-metrics-panel {
  background: linear-gradient(to bottom, var(--secondary-bg-color), var(--background-color));
  border-radius: 2rem;
  padding: 3rem;
  border: 1px solid var(--line-inverse-color);
  margin-bottom: 4rem;
}

@media (max-width: 900px) {
  .cs-metrics-panel {
    padding: 2rem 1rem;
  }

  .cs-metrics {
  padding: 6rem 1rem;
}
}

.cs-metrics-header {
  text-align: center;
  margin-bottom: 3rem;
}

.cs-metrics-title {
  margin: 0 0 0.5rem 0;
  font-family: "Lora";
  font-weight: 400;
  font-size: 2rem;
  color: var(--text-color);
}

.cs-metrics-subtitle {
  margin: 0 auto;
  max-width: 48rem;
  font-family: "IBMLight";
  color: var(--text-muted-color);
  line-height: 1.6;
}

/* Metric cards */
.cs-metrics-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .cs-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .cs-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cs-metric-card {
  position: relative;
  padding: 2rem;
  background: var(--background-color);
  border: 1px solid var(--line-inverse-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 220ms ease, transform 220ms ease;
}

.cs-metric-card:hover {
  border-color: rgba(98, 157, 97, 0.5);
  transform: translateY(-2px);
}

/* Hover glow in top-right */
.cs-metric-card::before {
  content: "";
  position: absolute;
  top: -3rem;
  right: -3rem;
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle, rgba(98, 157, 97, 0.22), transparent 60%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.cs-metric-card:hover::before {
  opacity: 1;
}

/* Bottom accent line on hover */
.cs-metric-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accentPrimary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.cs-metric-card:hover::after {
  transform: scaleX(1);
}

.cs-metric-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  background: var(--background-color);
  border: 1px solid var(--line-inverse-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.cs-metric-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accentPrimary);
  transition: transform 220ms ease;
}

.cs-metric-card:hover .cs-metric-icon svg {
  transform: scale(1.08);
}

.cs-metric-value {
  font-family: "IBMLight";
  font-weight: 300;
  font-size: clamp(2.25rem, 3vw, 3rem);
  line-height: 1.2;
  color: rgba(147, 220, 146, 1);
  margin: 0 0 0.25rem 0;
}

.cs-metric-label {
  margin: 0;
  color: var(--text-muted-color);
  font-family: "IBM";
  font-size: 1rem;
}

/* Achievements list */
.cs-achievements-title {
  margin: 0 0 2rem 0;
  text-align: center;
  font-family: "Lora";
  font-weight: 400;
  font-size: 2rem;
  color: var(--text-color);
}

.cs-achievements-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .cs-achievements-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cs-achievement {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--background-color);
  border: 1px solid var(--line-inverse-color);
  border-radius: 0.75rem;
  transition: all 220ms ease;
}

.cs-achievement:hover {
  border-color: rgba(98, 157, 97, 0.5);
}

.cs-achievement-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accentPrimary);
  flex-shrink: 0;
  margin-top: 0.4rem;
  transition: transform 420ms ease;
}

.cs-achievement:hover .cs-achievement-dot {
  transform: rotate(90deg);
}

.cs-achievement:hover {
  border-color: var(--accentPrimary);
}

.cs-achievement p {
  margin: 0;
  color: var(--text-muted-color);
  font-family: "IBMLight";
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Testimonial */
.cs-testimonial {
  position: relative;
}

.cs-testimonial-card {
  position: relative;
  padding: 3rem;
  border-radius: 1.25rem;
  background: rgba(42, 42, 42, 0.75);
  border: 1px solid var(--line-inverse-color);
  backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}

.cs-testimonial-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at bottom, rgba(98, 157, 97, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.cs-quote-mark {
  position: relative;
  font-family: "Lora";
  font-size: 90px;
  line-height: 1;
  color: rgba(98, 157, 97, 0.25);
  margin-bottom: 0.5rem;
}

.cs-quote-text {
  position: relative;
  font-family: "IBMLight";
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  line-height: 1.65;
  color: var(--text-color);
  margin: 0 0 2rem 0;
  max-width: 64rem;
}

.cs-author {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cs-author-badge {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(98, 157, 97, 1), rgba(139, 191, 159, 1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-family: "IBM";
  font-size: 1.25rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.cs-author-name {
  margin: 0;
  color: var(--text-color);
  font-family: "IBM";
}

.cs-author-role {
  margin: 0.15rem 0 0 0;
  color: var(--accent-color);
  font-family: "IBMLight";
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .cs-testimonial-card {
    padding: 2rem;
  }
}

/* =========================
   CTA section (uses existing button styles)
   ========================= */

.cs-cta {
  padding: 6rem 1.5rem;
  background: var(--background-color);
}

.cs-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.cs-cta-title {
  margin: 0 0 1rem 0;
  font-family: "IBM";
  font-weight: 400;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  color: var(--text-color);
}

.cs-cta-subtitle {
  margin: 0 auto;
  max-width: 60ch;
  font-family: "IBMLight";
  font-size: var(--text-size-Large);
  line-height: 1.7;
  color: var(--text-muted-color);
}

/* Button row spacing */
.cs-cta .button-box {
  margin-top: 3rem;
  flex-wrap: wrap;
}

/* =========================================================
   Case Study: Typography + Color Sync (from style.css)
   Paste at END of case-study.css so it overrides earlier rules
   ========================================================= */

.case-study-page {
  background: var(--background-color);
  color: var(--text-color);
}

/* Base body text in case study sections */
.case-study-page .cs-hero-description,
.case-study-page .cs-overview-intro,
.case-study-page .cs-overview-challenge-text p,
.case-study-page .cs-solution-subtitle,
.case-study-page .cs-solution-desc,
.case-study-page .cs-specs,
.case-study-page .cs-timeline-subtitle,
.case-study-page .cs-timeline-desc,
.case-study-page .cs-metrics-subtitle,
.case-study-page .cs-metric-label,
.case-study-page .cs-achievement p,
.case-study-page .cs-quote-text,
.case-study-page .cs-cta-subtitle {
  font-family: "IBM";
  font-size: var(--text-size-Large);
  line-height: 160%;
  color: var(--text-muted-color);
}

/* Section titles: match your site’s heading system */
.case-study-page .cs-overview-heading,
.case-study-page .cs-solution-title,
.case-study-page .cs-specs-title,
.case-study-page .cs-timeline-title,
.case-study-page .cs-metrics-title,
.case-study-page .cs-achievements-title,
.case-study-page .cs-cta-title {
  font-family: "IBM";
  font-size: var(--text-size-MHeadline);
  font-weight: 400;
  line-height: 140%;
  color: var(--text-color);
}

/* Hero title: use your global H1 styling (Lora + XLHeadline) */
.case-study-page .cs-hero-title {
  font-family: "Lora";
  font-size: var(--text-size-XLHeadline);
  font-weight: 500;
  line-height: 110%;
  color: var(--text-color);
}

/* Small labels / meta text */
.case-study-page .cs-hero-badge,
.case-study-page .cs-timeline-duration,
.case-study-page .cs-metric-label,
.case-study-page .cs-acc-label {
  font-family: "IBM";
  font-size: var(--text-size-Small);
  color: var(--text-muted-color);
}

/* Accent usage */
.case-study-page .cs-timeline-phase-title,
.case-study-page .cs-acc-value,
.case-study-page .cs-author-role {
  color: var(--accentPrimary);
}

/* Replace hard-coded line colors */
.case-study-page .cs-acc-item,
.case-study-page .cs-overview-challenge,
.case-study-page .cs-metric-card,
.case-study-page .cs-achievement,
.case-study-page .cs-testimonial-card {
  border-color: var(--line-inverse-color);
}

/* Remove any section-specific hard-coded backgrounds that drift from your theme */
.case-study-page .cs-solution,
.case-study-page .cs-specs,
.case-study-page .cs-metrics {
  background: var(--background-color-color);
}

/* Timeline should blend using your real page colors (no custom gray blocks) */
.case-study-page .cs-timeline {
  background: linear-gradient(to bottom, var(--background-color), var(--background-color));
}

/* Timeline line + dots should use accentPrimary (not custom greens) */
.case-study-page .cs-timeline-line,
.case-study-page .cs-timeline-dot {
  background: var(--accentPrimary);
}
.case-study-page .cs-timeline-dot {
  border-color: var(--background-color);
}

/* Metric value color should use accentPrimary (not rgba hard-codes) */
.case-study-page .cs-metric-value {
  color: var(--accentPrimary);
}

/* Testimonial: ensure clean “site” surface, not custom tinted overlays */
.case-study-page .cs-testimonial-card {
  background: var(--secondary-bg-color);
}

/* Outcome metric cards */
.cs-metric-cards{
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}

.cs-metric-cards--single{
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.cs-metric-cards-2{
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));

}

.cs-metric-cards-3{
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cs-metric-card{
  position: relative;
  padding: 2rem;
  background: var(--secondary-bg-color);
  border: 1px solid var(--line-inverse-color);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease;
}

.cs-metric-card::before{
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at 30% 30%, rgba(147, 220, 146, 0.20), transparent 70%);
  opacity: 0;
  filter: blur(18px);
  transition: opacity 220ms ease;
}

.cs-metric-card::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accentPrimary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.cs-metric-card:hover{
  border-color: rgba(147, 220, 146, 0.5);
  transform: translateY(-2px);
}

.cs-metric-card:hover::before{ opacity: 1; }
.cs-metric-card:hover::after{ transform: scaleX(1); }

.cs-metric-icon{
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: var(--tertiary-bg-color);
  border: 1px solid var(--line-inverse-color);
  color: var(--accentPrimary);
  margin-bottom: 1.25rem;
}

.cs-metric-icon svg{
  width: 28px;
  height: 28px;
  display: block;
}

.cs-metric-value{
  font-family: "IBM";
  font-weight: 300;
  font-size: clamp(2.5rem, 4vw, 3.25rem);
  line-height: 1.1;
  color: var(--accentPrimary);
  margin: 0 0 0.35rem 0;
}

.cs-metric-label{
  color: var(--text-color);
  font-size: 1rem;
  margin: 0;
}

.cs-metric-note{
  color: var(--text-muted-color);
  font-family: "IBMLight";
  font-size: var(--text-size-Small);
  line-height: 1.6;
}

/* =========================
   Explainer cards (crypto primer)
   ========================= */
.cs-explain{
  padding: 6rem 0;
}

.cs-explain-inner{
  width: min(1100px, calc(100% - 3rem));
  margin: 0 auto;
}

.cs-explain-header{
  text-align: center;
  margin-bottom: 2.75rem;
}

.cs-explain-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 900px){
  .cs-explain-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 600px){
  .cs-metric-cards-3{
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
  .cs-metric-cards-2{
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
}

.cs-explain-card{
  --card-bg: var(--secondary-bg-color);
  --card-fg: var(--text-color);
  --card-muted: var(--text-muted-color);
  --card-line: var(--line-inverse-color);

  position: relative;
  border-radius: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  padding: 2.25rem;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 220ms ease, border-color 220ms ease;
}

.cs-explain-card::before{
  content:"";
  position:absolute;
  inset:-40%;
  background: radial-gradient(circle at 30% 30%, rgba(147, 220, 146, 0.18), transparent 55%);
  opacity: 0;
  filter: blur(18px);
  transition: opacity 220ms ease;
}

.cs-explain-card:hover{
  transform: translateY(-3px);
  border-color: rgba(147, 220, 146, 0.45);
}

.cs-explain-card:hover::before{ opacity: 1; }

.cs-explain-eyebrow{
  margin: 0 0 0.9rem 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--card-muted);
}

.cs-explain-heading{
  margin: 0;
  font-family: "IBM";
  font-weight: 500;
  font-size: var(--text-size-SHeadline);
  line-height: 1.15;
  color: var(--card-fg);
}

.cs-explain-text{
  margin: 1rem 0 0 0;
  color: var(--card-muted);
  font-family: "IBMLight";
  line-height: 1.7;
  max-width: 48ch;
}

.cs-explain-illust{
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding-top: 1.75rem;
  color: var(--card-fg);
  opacity: 0.95;
  transform: translateY(0);
  transition: transform 220ms ease;
}

.cs-explain-card:hover .cs-explain-illust{
  transform: translateY(-4px);
}

.cs-explain-illust svg{
  width: min(360px, 95%);
  height: auto;
  display: block;
}

.cs-explain-title{
  font-family: "IBM";
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text-color);
  font-size: var(--text-size-MHeadline);
  line-height: 1.1;
  margin: 0;
}

.cs-explain-subtitle{
  font-family: "IBMLight";
  color: var(--text-muted-color);
  font-size: var(--text-size-Medium);
  line-height: 1.7;
}


/* =========================
   Mobile timeline: no overlap, Title → Body
   ========================= */
@media (max-width: 900px) {
  .cs-timeline-wrap {
    position: relative;
  }

  /* Pin the line to the far left; remove center translate */
  .cs-timeline-line {
    left: 0.75rem;
    transform: none;
    z-index: 0; 
  }

  /* Pin the dot to the same left position */
  .cs-timeline-dot {
    left: 0.75rem;
    transform: translate(-50%, -50%);
    z-index: 1;
  }

  /* Single-column stack for each item */
  .cs-timeline-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Ensure text isn’t centered and doesn’t collide with the line */
  .cs-timeline-col-left,
  .cs-timeline-col-right {
    text-align: left;
    padding: 0;
    position: relative;
    z-index: 2; 
  }

  /* If you alternate title/body across columns on desktop,
     force Title → Body order consistently for mobile. */
  .cs-timeline-col-left { order: 1; }
  .cs-timeline-col-right { order: 2; }

  /* If some items place the title in the RIGHT column on desktop,
     flip those on mobile so Title comes first.
     Change even→odd depending on your pattern. */
  .cs-timeline-item:nth-child(even) .cs-timeline-col-right { order: 1; }
  .cs-timeline-item:nth-child(even) .cs-timeline-col-left  { order: 2; }
}


@media (max-width: 900px) {
  .cs-solution-grid-4 .cs-solution-card,
  .cs-solution-grid .cs-solution-card {
    transition: none;
    transform: none;
  }

  .cs-solution-grid-4 .cs-solution-card.cs-anim,
  .cs-solution-grid .cs-solution-card.cs-anim {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cs-solution-grid-4 .cs-solution-card[data-cs-animate],
  .cs-solution-grid .cs-solution-card[data-cs-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cs-solution-grid-4 .cs-solution-card:hover,
  .cs-solution-grid .cs-solution-card:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .cs-explain-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 1rem 1rem 0;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: auto;
    overscroll-behavior-inline: contain;
    overflow-anchor: none;
  }
  .cs-explain-grid::-webkit-scrollbar {
    display: none;
  }
  
  .cs-explain-card {
    flex: 0 0 78%;
    min-width: 0;
    scroll-snap-align: start;
    padding: 1.5rem;
  }
  
.cs-explain-card {
    transition: none;
    transform: none;
  }
  .cs-explain-card:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .cs-explain-card {
    flex-basis: 85%;
  }
}

.cs-explain-nav {
  display: none;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
@media (max-width: 900px) {
  .cs-explain-nav {
    display: flex;
  }
}
.cs-explain-nav-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid var(--line-inverse-color);
  background: transparent;
  color: var(--text-muted-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.cs-explain-nav-btn:hover {
  border-color: var(--accentPrimary);
  color: var(--accentPrimary);
}
.cs-explain-nav-icon {
  font-size: 1.1rem;
  line-height: 1;
}




