/* ============================================
   CASE STUDY SYSTEM (the six featured project pages)
   One layout for every page: one container, one spacing scale, one
   section pattern, one gallery card and one results band. Loaded last
   on the case-study pages, so it replaces the older cs-* rules.
   Text content is not styled differently per page; only the design is
   shared. Brand colours come from the :root tokens in style.css:
   --navy, --blue, --indigo, --periwinkle and --pale.
============================================ */

:root {
  --cs-max: var(--container, 1180px);                  /* the one content width: the shared container (1180, 1320 from 1920px, 1440 from 2400px) */
  --cs-gutter: clamp(16px, 5vw, 64px);                 /* side gutters */
  --cs-space: clamp(56px, 10.4vw, 120px);              /* gap between sections: 56 mobile, ~80 tablet, 120 desktop */
  --cs-half: calc(var(--cs-space) / 2);                /* each section's top and bottom padding */
  --cs-nav-h: 84px;                                    /* room the fixed nav takes at the top of the hero */
  --cs-radius: 18px;
  --cs-radius-lg: 22px;
  --cs-shadow: 0 18px 36px -24px rgba(12, 0, 84, 0.55);
  --cs-line: rgba(12, 0, 84, 0.12);
  --cs-ink-soft: rgba(12, 0, 84, 0.74);
  --cs-h2: clamp(1.9rem, 1.2vw + 1.45rem, 2.75rem);    /* section headings, every page */
  --cs-lead: clamp(1.2rem, 0.8vw + 0.95rem, 1.6rem);   /* pull quote */
  --cs-micro: 0.8125rem;                               /* labels and captions */
  --cs-shimmer: linear-gradient(90deg, var(--periwinkle) 0%, var(--pale) 50%, var(--periwinkle) 100%);
}
@media (max-width: 767px) {
  :root { --cs-micro: 0.875rem; }                      /* nothing under 14px on phones */
}

/* ---------- Container and section rhythm ---------- */
.cs-page .section-inner {
  max-width: var(--cs-max);
  margin: 0 auto;
  padding: 0 var(--cs-gutter);
  box-sizing: border-box;
}
.cs-page main > section { padding: var(--cs-half) 0; }
.cs-page .cs-narrative { display: block; margin: 0; padding: 0; }

/* Shimmer while an image is still loading: keeps the box the right size and never shows an empty blue block. */
@keyframes cs-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.cs-page img { background-color: var(--pale); }
.cs-page .cs-skeleton,
.cs-page .cs-poster img,
.cs-page .cs-session img,
.cs-page .cs-article img,
.cs-page .cs-deck img,
.cs-page .cs-testimonial img,
.cs-page .cs-win img,
.cs-page .cs-duo-img,
.cs-page .cs-hero-media img,
.cs-page .cs-pullquote-media,
.cs-page .cs-pullquote-slides,
.cs-page .cs-pullquote-picture,
.cs-page .cs-tabs-visual,
.cs-page .cs-screen-media,
.cs-page .cs-flip-media {
  background-image: var(--cs-shimmer);
  background-size: 200% 100%;
  animation: cs-shimmer 1.6s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .cs-page .cs-skeleton, .cs-page .cs-poster img, .cs-page .cs-session img, .cs-page .cs-article img,
  .cs-page .cs-deck img, .cs-page .cs-testimonial img, .cs-page .cs-win img, .cs-page .cs-duo-img,
  .cs-page .cs-hero-media img, .cs-page .cs-pullquote-media, .cs-page .cs-pullquote-slides,
  .cs-page .cs-pullquote-picture, .cs-page .cs-tabs-visual, .cs-page .cs-screen-media, .cs-page .cs-flip-media {
    animation: none;
  }
}

/* ---------- Section pattern: pill label, heading, intro ---------- */
.cs-page .cs-section-label,
.cs-page .cs-challenge-tag,
.cs-page .cs-carousel-label {
  display: inline-flex;
  align-items: center;
  height: 28px;
  margin: 0 0 18px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--periwinkle);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: var(--cs-micro);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cs-page .cs-section-heading {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: var(--cs-h2);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-align: left;
}
.cs-page .cs-section-intro {
  margin: 0 0 clamp(28px, 4vh, 40px);
  max-width: 62ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--cs-ink-soft);
  text-align: left;
}

