/* Case study detail page styles — extends _page.css */

.cs-hero {
  padding: 100px 0 0;
  border-bottom: 1px solid var(--hair);
  position: relative;
  overflow: hidden;
}
.cs-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 1100px 500px at 50% 0%, rgba(59,130,246,0.12), transparent 60%);
  pointer-events: none;
}
.cs-hero__inner { position: relative; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.cs-hero__meta { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.cs-hero__tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.30);
  border-radius: 999px;
}
.cs-hero__client {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-70);          /* --ink-60 measured 4.15:1 at 11.5px */
}
.cs-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink-100);
  margin: 0 0 22px;
  max-width: 900px;
}
.cs-hero h1 em { font-style: normal; color: var(--accent); }
.cs-hero__lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-80);
  max-width: 760px;
  margin-bottom: 40px;
}

.cs-hero__image {
  margin: 0 -32px;
  position: relative;
  height: clamp(280px, 36vw, 480px);
  overflow: hidden;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.cs-hero__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cs-hero__image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,5,10,0.15) 0%, transparent 30%, transparent 70%, rgba(2,5,10,0.55) 100%);
  pointer-events: none;
}

/* Headline stats strip below the image */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hair);
  border-bottom: 1px solid var(--hair);
}
.cs-stats__cell {
  background: var(--bg-1);
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.cs-stats__v {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.025em;
  line-height: 1;
}
.cs-stats__l {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-70);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Body sections */
.cs-section { padding: 72px 0; border-bottom: 1px solid var(--hair); }
.cs-section__inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.cs-section--cols { display: grid; grid-template-columns: 280px 1fr; gap: 56px; max-width: 1280px; margin: 0 auto; padding: 72px 32px; border-bottom: 1px solid var(--hair); }
.cs-section__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cs-section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-100);
  margin: 0;
}
.cs-section h2 em { font-style: normal; color: var(--accent); }
.cs-section__body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-80);
  margin-bottom: 18px;
}
.cs-section__body p:last-child { margin-bottom: 0; }
.cs-section__body strong { color: var(--ink-100); font-weight: 500; }
.cs-section__body em { color: var(--accent); font-style: normal; font-weight: 500; }

.cs-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; }
.cs-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-80);
}
.cs-list .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.16em;
  padding-top: 4px;
}
.cs-list b { color: var(--ink-100); font-weight: 500; }

/* Detail subsystem cards (used in Solution section) */
.cs-subsys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
.cs-subsys__card {
  background: var(--bg-1);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 18px 20px;
}
.cs-subsys__card h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-100);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.cs-subsys__card p {
  font-size: 13px;
  line-height: 1.55;
  /* --ink-60 (#64748b) is 3.92:1 on the card's near-black ground, under the
     4.5:1 floor. These cards carry the substance of every case study — what was
     actually delivered — so they must not be the hardest text on the page.
     --ink-70 is already what .cs-stats__l uses for small copy here. */
  color: var(--ink-70);
  margin: 0;
}

/* Pull quote */
.cs-pull {
  padding: 64px 0;
  border-bottom: 1px solid var(--hair);
  background: linear-gradient(180deg, transparent 0%, rgba(59,130,246,0.04) 100%);
}
.cs-pull__inner { max-width: 920px; margin: 0 auto; padding: 0 32px; }
.cs-pull blockquote {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--ink-100);
  margin: 0;
  position: relative;
  padding-left: 36px;
}
.cs-pull blockquote::before {
  content: "“";
  position: absolute;
  left: 0; top: -8px;
  font-family: Georgia, serif;
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.7;
}

/* Footer CTA */
.cs-cta {
  padding: 80px 0;
}
.cs-cta__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: end;
}
.cs-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-100);
  margin: 0 0 14px;
}
.cs-cta p {
  font-size: 16px;
  color: var(--ink-70);
  line-height: 1.6;
  max-width: 540px;
}
.cs-cta__buttons {
  display: flex; flex-direction: column; gap: 10px;
}
.cs-cta__buttons .btn { justify-content: space-between; min-width: 240px; }

/* Related */
.cs-related {
  padding: 64px 0;
  border-top: 1px solid var(--hair);
  background: var(--bg-1);
}
.cs-related__inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.cs-related h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 24px;
  font-weight: 500;
}
.cs-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cs-related__card {
  background: var(--bg-deep);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 240ms cubic-bezier(0.22,1,0.36,1), border-color 240ms ease;
  display: flex; flex-direction: column; gap: 10px;
}
.cs-related__card:hover { transform: translateY(-3px); border-color: rgba(59,130,246,0.3); }
.cs-related__card-client {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.cs-related__card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-100);
  margin: 0;
  line-height: 1.3;
}
.cs-related__card .arrow {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.05em;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}

@media (max-width: 980px) {
  .cs-section--cols { grid-template-columns: 1fr; gap: 24px; }
  /* Without min-width:0 a grid item is floored at its content's min-content
     width, and the inline SVG figures (900-unit viewBox) held the track at
     762px inside a 390px screen. */
  .cs-section--cols > * { min-width: 0; }
  .cs-fig svg { max-width: 100%; height: auto; }
  /* Same automatic-minimum trap in the stats row: a long unbroken label kept
     the two tracks wider than the screen. */
  .cs-stats > * { min-width: 0; overflow-wrap: anywhere; }
  .cs-stats { grid-template-columns: repeat(2, 1fr); }
  .cs-subsys { grid-template-columns: 1fr; }
  .cs-cta__inner { grid-template-columns: 1fr; align-items: stretch; }
  .cs-related__grid { grid-template-columns: 1fr; }
}
