/* ==========================================================================
   Dfly Inc — Case Studies listing page (case-studies.html only)
   Hero with layered visual, value strip, filter + search toolbar, case-study
   card grid and a dark closing CTA. Built on the global tokens, buttons and
   motion layer (css/animations.css, js/animations.js); no new fonts,
   colours or libraries. Loaded after animations.css.
   ========================================================================== */

/* --- Hero ------------------------------------------------------------------ */
.cs-hero {
  position: relative;
  padding: 22px 0 76px;
  background-color: #ffffff;
  background-image: radial-gradient(720px 420px at 85% 35%, rgba(235, 101, 31, 0.12), transparent 70%),
    radial-gradient(560px 380px at 0% 0%, rgba(253, 239, 231, 0.9), transparent 70%),
    linear-gradient(rgba(23, 26, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 26, 44, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fffaf6 0%, #ffffff 85%);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
}

.cs-breadcrumb {
  padding: 0 0 26px;
  border: 0;
  background: none;
}

.cs-breadcrumb ol {
  font-size: 14px;
}

.cs-breadcrumb a {
  color: var(--color-primary-darker);
}

.cs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.cs-hero-copy h1 {
  margin-top: 14px;
  font-size: clamp(2.5rem, 1.55rem + 2.4vw, 4rem);
  line-height: 1.05;
  font-weight: var(--fw-bold);
  letter-spacing: -0.025em;
  color: var(--color-navy);
}

.cs-hero-tagline {
  margin-top: 14px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: var(--fw-semibold);
  color: var(--color-navy-700);
}

.cs-hero-lead {
  max-width: 540px;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
}

.cs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cs-hero-actions .btn {
  padding: 11px 22px;
}

/* Layered visual: dashboard screen, report card, channel chips, note card. */
.cs-hero-visual {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin-left: auto;
  aspect-ratio: 620 / 500;
}

.cs-hero-glow {
  position: absolute;
  inset: -6% -4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(235, 101, 31, 0.2), rgba(235, 101, 31, 0) 75%);
  pointer-events: none;
}

.cs-hero-screen,
.cs-hero-report {
  position: absolute;
  overflow: hidden;
  background-color: #ffffff;
}

.cs-hero-screen {
  top: 2%;
  left: 4%;
  width: 78%;
  border-radius: 22px;
  box-shadow: 0 40px 80px -32px rgba(23, 26, 44, 0.5), 0 0 0 1px rgba(23, 26, 44, 0.05);
}

.cs-hero-report {
  left: 0;
  bottom: 2%;
  width: 50%;
  border-radius: 14px;
  box-shadow: 0 30px 60px -28px rgba(23, 26, 44, 0.45), 0 0 0 1px rgba(23, 26, 44, 0.06);
}

.cs-hero-screen img,
.cs-hero-report img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-hero-chips {
  position: absolute;
  top: 8%;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  font-size: 15px;
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  color: var(--color-navy);
  white-space: nowrap;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  box-shadow: 0 16px 32px -14px rgba(23, 26, 44, 0.35), 0 0 0 1px rgba(23, 26, 44, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.cs-chip .icon {
  width: 32px;
  height: 32px;
  padding: 7px;
  color: var(--color-primary-dark);
  background-image: linear-gradient(135deg, var(--color-primary-tint), #fff7f2);
  border-radius: 10px;
}

.cs-chip--2 {
  margin-right: 34px;
}

.cs-chip--3 {
  margin-right: 10px;
}

.cs-chip--4 {
  margin-right: 46px;
}

.cs-hero-note {
  position: absolute;
  right: 4%;
  bottom: 8%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  background-color: rgba(23, 26, 44, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 24px 44px -20px rgba(23, 26, 44, 0.6);
}

.cs-hero-note-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cs-hero-note-arrow.icon {
  width: 14px;
  height: 14px;
  color: var(--color-primary-light);
}

.cs-hero-note-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}

.cs-hero-note-bars i {
  width: 5px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary));
}

.cs-hero-note-bars i:nth-child(1) { height: 30%; }
.cs-hero-note-bars i:nth-child(2) { height: 50%; }
.cs-hero-note-bars i:nth-child(3) { height: 42%; }
.cs-hero-note-bars i:nth-child(4) { height: 72%; }
.cs-hero-note-bars i:nth-child(5) { height: 100%; }

/* Entrance: pieces of the visual settle in one after another once the hero
   reveals (js adds .is-visible). Without JS nothing here is hidden. */
@keyframes csPieceIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes csFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.cs-hero-visual.is-visible .cs-hero-screen { animation: csPieceIn 700ms var(--ease-out) 80ms backwards; }
.cs-hero-visual.is-visible .cs-hero-report { animation: csPieceIn 700ms var(--ease-out) 240ms backwards; }
.cs-hero-visual.is-visible .cs-chip--1 { animation: csPieceIn 560ms var(--ease-out) 360ms backwards, csFloat 8s ease-in-out 1.2s infinite; }
.cs-hero-visual.is-visible .cs-chip--2 { animation: csPieceIn 560ms var(--ease-out) 440ms backwards, csFloat 8s ease-in-out 2.2s infinite; }
.cs-hero-visual.is-visible .cs-chip--3 { animation: csPieceIn 560ms var(--ease-out) 520ms backwards, csFloat 8s ease-in-out 3.2s infinite; }
.cs-hero-visual.is-visible .cs-chip--4 { animation: csPieceIn 560ms var(--ease-out) 600ms backwards, csFloat 8s ease-in-out 4.2s infinite; }
.cs-hero-visual.is-visible .cs-hero-note { animation: csPieceIn 560ms var(--ease-out) 700ms backwards; }

/* --- Value strip --------------------------------------------------------------- */
.cs-values {
  position: relative;
  z-index: 2;
  margin-top: -38px;
}

.cs-values-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 20px 8px;
  list-style: none;
  background-color: var(--color-white);
  border: 1px solid rgba(23, 26, 44, 0.07);
  border-radius: 18px;
  box-shadow: var(--shadow-premium), 0 1px 2px rgba(23, 26, 44, 0.04);
}

.cs-value {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 16px;
}

.cs-value + .cs-value {
  border-left: 1px solid var(--color-border);
}

.cs-value > .icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 10px;
  color: var(--color-primary-dark);
  background-image: linear-gradient(135deg, var(--color-primary-tint), #fff7f2);
  border-radius: 12px;
}

.cs-value span {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.cs-value strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14.5px;
  line-height: 1.3;
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
}

/* --- Toolbar: filters + search ---------------------------------------------------- */
.cs-browse {
  padding-top: 56px;
}

.cs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 18px;
}