/* ---------- Hero: the whole hero fits one laptop screen ---------- */
.cs-page .cs-hero {
  background: #fff;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--cs-nav-h) 0 clamp(16px, 3vh, 32px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
}
.cs-page .cs-hero > .section-inner { width: 100%; }
.cs-page .cs-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.cs-page .cs-hero-copy { min-width: 0; display: flex; flex-direction: column; }
.cs-page .cs-hero-logo { margin: 0 0 clamp(12px, 2.4vh, 20px); }
.cs-page .cs-hero-logo.exp-logo,
.cs-page .cs-hero-logos .exp-logo { width: 52px; height: 52px; }
.cs-page .cs-hero-logos { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cs-page .cs-hero-logos .exp-logo--wide { width: auto; padding: 0; background: none; box-shadow: none; }
.cs-page .cs-hero-logos .exp-logo--wide img { width: auto; height: 26px; object-fit: contain; }
.cs-page .cs-headline {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.85rem, min(3.4vw, 5.2vh), 3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.cs-page .cs-subdesc {
  margin: 12px 0 0;
  max-width: 52ch;
  font-size: clamp(0.95rem, 0.4vw + 0.8rem, 1.1rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--cs-ink-soft);
}
.cs-page .cs-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  margin-top: clamp(16px, 2.6vh, 24px);
}
.cs-page .cs-hero-stat { display: flex; flex-direction: column; gap: 4px; }
.cs-page .cs-hero-stat-value {
  font-size: clamp(1.75rem, 1.4vw + 1.1rem, 2.5rem);
  white-space: nowrap;
  font-weight: 600;
  line-height: 1;
  color: var(--navy);
}
.cs-page .cs-hero-stat-label {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--cs-ink-soft);
}

/* Meta strip: a compact two-column block at the foot of the hero copy. */
.cs-page .cs-meta-row {
  margin-top: clamp(20px, 3.6vh, 36px);
  padding-top: clamp(14px, 2.4vh, 22px);
  border-top: 1px solid var(--cs-line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px 24px;
}
.cs-page .cs-meta-top-row { display: contents; }
.cs-page .cs-meta-item,
.cs-page .cs-meta-line { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cs-page .cs-meta-item-label {
  font-size: var(--cs-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(12, 0, 84, 0.55);
}
.cs-page .cs-meta-item .work-card-pill { margin: 0; align-self: flex-start; }
.cs-page .cs-meta-year,
.cs-page .cs-meta-line-value { font-size: 0.95rem; font-weight: 500; line-height: 1.4; color: var(--navy); }
.cs-page .cs-meta-item:has(.cs-skills) { grid-column: 1 / -1; }
.cs-page .cs-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-page .cs-skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border: 1.5px solid rgba(12, 0, 84, 0.2);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
}
.cs-page .cs-partners { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.cs-page .cs-partners-label { font-size: var(--cs-micro); font-weight: 600; color: rgba(12, 0, 84, 0.55); }
.cs-page .cs-partners-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; list-style: none; margin: 0; padding: 0; }
.cs-page .cs-partner { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8125rem; font-weight: 600; color: var(--cs-ink-soft); }
.cs-page .cs-partner-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
  background: var(--pale); border: 1px solid var(--cs-line);
}
.cs-page .cs-partner-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-page .cs-partner--tbc { color: rgba(12, 0, 84, 0.45); }
.cs-page .cs-partner--tbc .cs-partner-logo { background: transparent; border-style: dashed; }

/* Hero image: square (or 16:10 for web-page captures), capped by the screen height so it never pushes the hero past one screen. */
.cs-page .cs-hero-media { min-width: 0; display: flex; justify-content: flex-end; }
.cs-page .cs-hero-media img {
  display: block;
  width: min(100%, calc(100svh - 170px));
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--cs-radius-lg);
  box-shadow: var(--cs-shadow);
}
.cs-page .cs-hero-media--landscape img {
  width: min(100%, calc((100svh - 170px) * 1.6));
  aspect-ratio: 16 / 10;
}
/* Short laptop and desktop windows: tighten the copy so the whole hero still fits. */
@media (min-width: 900px) and (max-height: 760px) {
  .cs-page .cs-hero { padding-top: 76px; }
  .cs-page .cs-hero-logo { margin-bottom: 10px; }
  .cs-page .cs-hero-logo.exp-logo { width: 44px; height: 44px; }
  .cs-page .cs-subdesc { margin-top: 8px; font-size: 0.95rem; }
  .cs-page .cs-hero-stats { margin-top: 12px; gap: 12px 24px; }
  .cs-page .cs-hero-stat-value { font-size: clamp(1.5rem, 1vw + 1rem, 2rem); }
  .cs-page .cs-hero-stat-label { font-size: 0.875rem; }
  .cs-page .cs-meta-row { margin-top: 14px; padding-top: 12px; gap: 10px 20px; }
  .cs-page .cs-skill-tag { padding: 3px 11px; }
  .cs-page .cs-hero-media img { width: min(100%, calc(100svh - 150px)); }
  .cs-page .cs-hero-media--landscape img { width: min(100%, calc((100svh - 150px) * 1.6)); }
}
/* Laptops and monitors between about 700px and 840px tall (1440×800 MacBooks, 1366×768 laptops). */
@media (min-width: 900px) and (max-height: 840px) {
  .cs-page .cs-hero { padding-bottom: 12px; }
  .cs-page .cs-headline { font-size: clamp(1.75rem, 4.8vh, 2.6rem); }
  .cs-page .cs-hero-stats { margin-top: 14px; }
  .cs-page .cs-meta-row { margin-top: 16px; padding-top: 14px; }
  .cs-page .cs-partners { margin-top: 10px; }
}
/* Screens about 700px tall (Windows laptops at 150% scaling): the hero still has to fit with room to spare. */
@media (min-width: 900px) and (max-height: 700px) {
  .cs-page .cs-hero { padding-top: 72px; padding-bottom: 12px; }
  .cs-page .cs-hero-logo.exp-logo { width: 40px; height: 40px; margin-bottom: 8px; }
  .cs-page .cs-headline { font-size: clamp(1.7rem, min(3vw, 4.6vh), 2.6rem); }
  .cs-page .cs-subdesc { margin-top: 6px; font-size: 0.92rem; line-height: 1.4; }
  .cs-page .cs-hero-stats { margin-top: 10px; gap: 6px 20px; }
  .cs-page .cs-hero-stat-value { font-size: clamp(1.4rem, 1.6vh, 1.75rem); }
  .cs-page .cs-hero-stat-label { font-size: 0.8125rem; line-height: 1.35; }
  .cs-page .cs-meta-row { margin-top: 10px; padding-top: 10px; gap: 8px 18px; }
  .cs-page .cs-meta-item, .cs-page .cs-meta-line { gap: 2px; }
  .cs-page .cs-meta-year, .cs-page .cs-meta-line-value { font-size: 0.875rem; line-height: 1.35; }
  .cs-page .cs-skills { gap: 6px; }
  .cs-page .cs-skill-tag { padding: 3px 10px; font-size: 0.78rem; }
  .cs-page .cs-partners { margin-top: 8px; }
  .cs-page .cs-hero-media img { width: min(100%, calc(100svh - 130px)); }
  .cs-page .cs-hero-media--landscape img { width: min(100%, calc((100svh - 130px) * 1.6)); }
}
@media (min-width: 900px) and (max-height: 640px) {
  .cs-page .cs-headline { font-size: clamp(1.6rem, 4.6vh, 2.2rem); }
  .cs-page .cs-subdesc { font-size: 0.9rem; line-height: 1.4; }
  .cs-page .cs-meta-year, .cs-page .cs-meta-line-value { font-size: 0.875rem; }
}

