/* =========================================================
   service-providers.css
   Page-specific styles. Shared classes (.btn, .eyebrow,
   .container, .why-card, .cta-banner, .site-header,
   .site-footer) live in style.css.
   ========================================================= */

/* =========================================================
   SECTION: sp-hero
   ========================================================= */
.sp-hero {
  position: relative;
  /* Figma hero/banner frame is 639px tall. The white nav is a sticky bar in
     normal flow above it, so the banner starts directly after the header and
     the breadcrumb strip sits at the very top of the banner. */
  min-height: 639px;
  display: flex;
  align-items: center;
  color: var(--color-white);
  overflow: hidden;
  isolation: isolate;
}

.sp-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.sp-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* Partner-page hero overlay — gradient matched to the Figma banner, plus a
   light top scrim (the page has a nav over the hero that Figma's node omits). */
.sp-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 58, 0.3) 0%, rgba(7, 9, 58, 0) 18%),
    linear-gradient(90.65deg, rgba(7, 9, 58, 0.7) 11.67%, rgba(7, 9, 58, 0) 70%),
    linear-gradient(195.76deg, rgba(7, 9, 58, 0) 30%, rgba(7, 9, 58, 0.5) 90%);
}

.sp-breadcrumb {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #e5e9ee;
  padding: 4px 0;
  color: rgba(0, 0, 0, 0.56);
  font-size: 16px;
  z-index: 2;
}

.sp-breadcrumb a {
  color: rgba(0, 0, 0, 0.56);
}

.sp-breadcrumb a:hover {
  color: var(--color-deep-blue);
}

.sp-breadcrumb__sep {
  margin: 0 6px;
}

.sp-breadcrumb__current {
  color: var(--color-black);
}

.sp-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.sp-hero__copy {
  max-width: 662px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Title + lede share a tighter 20px rhythm; the 40px copy gap applies to the
   buttons row (matches the Figma hero spacing). */
.sp-hero__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sp-hero__title {
  font-size: 48px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  color: var(--color-white);
}

.sp-hero__title strong {
  font-weight: 700;
}

.sp-hero__lede {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.sp-hero__actions {
  display: flex;
  gap: 24px;
  align-items: center;
}

/* =========================================================
   SECTION: approach pillars (01 / 02 / 03)
   light-gray panel that overlays the bottom of the hero banner
   ========================================================= */
.approach {
  position: relative;
  z-index: 2;
  margin-top: -80px;          /* pulls the panel up to overlay the hero */
  padding: 0;
  background: transparent;
}

.approach__grid {
  list-style: none;
  margin: 0;
  padding: 48px 80px;
  background: #ebf0f4;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px;
}

.approach-card {
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  position: relative;
}

.approach-card__num {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-link-blue);
  line-height: 1;
  margin-bottom: 16px;
}

.approach-card__title {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-link-blue);
  margin: 0 0 12px;
  line-height: 1.2;
}

/* Service Providers: keep the three approach headings on one line each (QC) */
.approach:not(.approach--si) .approach-card__title {
  font-size: 18px;
  white-space: nowrap;
}

.approach-card__copy {
  font-size: 16px;
  color: var(--color-black);
  margin: 0;
  line-height: 1.5;
}

/* System Integrators: widen the columns (tighter gap + side padding) so
   the longer first-card copy settles onto two lines like the others. */
.approach--si .approach__grid {
  gap: 40px;
  padding: 48px 56px;
}

/* =========================================================
   SECTION: The Opportunity
   ========================================================= */
.opportunity {
  padding: 60px 0 80px;
  background: var(--color-white);
}

/* Eyebrow on the light partner-page sections uses the Primary/Blue
   token (#1c62cb), not the darker primary-blue that style.css applies. */
.opportunity .eyebrow,
.help .eyebrow {
  color: var(--color-link-blue);
}

.opportunity__head {
  display: grid;
  grid-template-columns: 605px 1fr;
  gap: 45px;
  align-items: start;
  margin-bottom: 36px;
}

.opportunity__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.opportunity__title {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-black);
  margin: 0;
}

.opportunity__title strong {
  font-weight: 600;
}

