.client-story-page {
  --client-story-content-width: 980px;
  background:
    var(--loopino-surface);
}

.client-story-main {
  padding-top: clamp(120px, 15vw, 168px);
}

.client-story-hero {
  padding-top: clamp(28px, 4vw, 44px);
}

.client-story-hero-grid,
.client-story-solution-grid,
.client-story-impact-shell,
.client-story-stack-shell {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.client-story-hero-grid {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.client-story-solution-grid,
.client-story-impact-shell,
.client-story-stack-shell {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.client-story-hero-copy {
  display: grid;
  width: min(100%, var(--client-story-content-width));
  justify-items: center;
  text-align: center;
}

.client-story-hero-copy h1 {
  margin: 14px 0 18px;
  max-width: 16ch;
  font-family: var(--ko-font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
  color: var(--loopino-text-strong);
  text-wrap: balance;
}

.client-story-hero-copy h1 span {
  color: var(--loopino-primary);
}

.client-story-lead {
  max-width: var(--client-story-content-width);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  color: var(--loopino-text-muted);
  text-wrap: pretty;
}

.client-story-tag-row,
.client-story-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-story-tag-row {
  margin-top: 28px;
  justify-content: center;
}

.client-story-tag,
.client-story-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--loopino-radius-md);
  border: 1px solid rgba(var(--ko-border-rgb), 0.24);
  background: rgba(var(--ko-panel-rgb), 0.72);
  color: var(--loopino-text-default);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.client-story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.client-story-hero-copy .client-story-actions {
  justify-content: center;
}

.client-story-hero-rail {
  width: min(100%, var(--client-story-content-width));
}

.client-story-stage,
.client-story-summary-card,
.client-story-info-card,
.client-story-sidebar-panel,
.client-story-step,
.client-story-impact-card,
.client-story-cta-shell,
.client-story-stack-column {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--ko-border-rgb), 0.24);
  background: rgba(var(--ko-panel-rgb), 0.8);
  box-shadow: 0 24px 60px rgba(var(--ko-shadow-rgb), 0.34);
  backdrop-filter: blur(16px);
}

.client-story-stage,
.client-story-summary-card,
.client-story-cta-shell {
  border-radius: var(--loopino-radius-md);
}

.client-story-info-card,
.client-story-sidebar-panel,
.client-story-step,
.client-story-impact-card,
.client-story-stack-column {
  border-radius: var(--loopino-radius-md);
}

.client-story-stage {
  min-height: 560px;
  padding: 18px;
  isolation: isolate;
}

.client-story-stage-media {
  display: flex;
  height: 100%;
  min-height: 520px;
  border-radius: var(--loopino-radius-md);
  overflow: hidden;
  background: rgba(var(--ko-overlay-rgb), 0.7);
}

.client-story-stage-media img {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}

.client-story-stage-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.9;
  z-index: -1;
}

.client-story-stage-glow-secondary {
  width: 150px;
  height: 150px;
  bottom: 14%;
  left: -30px;
  background: rgba(var(--ko-secondary-rgb), 0.18);
}

.client-story-stage-card {
  position: absolute;
  max-width: 240px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(var(--ko-border-rgb), 0.24);
  background: rgba(var(--ko-overlay-rgb), 0.82);
  box-shadow: 0 18px 40px rgba(var(--ko-shadow-rgb), 0.42);
}

.client-story-stage-card-top {
  top: 28px;
  right: 28px;
}

.client-story-stage-card-bottom {
  bottom: 28px;
  left: 28px;
}

.client-story-stage-label,
.client-story-panel-label,
.client-story-info-label {
  display: inline-flex;
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--loopino-primary);
}

.client-story-stage-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--ko-font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  color: var(--loopino-text-strong);
}

.client-story-stage-card p,
.client-story-summary-row span,
.client-story-summary-row strong,
.client-story-info-card p,
.client-story-check-item p,
.client-story-sidebar-panel p,
.client-story-step p,
.client-story-impact-card p,
.client-story-cta-shell p {
  text-wrap: pretty;
}

.client-story-summary-card {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 24px;
  text-align: center;
}

.client-story-summary-row {
  display: grid;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(var(--ko-border-rgb), 0.18);
}

.client-story-summary-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.client-story-summary-row span {
  color: var(--loopino-text-soft);
  font-size: 0.88rem;
}

.client-story-summary-row strong {
  color: var(--loopino-text-strong);
  font-size: 1rem;
  font-weight: 500;
}

.client-story-article-grid,
.client-story-card-grid,
.client-story-step-grid,
.client-story-impact-grid {
  display: grid;
  gap: 20px;
}

.client-story-article-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.client-story-card-grid,
.client-story-impact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-story-step-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.client-story-info-card,
.client-story-step,
.client-story-impact-card {
  min-height: 100%;
  padding: 26px;
}

.client-story-info-card h3,
.client-story-article-card h3,
.client-story-step h3 {
  margin-bottom: 12px;
  font-family: var(--ko-font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--loopino-text-strong);
}

.client-story-solution-copy,
.client-story-impact-copy {
  display: grid;
  gap: 24px;
}