/* Phones and tablets: one column, the copy first and the picture after it. */
@media (max-width: 899px) {
  .cs-page .cs-hero {
    min-height: auto;
    padding: calc(var(--cs-nav-h) - 8px) 0 var(--cs-half);
    display: block;
  }
  .cs-page .cs-hero-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cs-page .cs-hero-media { justify-content: flex-start; }
  .cs-page .cs-hero-media img,
  .cs-page .cs-hero-media--landscape img {
    width: 100%;
    max-width: 560px;
  }
  .cs-page .cs-hero-media--landscape img { aspect-ratio: 16 / 10; }
  .cs-page .cs-narrative { grid-template-columns: minmax(0, 1fr); gap: var(--cs-space); }
}
@media (max-width: 560px) {
  .cs-page .cs-meta-row { grid-template-columns: minmax(0, 1fr); }
  .cs-page .cs-meta-item:has(.cs-skills) { grid-column: auto; }
  .cs-page .cs-hero-stat-value { font-size: 1.75rem; }
}

/* ---------- 5. Challenge: picture, tag and the pull quote ---------- */
.cs-page .cs-pullquote-row { display: flex; flex-direction: column; gap: clamp(20px, 3vh, 28px); }
.cs-page .cs-pullquote {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 1.05rem + 0.25vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--navy);
}
/* the one key phrase of the Challenge */
.cs-page .cs-pullquote .cs-key {
  font-weight: 600;
  color: var(--navy);
  background: linear-gradient(transparent 72%, var(--periwinkle) 72%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 2px;
}
.cs-page .cs-pullquote-slides,
.cs-page .cs-pullquote-picture {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--cs-radius-lg);
  overflow: hidden;
  box-shadow: var(--cs-shadow);
}
.cs-page .cs-pullquote-picture { overflow: visible; }
.cs-page .cs-pullquote-picture > img.cs-pullquote-media {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 55% 50%;
  border-radius: var(--cs-radius-lg);
  box-shadow: var(--cs-shadow);
}
.cs-page img.cs-pullquote-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 55% 50%;
  border-radius: var(--cs-radius-lg);
  box-shadow: var(--cs-shadow);
}
.cs-page .cs-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
  -webkit-user-drag: none;
}
.cs-page .cs-slide.is-current { opacity: 1; }
.cs-page .cs-rescue-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 10px 20px -12px rgba(12, 0, 84, 0.6);
}
.cs-page .cs-rescue-pill--fbi { background: #ffd23f; }

/* ---------- 6. Approach: numbered step cards ---------- */
.cs-page .cs-approach-did { margin-top: clamp(28px, 4vh, 40px); }
.cs-page .cs-approach-did-heading {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: var(--cs-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.cs-page .cs-approach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 12px;
}
.cs-page .cs-approach-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--cs-line);
  border-radius: 16px;
  background: #fff;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--navy);
}
.cs-page .cs-approach-list li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
}