.cs-filters.filter-bar {
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 0;
}

.cs-filters .filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 7px 7px 12px;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  line-height: 20px;
  color: var(--color-navy);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  transition: color var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-out);
}

.cs-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  background-color: var(--color-bg-alt);
  border-radius: 999px;
  transition: inherit;
}

.cs-filters .filter-btn.is-active {
  color: var(--color-white);
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: 0 10px 22px -10px rgba(200, 80, 15, 0.6);
}

.cs-filters .filter-btn.is-active .cs-count {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.22);
}

.cs-filters .filter-btn:focus-visible,
.cs-search-input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.cs-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 300px;
}

.cs-search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.cs-search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  font: inherit;
  font-size: 15px;
  color: var(--color-navy);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  transition: border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.cs-search-input::placeholder {
  color: var(--color-neutral-500);
}

.cs-search-input:hover {
  border-color: rgba(235, 101, 31, 0.45);
}

.cs-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(235, 101, 31, 0.14);
}

.cs-grid-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  margin-bottom: 22px;
  font-size: 14px;
}

.cs-results-count {
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
}

.cs-disclosure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
}

.cs-disclosure .icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-primary-dark);
}

/* --- Case study cards ------------------------------------------------------------------ */
.cs-grid.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.cs-card.case-study-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background-color: var(--color-white);
  border: 1px solid rgba(23, 26, 44, 0.08);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 26, 44, 0.04), 0 14px 32px -22px rgba(23, 26, 44, 0.3);
}

.cs-card-media {
  position: relative;
  aspect-ratio: 864 / 440;
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.cs-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms var(--ease-out);
}

.cs-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 26, 44, 0) 55%, rgba(23, 26, 44, 0.18) 100%);
  pointer-events: none;
}

.cs-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  color: var(--color-navy);
  background-color: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 6px 16px -6px rgba(23, 26, 44, 0.35);
}

.cs-card-badge .icon {
  width: 16px;
  height: 16px;
  color: var(--color-primary-dark);
}

