/* ==========================================================================
   Case study pages (Figma prototype page 9)
   Header, footer and the "Similar case studies" slider come from style.css.
   ========================================================================== */

/* ---------- Banner ---------- */
/* Text on the left, project mockup on the right, both centred with flex */
.cs-hero {
  --banner-h: 962px;
  --banner-pb: 52px;
  background-image: linear-gradient(105deg, #06071B 0%, #0B2E6E 45%, #0B6FD8 100%);
}
.cs-hero__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cs-hero__content { width: 720px; }
.cs-hero__title {
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 50px;
  line-height: 62px;
  color: var(--color-white);
}
.cs-hero__text {
  margin-top: 40px;
  font-family: var(--font-dm-sans);
  font-size: 18px;
  line-height: 30px;
  color: var(--color-white);
}
.cs-hero .circle-link { margin-top: 76px; font-weight: 600; color: var(--color-white); }
.cs-hero__image {
  flex: 0 0 699px;
  margin-top: 55px;           /* sits a little lower than the text, as in the design */
  width: 699px;
  height: 469px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45);
}

/* ---------- Body: main column + table of contents ---------- */
.cs-body { padding: var(--section-space) 0; background: var(--color-white); }
.cs-body__inner { display: flex; justify-content: space-between; align-items: flex-start; width: var(--container-width); margin: 0 auto; }
.cs-main { width: 1125px; }

.cs-glance { padding: 31px 41px 39px; border: 1px solid #E5E7EB; border-radius: 12px; }
.cs-title {
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 36px;
  line-height: 46px;
  color: var(--color-heading);
}
.cs-title em { font-style: normal; color: var(--color-primary); }

.cs-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
  padding: 24px 24px 26px;
  border-radius: 6px;
  background: #F4F6FD;
}
.cs-label {
  display: block;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #6B7280;
}
.cs-fact__value {
  margin-top: 13px;
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 18px;
  line-height: 26px;
  color: var(--color-heading);
}
.cs-fact__sub {
  margin-top: 4px;
  font-family: var(--font-dm-sans);
  font-size: 15px;
  line-height: 22px;
  color: #6B7280;
}

.cs-stack { margin-top: 51px; }
.cs-stack__list { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.cs-stack__list li {
  padding: 5px 11px;
  border-radius: 4px;
  background: #E5ECFB;
  font-family: var(--font-poppins);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-heading);
}

.cs-intro { margin-top: 49px; padding-top: 32px; border-top: 1px solid #E5E7EB; }
.cs-text {
  font-family: var(--font-dm-sans);
  font-size: 17px;
  line-height: 30px;
  color: var(--color-body);
}
.cs-intro .cs-text + .cs-text { margin-top: 14px; }
.cs-intro .cs-text:last-child { color: var(--color-heading); }

/* numbered sections */
.cs-section { margin-top: 78px; scroll-margin-top: 40px; }
.cs-section__head { display: flex; align-items: center; gap: 12px; }
.cs-num {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--color-primary);
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-white);
}
.cs-section > .cs-text { margin-top: 16px; }