/* ---------- Gallery bands: pale blue only behind image galleries ---------- */
.cs-page .cs-posters-section,
.cs-page .cs-products-section,
.cs-page .cs-articles-section,
.cs-page .cs-decks-section,
.cs-page .cs-events-section,
.cs-page .cs-compare-section,
.cs-page .cs-testimonials-section,
.cs-page .cs-wins-section { background: var(--pale); }

/* Every gallery sits inside the content container. Autoscroll strips are clipped at its edges. */
.cs-page .cs-screens-viewport,
.cs-page .cs-articles-viewport,
.cs-page .cs-sessions-viewport,
.cs-page .cs-posters-viewport {
  margin-top: clamp(28px, 4vh, 40px);
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}
.cs-page .cs-screens-viewport.is-dragging { cursor: grabbing; }
.cs-page .cs-screens-track {
  display: flex;
  gap: 16px;
  width: max-content;
  will-change: transform;
}
.cs-page .cs-poster,
.cs-page .cs-session,
.cs-page .cs-article,
.cs-page .cs-screen,
.cs-page .cs-deck,
.cs-page .cs-testimonial,
.cs-page .cs-win {
  margin: 0;
  flex: 0 0 auto;
  min-width: 0;
  user-select: none;
  -webkit-user-select: none;
}
.cs-page .cs-poster { width: clamp(200px, 22vw, 260px); }
.cs-page .cs-poster img { aspect-ratio: 4 / 5; }
.cs-page .cs-session { width: clamp(200px, 22vw, 280px); }
.cs-page .cs-session img { aspect-ratio: 1 / 1; }
.cs-page .cs-article { width: clamp(260px, 30vw, 380px); }
.cs-page .cs-article img { aspect-ratio: 16 / 9; }
.cs-page .cs-poster img,
.cs-page .cs-session img,
.cs-page .cs-article img,
.cs-page .cs-deck img,
.cs-page .cs-testimonial img,
.cs-page .cs-win img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--cs-radius);
  box-shadow: var(--cs-shadow);
  pointer-events: none;
  -webkit-user-drag: none;
}
.cs-page .cs-screen { flex-basis: clamp(170px, 17vw, 220px); display: flex; flex-direction: column; gap: 12px; }
.cs-page .cs-screen-media {
  position: relative;
  aspect-ratio: 924 / 2000;
  border-radius: var(--cs-radius);
  overflow: hidden;
  background: var(--pale);
  box-shadow: var(--cs-shadow);
}
.cs-page .cs-screen-img,
.cs-page .cs-flip-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  -webkit-user-drag: none;
}
.cs-page .cs-screen-img--new,
.cs-page .cs-flip-img--new { opacity: 1; }
.cs-page .cs-screen.is-previous .cs-screen-img--old,
.cs-page .cs-flip.is-previous .cs-flip-img--old { opacity: 1; }
.cs-page .cs-screen.is-previous .cs-screen-img--new,
.cs-page .cs-flip.is-previous .cs-flip-img--new { opacity: 0; }
.cs-page .cs-screen-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.cs-page .cs-screen.is-previous .cs-screen-badge,
.cs-page .cs-flip.is-previous .cs-screen-badge { opacity: 1; transform: none; }
.cs-page .cs-screens-head { display: flex; flex-direction: column; align-items: flex-start; }
.cs-page .cs-screens-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 clamp(24px, 3vh, 32px);
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cs-ink-soft);
}
.cs-page .cs-screens-hint svg { flex: none; width: 16px; height: 16px; color: var(--blue); }
.cs-page .cs-screens-hint-tap { display: none; }
@media (hover: none) {
  .cs-page .cs-screens-hint-hover { display: none; }
  .cs-page .cs-screens-hint-tap { display: inline; }
}
.cs-page .cs-screens-head .cs-section-heading { margin-bottom: 14px; }