.cs-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 20px;
}

.cs-card .cs-card-industry {
  font-size: 12px;
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-darker);
}

.cs-card .cs-card-title {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: var(--fw-semibold);
  text-transform: none;
  color: var(--color-navy);
}

.cs-card .cs-card-desc {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
}

/* Value above label in every card: identical pill height across a row, and
   the animated count can never re-wrap the label. */
.cs-card-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 16px;
  padding: 12px 14px;
  background-image: linear-gradient(90deg, var(--color-primary-tint), #fff8f3);
  border-radius: 12px;
}

.cs-card-metric-value {
  font-size: 26px;
  line-height: 1.1;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--color-primary-darker);
}

.cs-card-metric-label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--color-navy);
}

.cs-card-metric-note {
  padding: 1px 8px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.cs-card-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.cs-card-facts dt {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cs-card-facts dd {
  margin: 3px 0 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
}

.cs-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  font-size: 15px;
  font-weight: var(--fw-semibold);
  color: var(--color-primary-darker);
}

/* The whole card is one link target (the "View Case Study" link). */
.cs-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 16px;
}

.cs-card-link .icon {
  width: 18px;
  height: 18px;
  transition: transform var(--motion-base) var(--ease-out);
}

.cs-card-link:focus-visible {
  outline: none;
}

/* Focus ring: on the card itself (not clipped by its overflow); browsers
   without :has() get the ring drawn just inside the card edge. */
.cs-card-link:focus-visible::after {
  outline: 2px solid var(--color-primary);
  outline-offset: -3px;
}

.cs-card:has(.cs-card-link:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.cs-card:has(.cs-card-link:focus-visible) .cs-card-link:focus-visible::after {
  outline: none;
}

.cs-card.case-study-card {
  transition: transform var(--motion-base) var(--ease-out),
    box-shadow var(--motion-base) var(--ease-out),
    border-color var(--motion-base) var(--ease-standard);
}

.cs-crosslink {
  margin-top: 36px;
  text-align: center;
  color: var(--color-text);
}

.cs-crosslink a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  font-weight: var(--fw-semibold);
  color: var(--color-primary-darker);
}

.cs-crosslink a .icon {
  transition: transform var(--motion-base) var(--ease-out);
}

/* --- Closing CTA ------------------------------------------------------------------------ */
.cs-cta {
  position: relative;
  padding: 88px 0;
  color: var(--color-white);
  background-color: var(--color-navy);
  background-image: radial-gradient(560px 360px at 82% 50%, rgba(235, 101, 31, 0.22), transparent 70%),
    radial-gradient(460px 300px at 8% 20%, rgba(242, 140, 85, 0.1), transparent 70%),
    radial-gradient(ellipse at 50% 50%, rgba(23, 26, 44, 0) 25%, var(--color-navy) 85%),
    linear-gradient(var(--grid-line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-dark) 1px, transparent 1px),
    linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-700) 100%);
  background-size: 140% 140%, 140% 140%, auto, 48px 48px, 48px 48px, auto;
  animation: premiumGlowDrift 16s ease-in-out infinite alternate;
}

.cs-cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

.cs-cta .eyebrow {
  color: var(--color-primary-light);
  background-color: rgba(235, 101, 31, 0.12);
  border-color: rgba(242, 140, 85, 0.3);
}

.cs-cta h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem);
  line-height: 1.12;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--color-white);
}

.cs-cta h2 .hl {
  color: var(--color-primary-light);
}

.cs-cta-copy > p:not(.eyebrow) {
  max-width: 540px;
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text-on-dark-muted);
}

.cs-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cs-cta-actions .btn {
  padding: 11px 22px;
}

.cs-btn-ghost {
  color: var(--color-white);
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.cs-btn-ghost:hover,
.cs-btn-ghost:focus-visible {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--color-white);
}

.cs-cta-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}

.cs-cta-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-on-dark-muted);
}

.cs-cta-points .icon {
  width: 16px;
  height: 16px;
  color: var(--color-primary-light);
}

.cs-cta-visual {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 330px;
  margin-left: auto;
}

.cs-cta-card {
  position: absolute;
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.cs-cta-card-label {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cs-cta-card--bars {
  top: 36px;
  left: 0;
  width: 52%;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.cs-cta-card--bars .cs-cta-card-label {
  color: var(--color-text-on-dark-muted);
}

.cs-cta-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 96px;
}

.cs-cta-bars i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary-dark));
}

