/* Case Hero block — case-study page header. Layout ref: belkins.io case hero;
   all visuals from Sunrise tokens. KPI type treatment mirrors .sun-ts__kpi-*. */
.sun-case-hero {
  box-sizing: border-box;
  background: var(--sun-base);
  /* Top padding must clear BOTH the fixed header and the breadcrumb, which is
     absolutely positioned over the top of the first section (see breadcrumbs.css).
     The breadcrumb is ~141px tall (calc(73px header + 24px) top padding + line +
     24px), so the "Case Study" pill starts below it instead of overlapping. */
  padding: clamp(148px, 16vh, 172px) 0 clamp(32px, 4vw, 56px);
}
.sun-case-hero *,
.sun-case-hero *::before,
.sun-case-hero *::after { box-sizing: border-box; }

.sun-case-hero__inner {
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
}

/* Top row — badge left, client logo right */
.sun-case-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.sun-case-hero__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--sun-border);
  border-radius: var(--sun-radius-button);
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: var(--wp--preset--font-size--sm);
  line-height: 1.4286;
  color: var(--sun-primary);
  background: var(--sun-surface);
}
/* Same logo box as the reference slider (.sun-ts__logo): whitespace trimmed
   (sunrise_logo_image), small files scaled UP to fill the box, right on desktop,
   left-aligned under the badge on mobile. */
.sun-case-hero__logo {
  flex: 0 0 auto;
  width: 160px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.sun-case-hero__logo-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: right center;
}

.sun-case-hero__title {
  margin: 0 0 16px;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: var(--wp--preset--font-size--display-xl);   /* H1 · 56 fluid */
  line-height: 1.15;
  letter-spacing: -0.56px;
  color: var(--sun-secondary);
  max-width: 24ch;
  overflow-wrap: break-word;
}

.sun-case-hero__intro {
  margin: 0;
  max-width: 62ch;
  font-family: var(--wp--preset--font-family--brand);
  font-size: var(--wp--preset--font-size--lg);           /* 18 */
  line-height: 1.5;
  color: var(--sun-bluegrey);
}

/* KPI row — .sun-ts__kpi type treatment, laid out horizontally with
   vertical end-dot dividers between figures. */
.sun-case-hero__kpis {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(28px, 4vw, 48px);
}
.sun-case-hero__kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sun-case-hero__kpi-value {
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -0.48px;
  color: var(--sun-primary);                             /* #ff710a */
}
.sun-case-hero__kpi-label {
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  color: var(--sun-bluegrey);                            /* #4f5563 */
}
/* Vertical divider with round end-dots (testimonials/footer idiom). */
.sun-case-hero__kpi-divider {
  position: relative;
  display: block;
  width: 1px;
  align-self: stretch;
  background: var(--sun-border);                         /* #efefef */
}
.sun-case-hero__kpi-divider::before,
.sun-case-hero__kpi-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sun-muted);                          /* #b6bac4 */
  transform: translate(-50%, -50%);
}
.sun-case-hero__kpi-divider::after { top: 100%; }

/* Optional hero image — full container width, editorial crop */
.sun-case-hero__image { margin-top: clamp(32px, 4vw, 48px); }
.sun-case-hero__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  border-radius: 24px;
}

@media (max-width: 700px) {
  .sun-case-hero__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .sun-case-hero__logo { justify-content: flex-start; height: 56px; }
  .sun-case-hero__logo-img { object-position: left center; }
  /* Stack the KPIs into a single column before the two-column row gets cramped
     enough to wrap a label — and drop the vertical divider, which only makes
     sense between side-by-side figures (it dangled next to the wrapped KPI). */
  .sun-case-hero__kpis {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .sun-case-hero__kpi-divider { display: none; }
  .sun-case-hero__kpi-value { font-size: 36px; line-height: 44px; }
}
