:root {
  --section-padding: clamp(80px, 12vw, 140px);
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/JetBrainsMono-VariableFont.woff2") format("woff2");
}

.cs-listing { background: #171617; color: #f1ede4; font-family: 'Manrope', system-ui, sans-serif; }
.cs-listing *, .cs-listing *::before, .cs-listing *::after { box-sizing: border-box; }

.cs-listing .hero-bg {
  background-image: url("/assets/images/about-hero-bg.jpg");
  background-size: cover;
  background-position: center right;
}
@media (orientation: portrait) and (max-width: 760px) {
  .cs-listing .hero-bg {
    background-image: url("/assets/images/about-hero-bg-portrait.jpg");
    background-position: top center;
  }
}

.cs-listing .chip {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(241, 237, 228, .16);
  background: rgba(23, 22, 23, .35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #c9c7c4;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.cs-listing .chip.on {
  border: 1px solid #009C6F;
  background: #009C6F;
  color: #ffffff;
}
@media (hover: hover) {
  .cs-listing .chip:hover:not(.on) { border-color: rgba(241, 237, 228, .7); color: #f1ede4; }
}

/* Filter chips: wrap on desktop, single swipeable row on mobile */
.cs-listing #cs-chips { flex-wrap: wrap; }
@media (max-width: 640px) {
  .cs-listing #cs-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .cs-listing #cs-chips::-webkit-scrollbar { display: none; }
  .cs-listing .chip { flex: 0 0 auto; scroll-snap-align: start; }
}

/* ---- Carousel (ported from the homepage selected-works rail) ---- */
.cs-listing .sw-rail {display: grid; grid-template-columns: 1fr; gap: 18px;}
/* Desktop: 2 columns */
@media (min-width: 901px) {
  .cs-listing .sw-rail {grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px;}
  .cs-listing .sw-rail .sw-card.span-full {grid-column: 1 / -1;}
}
.cs-listing .sw-card {position: relative; height: 580px;
  overflow: hidden; border-radius: 18px; background: var(--black-light);
  border: 1px solid rgba(241, 237, 228, 0.12); text-decoration: none; display: block;
  transition: border-color 0.2s ease, box-shadow 0.3s ease;}
.cs-listing .sw-card-body {position: relative; z-index: 2; padding: 38px 38px 0;}
.cs-listing .sw-eyebrow {position: relative; height: 13px;}
.cs-listing .sw-eyebrow span {position: absolute; inset: 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; transition: opacity 0.28s ease;}
.cs-listing .sw-eyebrow-sector {color: rgba(241, 237, 228, 0.5); opacity: 1;}
.cs-listing .sw-eyebrow-type {color: var(--accent); opacity: 0;}
.cs-listing .sw-name {font-size: 28px; font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; color: var(--cream); margin-top: 10px; text-wrap: balance;}
.cs-listing .sw-tagline {font-size: 14.5px; line-height: 1.55; color: rgba(241, 237, 228, 0.58); margin: 13px 0 0; max-width: 34ch; text-wrap: pretty;}
.cs-listing .sw-view {display: flex; align-items: center; gap: 7px; margin-top: 20px; font-size: 13px; font-weight: 600; color: var(--accent); transition: gap 0.2s ease;}
.cs-listing .sw-view svg {width: 15px; height: 15px;}
.cs-listing .sw-phone {position: absolute; bottom: -296px; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 314px; background: #e7e2d6; border-radius: 36px; padding: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px #d8d2c4;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);}
.cs-listing .sw-phone-screen {position: relative; width: 100%; aspect-ratio: 780 / 1578; border-radius: 26px; overflow: hidden; background: #111 center / cover no-repeat;}
@media (hover: hover) {
  .cs-listing .sw-card:hover {border-color: rgba(241, 237, 228, 0.28); box-shadow: 0 24px 54px rgba(0, 0, 0, 0.55);}
  .cs-listing .sw-card:hover .sw-phone {transform: translateX(-50%) translateY(-20px);}
  .cs-listing .sw-card:hover .sw-view {gap: 11px;}
  .cs-listing .sw-card:hover .sw-eyebrow-sector {opacity: 0;}
  .cs-listing .sw-card:hover .sw-eyebrow-type {opacity: 1;}
}
@media (hover: none) {
  .cs-listing .sw-phone {transform: translateX(-50%) translateY(-20px);}
}
@media (max-width: 900px) {
}
@media (max-width: 560px) {
  .cs-listing .sw-card {height: 548px;}
  .cs-listing .sw-card-body {padding: 28px 24px 0;}
  .cs-listing .sw-phone {width: min(74vw, 314px);}
}
@media (prefers-reduced-motion: reduce) {
  .cs-listing .sw-card, .cs-listing .sw-phone, .cs-listing .sw-view, .cs-listing .sw-eyebrow span {transition: none;}
}
.cs-listing .sw-card[hidden] { display: none !important; }

/* ==================== Listing hero: image cap + mobile dropdown ====================
   Same system as the case study detail pages: below 1280 the photo becomes a cap
   that fades fully to solid before the title; desktop keeps the full-bleed hero.
   On phones the filter chips give way to a single sector dropdown. */

/* base (desktop defaults) */
.cs-listing .hero-cap { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cs-listing .hero-fade { display: none; }
.cs-listing .cs-selwrap { display: none; }

@media (max-width: 1279.98px) {
  .cs-listing .hero { padding-top: 236px !important; border-bottom: 1px solid rgba(242, 235, 216, 0.16); }
  .cs-listing .hero-cap { position: absolute; inset: 0 0 auto 0; height: 56%; min-height: 320px; overflow: hidden; }
  /* the photography's light sits on the right of both source images; mirror it
     into the left wedge and anchor the crop to the lit side */
  .cs-listing .hero-cap .hero-bg { transform: scaleX(-1); background-position: center right; }
  .cs-listing .hero-fade { display: block; position: absolute; inset: 0; background:
      linear-gradient(to bottom, rgba(23, 22, 23, 0.1) 0%, rgba(23, 22, 23, 0.38) 58%, #171617 97%),
      linear-gradient(to right, rgba(23, 22, 23, 0) 0%, rgba(23, 22, 23, 0.45) 48%, #171617 80%); }
  .cs-listing .hero-in { margin-top: 0; z-index: 1; }
}

@media (max-width: 639.98px) {
  .cs-listing .hero { padding-top: 168px !important; }
  .cs-listing .hero-cap { min-height: 260px; }
  /* chips give way to the dropdown on phones */
  .cs-listing #cs-chips { display: none !important; }
  .cs-listing .cs-selwrap { display: flex; align-items: center; margin-top: 16px; }
}

/* dropdown control */
.cs-listing .cs-sel { position: relative; display: inline-flex; width: min(100%, 320px); }
.cs-listing .cs-sel select {
  appearance: none; -webkit-appearance: none;
  width: 100%; min-height: 48px; padding: 0 48px 0 16px;
  background: var(--black-light); color: var(--cream);
  border: 1px solid rgba(241, 237, 228, 0.28); border-radius: 12px;
  font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.cs-listing .cs-sel select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-listing .cs-sel-ico { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--accent); display: inline-flex; }
.cs-listing .cs-sel-ico svg { width: 16px; height: 16px; }

/* ---- Card background imagery ----
   Abstract sector image behind each card, under a scrim heaviest at the top
   where the text sits, easing lower so the warm light halos the phone. */
.cs-listing .sw-card-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
.cs-listing .sw-card-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(30, 29, 30, 0.82) 0%, rgba(30, 29, 30, 0.55) 52%, rgba(30, 29, 30, 0.3) 100%);
}

/* ============ Capability section (BBCS capability / cross-industry) ============ */
.cs-listing .cs-cap { background: var(--cream); border-top: 1px solid rgba(23, 22, 23, 0.10); padding: clamp(56px, 8vw, 100px) 0; }
.cs-listing .cs-cap-in { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.cs-listing .cs-cap-eyebrow { display: flex; align-items: center; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.cs-listing .cs-cap-eyebrow span { width: 22px; height: 1px; background: var(--accent); }
.cs-listing .cs-cap-h2 { margin: 16px 0 0; font-size: clamp(26px, 3vw, 40px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; max-width: 22ch; color: var(--black); }
.cs-listing .cs-cap-h2 .accent { color: var(--accent); }
.cs-listing .cs-cap-lead { margin: 16px 0 0; font-size: 16.5px; line-height: 1.62; color: rgba(23, 22, 23, 0.64); max-width: 64ch; text-wrap: pretty; }
.cs-listing .cs-cap-hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 52px); align-items: center; margin-top: clamp(30px, 4vw, 48px); padding: clamp(26px, 3vw, 40px); border: 1px solid rgba(23, 22, 23, 0.12); border-radius: 16px; background: #f8f5ef; }
.cs-listing .cs-cap-v { font-size: clamp(58px, 8vw, 108px); font-weight: 800; line-height: 0.88; letter-spacing: -0.04em; color: var(--black); }
.cs-listing .cs-cap-v small { font-size: 0.38em; color: var(--accent); font-weight: 800; }
.cs-listing .cs-cap-htext h3 { margin: 0; font-size: clamp(17px, 1.6vw, 20px); font-weight: 800; line-height: 1.25; color: var(--black); }
.cs-listing .cs-cap-htext p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.6; color: rgba(23, 22, 23, 0.64); text-wrap: pretty; }
.cs-listing .cs-cap-caps { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(23, 22, 23, 0.12); border: 1px solid rgba(23, 22, 23, 0.12); border-radius: 14px; overflow: hidden; }
.cs-listing .cs-cap-caps > div { background: #f8f5ef; padding: clamp(22px, 2.6vw, 28px); }
.cs-listing .cs-cap-caps .nwi { width: 20px; height: 20px; color: var(--accent); display: inline-flex; }
.cs-listing .cs-cap-caps .nwi svg { width: 100%; height: 100%; }
.cs-listing .cs-cap-caps h4 { margin: 14px 0 0; font-size: 15px; font-weight: 800; color: var(--black); }
.cs-listing .cs-cap-caps p { margin: 7px 0 0; font-size: 13.5px; line-height: 1.55; color: rgba(23, 22, 23, 0.60); text-wrap: pretty; }
@media (max-width: 820px) { .cs-listing .cs-cap-caps { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cs-listing .cs-cap-hero { grid-template-columns: 1fr; gap: 14px; } }

/* ============ Case studies disclaimer pill ============
   Fully styled here (no inline styles in the markup) so these rules
   actually apply. Short text variant replaces the full sentence on phones. */
.cs-listing .cs-disclaimer {
  display: flex; align-items: flex-start; gap: 11px;
  margin-bottom: 24px; padding: 12px 18px;
  border: 1px solid rgba(241, 237, 228, 0.14); border-radius: 999px;
  background: #1e1d1e;
}
@media (min-width: 721px) { .cs-listing .cs-disclaimer { align-items: center; } }
.cs-listing .cs-disc-ico { display: inline-flex; flex: none; width: 17px; height: 17px; color: #009C6F; }
.cs-listing .cs-disc-ico svg { width: 100%; height: 100%; display: block; }
.cs-listing .cs-disclaimer p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #c9c6c0; text-wrap: pretty; }
.cs-listing .cs-disc-short { display: none; }
@media (max-width: 720px) {
  .cs-listing .cs-disclaimer { border-radius: 14px; padding: 14px 16px; }
}
@media (max-width: 639.98px) {
  .cs-listing .cs-disclaimer { padding: 8px 13px; gap: 9px; border-radius: 12px; margin-bottom: 18px; }
  .cs-listing .cs-disc-ico { width: 14px; height: 14px; }
  .cs-listing .cs-disclaimer p { font-size: 12px; line-height: 1.45; }
  .cs-listing .cs-disc-full { display: none; }
  .cs-listing .cs-disc-short { display: inline; }
}
