/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CASE STUDY â€” STRUCTURED SECTIONS
   Extends the existing .sc-* styles from legacy.css
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Hero Adjustments â”€â”€ */
.sc-hero {
  padding-bottom: 48px;
  /* Tightened based on feedback */
}

/* â”€â”€ Stat Bar (below hero) â”€â”€ */
.cs-stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: -32px auto 24px;
  /* Tighter overlap and bottom spacing */
  position: relative;
  z-index: 10;
  padding: 0 24px;
}

.cs-stat-item {
  background: #fff;
  padding: 32px 24px;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-stat-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
}

.cs-stat-icon {
  font-size: 28px;
  margin-bottom: 16px;
  opacity: 0.9;
}

.cs-stat-value {
  font-size: 34px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 8px;
}

.cs-stat-label {
  font-size: 14px;
  color: var(--navy);
  line-height: 1.4;
  font-weight: 600;
}

.cs-stat-sublabel {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}



/* â”€â”€ Section Label (eyebrow inside sc-content) â”€â”€ */
.cs-section-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.cs-section-label::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--teal);
  border-radius: 1px;
}

/* â”€â”€ Content Sections (inside sc-content) â”€â”€ */
.cs-section {
  padding: 24px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cs-section:last-child {
  border-bottom: none;
}

.cs-section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-bottom: 20px;
}

.cs-section-text {
  font-size: 17px;
  color: var(--body-text);
  line-height: 1.9;
}

/* â”€â”€ Problem Numbers Grid â”€â”€ */
.cs-problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.cs-problem-item {
  background: var(--snow);
  padding: 40px 24px;
  text-align: center;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s;
}

.cs-problem-item:hover {
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
}

.cs-problem-value {
  font-size: 42px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 16px;
}

.cs-problem-label {
  font-size: 15px;
  color: var(--body-text);
  line-height: 1.5;
  font-weight: 500;
}

.cs-problem-sublabel {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
}

/* â”€â”€ Architecture Table â”€â”€ */
.cs-arch-intro {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  margin-top: 16px;
  line-height: 1.7;
}

.cs-arch-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.cs-arch-table thead th {
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 16px 24px;
  text-align: left;
}

.cs-arch-table tbody td {
  padding: 20px 24px;
  font-size: 15px;
  color: var(--body-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  line-height: 1.6;
}

.cs-arch-table tbody tr:last-child td {
  border-bottom: none;
}

.cs-arch-table tbody tr {
  transition: background 0.2s;
  background: #fff;
}

.cs-arch-table tbody tr:nth-child(even) {
  background: var(--snow);
}

.cs-arch-table tbody tr:hover {
  background: rgba(0, 184, 169, 0.04);
}

.cs-arch-table tbody td:first-child {
  font-weight: 700;
  color: var(--navy);
  width: 30%;
}

/* â”€â”€ Architecture Flow Diagram â”€â”€ */
.cs-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 16px;
  padding: 32px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.cs-flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 8px;
  /* Tighter left padding for the circle */
  background: var(--snow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 100px;
  transition: all 0.3s;
}

.cs-flow-step:hover {
  border-color: rgba(0, 184, 169, 0.3);
  background: rgba(0, 184, 169, 0.08);
  transform: translateY(-2px);
}

.cs-flow-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 184, 169, 0.25);
}

.cs-flow-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.cs-flow-arrow {
  padding: 0 12px;
  color: var(--teal);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.7;
}

/* â”€â”€ Key Decisions List â”€â”€ */
.cs-decisions {
  margin-top: 24px;
  padding: 32px;
  background: var(--snow);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.cs-decisions-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.cs-decisions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cs-decisions-list li {
  position: relative;
  padding-left: 28px;
  font-size: 16px;
  color: var(--body-text);
  line-height: 1.7;
}

.cs-decisions-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.15);
}

/* â”€â”€ Results Before / After â”€â”€ */
.cs-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.03);
}

.cs-results-col {
  display: flex;
  flex-direction: column;
}

.cs-results-col--before {
  background: #fafafc;
}

.cs-results-col--after {
  background: rgba(0, 184, 169, 0.04);
}

.cs-results-header {
  padding: 24px 32px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cs-results-col--before .cs-results-header {
  background: rgba(0, 0, 0, 0.03);
  color: var(--muted);
}

.cs-results-col--after .cs-results-header {
  background: var(--teal);
  color: #fff;
}

.cs-results-header::before {
  content: "✕";
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.cs-results-col--after .cs-results-header::before {
  content: "✓";
  background: rgba(255, 255, 255, 0.2);
}

.cs-result-row {
  padding: 20px 32px;
  font-size: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.cs-result-row::before {
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 4px;
}
.cs-results-col--before .cs-result-row::before {
  content: "✕";
  color: #ef4444;
}
.cs-results-col--after .cs-result-row::before {
  content: "✓";
  color: var(--teal);
}

.cs-results-col--before .cs-result-row {
  color: #6c707d;
  /* slightly muted but readable */
  border-right: 1px solid rgba(0, 0, 0, 0.04);
  position: relative;
}

.cs-results-col--after .cs-result-row {
  color: var(--navy);
  font-weight: 700;
  position: relative;
}

.cs-result-row:last-child {
  border-bottom: none;
}

/* â”€â”€ Proof Point â”€â”€ */
.cs-proof {
  background: var(--navy);
  border-radius: 24px;
  padding: 48px 64px;
  margin-top: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 30, 60, 0.15);
}

.cs-proof::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 184, 169, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cs-proof::after {
  content: "â€";
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 180px;
  font-family: serif;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
}

.cs-proof-text {
  font-size: clamp(22px, 2.5vw, 32px);
  color: #fff;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.cs-proof-text em {
  color: var(--teal);
  font-style: normal;
  font-weight: 700;
}

/* â”€â”€ Back Link â”€â”€ */
.cs-back-lk {
  display: inline-flex;
  align-items: center;
  margin-top: 48px;
  font-size: 15px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  transition: transform 0.2s, color 0.2s;
}

.cs-back-lk:hover {
  color: var(--teal-deep);
  transform: translateX(-4px);
}

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 1024px) {
  .cs-stat-bar {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -32px;
  }

  .cs-problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sc-hero {
    padding-bottom: 40px;
  }

  .cs-stat-bar {
    margin-top: 0;
    margin-bottom: 24px;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px;
  }

  .cs-stat-item {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .cs-stat-value {
    font-size: 28px;
  }

  .cs-problem-grid {
    gap: 12px;
  }

  .cs-problem-item {
    padding: 28px 20px;
  }

  .cs-problem-value {
    font-size: 32px;
  }

  .cs-results-grid {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .cs-results-col--before .cs-result-row {
    border-right: none;
  }

  .cs-proof {
    padding: 40px 24px;
    margin-top: 24px;
    margin-bottom: 24px;
    border-radius: 16px;
  }

  .cs-proof-text {
    font-size: 20px;
  }

  .cs-arch-table thead th,
  .cs-arch-table tbody td {
    padding: 16px;
    font-size: 14px;
  }

  .cs-arch-table tbody td:first-child {
    width: 40%;
  }

  .cs-section {
    padding: 32px 0;
  }

  .cs-flow {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px 16px;
  }

  .cs-flow-step {
    justify-content: center;
  }

  .cs-flow-arrow {
    justify-content: center;
    padding: 8px 0;
    transform: rotate(90deg);
  }

  .cs-flow-name {
    white-space: normal;
    text-align: center;
  }

  .cs-decisions {
    padding: 24px 20px;
  }
}