/* Before-and-after single card (hover, tap or Enter to flip). */
.cs-page .cs-flip { margin-top: 0; cursor: pointer; border-radius: var(--cs-radius-lg); outline-offset: 4px; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.cs-page .cs-flip-media {
  position: relative;
  aspect-ratio: 2000 / 1083;
  border-radius: var(--cs-radius-lg);
  overflow: hidden;
  background: var(--pale);
  box-shadow: var(--cs-shadow);
}
.cs-page .cs-flip .cs-screen-badge { top: 20px; left: 20px; }
@media (hover: hover) {
  .cs-page .cs-flip:hover .cs-flip-img--old { opacity: 1; }
  .cs-page .cs-flip:hover .cs-flip-img--new { opacity: 0; }
  .cs-page .cs-flip:hover .cs-screen-badge { opacity: 1; transform: none; }
}

/* Tabs card: the tab list beside a picture. Wide and duo variants stack the tabs on top. */
.cs-page .cs-tabs-card {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  margin-top: clamp(28px, 4vh, 40px);
}
.cs-page .cs-tabs-list { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cs-page .cs-tab-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.cs-page .cs-tab-item:hover { background: rgba(255, 255, 255, 0.6); }
.cs-page .cs-tab-item.is-active { background: #fff; box-shadow: var(--cs-shadow); }
.cs-page .cs-tab-item:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cs-page .cs-tab-title { margin: 0; font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; color: var(--navy); }
.cs-page .cs-tab-desc { display: none; margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--cs-ink-soft); }
.cs-page .cs-tab-item.is-active .cs-tab-desc { display: block; }
.cs-page .cs-tabs-visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  justify-self: start;
  aspect-ratio: 1 / 1;
  border-radius: var(--cs-radius-lg);
  overflow: hidden;
  box-shadow: var(--cs-shadow);
}
.cs-page .cs-tabs-visual-inner { position: absolute; inset: 0; }
.cs-page .cs-tabs-visual--poster,
.cs-page .cs-tabs-visual--portrait { aspect-ratio: 4 / 5; }
.cs-page .cs-tabs-visual--landscape { aspect-ratio: 16 / 10; }
.cs-page .cs-tabs-visual--square { aspect-ratio: 1 / 1; }
.cs-page .cs-tabs-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  -webkit-user-drag: none;
}
.cs-page .cs-tabs-image.is-active { opacity: 1; }
.cs-page .cs-tabs-slideshow { inset: 0; }
.cs-page .cs-tabs-card--wide { grid-template-columns: minmax(0, 1fr); }
.cs-page .cs-tabs-card--wide .cs-tabs-list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.cs-page .cs-tabs-card--wide .cs-tab-item { flex: 1 1 200px; width: auto; }
.cs-page .cs-tabs-card--wide .cs-tabs-visual { max-width: none; aspect-ratio: 16 / 10; }
.cs-page .cs-tabs-card--duo { grid-template-columns: minmax(0, 1fr); }
.cs-page .cs-tabs-card--duo .cs-tabs-list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.cs-page .cs-tabs-card--duo .cs-tab-item { width: auto; padding: 10px 20px; border-radius: 999px; }
.cs-page .cs-tabs-card--duo .cs-tab-item.is-active { border-radius: 999px; }
.cs-page .cs-tabs-visual--duo { width: auto; max-width: none; aspect-ratio: auto; background: none; box-shadow: none; overflow: visible; }
.cs-page .cs-tabs-visual--duo .cs-tabs-visual-inner { position: relative; inset: auto; }
.cs-page .cs-duo { display: none; flex-wrap: wrap; gap: 16px; }
.cs-page .cs-duo.is-active { display: flex; animation: cs-duo-in 0.35s ease; }
@keyframes cs-duo-in { from { opacity: 0; } to { opacity: 1; } }
.cs-page .cs-duo-img {
  flex: 0 1 min(320px, calc(50% - 8px));
  display: block;
  width: min(320px, calc(50% - 8px));
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--cs-radius-lg);
  box-shadow: var(--cs-shadow);
  -webkit-user-drag: none;
}
@media (max-width: 899px) {
  .cs-page .cs-tabs-card { grid-template-columns: minmax(0, 1fr); }
  .cs-page .cs-tabs-visual { max-width: 100%; justify-self: stretch; }
  .cs-page .cs-tabs-card--wide .cs-tabs-list { flex-direction: column; }
  .cs-page .cs-tabs-card--wide .cs-tab-item { flex: none; }
}
@media (max-width: 560px) {
  .cs-page .cs-duo-img { flex-basis: 100%; width: 100%; max-width: 360px; }
}

