/* =====================================================================
   Case Studies page — editorial "dossier" layout
   Scoped under .cs-wrap so nothing bleeds into the rest of the site.
   Brand tokens: red #d63447 / #dc3545, yellow #ffce00, navy #1c2331
   ===================================================================== */

.cs-wrap {
  --cs-red: #d63447;
  --cs-red-deep: #c50000;
  --cs-yellow: #ffce00;
  --cs-navy: #1c2331;
  --cs-ink: #14181f;
  --cs-paper: #f6f5f2;
  --cs-line: rgba(28, 35, 49, 0.12);
  --cs-muted: #6b7280;
}

/* ---------- Intro line under the hero ---------- */
.cs-intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-size: 19px;
  line-height: 1.7;
  color: #3a3f47;
}
.cs-intro .cs-kicker {
  display: inline-block;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: var(--cs-red);
  margin-bottom: 14px;
}

/* ---------- Filter / tab bar (visual placeholder) ---------- */
.cs-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 34px auto 0;
}
.cs-chip {
  border: 1px solid var(--cs-line);
  background: #fff;
  color: var(--cs-navy);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  cursor: default;
}
.cs-chip.is-active,
.cs-chip:hover {
  background: var(--cs-navy);
  color: #fff;
  border-color: var(--cs-navy);
}

/* =====================================================================
   Featured case study — image banner + sticky spec sheet + narrative
   ===================================================================== */
.cs-featured {
  position: relative;
  background: var(--cs-paper);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--cs-line);
  box-shadow: 0 30px 70px -40px rgba(20, 24, 31, 0.6);
}

/* label ribbon over the image */
.cs-featured-flag {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cs-navy);
  background: var(--cs-yellow);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}

/* the portfolio slide as the banner */
.cs-banner-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* body grid: sticky meta + story */
.cs-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
}

/* left: spec sheet */
.cs-spec {
  padding: 44px 34px;
  border-right: 1px solid var(--cs-line);
  background: #fff;
}
.cs-spec-block { margin-bottom: 24px; }
.cs-spec-block:last-child { margin-bottom: 0; }
.cs-spec-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cs-muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.cs-spec-value {
  font-size: 16px;
  color: var(--cs-navy);
  font-weight: 600;
  line-height: 1.45;
}
.cs-spec-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.cs-spec-tags span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cs-navy);
  background: rgba(28, 35, 49, 0.06);
  border-radius: 6px;
  padding: 5px 10px;
}
.cs-sticky { position: sticky; top: 110px; }

/* right: numbered story */
.cs-story { padding: 44px 48px; }
.cs-story-title {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--cs-navy);
  margin: 0 0 8px;
}
.cs-story-title em { font-style: normal; color: var(--cs-red); }
.cs-story-lede {
  font-size: 17px;
  line-height: 1.6;
  color: #5b616b;
  margin: 0 0 34px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--cs-line);
}
.cs-step { position: relative; padding-left: 62px; margin-bottom: 34px; }
.cs-step:last-child { margin-bottom: 0; }
.cs-step-num {
  position: absolute;
  left: 0;
  top: -4px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: var(--cs-red);
  font-variant-numeric: tabular-nums;
}
.cs-step-num:after {
  content: "";
  display: block;
  width: 1px;
  height: calc(100% + 4px);
  background: var(--cs-line);
  position: absolute;
  left: 50%;
  top: 44px;
}
.cs-step:last-child .cs-step-num:after { display: none; }
.cs-step h4 {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cs-navy);
  font-weight: 800;
  margin: 0 0 10px;
}
.cs-step p {
  font-size: 16.5px;
  line-height: 1.72;
  color: #454a52;
  margin: 0 0 10px;
}
.cs-step ul { margin: 8px 0 0; padding: 0; list-style: none; }
.cs-step li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.6;
  color: #454a52;
  margin-bottom: 6px;
}
.cs-step li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--cs-yellow);
  border: 1px solid var(--cs-red);
  transform: rotate(45deg);
}

/* ---------- Highlights band (dark) ---------- */
.cs-highlights {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255, 206, 0, 0.14) 0%, rgba(255, 206, 0, 0) 45%),
    linear-gradient(135deg, #1c2331 0%, #12161f 100%);
  color: #fff;
  padding: 40px 48px;
}
.cs-highlights-head {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cs-yellow);
  font-weight: 700;
  margin-bottom: 24px;
}
.cs-hl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.cs-hl { position: relative; padding-left: 18px; }
.cs-hl:before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--cs-red);
  border-radius: 3px;
}
.cs-hl .cs-hl-big {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}
.cs-hl .cs-hl-big span { color: var(--cs-yellow); }
.cs-hl .cs-hl-label {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
}

/* =====================================================================
   Pull quote
   ===================================================================== */
.cs-quote {
  max-width: 900px;
  margin: 64px auto 0;
  text-align: center;
  position: relative;
}
.cs-quote:before {
  content: "\201C";
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 120px;
  line-height: 0.6;
  color: var(--cs-red);
  opacity: 0.25;
  margin-bottom: 6px;
}
.cs-quote blockquote {
  font-size: clamp(21px, 2.6vw, 30px);
  line-height: 1.5;
  font-weight: 600;
  color: var(--cs-navy);
  margin: 0 0 18px;
}
.cs-quote .cs-cite { font-size: 15px; color: var(--cs-muted); }
.cs-quote .cs-cite strong { color: var(--cs-navy); }

/* =====================================================================
   Case study gallery
   ===================================================================== */