.cs-cta-bars i:nth-child(1) { height: 26%; opacity: 0.55; }
.cs-cta-bars i:nth-child(2) { height: 38%; opacity: 0.6; }
.cs-cta-bars i:nth-child(3) { height: 34%; opacity: 0.7; }
.cs-cta-bars i:nth-child(4) { height: 52%; opacity: 0.8; }
.cs-cta-bars i:nth-child(5) { height: 64%; opacity: 0.85; }
.cs-cta-bars i:nth-child(6) { height: 80%; opacity: 0.92; }
.cs-cta-bars i:nth-child(7) { height: 100%; }

.cs-cta-card--line {
  top: 0;
  right: 0;
  width: 50%;
  background-color: var(--color-white);
}

.cs-cta-line {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.cs-cta-line polyline {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-cta-line circle {
  fill: var(--color-primary);
  stroke: #ffffff;
  stroke-width: 2;
}

.cs-cta-card--steps {
  right: 6%;
  bottom: 0;
  width: 54%;
  background-color: var(--color-white);
}

.cs-cta-card--steps ol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-cta-card--steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
}

.cs-cta-card--steps li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(235, 101, 31, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8500f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(235, 101, 31, 0.3);
}

.cs-cta-visual.is-visible .cs-cta-card--line { animation: csPieceIn 640ms var(--ease-out) 120ms backwards, csFloat 9s ease-in-out 1.4s infinite; }
.cs-cta-visual.is-visible .cs-cta-card--bars { animation: csPieceIn 640ms var(--ease-out) 260ms backwards, csFloat 9s ease-in-out 3s infinite; }
.cs-cta-visual.is-visible .cs-cta-card--steps { animation: csPieceIn 640ms var(--ease-out) 400ms backwards, csFloat 9s ease-in-out 4.6s infinite; }

/* --- Hover (mouse / trackpad) ------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .cs-filters .filter-btn:not(.is-active):hover {
    color: var(--color-primary-darker);
    border-color: var(--color-primary);
  }

  .cs-card.case-study-card:hover {
    transform: translateY(-5px);
    border-color: rgba(235, 101, 31, 0.28);
    box-shadow: 0 2px 4px rgba(23, 26, 44, 0.04), 0 28px 48px -24px rgba(23, 26, 44, 0.35);
  }

  .cs-card:hover .cs-card-media img {
    transform: scale(1.05);
  }

  .cs-card:hover .cs-card-link .icon,
  .cs-crosslink a:hover .icon {
    transform: translateX(4px);
  }
}

/* --- Responsive ----------------------------------------------------------------------------- */
/* Below 1400px the seven industry pills need the full row; search sits under them. */
@media (max-width: 1399px) {
  .cs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .cs-search {
    flex-basis: auto;
    max-width: 420px;
  }
}

@media (max-width: 1199px) {
  .cs-hero-grid {
    gap: 36px;
  }

  .cs-chip {
    font-size: 14px;
  }

  .cs-values-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 16px;
  }

  .cs-value {
    flex: 0 0 33.333%;
  }

  .cs-value:nth-child(4) {
    border-left: 0;
  }

  .cs-grid.grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  /* Tablet and phone: the industry pills become one swipeable row. */
  .cs-filters.filter-bar {
    flex-wrap: nowrap;
    padding: 4px 2px 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
    mask-image: linear-gradient(90deg, #000 90%, transparent);
  }

  .cs-filters.filter-bar::-webkit-scrollbar {
    display: none;
  }

  .cs-filters .filter-btn {
    flex-shrink: 0;
  }
}

@media (max-width: 991px) {
  .cs-hero {
    padding-bottom: 64px;
  }

  .cs-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .cs-hero-lead {
    max-width: 640px;
  }

  .cs-hero-visual {
    max-width: 600px;
    margin-inline: auto;
  }

  .cs-cta-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .cs-cta-visual {
    margin-inline: auto;
  }
}

@media (max-width: 767px) {
  .cs-hero {
    padding: 16px 0 56px;
  }

  .cs-breadcrumb {
    padding-bottom: 18px;
  }

  .cs-hero-tagline {
    font-size: 19px;
  }

  .cs-hero-lead {
    font-size: 16px;
  }

  .cs-hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .cs-values-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 0;
    padding: 16px 4px;
  }

  .cs-value {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 14px;
  }

  .cs-value:nth-child(odd) {
    border-left: 0;
  }

  .cs-value:nth-child(even) {
    border-left: 1px solid var(--color-border);
  }

  .cs-value:last-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
  }

  .cs-value > .icon {
    width: 40px;
    height: 40px;
    padding: 10px;
  }

  .cs-browse {
    padding-top: 44px;
  }

  /* Filters become one swipeable row; the search spans the width. */
  .cs-filters.filter-bar {
    margin-inline: -16px;
    padding: 4px 16px 6px;
  }

  .cs-search {
    max-width: none;
  }

  .cs-grid-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .cs-disclosure {
    align-items: flex-start;
  }

  .cs-grid.grid-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .cs-cta {
    padding: 64px 0;
  }

  .cs-cta-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .cs-cta-visual {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    height: auto;
    max-width: 460px;
  }

  .cs-cta-card,
  .cs-cta-card--bars,
  .cs-cta-card--line,
  .cs-cta-card--steps {
    position: static;
    width: auto;
  }

  .cs-cta-card--steps {
    grid-column: 1 / -1;
  }

  .cs-cta-card--steps ol {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .cs-cta-bars {
    height: 72px;
  }
}