.opportunity__paragraphs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* 20px copy gap + 12px = 32px title→paragraphs, matching the Figma rhythm */
  margin: 12px 0 0;
  font-size: 18px;
  color: var(--color-charcoal);
  line-height: 1.4;
}

.opportunity__paragraphs p {
  margin: 0;
}

.opportunity__photo {
  width: 100%;
  height: 448px;
  border-radius: 8px;
  object-fit: cover;
}

.opportunity__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 20px 0;
  text-align: center;
  margin-bottom: 36px;
}

.opportunity-stat__value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-link-blue);
  line-height: 1.4;
  margin-bottom: 8px;
}

.opportunity-stat__label {
  font-size: 16px;
  color: #50505e;
  line-height: 1.4;
  max-width: 280px;
  display: inline-block;
}

.opportunity__pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.op-pillar {
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 20px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 14px 41.25px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.op-pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
}

.op-pillar__icon {
  width: 40px;
  height: 40px;
  background: var(--color-sky-blue);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.op-pillar__icon svg,
.op-pillar__icon img {
  width: 22px;
  height: 22px;
  display: block;
}

/* Full-chip pillar icon: the PNG already contains the coloured chip. */
.op-pillar__icon--chip {
  background: transparent;
}

.op-pillar__icon--chip img {
  width: 40px;
  height: 40px;
}

.op-pillar h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-black);
  margin: 0;
  line-height: 1.2;
}

.op-pillar p {
  font-size: 18px;
  color: #50505e;
  line-height: 1.4;
  margin: 0;
}

/* =========================================================
   SECTION: The Challenge (tabs + detail card on dark bg)
   ========================================================= */
.challenge {
  position: relative;
  padding: 80px 0;
  color: var(--color-white);
  overflow: hidden;
  isolation: isolate;
}

.challenge__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.challenge__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.challenge__tint {
  position: absolute;
  inset: 0;
  background: rgba(24, 0, 86, 0.4);
  mix-blend-mode: multiply;
}

.challenge__head {
  max-width: 1187px;
  margin-bottom: 56px;
}

.challenge__title {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  margin: 20px 0 32px;
}

.challenge__title strong {
  font-weight: 600;
}