.cs-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.cs-case {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.cs-case:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -34px rgba(20, 24, 31, 0.55);
}
.cs-case-media { position: relative; overflow: hidden; }
.cs-case-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.cs-case:hover .cs-case-media img { transform: scale(1.04); }
.cs-case-cat {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cs-navy);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 999px;
}
.cs-case-body { padding: 26px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.cs-case-client {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cs-red);
  font-weight: 700;
  margin-bottom: 8px;
}
.cs-case h5 {
  font-size: 22px;
  font-weight: 800;
  color: var(--cs-navy);
  line-height: 1.2;
  margin: 0 0 12px;
}
.cs-case p {
  font-size: 15px;
  line-height: 1.65;
  color: #5b616b;
  margin: 0 0 20px;
}
.cs-case-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.cs-case-chips span {
  font-size: 12px;
  font-weight: 600;
  color: var(--cs-navy);
  background: rgba(255, 206, 0, 0.16);
  border: 1px solid rgba(214, 52, 71, 0.18);
  border-radius: 999px;
  padding: 5px 12px;
}
.cs-case-chips span.is-key {
  color: #fff;
  background: var(--cs-red);
  border-color: var(--cs-red);
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 991.98px) {
  .cs-body { grid-template-columns: 1fr; }
  .cs-spec {
    border-right: none;
    border-bottom: 1px solid var(--cs-line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 26px;
  }
  .cs-sticky { position: static; }
  .cs-hl-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .cs-gallery { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cs-spec { grid-template-columns: 1fr; padding: 30px 24px; }
  .cs-story { padding: 32px 24px; }
  .cs-highlights { padding: 32px 24px; }
  .cs-hl-grid { grid-template-columns: 1fr; gap: 20px; }
  .cs-step { padding-left: 50px; }
  .cs-featured-flag { font-size: 10px; padding: 7px 12px; }
}

/* =====================================================================
   Overview: clean logo cards (link to detail pages)
   ===================================================================== */
.cs-logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cs-logo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: 18px;
  padding: 32px 30px 26px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.cs-logo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -34px rgba(20, 24, 31, 0.5);
  border-color: rgba(214, 52, 71, 0.35);
}
.cs-logo-card:after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--cs-red), var(--cs-yellow));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.cs-logo-card:hover:after { transform: scaleX(1); }

/* logo lock-up */
.cs-logo-badge {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 22px;
}
.cs-logo-badge img {
  max-height: 62px;
  max-width: 172px;
  width: auto;
  object-fit: contain;
}
/* Loka text mark (no clean logo asset available) */
.cs-logo-mark {
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.04em;
  color: var(--cs-navy);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cs-logo-mark .cs-logo-dia {
  color: var(--cs-yellow);
  -webkit-text-stroke: 1px var(--cs-red);
  font-size: 24px;
}

.cs-logo-cat {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cs-red);
  font-weight: 700;
  margin-bottom: 8px;
}
.cs-logo-card h5 {
  font-size: 21px;
  font-weight: 800;
  color: var(--cs-navy);
  line-height: 1.18;
  margin: 0 0 10px;
}
.cs-logo-card p {
  font-size: 14.5px;
  line-height: 1.62;
  color: #5b616b;
  margin: 0 0 22px;
}
.cs-logo-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-logo-metric {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--cs-red);
  border-radius: 999px;
  padding: 6px 13px;
}
.cs-logo-arrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cs-navy);
  transition: color 0.25s ease, letter-spacing 0.25s ease;
}
.cs-logo-card:hover .cs-logo-arrow { color: var(--cs-red); letter-spacing: 0.06em; }

/* featured ribbon */
.cs-logo-card.is-featured { border-color: rgba(214, 52, 71, 0.4); }
.cs-logo-card .cs-ribbon {
  position: absolute;
  top: 16px;
  right: -34px;
  transform: rotate(45deg);
  background: var(--cs-yellow);
  color: var(--cs-navy);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 40px;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.4);
}

/* =====================================================================
   Detail page: clean logo header (no screenshot) + spec + story
   ===================================================================== */
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-navy);
  text-decoration: none;
  transition: color 0.25s ease, gap 0.25s ease;
}
.cs-back:hover { color: var(--cs-red); gap: 12px; }

.cs-detail-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 44px 48px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(214, 52, 71, 0.5) 0%, rgba(214, 52, 71, 0) 55%),
    linear-gradient(135deg, #232c3d 0%, #1c2331 55%, #12161f 100%);
  overflow: hidden;
}
.cs-detail-head:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.cs-detail-logo {
  position: relative;
  flex: 0 0 auto;
  width: 168px;
  min-height: 108px;
  background: #fff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 22px;
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.7);
}
.cs-detail-logo img { max-width: 100%; max-height: 72px; object-fit: contain; }
.cs-detail-heading { position: relative; }
.cs-detail-cat {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cs-yellow);
  margin-bottom: 12px;
}
.cs-detail-heading h3 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 12px;
  color: #fff;
}
.cs-detail-heading h3 em { font-style: normal; color: var(--cs-red); }
.cs-detail-heading p {
  max-width: 640px;
  font-size: 16.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

/* screenshot section (deeper in the page) */
.cs-shot {
  margin: 0 auto;
  max-width: 940px;
  background: var(--cs-paper);
  border: 1px solid var(--cs-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 70px -46px rgba(20, 24, 31, 0.6);
}
.cs-shot img { display: block; width: 100%; height: auto; }
.cs-shot figcaption {
  padding: 16px 24px;
  font-size: 14px;
  color: var(--cs-muted);
  text-align: center;
  border-top: 1px solid var(--cs-line);
}

@media (max-width: 991.98px) {
  .cs-logo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cs-logo-grid { grid-template-columns: 1fr; }
  .cs-detail-head { flex-direction: column; align-items: flex-start; gap: 24px; padding: 32px 24px; }
  .cs-detail-logo { width: 140px; min-height: 90px; }
}
