/* Case studies — listing + detail. Color-theme nav only; no hamburger/sticky layout overrides. */

.cs-page {
  --cs-shell: min(76rem, calc(100% - 3rem));
  --cs-ink: #111;
  --cs-paper: #f5f4ef;
  --cs-dark: #10110f;
  background: var(--cs-paper);
  color: var(--cs-ink);
}

.cs-page main,
.case-studies-page main {
  overflow: hidden;
}

.cs-page mark {
  color: var(--solution-accent, #ffef13);
  background: transparent;
}

.cs-shell {
  width: var(--cs-shell);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cs-sample-banner {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 1.25rem;
  padding: 0.55rem 0.9rem;
  border: 1px dashed color-mix(in srgb, var(--solution-accent, #ffef13) 55%, transparent);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.cs-section-head h2 {
  margin-top: 1.1rem;
  font-size: clamp(2.1rem, 4.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.cs-section-head > p,
.cs-section-head > a {
  color: rgba(0, 0, 0, 0.58);
  line-height: 1.7;
}

.cs-inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.85rem;
  color: var(--cs-ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* —— Breadcrumb (theme-matched, dark hero) —— */
.cs-breadcrumb {
  padding-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.cs-breadcrumb .breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.cs-breadcrumb .breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 1;
  min-width: 0;
}

.cs-breadcrumb .breadcrumb__item:last-child {
  flex-shrink: 0;
}

.cs-breadcrumb .breadcrumb__link,
.cs-breadcrumb .breadcrumb__current,
.cs-breadcrumb .breadcrumb__sep {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cs-breadcrumb .breadcrumb__link {
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s;
}

.cs-breadcrumb .breadcrumb__link:hover {
  color: #fff;
}

.cs-breadcrumb .breadcrumb__current {
  color: var(--solution-accent, #ffef13);
}

.cs-breadcrumb .breadcrumb__sep {
  color: rgba(255, 255, 255, 0.2);
}

/* —— Listing hero —— */
.cs-hero,
.cs-detail-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--cs-dark);
}

.cs-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 5rem 5rem;
  mask-image: linear-gradient(#000, transparent 92%);
}

.cs-hero__glow {
  position: absolute;
  top: -16rem;
  right: -12rem;
  z-index: -2;
  width: 40rem;
  height: 40rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--solution-accent, #ffef13) 22%, transparent);
  filter: blur(6rem);
  pointer-events: none;
}

.cs-hero__shell {
  width: var(--cs-shell);
  margin-inline: auto;
  padding: 0 0 clamp(3.5rem, 7vh, 5.5rem);
}

.cs-hero h1,
.cs-detail-hero h1 {
  margin-top: 1.15rem;
  max-width: 16ch;
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.cs-hero__lead {
  max-width: 40rem;
  margin-top: 1.35rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.75;
}

/* —— Cards / grid —— */
.cs-grid-section,
.cs-related {
  padding-block: clamp(4.5rem, 8vw, 7rem);
}

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

.cs-grid--related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cs-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1.35rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-card:hover {
  transform: translateY(-0.2rem);
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.08);
}

.cs-card__media {
  margin: 0;
  min-height: 14rem;
  background: #ebe8e0;
}

.cs-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem 1.2rem 1.4rem;
}

.cs-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.cs-card__logo-slot {
  display: inline-grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.55rem;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: 0.65rem;
  color: rgba(0, 0, 0, 0.4);
  background: var(--cs-paper);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cs-card__logo-slot--lg {
  min-width: 4.5rem;
  min-height: 3rem;
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.cs-card__logo-slot img {
  display: block;
  max-width: 4.5rem;
  max-height: 2rem;
  object-fit: contain;
}

.cs-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs-tag--muted {
  color: rgba(0, 0, 0, 0.5);
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.cs-tag--link {
  color: #111;
  background: var(--solution-accent, #ffef13);
  text-decoration: none;
}

.cs-detail-hero .cs-tag {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
}

.cs-detail-hero .cs-tag--link {
  color: #111;
  background: var(--solution-accent, #ffef13);
}

.cs-card__client {
  margin: 0.2rem 0 0;
  color: rgba(0, 0, 0, 0.5);
  font-size: 0.82rem;
  font-weight: 650;
}

.cs-card h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.cs-card__cta {
  margin-top: auto;
  padding-top: 0.75rem;
  color: rgba(0, 0, 0, 0.55);
  font-size: 0.82rem;
  font-weight: 750;
}

.cs-card:hover .cs-card__cta {
  color: #111;
}

/* —— Image slots —— */
.cs-image-slot {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  margin: 0;
  overflow: hidden;
  border: 1px dashed currentColor;
  color: rgba(0, 0, 0, 0.28);
  background-color: #ebe8e0;
}

.cs-image-slot::before {
  position: absolute;
  inset: 1rem;
  content: "";
  border: 1px solid currentColor;
  opacity: 0.14;
  pointer-events: none;
}

.cs-image-slot__content {
  position: relative;
  z-index: 1;
  max-width: 20rem;
  padding: 1.25rem;
  text-align: center;
  border-radius: 0.75rem;
  background: rgba(245, 244, 239, 0.95);
}

.cs-image-slot__eyebrow,
.cs-image-slot__content strong,
.cs-image-slot__content small {
  display: block;
}

.cs-image-slot__eyebrow {
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.55;
}

.cs-image-slot__content strong {
  margin-top: 0.55rem;
  color: #111;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.cs-image-slot__content small {
  margin-top: 0.65rem;
  color: rgba(0, 0, 0, 0.45);
  font-size: 0.66rem;
  line-height: 1.5;
}

.cs-image-slot--card {
  min-height: 14rem;
  border: 0;
  border-radius: 0;
}

.cs-image-slot--hero {
  width: 100%;
  min-height: clamp(22rem, 36vw, 32rem);
  border-color: color-mix(in srgb, var(--solution-accent, #ffef13) 55%, #fff);
  color: var(--solution-accent, #ffef13);
  background-color: #171815;
  border-radius: 1.5rem;
}

.cs-image-slot--hero .cs-image-slot__content {
  background: rgba(16, 17, 15, 0.92);
}

.cs-image-slot--hero .cs-image-slot__content strong {
  color: #fff;
}

.cs-image-slot--hero .cs-image-slot__content small {
  color: rgba(255, 255, 255, 0.5);
}

.cs-image-slot--shot {
  min-height: 16rem;
  border-radius: 1.25rem;
}

.cs-image-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— CTA —— */
.cs-cta {
  padding-block: clamp(4rem, 7vw, 6rem);
  color: #fff;
  background: #11120f;
}

.cs-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.cs-cta h2 {
  margin-top: 1rem;
  max-width: 14ch;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.cs-cta p {
  max-width: 36rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.7;
}

.cs-cta .solution-button {
  min-height: 2.75rem;
  min-width: 2.75rem;
}

/* —— Detail hero —— */
.cs-detail-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: 0.5rem;
}

.cs-detail-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.cs-detail-hero .solution-actions {
  margin-top: 1.75rem;
}

/* —— Stats —— */
.cs-stats {
  padding-block: 0;
  margin-top: -1px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cs-stats__strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-inline: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.08);
}

.cs-stats__strip > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 8rem;
  justify-content: center;
  padding: 1.4rem 1.15rem;
  background: #fff;
}

.cs-stats__placeholder {
  color: rgba(0, 0, 0, 0.35);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cs-stats__strip strong {
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  letter-spacing: -0.04em;
}

.cs-stats__strip span:last-child {
  color: rgba(0, 0, 0, 0.55);
  font-size: 0.8rem;
  font-weight: 650;
}

/* —— Text blocks —— */
.cs-block {
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
  background: #fff;
}

.cs-block--tint {
  background: var(--cs-paper);
}

.cs-block__split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.cs-block__split h2 {
  margin-top: 1rem;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.cs-block__split > p {
  color: rgba(0, 0, 0, 0.62);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* —— Process —— */
.cs-process {
  padding-block: clamp(4.5rem, 8vw, 7rem);
  background: #fff;
}

.cs-process__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-block: 1px solid rgba(0, 0, 0, 0.12);
}

.cs-process__steps li {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 14rem;
  padding: 1.5rem 1.2rem;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.cs-process__steps li:last-child {
  border-right: 0;
}

.cs-process__steps span {
  color: color-mix(in srgb, var(--solution-accent, #ffef13) 70%, #111);
  font-size: 0.72rem;
  font-weight: 800;
}

.cs-process__steps h3 {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.cs-process__steps p {
  margin-top: 0.55rem;
  color: rgba(0, 0, 0, 0.58);
  line-height: 1.65;
}

/* —— Results / quote —— */
.cs-results {
  padding-block: clamp(4.5rem, 8vw, 7rem);
  color: #fff;
  background: #11120f;
}

.cs-results__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.cs-results h2 {
  margin-top: 1rem;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.cs-results__layout > div > p {
  margin-top: 1.15rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.75;
}

.cs-quote {
  margin: 0;
  padding: 1.6rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.35rem;
  background: #171815;
}

.cs-quote > p {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.cs-quote__placeholder {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--solution-accent, #ffef13);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cs-quote footer {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.35rem;
}

.cs-quote__photo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cs-quote__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-quote cite {
  display: block;
  font-style: normal;
  font-weight: 750;
}

.cs-quote footer span:last-child {
  display: block;
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* —— Proof gallery —— */
.cs-proof {
  padding-block: clamp(4.5rem, 8vw, 7rem);
  background: var(--cs-paper);
}

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

/* —— Responsive: 1024 / 768 / 480 —— */
@media (max-width: 1024px) {
  .cs-grid,
  .cs-grid--related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-detail-hero__layout,
  .cs-section-head,
  .cs-block__split,
  .cs-results__layout {
    grid-template-columns: 1fr;
  }

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

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

  .cs-process__steps li:nth-child(2n) {
    border-right: 0;
  }

  .cs-process__steps li:nth-child(n + 3) {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
  }

  .cs-proof__grid {
    grid-template-columns: 1fr;
  }

  .cs-image-slot--hero {
    min-height: 20rem;
  }
}

@media (max-width: 768px) {
  .cs-page {
    --cs-shell: calc(100% - 2rem);
  }

  .cs-breadcrumb {
    padding-top: 0.75rem;
  }

  .cs-grid,
  .cs-grid--related {
    grid-template-columns: 1fr;
  }

  .cs-hero h1,
  .cs-detail-hero h1 {
    max-width: none;
    font-size: clamp(2.2rem, 9.5vw, 3.1rem);
  }

  .cs-sample-banner {
    white-space: normal;
    line-height: 1.4;
    border-radius: 0.85rem;
  }

  .cs-process__steps {
    grid-template-columns: 1fr;
  }

  .cs-process__steps li {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }

  .cs-process__steps li:nth-child(n + 3) {
    border-top: 0;
  }

  .cs-process__steps li:last-child {
    border-bottom: 0;
  }

  .cs-cta__inner {
    align-items: stretch;
  }

  .cs-cta .solution-button {
    width: 100%;
    justify-content: center;
  }

  .solution-actions {
    display: grid;
    gap: 0.75rem;
  }

  .solution-actions .solution-button {
    width: 100%;
    min-height: 2.75rem;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .cs-card__media,
  .cs-image-slot--card {
    min-height: 12rem;
  }

  .cs-stats__strip > div {
    min-height: 7rem;
    padding: 1.1rem 0.9rem;
  }

  .cs-quote {
    padding: 1.25rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-card {
    transition: none;
  }

  .cs-card:hover {
    transform: none;
  }
}