.challenge__copy {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

.challenge__body {
  display: grid;
  grid-template-columns: 415px 1fr;
  gap: 28px;
  align-items: center;
}

.challenge__tabs {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  align-self: center;
  margin: 0;
}

.challenge__tab {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  color: var(--color-white);
  font-size: 18px;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.challenge__tab:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.challenge__tab--active {
  background: var(--color-sky-blue);
  color: var(--color-black);
  font-weight: 600;
  border-color: transparent;
  /* active tab uses wider horizontal padding in the Figma (px-24 vs px-12) */
  padding: 10px 24px;
}

.challenge__detail {
  background: var(--color-white);
  color: var(--color-black);
  border-radius: 12px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 277px;
  grid-template-rows: auto auto;
  /* row gap 24px, column gap 12px (text ↔ image) per Figma */
  gap: 24px 12px;
  min-height: 429px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.challenge__detail.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

.challenge__detail-text {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.challenge__detail-img {
  grid-column: 2;
  grid-row: 1;
  width: 277px;
  height: 272px;
  object-fit: cover;
  border-radius: 8px;
}

.challenge__resolution {
  grid-column: 1 / -1;
  grid-row: 2;
  background: rgba(238, 238, 241, 0.33);
  border-top: 1px solid rgba(0, 0, 0, 0.17);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.challenge__detail-title {
  font-size: 24px;
  font-weight: 500;
  color: var(--color-black);
  margin: 0;
  line-height: 1.2;
}

.challenge__detail-copy {
  font-size: 18px;
  color: var(--color-deep-blue);
  margin: 0;
  line-height: 1.5;
}

.challenge__resolution-tag {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.68px;
  color: rgba(0, 0, 0, 0.47);
  text-transform: uppercase;
}

.challenge__resolution-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-black);
  margin: 0;
  line-height: 1.4;
}

/* =========================================================
   SECTION: How HyperBlox Helps (white bg, image left, accordion right)
   ========================================================= */
.help {
  background: var(--color-white);
  padding: 80px 0;
}

.help__inner {
  display: grid;
  grid-template-columns: 540px 1fr;
  gap: 80px;
  align-items: start;
}

.help__left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.help__title {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  color: var(--color-black);
}

.help__title strong {
  font-weight: 600;
}

.help__lede {
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  color: var(--color-charcoal);
  max-width: 499px;
}

.help__photo {
  margin-top: 24px;
  border-radius: 8px;
  overflow: hidden;
  max-width: 540px;
}

.help__photo img {
  width: 100%;
  height: 429px;
  object-fit: cover;
  display: block;
}

.help__accordion {
  display: flex;
  flex-direction: column;
  /* Tighter stacking — Figma cards have a thin divider rule, no card backgrounds */
  gap: 8px;
}

.help-card {
  border-bottom: 1px solid rgba(0, 0, 0, 0.33);
  background: transparent;
  transition: box-shadow 0.4s ease, padding 0.4s ease;
}

/* Collapsed cards: no shadow, no fill — just dimmed text on a divider line */
.help-card:not(.help-card--open) {
  box-shadow: none;
  background: transparent;
}

.help-card--open {
  background: transparent;
}

.help-card__head {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 20px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  background: transparent;
  border: 0;
  transition: opacity 0.3s ease;
}

.help-card:not(.help-card--open) .help-card__head {
  opacity: 0.63;
}

.help-card:not(.help-card--open):hover .help-card__head {
  opacity: 1;
}

.help-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
}

.help-card__icon svg,
.help-card__icon img {
  width: 28px;
  height: 28px;
  display: block;
}

.help-card__icon--cyan {
  background: var(--color-sky-blue);
}

.help-card__icon--yellow {
  background: var(--color-lime-yellow);
}

.help-card__icon--green {
  background: var(--color-grass-green);
}

.help-card__icon--dark {
  background: var(--color-dark-blue);
}

/* Full-chip icon: the PNG already contains the coloured rounded chip, so the
   image fills the 48px box and no CSS background is applied. */
.help-card__icon--chip {
  background: transparent;
}

.help-card__icon--chip img {
  width: 48px;
  height: 48px;
}

.help-card__title {
  flex: 1;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-black);
}

.help-card--open .help-card__title {
  font-weight: 600;
}

.help-card__caret {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  color: var(--color-black);
  display: inline-block;
  transition: transform 0.3s ease;
}

.help-card--open .help-card__caret {
  transform: rotate(180deg);
}

.help-card__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.help-card__body > * {
  min-height: 0;
  overflow: hidden;
}

.help-card--open .help-card__body {
  grid-template-rows: 1fr;
}

.help-card__body-inner {
  padding: 0 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.45s ease 0.05s, transform 0.45s ease 0.05s;
}

.help-card--open .help-card__body-inner {
  opacity: 1;
  transform: translateY(0);
}

.help-card__body p {
  color: #50505e;
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

/* =========================================================
   SECTION: Revenue Expansion (half dark-bg / half white)
   ========================================================= */
.revenue {
  position: relative;
  padding: 80px 0 100px;
  color: var(--color-white);
  overflow: hidden;
  isolation: isolate;
  background: var(--color-white);
}

/* dark backdrop only covers the top portion — stage cards sit on white below */
.revenue__bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 773px;
  z-index: -1;
}

.revenue__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.revenue__tint {
  position: absolute;
  inset: 0;
  background: rgba(24, 0, 86, 0.55);
  mix-blend-mode: multiply;
}

.revenue__inner {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.revenue__top {
  display: grid;
  grid-template-columns: 609px 526px;
  gap: 105px;
  align-items: start;
}

.revenue__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.revenue__title {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

.revenue__title strong {
  font-weight: 600;
}

.revenue__lede {
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
}

/* stacked revenue pyramid visual */
.revenue-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 526px;
}

.revenue-stack__layer {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(
    to right,
    rgba(133, 133, 133, 0.4),
    rgba(109, 193, 239, 0.4) 50.48%,
    rgba(7, 115, 175, 0.4)
  );
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
}

.revenue-stack__layer--top {
  width: 100%;
  border-radius: 8px;
}

.revenue-stack__layer--mid {
  width: 414px;
  border-radius: 0 0 8px 8px;
  border-top: 0;
}

.revenue-stack__layer--bottom {
  width: 322px;
  border-radius: 0 0 8px 8px;
  border-top: 0;
}

.revenue-stack__head {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 280px;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.3125px;
  text-align: center;
}

.revenue-stack__icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.revenue-stack__icon img {
  width: 28px;
  height: 28px;
  display: block;
}

.revenue-stack__layer p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.3125px;
  color: var(--color-sky-blue);
  white-space: nowrap;
}

/* formula row beneath the stack */
.revenue-formula {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.revenue-formula__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-white);
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}
.revenue-formula__node--wide { min-width: 200px; }

