/* Case-study “transit” parity — scoped to pages that add
   .case-study-transit (+ .case-theme-*) on .page-wrapper. Loaded after
   page-local <style> so these rules win. Mirrors helsinki-bus.html. */

.page-wrapper.case-study-transit.case-theme-pillar {
  --cs-hero-grad: linear-gradient(135deg, #24105f 0%, #6d28d9 38%, #8b3fe2 68%, #a855f7 100%);
  --cs-impact-bg: linear-gradient(135deg, #120724 0%, #2b1163 44%, #4c1d95 72%, #6d28d9 100%);
  --cs-impact-glow1: radial-gradient(90% 70% at 20% 12%, rgba(109, 40, 217, 0.46), transparent 58%);
  --cs-impact-glow2: radial-gradient(72% 58% at 88% 92%, rgba(168, 85, 247, 0.24), transparent 62%);
  --cs-phone-shadow: 0 60px 120px rgba(76, 29, 149, 0.2);
}

.page-wrapper.case-study-transit.case-theme-family {
  --cs-hero-grad: linear-gradient(135deg, #065f46 0%, #10b981 45%, #bef264 100%);
  --cs-impact-bg: linear-gradient(135deg, #022c22 0%, #064e3b 46%, #14532d 100%);
  --cs-impact-glow1: radial-gradient(88% 68% at 18% 14%, rgba(52, 211, 153, 0.38), transparent 58%);
  --cs-impact-glow2: radial-gradient(70% 55% at 90% 90%, rgba(190, 242, 100, 0.22), transparent 62%);
  --cs-phone-shadow: 0 60px 120px rgba(16, 185, 129, 0.14);
}

.page-wrapper.case-study-transit.case-theme-watch {
  --cs-hero-grad: linear-gradient(135deg, #020617 0%, #1d4ed8 52%, #fbbf24 100%);
  --cs-impact-bg: linear-gradient(135deg, #020617 0%, #0f172a 42%, #172554 100%);
  --cs-impact-glow1: radial-gradient(88% 70% at 24% 12%, rgba(56, 189, 248, 0.35), transparent 58%);
  --cs-impact-glow2: radial-gradient(65% 55% at 88% 88%, rgba(251, 191, 36, 0.28), transparent 62%);
  --cs-phone-shadow: 0 60px 120px rgba(14, 165, 233, 0.14);
}

.page-wrapper.case-study-transit.case-theme-lego {
  /* Lead + accent text: amber → gold → lemon (reads yellow-orange, not forest). */
  --cs-hero-grad: linear-gradient(128deg, #c2410c 0%, #ea580c 22%, #f59e0b 48%, #fbbf24 72%, #fde047 92%, #fef9c3 100%);
  --cs-impact-bg: linear-gradient(135deg, #431407 0%, #9a3412 38%, #b45309 68%, #ca8a04 100%);
  --cs-impact-glow1: radial-gradient(88% 70% at 18% 14%, rgba(251, 191, 36, 0.42), transparent 58%);
  --cs-impact-glow2: radial-gradient(72% 58% at 88% 88%, rgba(253, 224, 71, 0.28), transparent 62%);
  --cs-phone-shadow: 0 60px 120px rgba(234, 88, 12, 0.2);
}

/* LEGO preview — quieter mosaic, readable left column, compact meta row. */
.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero__canvas {
  opacity: 0.48;
}

.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__text-col {
  position: relative;
  z-index: 0;
  transform: translateY(-32px);
  padding-right: clamp(12px, 2.5vw, 28px);
}

.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__text-col::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: clamp(-40px, -4vw, -16px);
  bottom: -1.5rem;
  width: min(108%, calc(100% + clamp(40px, 6vw, 80px)));
  background: linear-gradient(
    100deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.94) 58%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: -1;
  pointer-events: none;
}

.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__top-slot {
  margin-top: clamp(36px, 6.5vh, 68px);
  padding-top: clamp(10px, 1.8vh, 28px);
  padding-bottom: clamp(8px, 1.4vh, 16px);
}

.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__client--stacked {
  align-items: flex-start;
  gap: 12px 14px;
}

.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__client-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__client-sub {
  margin: 0;
  font-size: clamp(11.5px, 0.95vw, 13px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: rgba(12, 14, 18, 0.48);
  max-width: 38ch;
}

.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__client-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}

.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__summary {
  margin-top: clamp(4px, 0.8vh, 10px);
}

.page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(14px, 2vw, 26px);
  row-gap: 10px;
  margin-top: clamp(20px, 2.8vh, 34px);
  max-width: 100%;
}

.page-wrapper.case-study-transit.case-theme-helsinki {
  --cs-hero-grad: linear-gradient(135deg, #0b1f4b 0%, #2563eb 55%, #60a5fa 100%);
  --cs-impact-bg: linear-gradient(135deg, #08142f 0%, #0b1f4b 46%, #1d4ed8 100%);
  --cs-impact-glow1: radial-gradient(88% 70% at 22% 12%, rgba(96, 165, 250, 0.28), transparent 58%);
  --cs-impact-glow2: radial-gradient(65% 55% at 88% 88%, rgba(37, 99, 235, 0.22), transparent 62%);
  --cs-phone-shadow: 0 60px 120px rgba(37, 99, 235, 0.14);
}

/* ── White hero + mosaic canvas ─────────────────────────────────── */
.page-wrapper.case-study-transit .helsinki-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  max-height: none;
  overflow: visible !important;
  isolation: isolate;
  display: flex;
  align-items: center;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #ffffff !important;
  border-radius: 0 !important;
}

.page-wrapper.case-study-transit .helsinki-hero::before,
.page-wrapper.case-study-transit .helsinki-hero::after {
  display: none !important;
  content: none !important;
}

.page-wrapper.case-study-transit .helsinki-hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Optional: rising “marble” mosaic field instead of a canvas (LEGO case). */
.page-wrapper.case-study-transit .helsinki-hero__marbles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.page-wrapper.case-study-transit .helsinki-hero__container {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  padding: clamp(72px, 9vh, 104px) clamp(32px, 5vw, 80px) clamp(56px, 7vh, 88px);
  display: flex;
  align-items: stretch;
}

.page-wrapper.case-study-transit .helsinki-hero__inner {
  position: relative;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}

.page-wrapper.case-study-transit .helsinki-hero__nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: clamp(20px, 2.6vh, 32px) clamp(32px, 5vw, 80px) clamp(16px, 2vh, 24px);
}

.page-wrapper.case-study-transit .nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: nowrap;
  max-width: 1320px;
  margin: 0 auto;
}

.page-wrapper.case-study-transit .nav__brand-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.page-wrapper.case-study-transit .nav__brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.page-wrapper.case-study-transit .nav__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: rgba(15, 26, 43, 0.62);
  white-space: nowrap;
  user-select: none;
}

.page-wrapper.case-study-transit .nav__status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  animation: csTransitNavPulse 2.8s ease-in-out infinite;
}

@keyframes csTransitNavPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .page-wrapper.case-study-transit .nav__status-dot { animation: none; }
}

.page-wrapper.case-study-transit .nav__links {
  display: flex;
  gap: clamp(10px, 1.8vw, 18px);
  list-style: none;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0;
  margin: 0;
}

.page-wrapper.case-study-transit .nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #fff !important;
  text-decoration: none;
  background: #0c0e12;
  border-radius: 999px;
  border: 1px solid rgba(12, 14, 24, 0.24);
  transition: transform 0.18s ease, box-shadow 0.22s ease, filter 0.18s ease;
  box-shadow: 0 1px 2px rgba(12, 14, 24, 0.18), 0 8px 18px -8px rgba(12, 14, 24, 0.32);
}

.page-wrapper.case-study-transit .nav__cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    0 2px 4px rgba(12, 14, 24, 0.2),
    0 12px 24px -8px rgba(12, 14, 24, 0.32),
    0 24px 44px -16px rgba(12, 14, 24, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 24px rgba(255, 255, 255, 0.36);
}

.page-wrapper.case-study-transit .nav__links a:not(.nav__cta) {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.72);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: transparent;
  transition: color 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-wrapper.case-study-transit .nav__links a:not(.nav__cta):hover {
  color: var(--ink-1);
  transform: translateY(-3px);
}

.page-wrapper.case-study-transit .nav__arrow {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  transform: translateY(-1px);
  transition: transform 0.18s ease;
}

.page-wrapper.case-study-transit .nav__cta:hover .nav__arrow {
  transform: translate(2px, -2px);
}

/* ── Phone hero layout ──────────────────────────────────────────── */
.page-wrapper.case-study-transit .helsinki-hero--phone.helsinki-hero .helsinki-hero__container {
  padding-top: clamp(72px, 9vh, 104px);
  padding-bottom: clamp(56px, 7vh, 88px);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "text phone";
  align-items: stretch;
  gap: clamp(24px, 3.5vw, 56px);
  min-height: calc(100vh - clamp(128px, 16vh, 192px));
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__text-col {
  grid-area: text;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0;
  max-width: 760px;
  /* Gutter only from .helsinki-hero__container — matches helsinki-bus.html */
  padding-left: 0;
  transform: translateY(-46px);
  min-height: 0;
}

/* Fills space above the headline block; client row sits ~mid-gap between nav and summary. */
.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__top-slot {
  display: flex;
  /* Anchor near the nav (top of the available gap), not floating mid-gap. */
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 0;
  /* Nudge down from nav so it reads as part of the hero, not the header. */
  padding-top: clamp(18px, 3.2vh, 44px);
  margin-top: 100px;
  padding-bottom: clamp(10px, 1.8vh, 20px);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__client {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap;
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__client-logo {
  /* “Marble” size: subtle credential, not a feature element. */
  width: 22px;
  height: 22px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(12, 14, 24, 0.08);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__client-org-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__client-org-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__client-ext {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  opacity: 0.55;
  transform: translateY(-0.5px);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__client-text {
  margin: 0;
  font-size: clamp(12.5px, 1.05vw, 14px);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.35;
  color: rgba(12, 14, 18, 0.55);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__client-role {
  color: rgba(12, 14, 18, 0.72);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__client-atword {
  font-weight: 400;
  color: rgba(12, 14, 18, 0.42);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__client-org {
  font-weight: 600;
  color: var(--ink-1, #0c0e12);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__copy-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__copy-block .helsinki-hero__summary,
.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__copy-block .helsinki-hero__title,
.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__copy-block .helsinki-hero__meta {
  grid-area: auto;
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__summary {
  margin: 0 0 clamp(10px, 1.4vh, 18px);
  font-size: clamp(15px, 1.3vw, 20px);
  line-height: 1.4;
  max-width: 50ch;
  color: rgba(12, 14, 18, 0.62) !important;
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__title {
  font-size: clamp(32px, 3.4vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  max-width: 22ch;
  text-wrap: balance;
  hyphens: manual;
  overflow-wrap: break-word;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--ink-1, #0c0e12) !important;
  filter: none !important;
  padding-bottom: 0;
  margin: 0;
}

/* Gradient payoff phrase inside the phone hero title (helsinki-bus pattern). */
.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__title .helsinki-hero__title-accent {
  background: var(--cs-hero-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  padding-bottom: 0.06em;
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 2.5vw, 32px);
  margin: clamp(40px, 4.5vh, 52px) 0 0;
  padding: 0;
  max-width: 760px;
}

.page-wrapper.case-study-transit .helsinki-hero__meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-wrapper.case-study-transit .helsinki-hero__meta dt {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}

.page-wrapper.case-study-transit .helsinki-hero__meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink-1);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__media {
  grid-area: phone;
  align-self: end;
  justify-self: center;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  max-height: none;
}

.page-wrapper.case-study-transit.case-theme-watch .helsinki-hero--watch .helsinki-hero__media {
  align-items: center;
  padding-bottom: clamp(8px, 2vh, 24px);
}

.page-wrapper.case-study-transit.case-theme-watch .helsinki-hero--watch .wf {
  max-width: min(300px, 88vw);
}

/* Freeletics watch: bottom-weight the copy like other phone heroes, but keep the
   same bottom band as `.helsinki-hero__container` so meta clears the fold. */
.page-wrapper.case-study-transit.case-theme-watch .helsinki-hero--watch .helsinki-hero__text-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding-bottom: clamp(56px, 7vh, 88px);
  box-sizing: border-box;
  transform: none;
}

.page-wrapper.case-study-transit.case-theme-watch .helsinki-hero--watch .helsinki-hero__copy-block {
  margin-top: auto;
  /* Large watch mockup sits tall — lift headline + meta so they clear the fold. */
  transform: translateY(-140px);
}

.page-wrapper.case-study-transit .phone-frame {
  height: min(88vh, 820px);
  aspect-ratio: 9 / 19.5;
  width: auto;
  max-width: 100%;
  position: relative;
  filter:
    drop-shadow(0 4px 8px rgba(15, 23, 42, 0.1))
    drop-shadow(0 18px 36px rgba(15, 23, 42, 0.18))
    drop-shadow(0 48px 96px rgba(15, 23, 42, 0.22))
    drop-shadow(0 60px 120px rgba(59, 130, 246, 0.14));
}

.page-wrapper.case-study-transit .phone-frame__chassis {
  position: absolute;
  inset: 0;
  border-radius: clamp(40px, 3.8vw, 58px);
  background: linear-gradient(155deg, #1c1c1c 0%, #0a0a0a 28%, #040404 55%, #161616 100%);
  padding: clamp(5px, 0.5vw, 8px);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.4),
    0 0 0 0.5px rgba(15, 23, 42, 0.12);
}

.page-wrapper.case-study-transit .helsinki-hero--phone .phone-frame__chassis {
  transform: translateX(-20px);
}

.page-wrapper.case-study-transit .phone-frame__screen {
  position: absolute;
  inset: clamp(5px, 0.5vw, 8px);
  border-radius: clamp(34px, 3.3vw, 50px);
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.page-wrapper.case-study-transit .phone-frame__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.page-wrapper.case-study-transit .phone-frame__island {
  display: none;
}

/* Agency Support / Pillar uses a desktop dashboard, not a phone mockup.
   Re-use the markup but restyle the frame as a wide desktop surface that
   bleeds off the right edge so the dense table remains readable. */
.page-wrapper.case-study-transit.case-theme-pillar .helsinki-hero--phone .helsinki-hero__inner {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: clamp(20px, 2.6vw, 40px);
}

.page-wrapper.case-study-transit.case-theme-pillar .helsinki-hero--phone .helsinki-hero__media {
  justify-self: stretch;
  align-self: center;
  overflow: visible;
}

.page-wrapper.case-study-transit.case-theme-pillar .phone-frame {
  width: min(1440px, 104vw);
  height: auto;
  aspect-ratio: 16 / 10;
  max-width: none;
  margin-left: 0;
  transform: translateX(clamp(120px, 18vw, 320px));
  filter:
    drop-shadow(0 4px 8px rgba(76, 29, 149, 0.1))
    drop-shadow(0 18px 36px rgba(76, 29, 149, 0.16))
    drop-shadow(0 48px 96px rgba(76, 29, 149, 0.18));
}

.page-wrapper.case-study-transit.case-theme-pillar .phone-frame__chassis {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  border-radius: clamp(14px, 1.25vw, 22px);
  padding: clamp(4px, 0.45vw, 7px);
  background: linear-gradient(145deg, #201735 0%, #100b1d 48%, #2b1163 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(76, 29, 149, 0.14);
  transform: none !important;
}

.page-wrapper.case-study-transit.case-theme-pillar .phone-frame__screen {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  border-radius: clamp(9px, 0.75vw, 14px);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(12, 14, 18, 0.08);
}

.page-wrapper.case-study-transit.case-theme-pillar .phone-frame__screen img {
  object-fit: cover;
  object-position: top left;
}

.page-wrapper.case-study-transit.case-theme-pillar .phone-frame__island {
  display: none;
}

@media (max-width: 880px) {
  /* Match Helsinki mobile hero: air under in-hero nav, single-column copy flow,
     larger headline, stacked meta — applies to LEGO / Pillar / Freeletics. */
  .page-wrapper.case-study-transit .helsinki-hero--phone.helsinki-hero .helsinki-hero__container {
    padding-top: clamp(104px, 15vh, 152px);
  }
  .page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__inner {
    grid-template-columns: 1fr;
    grid-template-areas: "text" "phone";
    align-items: start;
    min-height: 0;
    gap: clamp(28px, 5vh, 44px);
  }
  .page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__text-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(12px, 2.5vh, 22px);
    transform: none;
    padding-left: 0;
    max-width: none;
    grid-template-rows: unset;
  }
  .page-wrapper.case-study-transit.case-theme-watch .helsinki-hero--watch .helsinki-hero__text-col {
    padding-bottom: 0;
  }
  .page-wrapper.case-study-transit.case-theme-watch .helsinki-hero--watch .helsinki-hero__copy-block {
    margin-top: 0;
    transform: translateY(-140px);
  }
  .page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__top-slot {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    align-items: flex-start;
  }
  .page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__copy-block {
    gap: clamp(10px, 1.6vh, 16px);
  }
  .page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__summary {
    margin-bottom: 0;
  }
  .page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__title {
    font-size: clamp(34px, 9.2vw, 52px);
    line-height: 1.05;
    max-width: none;
  }
  .page-wrapper.case-study-transit .helsinki-hero--phone .helsinki-hero__meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(18px, 2.8vh, 26px);
    margin-top: clamp(22px, 3.2vh, 36px);
    max-width: none;
  }
  .page-wrapper.case-study-transit .phone-frame {
    height: auto;
    width: min(260px, 75%);
  }
  .page-wrapper.case-study-transit.case-theme-pillar .phone-frame {
    width: 100%;
    max-width: 100%;
    transform: none;
    margin-left: 0;
  }
  .page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__text-col::before {
    display: none;
  }
  .page-wrapper.case-study-transit.case-theme-lego .helsinki-hero--phone .helsinki-hero__meta {
    grid-template-columns: 1fr;
  }
}

/* ── Lead + gradients ───────────────────────────────────────────── */
.page-wrapper.case-study-transit .helsinki-lead {
  box-sizing: border-box;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(120px, 14vw, 220px) clamp(24px, 4vw, 56px);
  text-align: center;
}

.page-wrapper.case-study-transit .helsinki-lead__statement {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(2.25rem, 5.8vw, 4.5rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  background: var(--cs-hero-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-bottom: 0.08em;
  margin: 0 auto;
  overflow-wrap: break-word;
  text-wrap: balance;
}

@media (max-width: 900px) {
  .page-wrapper.case-study-transit .helsinki-lead__statement {
    font-size: clamp(3.125rem, 14vw, 4.75rem);
    line-height: 1.08;
  }
}

/* Watch lead: body line in ink, accent phrase in gradient. */
.page-wrapper.case-study-transit.case-theme-watch .helsinki-lead__statement {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--ink-1) !important;
}

.page-wrapper.case-study-transit .hero-gradient {
  background: var(--cs-hero-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Layout + fixed TOC ─────────────────────────────────────────── */
.page-wrapper.case-study-transit .case-study {
  padding-top: 64px;
}

.page-wrapper.case-study-transit .cs-layout {
  display: block !important;
  max-width: 856px !important;
  margin: 0 auto !important;
  padding: 0 clamp(24px, 4vw, 56px) !important;
}

.page-wrapper.case-study-transit .cs-content {
  min-width: 0;
}

@media (min-width: 901px) {
  .page-wrapper.case-study-transit .cs-toc {
    position: fixed !important;
    left: calc(max(clamp(32px, 5vw, 80px), (100vw - 1320px) / 2) + clamp(24px, 4vw, 40px)) !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(calc(-50% + 8px)) !important;
    width: 220px !important;
    padding: 0 0 8px 6px !important;
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
    z-index: 5 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
      transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    align-self: auto !important;
  }
  .page-wrapper.case-study-transit .cs-toc.is-visible {
    opacity: 1 !important;
    transform: translateY(-50%) !important;
    pointer-events: auto !important;
  }
}

@media (max-width: 900px) {
  .page-wrapper.case-study-transit .cs-layout {
    padding: 0 clamp(20px, 4vw, 40px) !important;
  }
  .page-wrapper.case-study-transit .cs-toc {
    display: none !important;
  }
}

.page-wrapper.case-study-transit .pillar-compact-toc .cs-toc {
  width: 220px;
}

.page-wrapper.case-study-transit .cs-toc__title {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--ink-3) !important;
  margin-bottom: 8px !important;
}

.page-wrapper.case-study-transit .cs-toc__list {
  gap: 4px !important;
}

.page-wrapper.case-study-transit .cs-toc__link {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  padding: 4px 0 !important;
  line-height: 1.4 !important;
  overflow: visible !important;
  white-space: normal !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--ink-3) !important;
  transition: color var(--dur-2, 220ms) var(--ease, cubic-bezier(0.4, 0, 0.2, 1)) !important;
}

.page-wrapper.case-study-transit .cs-toc__link:hover {
  color: var(--ink-1) !important;
  background: transparent !important;
}

.page-wrapper.case-study-transit .cs-toc__link.is-active {
  color: var(--ink-1) !important;
  font-weight: 500 !important;
  background: transparent !important;
}

.page-wrapper.case-study-transit .cs-toc__dot {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  max-height: 14px !important;
  flex: 0 0 14px !important;
  margin: 0 8px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  box-shadow: none !important;
  background: transparent !important;
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.page-wrapper.case-study-transit .cs-toc__link.is-active .cs-toc__dot {
  opacity: 1;
  animation: csTransitTocDotPulse 2.8s ease-in-out infinite;
}

@keyframes csTransitTocDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.88; }
}

@media (prefers-reduced-motion: reduce) {
  .page-wrapper.case-study-transit .cs-toc__link.is-active .cs-toc__dot {
    animation: none;
  }
}

.page-wrapper.case-study-transit .cs-toc__link.is-done {
  color: var(--ink-3) !important;
}

/* ── Section typography + quotes ──────────────────────────────── */
.page-wrapper.case-study-transit .case-study__section-title,
.page-wrapper.case-study-transit .case-study__impact-title,
.page-wrapper.case-study-transit .helsinki-lead__statement {
  text-wrap: balance;
}

.page-wrapper.case-study-transit .case-study__section-title {
  font-size: clamp(1.95rem, 4.4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  max-width: 720px;
  margin-bottom: 20px;
}

.page-wrapper.case-study-transit .case-study__section--feature .case-study__section-title {
  font-size: clamp(2.75rem, 6.4vw, 4.75rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  font-weight: 600;
  background: var(--cs-hero-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-bottom: 0.08em;
  max-width: 720px;
  margin-bottom: 24px;
}

/* Match Helsinki: section headlines never use italic — <em> was only semantic. */
.page-wrapper.case-study-transit .case-study__section-title em {
  font-style: normal !important;
  font-weight: inherit;
}

.page-wrapper.case-study-transit .case-study__section--feature .case-study__section-title em {
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.page-wrapper.case-study-transit .case-study__section-label {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 18px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.page-wrapper.case-study-transit .case-study__section-text {
  font-size: 16px;
  line-height: 1.65;
}

.page-wrapper.case-study-transit .case-study__section {
  padding: clamp(44px, 6vw, 72px) 0;
  border-bottom: 0 !important;
}

.page-wrapper.case-study-transit .case-study__section--feature {
  padding: clamp(72px, 9vw, 128px) 0;
}

.page-wrapper.case-study-transit .case-study__quote {
  font-size: clamp(24px, 2.9vw, 38px) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  color: var(--ink-1) !important;
  font-style: normal !important;
  border-left: none !important;
  padding-left: 0 !important;
  max-width: 32ch !important;
}

.page-wrapper.case-study-transit .case-study__quote span {
  display: block;
  margin-top: 18px;
  font-style: normal !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--ink-3) !important;
}

.page-wrapper.case-study-transit .case-study__quote .case-study__quote-gradient {
  display: inline;
  margin-top: 0;
  font-style: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}

.page-wrapper.case-study-transit .pills {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 16px !important;
}

.page-wrapper.case-study-transit .pill {
  padding: 6px 12px !important;
  background: #ffffff !important;
  color: var(--ink-1) !important;
  border: none !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  box-shadow:
    0 1px 2px rgba(12, 14, 24, 0.08),
    0 6px 16px -6px rgba(12, 14, 24, 0.16),
    0 18px 36px -12px rgba(12, 14, 24, 0.18) !important;
}

/* ── Impact block ───────────────────────────────────────────────── */
.page-wrapper.case-study-transit .case-study__impact {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  margin-left: 0;
  transform: none;
  padding: clamp(56px, 7vw, 96px) clamp(32px, 4vw, 56px);
  margin-top: clamp(40px, 5vw, 64px);
  margin-bottom: clamp(80px, 9vw, 140px);
  border-radius: clamp(16px, 1.6vw, 24px);
  background: var(--cs-impact-bg);
  color: #fff;
}

.page-wrapper.case-study-transit .case-study__impact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cs-impact-glow1), var(--cs-impact-glow2);
  pointer-events: none;
  z-index: 0;
}

.page-wrapper.case-study-transit .case-study__impact > * {
  position: relative;
  z-index: 1;
}

.page-wrapper.case-study-transit .case-study__impact .case-study__section-label {
  color: rgba(255, 255, 255, 0.58);
}

.page-wrapper.case-study-transit .case-study__impact-title {
  font-size: clamp(1.95rem, 4.4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: #ffffff !important;
}

.page-wrapper.case-study-transit .case-study__impact-text {
  color: rgba(255, 255, 255, 0.72) !important;
}

.page-wrapper.case-study-transit.case-theme-watch .case-study__impact {
  width: 100% !important;
  margin-left: 0 !important;
  transform: none !important;
  padding: clamp(44px, 5vw, 68px) clamp(32px, 4vw, 56px) !important;
}

.page-wrapper.case-study-transit.case-theme-watch .case-study__impact-title {
  font-size: clamp(1.95rem, 4.4vw, 3.15rem) !important;
  line-height: 1.08 !important;
}

.page-wrapper.case-study-transit.case-theme-watch .case-study__impact .stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 900px) {
  /* vw-forward mobile scale so narrow viewports keep headline hierarchy. */
  .page-wrapper.case-study-transit .case-study__section-title {
    font-size: clamp(2.05rem, 6.5vw, 2.95rem);
    max-width: none;
  }
  .page-wrapper.case-study-transit .case-study__section--feature .case-study__section-title {
    font-size: clamp(2.45rem, 8.2vw, 3.6rem);
    max-width: none;
  }
  .page-wrapper.case-study-transit .case-study__quote {
    font-size: clamp(23px, 5.2vw, 36px) !important;
    max-width: none !important;
  }
  .page-wrapper.case-study-transit .case-study__impact-title {
    font-size: clamp(2.45rem, 8.2vw, 3.6rem);
    line-height: 1.1;
    max-width: none;
  }
}

@media (max-width: 760px) {
  .page-wrapper.case-study-transit .case-study__impact {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
  .page-wrapper.case-study-transit.case-theme-watch .case-study__impact {
    width: 100% !important;
    margin-left: 0 !important;
    transform: none !important;
    padding: clamp(48px, 12vw, 72px) clamp(24px, 6vw, 32px) !important;
  }
}

.page-wrapper.case-study-transit .back-link {
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-3) !important;
  padding: 40px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
}

.page-wrapper.case-study-transit .back-link:hover {
  color: var(--ink-1) !important;
}

/* ── Media frames (match Helsinki) ─────────────────────────────── */
.page-wrapper.case-study-transit .cs-media {
  margin: clamp(32px, 4vw, 56px) 0;
  max-width: 720px;
}

.page-wrapper.case-study-transit .cs-media__frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: clamp(12px, 1.2vw, 18px);
  background: var(--bg-2);
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.05),
    0 20px 48px rgba(15, 23, 42, 0.08);
}

.page-wrapper.case-study-transit .cs-media__frame img,
.page-wrapper.case-study-transit .cs-media__frame video {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1);
}

@media (max-width: 820px) {
  .page-wrapper.case-study-transit .nav__inner {
    justify-content: center;
    gap: 14px;
    flex-wrap: nowrap;
  }
  .page-wrapper.case-study-transit .nav__brand-group {
    flex: 1 1 auto;
    min-width: 0;
  }
  .page-wrapper.case-study-transit .nav__brand {
    font-size: 15px;
    white-space: nowrap;
  }
  .page-wrapper.case-study-transit .nav__links {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .page-wrapper.case-study-transit .nav__links li:nth-child(2),
  .page-wrapper.case-study-transit .nav__links li:nth-child(3),
  .page-wrapper.case-study-transit .nav__links li:nth-child(4) {
    display: none;
  }
  .page-wrapper.case-study-transit .nav__links a:not(.nav__cta) {
    font-size: 15px;
    padding: 7px 2px;
  }
  .page-wrapper.case-study-transit .nav__cta {
    font-size: 14px;
    padding: 9px 15px;
  }
}