/* Wins and testimonials: static sets of images. */
.cs-page .cs-testimonials,
.cs-page .cs-wins {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  margin: clamp(28px, 4vh, 40px) 0 0;
  padding: 0;
}
.cs-page .cs-wins { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
.cs-page .cs-decks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cs-page .cs-deck { display: flex; flex-direction: column; }
.cs-page .cs-deck-name {
  margin-top: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
}
.cs-page .cs-decks-section .cs-decks { margin-top: 0; }
@media (max-width: 899px) {
  .cs-page .cs-testimonials,
  .cs-page .cs-wins,
  .cs-page .cs-decks {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    margin-inline: 0;          /* the swipe strip stays inside its card; it used to bleed out past the card edges */
    padding-inline: 0;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cs-page .cs-testimonials::-webkit-scrollbar,
  .cs-page .cs-wins::-webkit-scrollbar,
  .cs-page .cs-decks::-webkit-scrollbar { display: none; }
  .cs-page .cs-testimonial,
  .cs-page .cs-win,
  .cs-page .cs-deck { flex: 0 0 min(78%, 420px); scroll-snap-align: start; }
}

/* ---------- More projects: the homepage work cards ---------- */
.cs-page .cs-more-projects .section-heading {
  margin: 0 0 clamp(24px, 3vh, 36px);
  font-family: var(--font-body);
  font-size: var(--cs-h2);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.cs-page .cs-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 0;
  background: transparent;
}
.cs-page .cs-more-grid .work-card { width: 100%; flex: initial; will-change: auto; }
.cs-page .cs-more-grid .img-placeholder { aspect-ratio: 1 / 1; }
@media (max-width: 899px) {
  .cs-page .cs-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .cs-page .cs-more-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Scroll reveal (only once the script has started) ---------- */
.cs-anim .cs-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease var(--d, 0ms), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
}
.cs-anim .cs-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .cs-anim .cs-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Navigation: solid once the page scrolls, so text never shows through ---------- */
.cs-page .site-header { transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease; }
.cs-page .site-header.is-scrolled {
  top: 0;
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -18px rgba(12, 0, 84, 0.35);
}

/* ---------- Horizontal scroll guard (clip, so the page itself can still scroll) ---------- */
.cs-page main { overflow-x: clip; }

/* =====================================================================
   PANELS (follow-up): white page, one tinted panel per section.
   Every section except the hero is a rounded panel, inset from the
   screen edges. The hero above is unchanged.
   ===================================================================== */
body.cs-page { background: #fff; }

.cs-page .cs-panel {
  width: min(var(--cs-max), 100% - 2 * var(--cs-gutter));
  margin: var(--cs-space) auto;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 3.5vw, 52px);
  box-sizing: border-box;
  background: var(--pale);
  border-radius: 32px;
}
.cs-page .cs-panel > .section-inner { max-width: none; margin: 0; padding: 0; }
.cs-page .cs-panel > .section-inner + .section-inner { margin-top: clamp(28px, 4vh, 40px); }

/* Challenge, then Rescue: text on the left, the rescue picture on the right. Stacks on phones, text first. */
.cs-page .cs-pullquote-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.cs-page .cs-pullquote-row > * { min-width: 0; }
.cs-page .cs-pullquote-row > :not(.cs-pullquote-slides):not(.cs-pullquote-picture) { order: 1; }
.cs-page .cs-pullquote-row > .cs-pullquote-slides,
.cs-page .cs-pullquote-row > .cs-pullquote-picture { order: 2; }

/* The picture keeps its own shape (no cropping). Room above it for the rescue pill, which sits above the picture, not on it. */
.cs-page .cs-pullquote-slides,
.cs-page .cs-pullquote-picture {
  position: relative;
  width: 100%;
  margin-top: 64px;
  overflow: visible;
  aspect-ratio: auto;
  background-image: none;
  animation: none;
  box-shadow: none;
}
.cs-page .cs-pullquote-slides { aspect-ratio: 16 / 9; }
.cs-page .cs-pullquote-slides.cs-pullquote-slides--portrait { aspect-ratio: 4 / 5; }
.cs-page .cs-slide { object-fit: contain; border-radius: var(--cs-radius-lg); background: #fff; }
.cs-page .cs-pullquote-picture > img.cs-pullquote-media,
.cs-page img.cs-pullquote-media {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: var(--cs-radius-lg);
  box-shadow: var(--cs-shadow);
}
.cs-page .cs-rescue-pill {
  position: absolute;
  top: auto;
  left: 0;
  bottom: 100%;
  margin-bottom: 14px;
}
@media (max-width: 899px) {
  .cs-page .cs-pullquote-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cs-page .cs-pullquote-row > :not(.cs-pullquote-slides):not(.cs-pullquote-picture) { margin-bottom: 36px; }
  .cs-page .cs-pullquote-slides,
  .cs-page .cs-pullquote-picture { margin-top: 56px; }
}

/* Our Approach, compact: heading and intro on the left, the numbered steps on the right, two across. */
.cs-page .cs-approach-section .section-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.cs-page .cs-approach-intro { grid-column: 1; grid-row: 1; }
.cs-page .cs-approach-intro .cs-section-intro { margin-bottom: 0; }
.cs-page .cs-approach-section .cs-approach-did { grid-column: 2; grid-row: 1; margin-top: 0; }
.cs-page .cs-approach-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 899px) {
  .cs-page .cs-approach-section .section-inner { grid-template-columns: minmax(0, 1fr); }
  .cs-page .cs-approach-intro,
  .cs-page .cs-approach-section .cs-approach-did { grid-column: 1; grid-row: auto; margin-top: 28px; }   /* stacked: room between the intro text and "What I Did" */
  .cs-page .cs-approach-list { grid-template-columns: minmax(0, 1fr); }
}

/* Moving strips sit on their own tinted band inside the panel, so they never blend into the section. */
.cs-page .cs-screens-viewport,
.cs-page .cs-articles-viewport,
.cs-page .cs-sessions-viewport,
.cs-page .cs-posters-viewport {
  padding: 22px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--periwinkle) 55%, #fff);
}

/* Uncropped images: every picture keeps its own shape. */
.cs-page .cs-tabs-visual { background: #fff; border-radius: 22px; overflow: hidden; }
.cs-page .cs-tabs-image,
.cs-page img.cs-tabs-image,
.cs-page .cs-screen-img,
.cs-page .cs-flip-img { object-fit: contain; }
.cs-page .cs-tabs-visual--duo { width: 100%; max-width: 560px; aspect-ratio: auto; background: none; box-shadow: none; overflow: visible; }
.cs-page .cs-tabs-visual--duo .cs-tabs-visual-inner { position: relative; inset: auto; }
.cs-page .cs-tabs-visual--duo .cs-tabs-image.cs-duo { position: relative; inset: auto; width: 100%; opacity: 1; }
.cs-page .cs-tabs-visual--duo .cs-duo.is-active { display: flex; flex-direction: column; }
.cs-page .cs-tabs-visual--duo .cs-duo-img {
  flex: none;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: var(--cs-radius-lg);
  box-shadow: var(--cs-shadow);
}

/* Before/after screens: the "Previously" label sits above its picture, not on it. */
.cs-page .cs-screen-media { overflow: visible; margin-top: 44px; background: none; box-shadow: none; }
.cs-page .cs-screen-img { border-radius: var(--cs-radius); }
.cs-page .cs-screen-badge,
.cs-page .cs-flip .cs-screen-badge { top: auto; left: 0; bottom: 100%; margin-bottom: 12px; }
.cs-page .cs-flip-media { overflow: visible; margin-top: 52px; background: none; box-shadow: none; }
.cs-page .cs-flip-img { border-radius: var(--cs-radius-lg); }

/* Wins sit inside the panel, not against the screen edge. */
.cs-page .cs-wins { max-width: none; }

/* Results: a light panel, white stat cards, modest numbers, one button style. */
.cs-page .cs-results-row { display: block; }
.cs-page .cs-results-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.cs-page .cs-stat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 2.4vw, 28px);
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--cs-shadow);
}
.cs-page .cs-stat-value {
  font-size: clamp(2rem, 3.5vw, 3rem);
  white-space: nowrap;   /* "6-fig" / "8-fig" must not break at the hyphen */
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.cs-page .cs-stat-label {
  max-width: none;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--cs-ink-soft);
}
.cs-page .cs-results-links { margin-top: 28px; }
.cs-page .cs-results-pill {
  border: 1.5px solid var(--navy);
  background: #fff;
  color: var(--navy);
}
.cs-page .cs-results-pill:first-child { background: var(--blue); border-color: var(--blue); color: #fff; }
.cs-page .cs-results-pill:hover,
.cs-page .cs-results-pill:focus-visible { background: var(--navy); border-color: var(--navy); color: #fff; }
.cs-page .cs-results-pill:first-child:hover,
.cs-page .cs-results-pill:first-child:focus-visible { background: var(--indigo); border-color: var(--indigo); }
.cs-page .cs-results-pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 560px) {
  .cs-page .cs-results-stats { gap: 12px; }
  .cs-page .cs-stat { padding: 18px; }
}

/* Phones: small labels and pills go up to 14px, the smallest size the page uses. */
@media (max-width: 767px) {
  .cs-page .cs-skill-tag,
  .cs-page .cs-rescue-pill,
  .cs-page .cs-partner,
  .cs-page .cs-partners-label,
  .cs-page .cs-screens-hint,
  .cs-page .cs-tab-desc,
  .cs-page .cs-deck-name,
  .cs-page .cs-screen-badge,
  .cs-page .cs-more-grid .work-card-pill,
  .cs-page .cs-more-grid .work-card-stat span { font-size: 0.875rem; }
  .cs-page .cs-more-grid .work-card-pill { text-transform: none; letter-spacing: 0; }
}

/* Results pills: the base pill shape (the earlier results block that set it has been replaced). */
.cs-page .cs-results-pill {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* =====================================================================
   FIT TO SCREEN: each picture is capped by the screen height, so a whole
   section fits a laptop screen without scrolling. A picture's width follows
   its own shape (--r = width / height), so nothing is cropped.
   ===================================================================== */
:root { --cs-fit: clamp(220px, calc(100svh - 380px), 420px); }

/* "Another project?" cards: the picture is capped by height, so the three cards fit the screen too. */
.cs-page .cs-more-grid .work-card { max-width: calc(var(--cs-fit) * 0.8 + 32px); justify-self: start; }
.cs-page .cs-more-grid .img-placeholder { width: 100%; }

/* Short laptop screens: tighter panels and text. */
@media (min-width: 900px) and (max-height: 800px) {
  .cs-page .cs-panel { padding: 28px clamp(28px, 3.5vw, 52px); }
  .cs-page .cs-panel > .section-inner + .section-inner { margin-top: 24px; }
  .cs-page .cs-section-heading { margin-bottom: 10px; }
  .cs-page .cs-section-intro { margin-bottom: 20px; }
  .cs-page .cs-approach-list li { padding: 10px 12px; font-size: 0.9rem; line-height: 1.4; }
  .cs-page .cs-approach-list { gap: 10px; }
  .cs-page .cs-panel { padding: 24px clamp(28px, 3.5vw, 52px); }
  .cs-page .cs-panel > .section-inner + .section-inner { margin-top: 18px; }
  .cs-page .cs-section-label { height: 26px; margin-bottom: 12px; }
  .cs-page .cs-tabs-card { margin-top: 18px; gap: 16px; }
  .cs-page .cs-tabs-card--wide .cs-tab-item { padding: 10px 16px; }
  .cs-page .cs-screens-hint { margin-bottom: 18px; }
}

/* Challenge: the rescue picture sits at the right, capped by height. */
.cs-page .cs-pullquote-slides {
  --r: calc(16 / 9);
  width: min(100%, calc(var(--cs-fit) * var(--r)));
  aspect-ratio: var(--r);
  justify-self: end;
}
.cs-page .cs-pullquote-slides.cs-pullquote-slides--portrait { --r: calc(4 / 5); }
.cs-page .cs-pullquote-picture { justify-self: end; }
.cs-page .cs-pullquote-picture { --r: 1; width: min(100%, calc(var(--cs-fit) * var(--r))); aspect-ratio: var(--r); }
.cs-page .cs-pullquote-picture > img.cs-pullquote-media { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }

/* Tab pictures: width follows the tab's own shape, height capped. */
.cs-page .cs-tabs-visual { --r: 1; width: min(40rem, calc(var(--cs-fit) * var(--r))); aspect-ratio: var(--r); justify-self: start; }
.cs-page .cs-tabs-visual--poster,
.cs-page .cs-tabs-visual--portrait { --r: calc(4 / 5); }
.cs-page .cs-tabs-visual--landscape { --r: calc(16 / 10); }
.cs-page .cs-tabs-visual--square { --r: 1; }
.cs-page .cs-tabs-card--wide .cs-tabs-visual { --r: calc(16 / 10); width: min(100%, calc(var(--cs-fit) * var(--r))); aspect-ratio: var(--r); }
.cs-page .cs-tabs-visual--duo .cs-duo-img { width: min(40rem, var(--cs-fit)); max-width: 100%; }

/* Before/after: the phone screens and the flip picture are sized by height too. */
.cs-page .cs-screen { flex-basis: min(clamp(170px, 17vw, 220px), calc((var(--cs-fit) - 90px) * 0.4621)); }
.cs-page .cs-flip-media { width: min(100%, calc(var(--cs-fit) * 1.847)); }

/* Wins: each picture keeps its own shape, capped by height. */
.cs-page .cs-win { width: 100%; }
.cs-page .cs-win img { --r: 0.8; width: min(100%, calc(var(--cs-fit) * var(--r))); aspect-ratio: var(--r); height: auto; }
.cs-page .cs-pullquote-picture:has(> .cs-pullquote-slides--portrait) { --r: calc(4 / 5); }
.cs-page .cs-pullquote-picture:has(> .cs-pullquote-slides) { --r: calc(16 / 9); }

/* Very short screens (about 650px and under): panels get a little less padding so they still fit below the nav. */
@media (min-width: 900px) and (max-height: 650px) {
  .cs-page .cs-panel { padding: 18px clamp(28px, 3.5vw, 52px); }
  .cs-page .cs-screens-hint { margin-bottom: 14px; }
}

/* Results headings: Poppins SemiBold (600), like the result numbers */
.cs-page .cs-results-section .cs-section-heading { font-weight: 600; }

/* On the project pages the "Another project?" card follows the page: SemiBold (600), where the landing and Work pages keep Bold (700) */
.cs-page .work-card h3,
.cs-page .work-card-stat strong { font-weight: 600; }