.revenue-formula__bubble {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--color-sky-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.revenue-formula__bubble svg,
.revenue-formula__bubble img {
  width: 22px;
  height: 22px;
  display: block;
}

.revenue-formula__op {
  color: var(--color-sky-blue);
  font-size: 20px;
  font-weight: 300;
}

/* 3 stage cards beneath */
.revenue__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.revenue-card {
  background: var(--color-white);
  color: var(--color-black);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.07);
}

.revenue-card__stage {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-link-blue);
}

.revenue-card__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-black);
  margin: 0;
  line-height: 1.3;
}

.revenue-card__copy {
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-black);
  margin: 0;
  flex: 1;
}

.revenue-card__metric {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-link-blue);
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .approach__grid,
  .opportunity__head,
  .opportunity__stats,
  .opportunity__pillars,
  .challenge__body,
  .help__inner,
  .revenue__top,
  .revenue__cards {
    grid-template-columns: 1fr;
  }

  .help__inner {
    gap: 40px;
  }

  .help__left {
    max-width: 540px;
  }

  .help__photo {
    max-width: 100%;
  }

  .help__photo img {
    height: auto;
    aspect-ratio: 540 / 429;
  }

  .help__title {
    font-size: 32px;
  }

  /* The -80px overlap (desktop panel effect) pulls the grey box up over
     the hero CTAs on mobile; sit it below the hero instead. */
  .approach {
    margin-top: 0;
  }

  .approach-card {
    padding: 0;
  }

  .approach-card + .approach-card {
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 24px;
    margin-top: 24px;
  }

  .opportunity__photo {
    height: auto;
  }

  .challenge__detail {
    grid-template-columns: 1fr;
  }

  /* Reset the desktop grid placements so the text, image and resolution
     stack in a single column instead of staying side-by-side. */
  .challenge__detail-text,
  .challenge__detail-img,
  .challenge__resolution {
    grid-column: auto;
    grid-row: auto;
  }

  .challenge__detail-img {
    width: 100%;
    height: 200px;
  }

  .revenue-stack {
    width: 100%;
  }

  .revenue-stack__layer--mid,
  .revenue-stack__layer--bottom {
    width: 80%;
  }

  .revenue-stack__layer p {
    white-space: normal;
  }

  /* On mobile the section stacks tall; the fixed 773px dark backdrop ended
     partway down. Cover the whole section so cards sit on the dark blue. */
  .revenue__bg {
    height: 100%;
  }

  .sp-hero {
    min-height: auto;
    padding: 160px 0 60px;
  }

  .sp-hero__title {
    font-size: 36px;
  }
}

/* =========================================================
   Phone ≤600px — partner pages (System Integrators / Service
   Providers / Technology Partners). Layout polish to match the
   Figma mobile design; content/text/images untouched.
   ========================================================= */
@media (max-width: 600px) {
  .sp-hero { padding: 132px 0 48px; }
  .sp-hero__title { font-size: 30px; line-height: 1.2; }
  .sp-hero__actions { flex-wrap: wrap; gap: 12px; }

  /* opportunity stats: centered, one under the other (Figma) */
  .opportunity__stats { gap: 28px; }
  .opportunity__stats > li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* section headings scale down on phones */
  .opportunity__title,
  .challenge__title,
  .help__title,
  .revenue__title,
  .approach__title { font-size: 28px; line-height: 1.25; }

  /* Revenue-formula diagram: let the node row wrap instead of overflowing. */
  .revenue-formula {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 8px;
  }
  .revenue-formula__node { white-space: normal; }
  .revenue-formula__node--wide { min-width: 0; }
  .revenue-stack__head { width: 100%; max-width: 280px; }
}