.cs-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin: 40px 0 0; padding: 0; list-style: none; }
.cs-card { padding: 24px 24px 32px; border: 1px solid #E5E7EB; border-radius: 6px; background: var(--color-white); }
.cs-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: #D9EAFB;
  color: var(--color-primary);
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 16px;
}
.cs-card__icon svg { width: 22px; height: 22px; }
.cs-card__title {
  margin-top: 18px;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 19px;
  line-height: 28px;
  color: var(--color-heading);
}
.cs-card__text {
  margin-top: 8px;
  font-family: var(--font-dm-sans);
  font-size: 16px;
  line-height: 26px;
  color: var(--color-body);
}
.cs-cards--approach .cs-card { border-color: #E3E8F6; background: #F4F6FD; }
.cs-cards--approach .cs-card__title::after { content: "_"; }

.cs-cards--outcome .cs-card { position: relative; padding: 22px 24px 20px 58px; border-color: #E3E8F6; background: #F4F6FD; }
.cs-cards--outcome .cs-card__icon { position: absolute; left: 20px; top: 22px; width: 24px; height: 24px; background: none; }
.cs-cards--outcome .cs-card__title { margin-top: 0; font-size: 18px; line-height: 26px; }

.cs-checks { margin: 24px 0 0; padding: 0; list-style: none; }
.cs-checks li {
  position: relative;
  padding-left: 28px;
  font-family: var(--font-dm-sans);
  font-size: 16px;
  line-height: 26px;
  color: var(--color-body);
}
.cs-checks li + li { margin-top: 12px; }
.cs-checks li strong { font-weight: 700; color: var(--color-heading); }
.cs-checks svg { position: absolute; left: 0; top: 4px; width: 18px; height: 18px; color: var(--color-primary); }

.cs-figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 40px;
  padding: 32px 0;
  border: 1px solid var(--color-primary);
  border-radius: 14px;
  background: #EEF4FD;
}
.cs-figure { padding: 0 32px; }
.cs-figure + .cs-figure { border-left: 2px solid #9AA6B8; }
.cs-figure .cs-label { font-weight: 500; color: #374151; }
.cs-figure__value {
  margin-top: 6px;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 50px;
  line-height: 56px;
  color: var(--color-heading);
}
.cs-figure:last-child .cs-figure__value { color: var(--color-primary); }

/* table of contents */
.cs-toc {
  position: sticky;
  top: 40px;
  width: 352px;
  padding: 24px 24px 20px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: var(--color-white);
}
.cs-toc__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #EEF0F3;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 18px;
  line-height: 26px;
  color: var(--color-heading);
}
.cs-toc__head svg { width: 24px; height: 24px; color: #4B5563; }
.cs-toc__list { margin: 12px 0 0; padding: 0 0 0 12px; list-style: none; }
.cs-toc__list a {
  display: block;
  padding: 9px 0;
  font-family: var(--font-poppins);
  font-size: 16px;
  line-height: 26px;
  color: #4B5563;
  transition: color .2s ease;
}
.cs-toc__list a:hover, .cs-toc__list a.is-active { color: var(--color-primary); }

/* image spots (placeholders until the real screenshots arrive) */
.cs-shot { margin-top: 48px; border-radius: 6px; }
.cs-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 23px; width: var(--container-width); margin: 78px auto 0; }
.cs-shots .img-ph { height: 516px; border-radius: 12px; }
.cs-hero__image.img-ph { box-shadow: none; }

/* ---------- Similar case studies (homepage slider) ---------- */
.cs-similar { padding: var(--section-space) 0; background: var(--color-soft-bg); overflow: hidden; }
.cs-similar .case-studies__inner { max-width: var(--container-width); padding-left: 0; }
.cs-similar .case-slider { margin-top: var(--head-gap); margin-left: 0; }
.case-slide--blue { background: linear-gradient(135deg, #0B6FD8 0%, #0B2E6E 100%); }
.case-slide--violet { background: linear-gradient(135deg, #7B6CF6 0%, #4C3FC9 100%); }
.cs-similar .case-slide { display: flex; flex-direction: column; padding: 96px 70px 70px; }
.cs-similar .case-slide__label,
.cs-similar .case-slide__title,
.cs-similar .case-slide__text,
.cs-similar .tech-pill { position: relative; left: auto; top: auto; }
.cs-similar .case-slide__label { font-family: var(--font-poppins); font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.cs-similar .case-slide__title { width: 560px; margin-top: 20px; }
.cs-similar .case-slide__text { width: 540px; margin-top: 24px; }
.cs-similar .case-slide__ph { position: absolute; right: 70px; top: 70px; bottom: 70px; width: 560px; border-radius: 16px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 14px, rgba(255,255,255,.14) 14px 28px); border-color: rgba(255,255,255,.45); }
.cs-similar .tech-pill { width: auto; margin-top: auto; align-self: flex-start; padding: 0 34px 0 30px; gap: 24px; text-decoration: none; }
.cs-similar .tech-pill__label { color: var(--color-white); }
.cs-similar .tech-pill svg { width: 30px; height: 14px; color: var(--color-white); }

/* ==========================================================================
   Visible spacing: 85px to the first card / letters, as on every page
   ========================================================================== */
@media (min-width: 1200px) {
  .cs-similar .section-heading { margin-top: -10px; }
}

/* ==========================================================================
   Smaller screens
   ========================================================================== */
@media (max-width: 1199.98px) {
  .cs-hero__inner { flex-direction: column; align-items: flex-start; gap: 0; }
  .cs-hero__content { width: auto; max-width: 720px; }
  .cs-hero__title { font-size: 36px; line-height: 46px; }
  .cs-hero__text { margin-top: 24px; font-size: 17px; line-height: 28px; }
  .cs-hero .circle-link { margin-top: 40px; white-space: normal; }
  .cs-hero__image { flex: none; display: block; width: 100%; max-width: 699px; height: auto; aspect-ratio: 699 / 469; margin-top: 48px; }

  .cs-body { padding: 64px 16px; }
  .cs-hero__image.img-ph { display: grid; }
  .cs-body__inner { flex-direction: column-reverse; width: auto; gap: 32px; }
  .cs-main { width: 100%; }
  .cs-toc { position: static; width: 100%; }
  .cs-glance { padding: 28px 24px 32px; }   /* same 24px inside as the table of contents and the cards */
  .cs-title { font-size: 30px; line-height: 38px; }
  .cs-facts { grid-template-columns: 1fr 1fr; }
  .cs-cards { grid-template-columns: 1fr; gap: 16px; }
  .cs-section { margin-top: 56px; }
  .cs-figures { grid-template-columns: 1fr; gap: 24px; padding: 24px 0; }
  .cs-figure + .cs-figure { border-left: 0; border-top: 1px solid #C9D3E3; padding-top: 24px; }
  .cs-figure__value { font-size: 40px; line-height: 48px; }

  .cs-similar { padding: 64px 16px; }
  .cs-shot { height: auto !important; aspect-ratio: auto; margin-top: 32px; }   /* own shape, as on desktop (a fixed 1125:731 box stretched the 4:3 screenshots) */
  .cs-shots { grid-template-columns: 1fr; width: auto; margin-top: 40px; }
  .cs-shots .img-ph { height: auto; aspect-ratio: 772 / 516; }
  .cs-similar .case-slide__ph { display: none; }
  .cs-similar .case-slide { padding: 32px 24px; }
  /* cards start on the same edge as the "Similar case studies" heading */
  .cs-similar .case-slider, .cs-similar .case-studies__controls { padding-left: 0; padding-right: 0; }
  .cs-similar .case-slide__title, .cs-similar .case-slide__text { width: auto; }
  .cs-similar .tech-pill { margin-top: 32px; height: 64px; }
}

@media (max-width: 575.98px) {
  .cs-hero__title { font-size: 28px; line-height: 36px; }
  .cs-facts { grid-template-columns: 1fr; }
}