.client-story-context .section-head,
.client-story-context .client-story-article-grid,
.client-story-solution-grid,
.client-story-workflow .section-head,
.client-story-step-grid,
.client-story-impact-shell,
.client-story-stack .section-head,
.client-story-stack-shell,
.client-story-cta-shell {
  width: min(100%, var(--client-story-content-width));
  margin-left: auto;
  margin-right: auto;
}

.client-story-solution-grid,
.client-story-impact-shell,
.client-story-stack-shell {
  grid-template-columns: 1fr;
}

.client-story-context .section-head,
.client-story-solution-copy,
.client-story-sidebar,
.client-story-workflow .section-head,
.client-story-impact-copy,
.client-story-stack .section-head,
.client-story-stack-column,
.client-story-cta-shell {
  text-align: left;
}

.client-story-solution-copy,
.client-story-sidebar,
.client-story-impact-copy {
  justify-items: center;
}

.client-story-article-card {
  display: grid;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(var(--ko-border-rgb), 0.2);
  text-align: left;
}

.client-story-article-card p,
.client-story-stack-copy p {
  max-width: var(--client-story-content-width);
  color: var(--loopino-text-muted);
  text-wrap: pretty;
}

.client-story-section-head {
  max-width: var(--client-story-content-width);
}

.client-story-context .section-head,
.client-story-workflow .section-head,
.client-story-stack .section-head,
.client-story-cta-shell {
  max-width: var(--client-story-content-width);
}

.client-story-checklist {
  display: grid;
  gap: 18px;
}

.client-story-check-item {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid rgba(var(--ko-accent-rgb), 0.36);
  text-align: center;
}

.client-story-check-item strong,
.client-story-sidebar-panel strong,
.client-story-impact-card strong,
.client-story-stack-column strong {
  color: var(--loopino-text-strong);
  font-weight: 600;
}

.client-story-sidebar {
  display: grid;
  gap: 18px;
}

.client-story-sidebar-panel {
  padding: 24px;
  text-align: center;
}

.client-story-bullet-list {
  display: grid;
  gap: 12px;
  padding-left: 0;
  list-style-position: inside;
  color: var(--loopino-text-muted);
  text-align: center;
}

.client-story-step {
  display: grid;
  gap: 14px;
  text-align: center;
}

.client-story-step-index {
  font-family: var(--ko-font-display);
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  color: var(--loopino-primary);
}

.client-story-quote {
  padding: 24px 0 0;
  border-top: 1px solid rgba(var(--ko-border-rgb), 0.18);
  font-family: var(--ko-font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--loopino-text-strong);
}

.client-story-impact-grid {
  align-self: stretch;
}

.client-story-impact-card {
  display: grid;
  gap: 10px;
  text-align: center;
}

.client-story-impact-value {
  font-family: var(--ko-font-display);
  font-size: clamp(2.3rem, 5vw, 4.3rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  color: var(--loopino-primary);
}

.client-story-stack-column {
  padding: 24px;
}

.client-story-stack-copy {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.client-story-cta {
  padding-top: clamp(80px, 10vw, 120px);
  padding-bottom: clamp(96px, 12vw, 144px);
}

.client-story-cta-shell {
  padding: clamp(28px, 4vw, 44px);
  text-align: center;
}

.client-story-cta-shell h2 {
  margin: 14px auto 16px;
  max-width: 14ch;
  font-family: var(--ko-font-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  color: var(--loopino-text-strong);
  text-wrap: balance;
}

.client-story-cta-shell p {
  max-width: var(--client-story-content-width);
  margin: 0 auto;
  color: var(--loopino-text-muted);
}

.client-story-cta-shell .client-story-actions {
  justify-content: center;
}

.client-story-more-shell {
  width: min(100%, var(--client-story-content-width));
  margin-left: auto;
  margin-right: auto;
}

.client-story-more .section-head {
  width: min(100%, var(--client-story-content-width));
  max-width: var(--client-story-content-width);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.client-story-carousel {
  margin-top: clamp(28px, 4vw, 40px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--ko-border-rgb), 0.55) transparent;
}

.client-story-carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  min-width: 100%;
  padding-bottom: 8px;
}

.client-story-carousel-item {
  width: clamp(280px, 42vw, 360px);
  flex: 0 0 auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.client-story-more-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

@media (max-width: 1120px) {
  .client-story-article-grid,
  .client-story-solution-grid,
  .client-story-impact-shell,
  .client-story-stack-shell {
    grid-template-columns: 1fr;
  }

  .client-story-card-grid,
  .client-story-impact-grid {
    grid-template-columns: 1fr;
  }

  .client-story-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .client-story-main {
    padding-top: 108px;
  }

  .client-story-stage {
    min-height: auto;
    padding: 0;
  }

  .client-story-stage-media {
    min-height: 380px;
    border-radius: inherit;
  }

  .client-story-carousel-item {
    width: min(82vw, 340px);
  }

  .client-story-stage-card {
    position: static;
    max-width: none;
    margin-top: 14px;
  }

  .client-story-info-card,
  .client-story-sidebar-panel,
  .client-story-step,
  .client-story-impact-card,
  .client-story-stack-column {
    padding: 22px;
  }

  .client-story-step-grid {
    grid-template-columns: 1fr;
  }

  .client-story-actions {
    flex-direction: column;
  }

  .client-story-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
