/* === Case study page === */
  .cs-cover {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
  }
  .cs-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    -o-object-position: center top;
       object-position: center top;
  }
  .cs-cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(24,25,29,0.3) 0%, rgba(24,25,29,0.75) 60%, rgba(24,25,29,1) 100%);
  }
  .cs-cover-content {
    position: relative;
    z-index: 2;
    padding: 4rem 0 3rem;
  }
  .cs-stat-ribbon {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(232,236,242,0.05);
    border: 1px solid rgba(232,236,242,0.07);
    border-radius: 1.25rem;
    overflow: hidden;
    margin: 3rem 0;
  }
  .cs-stat-cell {
    background: rgba(24,25,29,0.85);
    padding: 2rem;
    text-align: center;
  }
  .cs-stat-num {
    font-family: Montserrat, sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: #c9a84c;
    display: block;
  }
  .cs-stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(154,165,181,0.7);
    margin-top: 0.5rem;
    display: block;
  }
  .cs-brief-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
  }
  @media (min-width: 768px) {
    .cs-brief-grid { grid-template-columns: 1fr 1fr; }
  }
  .cs-brief-block {
    padding: 2rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(232,236,242,0.07);
    background: rgba(31,33,40,0.5);
  }
  .cs-phase-block {
    position: relative;
    padding: 2rem;
    border-left: 2px solid rgba(232,236,242,0.08);
    margin-bottom: 2rem;
    transition: border-color 0.3s ease;
  }
  .cs-phase-block:hover { border-left-color: #c9a84c; }
  .cs-phase-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    color: #c9a84c;
    margin-bottom: 0.75rem;
  }
  /* Full-width stacked / inline figures (not thumbnail grids) */
  .cs-figure-stack {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 3rem;
  }
  .cs-figure {
    margin: 0;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(232,236,242,0.07);
    background: rgba(31,33,40,0.4);
  }
  .cs-figure img {
    width: 100%;
    height: auto;
    display: block;
  }
  .cs-figure-caption {
    padding: 1rem 1.25rem 1.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(154,165,181,0.85);
    border-top: 1px solid rgba(232,236,242,0.06);
  }
  .cs-figure--inline {
    margin-top: 1.75rem;
  }
  .cs-phase-block .cs-figure-stack--inline {
    margin-top: 1.75rem;
    gap: 1.5rem;
  }
  .cs-outcome-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 3rem;
  }
  @media (min-width: 768px) {
    .cs-outcome-grid { grid-template-columns: repeat(4, 1fr); }
    .cs-outcome-grid--stats { grid-template-columns: repeat(3, 1fr); }
  }
  @media (min-width: 1100px) {
    .cs-outcome-grid--stats { grid-template-columns: repeat(5, 1fr); }
  }
  .cs-outcome-tile {
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(232,236,242,0.07);
    background: rgba(31,33,40,0.5);
    text-align: center;
    transition: border-color 0.25s ease, background 0.25s ease;
  }
  .cs-outcome-tile:hover {
    border-color: rgba(201,168,76,0.3);
    background: rgba(201,168,76,0.04);
  }
  .cs-outcome-grid--stats .stat-number {
    display: block;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  }
  .cs-outcome-grid--stats .cs-outcome-label {
    display: block;
    margin-top: 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(154,165,181,0.7);
  }
  .cs-quote-block {
    border-left: 3px solid #c9a84c;
    padding: 2rem 2.5rem;
    margin-top: 3rem;
    background: rgba(201,168,76,0.05);
    border-radius: 0 1rem 1rem 0;
  }
  .cs-quote-text {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: #e8ecf2;
    line-height: 1.65;
    font-style: italic;
  }
  .cs-quote-attr {
    margin-top: 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(154,165,181,0.7);
  }
  .nav-current {
    font-weight: 500;
    color: #ed3286;
  }
  /* === Clean header (no background image) === */
  .cs-header {
    padding: 4.5rem 0 4rem;
    border-bottom: 1px solid rgba(232,236,242,0.05);
    transition: padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .cs-header--ambient {
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 5rem;
  }
  @media (min-width: 1024px) {
    .cs-header--ambient {
      justify-content: center;
      min-height: 70vh;
      padding-bottom: 7rem;
    }
    #site-header:not(.is-scrolled) ~ main .cs-header--ambient.hero-section {
      padding-top: 7rem;
    }
  }
  .cs-header--ambient > .section-content {
    width: 100%;
    align-self: stretch;
    text-align: left;
  }
  /* Clear fixed header when logo is enlarged at top of page */
  #site-header:not(.is-scrolled) ~ main .cs-header {
    padding-top: calc(2rem + var(--logo-height) + 1rem);
  }
  .cs-header-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c9a84c;
    display: block;
    margin-bottom: 1.25rem;
  }
  .cs-header-title {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #e8ecf2;
    margin: 0;
  }
  .cs-header-tagline {
    margin-top: 1.25rem;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 400;
    color: rgba(154,165,181,0.85);
    max-width: 36rem;
    line-height: 1.55;
  }
  .cs-header-tags {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  /* === Hero image card (sits below the clean header) === */
  .cs-hero-card {
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(232,236,242,0.07);
    background: rgba(31,33,40,0.4);
    margin: 0;
  }
  .cs-hero-card:first-child {
    margin-top: 3rem;
  }
  .cs-hero-card--transparent {
    border: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }
  .cs-hero-card--fit {
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
  }
  .cs-hero-card img {
    width: 100%;
    height: auto;
    display: block;
  }
  .cs-hero-card--fit img {
    width: auto;
    max-width: 100%;
    height: auto;
  }
  /* === Visual showcase layout === */
  .cs-intro {
    max-width: 52rem;
    padding: 3rem 0 1.5rem;
  }
  .cs-intro-text {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    font-weight: 400;
    color: rgba(154,165,181,0.9);
    line-height: 1.75;
  }
  .cs-showcase-section {
    padding: 5rem 0;
    border-top: 1px solid rgba(232,236,242,0.05);
  }
  .cs-showcase-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 2.5rem;
    display: block;
  }
  .cs-showcase-lead {
    max-width: 42rem;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(154,165,181,0.85);
    line-height: 1.7;
    margin: -1rem 0 2.5rem;
  }
  .cs-showcase-full {
    display: block;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(232,236,242,0.07);
    background: rgba(31,33,40,0.4);
  }
  .cs-showcase-full img {
    width: 100%;
    height: auto;
    display: block;
  }
  /* Constrain the frame itself — not fit-content. Replaced elements
     contribute their intrinsic width to fit-content, so a 1080px story
     ad would leave a wide empty border around a visually-capped image. */
  .cs-showcase-full--fit {
    width: min(100%, 28rem);
    margin-inline: auto;
    background: transparent;
  }
  .cs-showcase-full--fit img,
  .cs-showcase-full--fit video {
    width: 100%;
    height: auto;
    display: block;
  }
  .cs-showcase-full video {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
  }
  .cs-showcase-stack {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }
  .cs-showcase-trio {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  @media (min-width: 768px) {
    .cs-showcase-trio { grid-template-columns: repeat(3, 1fr); }
  }
  .cs-showcase-trio .cs-showcase-full {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
  }
  .cs-showcase-trio .cs-showcase-full img {
    width: 100%;
    height: auto;
    -o-object-fit: contain;
       object-fit: contain;
  }
  .cs-showcase-trio--portrait .cs-showcase-full {
    padding: 0;
  }
  .cs-showcase-trio .cs-showcase-full video {
    width: 100%;
    height: auto;
    display: block;
    -o-object-fit: cover;
       object-fit: cover;
  }
  @media (max-width: 767px) {
    .cs-showcase-trio--peek-mobile {
      display: flex;
      flex-direction: row;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      scroll-snap-type: x mandatory;
      scroll-padding-inline: 1.5rem;
      gap: 0.75rem;
      margin-inline: -1.5rem;
      padding-inline: 1.5rem;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .cs-showcase-trio--peek-mobile::-webkit-scrollbar {
      display: none;
    }
    .cs-showcase-trio--peek-mobile .cs-showcase-full {
      flex: 0 0 82%;
      max-width: 82%;
      scroll-snap-align: center;
    }
  }
  .cs-showcase-caption {
    margin-top: 0.875rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(154,165,181,0.5);
  }