@media (max-width: 575px) {
  .cs-hero-visual {
    aspect-ratio: 620 / 540;
  }

  .cs-hero-screen {
    left: 0;
    width: 84%;
    border-radius: 16px;
  }

  .cs-hero-report {
    width: 56%;
    border-radius: 10px;
  }

  .cs-hero-chips {
    top: 4%;
    gap: 8px;
  }

  .cs-chip {
    gap: 6px;
    padding: 5px 10px 5px 5px;
    font-size: 12px;
    border-radius: 10px;
  }

  .cs-chip .icon {
    width: 24px;
    height: 24px;
    padding: 5px;
    border-radius: 7px;
  }

  .cs-chip--2 { margin-right: 18px; }
  .cs-chip--3 { margin-right: 4px; }
  .cs-chip--4 { margin-right: 24px; }

  .cs-hero-note {
    right: 0;
    bottom: 4%;
    gap: 8px;
    padding: 8px 10px;
    font-size: 11px;
    border-radius: 10px;
  }

  .cs-hero-note-bars {
    height: 16px;
  }

  .cs-card-body {
    padding: 18px 18px 18px;
  }

  .cs-card-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .cs-card-facts dd {
    font-size: 13px;
  }

  .cs-cta-card {
    padding: 14px;
    border-radius: 14px;
  }

  .cs-cta-card--steps li {
    font-size: 14px;
  }
}

/* --- Reduced motion --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .cs-hero-visual.is-visible .cs-hero-screen,
  .cs-hero-visual.is-visible .cs-hero-report,
  .cs-hero-visual.is-visible .cs-chip,
  .cs-hero-visual.is-visible .cs-hero-note,
  .cs-cta-visual.is-visible .cs-cta-card,
  .cs-cta {
    animation: none;
  }

  .cs-card.case-study-card:hover,
  .cs-card:hover .cs-card-media img,
  .cs-card:hover .cs-card-link .icon,
  .cs-crosslink a:hover .icon {
    transform: none;
  }
}

/* --- Results hub (results.html reuses these Our Work styles) ----------------
   The figure grid sits beside the hub sidebar, so it runs at two columns,
   one where the sidebar narrows it (992-1199), two again once the sidebar
   stacks (768-991) and one on phones. */
/* Let the hub column shrink: the swipeable filter row must not widen it. */
.hub-layout > .hub-main {
  min-width: 0;
}

.hub-main .cs-filters.filter-bar {
  margin-bottom: 18px;
}

.hub-main .cs-grid.grid-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (min-width: 992px) and (max-width: 1199px) {
  .hub-main .cs-grid.grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .hub-main .cs-grid.grid-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* --- Client case study cards (16 October 2026) -----------------------------
   Image with platform badge, client logo + name, title, industry, three
   figures and "View Case Study". The whole card is clickable through the
   link's ::after. Rendered by tools/build-case-studies.js. */
.ccs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.ccs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-radius: 14px;
  box-shadow: 0 12px 30px -22px rgba(11, 18, 32, 0.35);
  transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
}

.ccs-card.is-filtered-out {
  display: none;
}

.ccs-media {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.ccs-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--motion-slow, 600ms) var(--ease-out);
}

.ccs-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  line-height: 18px;
  color: var(--color-navy);
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 6px 16px -8px rgba(11, 18, 32, 0.45);
}

.ccs-badge .icon {
  width: 15px;
  height: 15px;
  color: var(--color-primary-dark);
}

.ccs-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 18px;
}

.ccs-client {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ccs-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  color: var(--color-white);
  background-color: var(--color-navy);
  border-radius: 9px;
}

.ccs-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: var(--color-white);
}

.ccs-client-name {
  font-size: 15px;
  font-weight: var(--fw-semibold);
  line-height: 20px;
  color: var(--color-navy);
}

.ccs-title {
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--color-navy);
}

.ccs-industry {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 20px;
  color: var(--color-text-muted);
}

.ccs-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.ccs-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ccs-stat-value {
  font-size: 18px;
  font-weight: var(--fw-bold);
  line-height: 24px;
  color: var(--color-primary-dark);
}

.ccs-stat-label {
  font-size: 12px;
  line-height: 16px;
  color: var(--color-text-muted);
}

.ccs-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  font-size: 14.5px;
  font-weight: var(--fw-semibold);
  color: var(--color-primary-darker);
}

/* Whole card is the click target. */
.ccs-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.ccs-link .icon {
  transition: transform var(--motion-fast) var(--ease-standard);
}

.ccs-card:has(.ccs-link:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.ccs-link:focus-visible {
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .ccs-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px -22px rgba(11, 18, 32, 0.4);
  }

  .ccs-card:hover .ccs-media img {
    transform: scale(1.04);
  }

  .ccs-card:hover .ccs-link .icon {
    transform: translateX(3px);
  }
}

@media (max-width: 1199px) {
  .ccs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .ccs-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccs-card,
  .ccs-media img,
  .ccs-link .icon {
    transition: none;
  }

  .ccs-card:hover,
  .ccs-card:hover .ccs-media img,
  .ccs-card:hover .ccs-link .icon {
    transform: none;
  }
}

/* --- Client logos on case study cards (19 October 2026) -----------------------------------
   The card image area is plain white with the client's logo centred on it,
   whole (object-fit: contain, never cropped). --logo-max (set inline by
   tools/build-case-studies.js) stops small logos being enlarged past 1.3×
   their pixel size, so they stay sharp. */
.ccs-media--logo,
.cc-more-media--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border-bottom: 1px solid rgba(23, 26, 44, 0.07);
}

.ccs-media--logo .ccs-badge {
  border: 1px solid rgba(23, 26, 44, 0.08);
  box-shadow: 0 4px 12px -8px rgba(11, 18, 32, 0.35);
}

.cs-logo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70%;
  height: 62%;
  margin-top: 10px;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-logo-stage--square,
.cs-logo-stage--circle {
  width: auto;
  height: 72%;
  aspect-ratio: 1;
}

.ccs-media--logo .cs-logo-stage img,
.cc-more-media--logo .cs-logo-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, var(--logo-max, 100%));
  max-height: 100%;
  object-fit: contain;
  transform: none;
  image-rendering: auto;
}

/* Square and round logos fill their tile (still whole: the tile is square). */
.cs-logo-stage--square img,
.cs-logo-stage--circle img {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.cs-logo-stage--circle img {
  border-radius: 50%;
}

@media (hover: hover) and (pointer: fine) {
  .ccs-card:hover .cs-logo-stage,
  .cc-more:hover .cs-logo-stage {
    transform: scale(1.05);
  }
}

/* Small badges next to the client name: the logo on white. */
.ccs-logo--img,
.cc-logo--img {
  padding: 3px;
  background-color: #fff;
  border: 1px solid rgba(23, 26, 44, 0.1);
}

.ccs-logo--circle,
.cc-logo--circle {
  padding: 0;
  border-radius: 50%;
}

.ccs-logo--circle img,
.cc-logo--circle img {
  border-radius: 50%;
}

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

/* The card-hover zoom is for illustrations; logos lift with their tile instead. */
.ccs-card:hover .ccs-media--logo img,
.cc-more:hover .cc-more-media--logo img {
  transform: none;
}
